Call plcread statement – MITSUBISHI ELECTRIC T-60 User Manual

Page 71

Advertising
background image

CALL PLCREAD Statement

Purpose:

This command is used to read the value(s) in a PLC’s registers, the status of

bits, or any other accessible memory location within the PLC. Refer to the
-PL5 and -SL5 for information on how to use this command with the

Allen-Bradley PLC-5 and SLC-500 processors.

Syntax:

CALL PLCREAD(id,cmd,start address,# ofregisters/bits,variable/array)

Comments:

id

specifies the address of the PLC from which you wish to read data. This

number is usually 1 when interfacing to one PLC.

cmd

specifies the read operation you wish to perform. See the table below for

the read operation possibilities.

start address

is the starting address of the bit(s) or register(s) you are

interested in reading. In the case of the PLC interfaces implemented so far,

this does not include a data type specifier (%, $, !, etc.)

MOD

GE9

TI3

TI5

OM1

PL2

Cmd

Function

Typical Data/Response*

1

Read PLC CPU Status

2 words; ID, run status

2

Read Discrete Input Status

1 word per 16 bits

3

Read Discrete Output Status

1 word per 16 bits

4

Read Register

1 word per register

5

Read Input Register

1 word per register

6

Quick Status

1 word with 8 bits

7

Read Analog Inputs

1 word per register

8

Read Analog Outputs

1 word per register

9

Read Discrete Internals/Coils/Relays

1 word per 16 bits

10

Read Holding Relays

1 word per 16 bits

11

Read Auxilary Relays

1 word per 16 bits

*The Data/Response format described here is typical. Refer to the section regarding your specific interface for

Table 5

Read Operation Options

PLC Interface Commands CALL PLCREAD Statement

63

Advertising