MITSUBISHI ELECTRIC T-60 User Manual

Page 94

Advertising
background image

The -OM1 Option limits you to
reading or writing a maximum
of 32 words of data (512 bits)
during one read or write
operation. For example, you
are restricted to accessing 32
registers in the DM area with
one CALL PLCREAD or CALL
PLCWRITE command.

Addressing bits in the -OM1 Option is a little different than in the rest of the
PLC interfaces. The -OM1 Option utilizes the Host Link bit

addressing scheme which combines the WORD address and the BIT address
into one number. For the IR, SR, LR, HR, and AR areas data is accessed in
this fashion. To read a bit at word 5 bit 3, will require an address of 503,

word 11 bit 13 requires the address of 1113. For example, to access the IR
data area, word 5, bits 6 through 9, use the following command

CALL PLCREAD(0, 2, 506, 4, A)

This command accesses word 5, bit 6 and reads four bits placing the result
in variable A. Note that the four bits will be aligned in variable A with bit

506 in the 2^0 location 507 in the 2^1 location and so on. This makes bit
testing within a BASIC program very simple.

Writes to individual bit locations in the Omron PLC is performed via a read
modify write process. EXTREME care should be taken when using data bits

which may be updated during a scan. Host Link only allows data to be read
and written to on WORD boundaries. This forces the -OM1 Option to read

surrounding bits to obtain an entire word, then sets or clears the desired bits
and write the recomposed words back to the PLC. If the data the -OM1
Option reads surrounding the operation is updated during a scan,

unpredictable results may occur. Writing to outputs may be something to

avoid if your program does not continually update them. Reads do not suffer
from this problem.

READ

WRITE

Cmd

Memory Type

Range

Data / Response

1

Status Word

*

1 word

2

IR & SR

*

1 word per 16 bits

3

IR & SR

*

1 word per 16 bits

4

DM

*

1 word per register

5

N/A

*

N/A

6

N/A

*

N/A

7

N/A

*

N/A

8

N/A

*

N/A

9

LR

*

1 word per 16 bits

10

HR

*

1 word per 16 bits

11

AR

*

1 word per 16 bits

PLC Dependent

Table 12

Cross Reference

-OM1 Memory Type Vs. Call

PLCREAD / PLCWRITE

T-60 Operator's Manual

86

Advertising