Vai al contenuto

Usage Example of The Control Flags

Following are some example of control flags usage, assuming the SFC POU is named Main:
  • Hold (freeze):
Main_HOLD_SFC := TRUE;
  • Restart from hold state:
Main_HOLD_SFC := FALSE;
  • Restart form initial state of a SFC block in hold state:
Main_RESET_SFC := TRUE; Main_HOLD_SFC := FALSE;
  • Reset to initial state and instant restart of SFC block:
Main_RESET_SFC := TRUE; (* automatic reset from compiler *).