Mitsubishi Electric MELSEC Q Series Programming Manual page 39

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

Advertisement

3 HANDLING OF CHARACTERS AND NUMERIC VALUES IN ST PROGRAMS
3 - 15
(a) Index modification
Index modification is indirect address specification using the index register.
When the index register is used, the device number is (directly specified
device number) + (index register contents).
[Description example]
(* The target D device number is changed for the numeric value in Z2
(* When 1 is in Z2, the target device number changes from D(0+1) to D1. *)
Z2 := 1;
D0Z2 := K0;
D1
(b) Bit specification
By specifying the bit No. of a word device, it can be used as a bit device.
D0.1
Word device
[Description example]
D0.0 = TRUE;
W0.F = FALSE;
(c) Digit specification
By specifying the 4 bits, 8 bits, 12 bits, etc. of a bit device as a single digit,
word data or double word data can be handled by the bit device.
K4X0
Digit specification
[Description example]
K4X0 := D0;
Wtest := K1X0;
Dwtest := K5X0;
(* 1 is assigned to index register Z2 *)
(* K0 is assigned to D0Z2
Bit No.
(* Bit 0 of D0 device is turned ON.
(* Bit 15 of W0 device is turned OFF. *)
Bit device
(* 16 bits are used from X0 device as integer
type (INT) and D0 is assigned. *)
(* 4 bits are assigned to word type label
(* 20 bits are assigned to double word type
label Dwtest from X0 device. *)
*)
*)
Wtest from X0 device. *)
3 - 15
*)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents