yo
This commit is contained in:
23
motor/build/generated_plc.st
Normal file
23
motor/build/generated_plc.st
Normal file
@@ -0,0 +1,23 @@
|
||||
PROGRAM motor
|
||||
VAR
|
||||
START : BOOL;
|
||||
STOP : BOOL;
|
||||
DELAY : TIME := T#100ms;
|
||||
RUNNING : BOOL;
|
||||
RS0 : RS;
|
||||
TON0 : TON;
|
||||
END_VAR
|
||||
|
||||
TON0(IN := START, PT := DELAY);
|
||||
RS0(S := TON0.Q, R1 := STOP);
|
||||
RUNNING := RS0.Q1;
|
||||
END_PROGRAM
|
||||
|
||||
|
||||
CONFIGURATION Config0
|
||||
|
||||
RESOURCE Res0 ON PLC
|
||||
TASK task0(INTERVAL := T#20ms,PRIORITY := 0);
|
||||
PROGRAM instance0 WITH task0 : motor;
|
||||
END_RESOURCE
|
||||
END_CONFIGURATION
|
||||
Reference in New Issue
Block a user