MITSUBISHI ELECTRIC T-60 User Manual

Page 84

Advertising
background image

Command Variations:

The CALL PLCREAD and CALL PLCWRITE commands for the PLC-5 are
significantly different from the other PLC’s described here. The following
descriptions apply to the -PL5 Option only:

CALL PLCREAD Statement

Syntax:

CALL PLCREAD(id, file, address, [bit], count, variable/array )

Comments:

This command is specific to the -PL5 Interface Option.

id

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

This number is usually 1 when interfacing to one PLC.

file

specifies the file number that you wish to access.

address

is the address of the first element to access in the above file.

[bit]

is an optional parameter which specifies the starting bit location of the

bits you wish to read. If you are reading words (as in reading a
register value), leave this field blank (ie, ...
address,,count,...). If you

are reading bits (I/O points, internal coils, etc.) specify the starting bit in the
element you are addressing (address) . This could be any bit from 0-15.

count

specifies the number of bits and/or elements that you wish to read. If

you are reading data in the form of words, it is the number of consectutive
elements you wish to read. If you are reading bits, it is the number of

consecutive bits you wish to read.

variable/array

is the variable name or single dimension array name where

you wish to store the data you are reading. If the value of count (see above) is

1, this will be a variable expression. If you are reading elements that are
stored as words and count is greater than one, this will be an array (make

sure you properly dimension the array prior to using it). If you are reading
the status of more than one, but less than 16 bits, you will be reading one
word, and therefore can use a discrete variable name. If you are reading

more than 16 bits, you will need to use an array. The dimension of the array
variable will be the next integer greater than the desired number of bits

divided by 16. For example, if you wish to read the status of bits 1-24 you
will need to dimension your array to at least two since 24/16 = 1.5 and two is
the next greater integer. Remember, any time you are reading more than one

word of data (more than one register or more than 16 bits) you must use a
dimensioned array variable.

T-60 Operator's Manual

76

Advertising