Mitsubishi Electronics T-60 Calculator User Manual


 
# of registers/bits is the number of consecutive registers, memory locations,
or bits that you wish to set. Many PLC Interfaces only allow you to set one at
a time, and for many applications that is all you will need to read. If this is
the case, # of registers/bits will be 1.If you wish to set more than one register
or memory location at a time, this number will be the number of consecutive
registers or locations you wish to set. 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 set.
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 16
bits) you must use a dimensioned array variable.
Examples:
10 DIM stat(10)
20 CALL PLCWRITE(1,1,1,5,stat(1))
This command clears the status in a TI305/405 PLC
10 CALL PLCWRITE(1,3,12,5,13)
This command writes a 1 to outputs 12, 14, and 15, and a 0 to outputs 13 and
16 in a PLC with an id (address) = 1. Note that 13 represents the binary
“01101" 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.
10 DIM anout%(10)
20 CALL PLCWRITE(1,8,1,2,anout%(1))
This command writes the value of analog1% to analog output 1 and to analog
output 2 in a GE Series 90 or TI505 PLC with address = 1
PLC Specific Information
In general, PLC’s from various manufacturers behave similarly. There are,
however, some “quirks” that need to be mentioned. Also, various PLC’s deal
with Operator Interfaces in various ways. Some allow access to the registers,
memory locations, and discrete I/O through the CPU’s programming port,
while others require some sort of communication module to be added to allow
the CPU and Operator Interface to interact properly. This section deals with
the criteria specific to each of the T-60 Series PLC Interface Options —
command variances, communication hardware, cabling, etc.
T-60 Operator's Manual
66