Clear (CLR)

The CLR instruction clears all the bits of the Dest.
Available Languages
Ladder Diagram
CLR_LD_avail_v31
Function Block
This instruction is not available in function block.
Structured Text
This instruction is not available in structured text.
Operands
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
LINT
USINT
UINT
UDINT
ULINT
REAL
LREAL
LTIME
TIME
TIME32
LDT
DT
tag
Tag to clear.
TIP: See Time and date data types for a complete description of Relative Time (LTIME, TIME, and TIME32) and Absolute Time (LDT and DT) data types.
Affects Math Status Flags
Conditional
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
CLR_LD_ex_v31
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal