This commit is contained in:
Tiago Batista Cardoso
2025-11-14 11:13:23 +01:00
commit de544a9632
21 changed files with 2089 additions and 0 deletions

View 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