Dual Channel Analog Input (DCA - integer version) and (DCAF - floating point version)
This instruction applies to the Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380, and GuardLogix 5580 controllers.
The Dual Channel Analog Input instruction monitors two analog input channels originating from an analog input module. Output 1 turns on when both analog inputs, Channel A and Channel B, are within the Tolerance and the High and Low Limit settings, and correct reset actions have been performed.
IMPORTANT:
Do not use the DCA instruction with the Guard I/O analog module's dual channel feature. Set Guard I/O module inputs to single-channel when using the DCA or DCAF instruction.
Available Languages
Ladder Diagram
Function Block
This instruction is not available in function block.
Structured Text
This instruction is not available in structured text.
Operands
IMPORTANT:
Do not use the same tag name for more than one instruction in the same program. Do not write to any instruction output tag under any circumstances.
WARNING:
If you change instruction parameters while in Run mode, you must accept the pending edits and cycle the controller mode from Program to Run for the changes to take effect.
The following table provides the parameters that are used to configure the instruction. These parameters cannot be changed at runtime.
Parameter | Data Type | Format | Description |
---|---|---|---|
(Integer) DCA | DCA_INPUT | tag | This parameter is a backing tag that maintains important execution information for each usage of this instruction. ATTENTION: To avoid unexpected operation do not reuse this backing tag and its members. Do not write to any of the tag members anywhere else in the program. |
(Real) DCAF | DCAF_INPUT | tag | |
Restart Type | BOOL | name | This parameter configures Output 1 for either Manual or Automatic Restart. Manual (0) - When both Channel A and Channel B are within the Tolerance setting and within the High and Low Limit settings, a transition of the Reset input from OFF (0) to ON (1) is required to energize Output 1.Automatic (1) - Output 1 is energized 50 ms after both Channel A and Channel B are within the Tolerance setting and within the High and Low Limit settings. ATTENTION: Automatic Restart may be used only in application situations where you can prove that no unsafe conditions can occur as a result of its use, or the reset function is being performed elsewhere in the safety circuit (for example, output function). |
Cold Start Type | BOOL | name | This parameter specifies the Output 1 behavior when applying controller power or mode change to Run. Manual (0) - Output 1 is not energized when the Input Status becomes valid or when the Input Status fault is cleared.Automatic (1) - When both Channel A and Channel B are within the Tolerance setting and within the High and Low Limit settings, Output 1 is energized immediately when the Input Status becomes valid or when the Input Status fault is cleared. |
The following table explains instruction inputs. The inputs may be field device signals from input devices or derived from user logic.
Operand | Data Type | Format | Description |
---|---|---|---|
Channel A | DINT (DCA) REAL (DCAF) | tag | This input is one of the two safety analog inputs to the instruction. |
Channel B | DINT (DCA) REAL (DCAF) | tag | This input is one of the two safety analog inputs to the instruction. |
Discrepancy Time (ms) | DINT | immediate tag | The amount of time that the Channel A and Channel B inputs are allowed to be out of tolerance before an instruction fault is generated. The valid range is 5...3000 ms. A setting of 0 disables the timer. The value of 0 can only be applied via the use of a tag. Important: Values from 1... 4 are reset to the minimum value (5). Values greater than 3000 are reset to the maximum value (3000). |
High Limit | DINT (DCA) REAL (DCAF) | tag immediate | The HTP Output turns ON when the Channel A or Channel B input exceeds this value. |
Low Limit | DINT (DCA) REAL (DCAF) | tag immediate | The LTP Output turns ON when the Channel A or Channel B input drops below this value. |
Input Status | BOOL | tag immediate | If instruction inputs are from a safety I/O module, this is the status from the I/O module or modules (Connection Status or Combined Status). If instruction inputs are derived from internal logic, it is the application programmer’s responsibility to determine the conditions. ON (1): The inputs to this instruction are valid. OFF (0): The inputs to this instruction are invalid. |
Reset 1 | BOOL | tag | This input clears instruction and circuit faults provided the fault condition is not present. OFF (0) -> ON (1): The FP (Fault Present) and Fault Code outputs are reset. |
Tolerance | DINT (DCA) REAL (DCAF) | tag immediate | The number of counts that Channel A and Channel B can differ by without affecting Output 1. |
1
ISO 13849-1 stipulates instruction reset functions must occur on falling edge signals. To comply with ISO 13849-1 requirements, add this logic immediately before this instruction. Rename the Reset_Signal tag in this example to reset your signal tag name. Then use the OSF Instruction Bit tag as the reset source for the instruction. The following table explains instruction outputs. The outputs may be used to drive external tags (safety output modules) or internal tags for use in other logic routines.
Operand | Data Type | Description |
---|---|---|
Output 1 (O1) | BOOL | This output is energized when the input conditions have been satisfied. The output becomes de-energized when:
|
High Trip Point (HTP) | BOOL | ON (1): The Channel A or Channel B input exceeds the High Limit input value. OFF (0): The Channel A or Channel B input is less than or equal to the High Limit input value. |
Low Trip Point (LTP) | BOOL | ON (1): The Channel A or Channel B input drops below the Low Limit input value. OFF (0): The Channel A or Channel B input is greater than or equal to the Low Limit input value. |
01 On Time | DINT | This output represents the length of time in hours that Output 1 has been ON. |
Fault Present (FP) | BOOL | ON (1): A fault is present in the instruction. OFF (0): The instruction is operating normally. |
Fault Code | DINT | This output indicates the type of fault that occurred. For a list of fault codes, see Fault Codes. This parameter is not safety-related. |
Diagnostic Code | DINT | This output indicates the diagnostic status of the instruction. For a list of diagnostic codes, see Diagnostic Codes. This parameter is not safety-related. |
Revision | Constant | This output contains the firmware revision level of the instruction. |
IMPORTANT:
Do not write to any instruction output tag under any circumstance.
Operation
Normal Operation
The timing diagram illustrates normal operation with Restart Type configured for Manual and Cold Start Type configured for Manual. At (A), Output 1 is energized because the Channel A and Channel B inputs are within the Tolerance setting and within the High and Low Limits settings when the reset is triggered. At (B), Output 1 is de-energized because the Channel A input has gone below the Low Limit. Output 1 is energized at (C) when a reset is triggered because Channel A is now within the Tolerance and Limit settings.
Normal Operation (Manual Restart, Manual Cold Start)
Normal Operation (Manual Restart, Automatic Cold Start)
The timing diagram illustrates normal operation with Restart Type configured for Manual and Cold Start Type configured for Automatic. When the Cold Start Type is Automatic, Output 1 is energized as soon as the Input Status input becomes valid [OFF (0) to ON (1) transition] for the first time, such as when power is applied to a PLC controller.
At (A), Output 1 is energized immediately after the Input status becomes valid while the Channel A and Channel B inputs are within Tolerance and within the High and Low Limits. At (B), Output 1 is de-energized when the Channel B input falls below the Low Limit. Output 1 cannot be energized again until (C), when a reset is triggered while the Channel A and Channel B inputs are within the Tolerance and Limit settings.
Normal Operation (Automatic Restart, Manual Cold Start)
The timing diagram illustrates normal operation with Automatic Restart and Manual Cold Start. At (A), Output 1 is energized when a reset is triggered while the Channel A and Channel B inputs are within Tolerance and within the High and Low Limits. Output 1 is de-energized at (B) when the Channel B input drops below the Low Limit. Output 1 is automatically energized again at (C), 50 ms after the Channel B input is back within the Tolerance and Limit settings.
Normal Operation (Automatic Restart, Automatic Cold Start)
The timing diagram illustrates normal operation with Automatic Restart and Automatic Cold Start. When the Cold Start Type is Automatic, Output 1 is energized as soon as the Input Status input becomes valid [OFF (0) to ON (1) transition] for the first time, such as when power is applied to a PLC controller. Channel A and Channel B must be within Tolerance and within the High and Low Limits for Output 1 to be energized.
At (A), Output 1 is energized when the Input Status input becomes valid while the Channel A and Channel B inputs are within Tolerance and within the High and Low Limits. At (B), Output 1 is de-energized when the Channel A and Channel B inputs go above the High Limit. Output 1 is automatically energized at (C), 50 ms after the Channel A and Channel B inputs fall back within the Limits while remaining within Tolerance.
Input Status Fault
Input Status Fault (Manual Restart, Manual Cold Start)
The timing diagram shows a fault occurring when the Input Status input becomes invalid. Output 1 is energized at (A), when a reset is triggered and the Channel A and Channel B inputs are within the Tolerance and the High and Low Limits. A fault occurs at (B) because the Input Status input becomes invalid, which de-energizes Output 1. The fault cannot be cleared at (C) because the Input Status is still invalid. At (D), Input Status is valid, the fault is cleared, and Output 1 is energized when the reset is triggered.
Input Status Fault (Manual Restart, Automatic Cold Start)
The timing diagram illustrates a fault occurring when the Input Status input becomes invalid. Output 1 is energized at (A), when the Input Status becomes valid because the Cold Start Type is Automatic and the Channel A and Channel B inputs are within Tolerance and within the High and Low Limits. A fault occurs at (B) when the Input Status becomes invalid, which de-energizes Output 1. The fault cannot be cleared at (C) because the Input Status is still invalid. At (D), Input Status is valid, the fault is cleared, and Output 1 is energized when the reset is triggered.
Discrepancy Fault (Manual Restart)
The timing diagram illustrates a fault occurring when the difference between Channel A and Channel B exceeds the Tolerance for longer than the Discrepancy Time. At (A), Channel A and Channel B go out of Tolerance and the discrepancy timer starts. At (B), a discrepancy fault occurs because Channel A and Channel B have been out of Tolerance for at least 250 ms, the configured Discrepancy Time. At (C), the fault is not cleared because the difference between the Channel A and Channel B inputs is still greater than the Tolerance. The fault is cleared and Output 1 is energized at (D) when a reset is triggered and the difference between the Channel A and Channel B inputs falls within the Tolerance. At (E), the difference between Channel A and Channel B again goes beyond the Tolerance and the discrepancy timer starts. Another discrepancy fault occurs at (F) when the Discrepancy Time is exceeded.
False Rung State Behavior
When the instruction is executed on a false rung, all instruction outputs are set to 0.
Fault Codes and Corrective Actions
The fault codes are listed in hexadecimal format followed by decimal format.
Fault Code | Description | Corrective Action |
---|---|---|
00 | No fault. | None. |
16#20 32 | The Input Status input transitioned from ON (1) to OFF (0) while the instruction was executing. |
|
16#4050 16464 | The difference between Channel A and Channel B input values exceeded the Tolerance setting for longer than the Discrepancy Time. |
|
Diagnostic Codes and Corrective Actions
The diagnostic codes are listed in hexadecimal format followed by decimal format.
Fault Code | Description | Corrective Action |
---|---|---|
00 | No fault. | None. |
16#05 5 | The Reset input is held ON (1). | Set the Reset input to OFF (0). |
16#20 32 | The Input Status input was OFF (0) when the instruction started. | Check the I/O module connection or the internal logic used to source input status. |
16#4050 16464 | At startup, the difference between Channel A and Channel B input values is greater than the Tolerance setting. | Verify that Channel A and Channel B inputs are valid and adjust the tolerance setting appropriately for the application. |
16#4051 16465 | The Low Limit setting is greater than the High Limit setting. | Adjust the settings so that the Low Limit setting is less than the High Limit setting. |
16#4052 16466 | The Channel A input value is less than the Low Limit setting. | Verify that the Channel A and Channel B inputs are valid and adjust the High and Low Limit settings appropriately for the application. |
16#4053 16467 | The Channel B input value is less than the Low Limit setting. | Verify that the Channel A and Channel B inputs are valid and adjust the High and Low Limit settings appropriately for the application. |
16#4054 16468 | The Channel A input value is greater than the High Limit setting. | Verify that the Channel A and Channel B inputs are valid and adjust the High and Low Limit settings appropriately for the application. |
16#4055 16469 | The Channel B input value is greater than the High Limit setting. | Verify that the Channel A and Channel B inputs are valid and adjust the High and Low Limit settings appropriately for the application. |
16#4056 16470 | The Tolerance input value is a negative number. | Change the Tolerance input value to a positive number. |
16#4057 16471 | The difference between Channel A and Channel B input values is greater than the Tolerance setting. | Verify that Channel A and Channel B inputs are valid and adjust the Tolerance setting appropriately for the application. |
16#4058 16472 | The Discrepancy Time setting is not within the allowable range and is being forced to the minimum or maximum value. | Adjust the Discrepancy Time setting to within the allowable range of 5...3000 ms. |
Affects Math Status Flags
No
Major / Minor Faults
None. See Common Attributes for operand-related faults.
Execution
Condition/State | Action Taken |
---|---|
Prescan | Same as Rung-condition-in is false. |
Rung-condition-in is false | The .O1, .HTP, .LTP and .FP are cleared to false. The Diagnostic Code and Fault Code outputs are set to 0 |
Rung-condition-in is true | The instruction executes as described in the Normal Operation section. |
Postscan | Same as Rung-condition-in is false. |
Provide Feedback