4 - 13 4 - 13
4 ST PROGRAM EXPRESSIONS
TRUE
TRUE
FALSE
TRUE
FALSE
Statement 1
Statement 2
Statement n+1
Statement n
= Selection 1?
= Selection 2?
= Selection n?
[Description example]
(a) When actual device is used in integer expression
CASE D0 OF
1:
D1 : = 0; (* If D0 is 1, 0 is assigned to D1.
*)
2, 3:
D1 : = 1; (* If D0 is 2 or 3, 1 is assigned to D1.
*)
4..6:
D1 : = 2; (* If D0 is any of 4 to 6, 2 is assigned to D1.
*)
ELSE
D1 : = 3; (* If D0 is other than the above, 3 is assigned to D1.
*)
END_CASE;
(b) When operation result is used in integer expression
CASE D0*D1 OF
1:
D1 : = 0; (* If D0*D1 is 1, 0 is assigned to D1.
*)
2, 3:
D1 : = 1; (* If D0*D1 is 2 or 3, 1 is assigned to D1.
*)
4..6:
D1 : = 2; (* If D0*D1 is any of 4 to 6, 2 is assigned to D1.
*)
ELSE
D1 : = 3; (* If D0*D1 is other than the above, 3 is assigned to D1. *)
END_CASE;
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......