Reset (RES)

The RES instruction resets a TIMER, COUNTER, or CONTROL structure.
When true, the RES instruction clears these elements:
When using a RES instruction for a:
The instruction clears:
TIMER
.ACC value to 0
control status bits to false
COUNTER
.ACC value to 0
control status bits to false
CONTROL
.POS value to 0
control status bits to false
Available Languages
Ladder Diagram
Ladder Diagram_Reset (RES)_v1
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.
Ladder Diagram
Operand
Data Type
Format
Description
Structure
TIMER
CONTROL
COUNTER
Tag
Structure to reset
Affects Math Status Flags
No
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.
Reset the specified structure.
Postscan
N/A
Example
Ladder Diagram
FTStudio-RES-LD-EX-V1
Reset Example
In the preceding example:
when limit_switch_8 is enabled, reset counter_4
when limit_switch_5 is enabled, reset Timer_1
when limit_switch_6 is enabled, reset control_1
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.