Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
394 B
2
Indexable
Never
FUNCTION_block PLC_PRG
VAR_INPUT
	OpenValve: BOOL;
 	CloseValve: BOOL;
	IsOpen: BOOL;
  	IsClosed: BOOL;
END_VAR

VAR
  ValveState: INT := 0;
  Open: BOOL;
  Close: BOOL;
  Timer: TON;
  
  T1: TIME := T#5S;
  T2: TIME := T#5S;
  
  _T1: INT := 5;
  _T2: INT := 5;

END_VAR

VAR_OUTPUT
	ErrorMode: BOOL;
	IdleMode: BOOL;
	ManualMode: BOOL;
	SlowTurning: BOOL;
END_VAR