Mitsubishi Electric MELSEC Q Series Programming Manual page 53

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

4 ST PROGRAM EXPRESSIONS
4 - 13
TRUE
= Selection 1?
FALSE
TRUE
= Selection 2?
FALSE
TRUE
= Selection n?
Statement n+1
[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;
Statement 2
Statement n
Statement 1
*)
*)
*)
*)
*)
*)
*)
4 - 13

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents