MITSUBISHI ELECTRIC T-60 User Manual

Page 105

Advertising
background image

location at a time, this number will be the number of consecutive registers or

locations you wish to write. If you are writing the status of more than one
I/O bit, this number will be the number of consecutive bits you wish to write.

expression/variable/array

is the expression, variable or array data you

wish to write to the PLC’s I/O, registers, or other memory locations. If the

value of # of registers/bits (see above) is 1, this will be an expression or a
variable. If the number of words is greater than one, this must be an array

(make sure you properly dimension the array prior to using it). If you wish to
write the status of up to 16 I/O bits, you will be writing one word, and
therefore will need to use an expression or discrete variable name. If you

wish to set more than 16 consecutive 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 set 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

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

Examples:

10 CALL PLCWRITE(1,3,9,2,3)
This command writes a 1 to outputs 0 and 1. Note that 3 represents the

binary “11" which is the bit pattern desired.

10 DIM newdat%(10)
20 CALL PLCWRITE(1,4,5,2,newdat%(4))

This command writes the value of newdat%(4) to register 5 and newdat%(5)
to register 6 in a PLC with an id (address) = 1.

PLC

T-60

Signal Name

7

3

GND

16

4

TXD-

3

5

TXD+

15

6

RXD-

2

7

RXD+

N/C

8

SHIELD

4

DSR+

8

GND

20

GND

21

PWE

17

DSR-

Table 16

PLC/Model/Signal Name

PLC Interface Commands PLC Specific Information

97

Advertising