4 - 23 4 - 23
4 ST PROGRAM EXPRESSIONS
(b) CASE conditional statement
Unit
(
µs)
Number of Steps
Operation Processing
Time (Q25H)
Operation Processing
Time (Q00J)
ST program
CASE D0 OF
1, 2:
D0 : = 100;
3..10:
D1 : = D1 + 1;
END_CASE;
29 5.004
36.1
List program
LD= D0 K1
AND= D0 K2
MOV K100
D0
LD>= D0 K3
AND<= D0
K10
INC D1
16 0.64
4.6
[Remarks]
Since CJ, JMP, etc. need not be executed in a list unlike ST, only the times for the compared areas are
measured.
The time has been calculated on the assumption that the compared areas are conducting.
(c) FOR...DO statement
Unit
(
µs)
Number of Steps
Operation Processing
Time (Q25H)
Operation Processing
Time (Q00J)
ST program
FOR D0 : = 0 T0 10 BY 1 D0
D1 : = D1 + 1;
END_FOR;
16
Initialization: 0.134
Repeat: 3.308
In this case, the
repeated area operates
10 times.
Initialization: 0.9
Repeat: 24.0
List program
FOR K10
LD SM400
INC D1
NEXT
6 2.574 21.6
[Remarks]
The above operation processing time is taken by the number of repeat times.
In a list, only the number of repeat times can be specified. In ST, repeat and other operation processing can be
performed by condition comparison.
Summary of Contents for MELSEC L series
Page 1: ...Programming Manual Structured Text ...
Page 2: ......
Page 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Page 297: ......