Clear (CLR)
The CLR instruction clears all the bits of the Dest.
Available Languages
Ladder Diagram
FactoryTalk Design Studio
DSL - Ladder DiagramOperands
IMPORTANT:
Unexpected operation may occur if:
- Output tag operands are overwritten
- Members of a structure operand are overwritten
- Except when specified, structure operands are shared by multiple instructions.
The CLR instruction supports elementary data types. See Elementary data types.
Ladder Diagram
Operand | Data Type | Format | Description |
---|---|---|---|
Dest | SINT INT DINT REAL | tag | Tag to clear. |
Affects Math Status Flags
Conditional. See Math status flags.
Major/Minor Faults
None specific to this instruction. See Index through arrays for array-indexing faults.
Execution
Ladder Diagram
Condition/State | Action Taken |
---|---|
Prescan | N/A |
Rung-condition-in is false | Set Rung-condition-out to Rung-condition-in. |
Rung-condition-in is true | Set Rung-condition-out to Rung-condition-in. Clear Dest to 0. |
Postscan | N/A |
Example
Ladder Diagram
Provide Feedback