External device setup manual – IDEC High Performance Series User Manual

Page 236

Advertising
background image

Chapter 2

218

External Device Setup Manual

With the MICRO/I, reference device values are specified in units of 16-bit devices. Therefore, to specify a value for
DINT, REAL, TIMER (a 32-bit device), or PRE and ACC elements in the CONTROL structure, it is necessary to dou-
ble the reference device value in the PLC before specifying it.

Example 1:

If 1 is specified as the reference device value for DINT[0], the upper word for DINT[0] is used. To use DINT[1],
specify a reference device value of 2.

Script
[LM 200] = OFFSET(tag[0],[LDR 0]);
Operation description
When the value of LDR0 is 2, the value of tag[1], the device 2 words from tag[0], is read and stored in LDR200.

Example 2:

If 1 is specified as the reference device value for TIMER[0].PRE, the upper word for TIMER[0].PRE is used. To
use TIMER[1].PRE, specify a reference device value of 2.

Script
[LM 200] = OFFSET(tag[0].PRE,[LDR 0]);
Operation description
When the value of LDR0 is 2, the value of tag[1].PRE, the device 2 words from tag[0].PRE, is read and stored in
LDR200.

Read

0000

0002

LDR0

+2

1234

1234

LDR200

tag[1]

tag[0]

Read

0000

0002

LDR0

+2

1234

1234

LDR200

tag[1].PRE

tag[0].PRE

Advertising
This manual is related to the following products: