File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
CONFIGURATION DefaultCfg
2
2
VAR_GLOBAL
3
- Start_Stop AT %IX0.0: BOOL; (* This is a comment *)
3
+ Start_Stop AT %IX0.0 : BOOL; (* This is a comment *)
4
4
END_VAR
5
- TASK NewTask (INTERVAL := T#20ms );
5
+ TASK NewTask (INTERVAL := T#20MS );
6
6
PROGRAM Main WITH NewTask : PLC_PRG;
7
7
END_CONFIGURATION
8
8
9
9
PROGRAM demo
10
10
VAR_EXTERNAL
11
- Start_Stop: BOOL;
11
+ Start_Stop : BOOL;
12
12
END_VAR
13
13
VAR
14
14
a : REAL; // Another comment
15
- todTest: TIME_OF_DAY := TOD#12: 55;
15
+ todTest : TIME_OF_DAY := TOD#12 : 55;
16
16
END_VAR
17
17
a := csq(12.5); 16#FAC0 2#1001_0110
18
18
IF a > REAL#100 THEN
@@ -23,13 +23,14 @@ END_PROGRAM;
23
23
FUNCTION_BLOCK PRIVATE MyName EXTENDS AnotherName
24
24
25
25
END_FUNCTION_BLOCK
26
- /* Get a square of the circle */
26
+ /* Get a square of the circle */
27
27
FUNCTION csq : REAL
28
28
VAR_INPUT
29
- r: REAL;
29
+ r : REAL;
30
30
END_VAR
31
31
VAR CONSTANT
32
- c_pi: REAL := 3.14;
32
+ c_pi : REAL := 3.14;
33
33
END_VAR
34
+ TON(IN := TRUE, PT := T#10S);
34
35
csq := ABS(c_pi * (r * 2));
35
36
END_FUNCTION
You can’t perform that action at this time.
0 commit comments