Mitsubishi Electronics T-60 Calculator User Manual


 
sure you properly dimension the array prior to using it). If you are setting
more than one, but less than 16 bits, you will be writing one word, and
therefore can use a discrete variable name. If you are setting 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 set 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 regdat%(10)
20 CALL PLCWRITE(1,4,16,,5,regdat%(4))
This command writes the contents of regdat%(4) in element 16, regdat%(5) in
element 17, regdat%(6) in element 18, regdat%(7) in element 19, and
regdat%(8) in element 20 to file #4 in the PLC-5 with id (address) of 1.
10 CALL PLCWRITE(2,5,47,,1,regdat1%)
This command writes the data in regdat1% into element number 47 in file #5
in the PLC-5 with id (address) of 2.
10 DIM stat%(2)
20 CALL PLCWRITE(1,2,33,12,5,13)
This command sets bits 12, 14, and 15 to a 1, and bits 13 and 16 to a 0 in
element 33 in file #2 in PLC with an id (address) of 1.
T-60 Operator's Manual
78