3-25
3
The nature of the command depends upon the specific Modbus device.
Simple writes to 16-bit Modbus registers are handled with the W command.
In the following example, a value of 50 is written to register 300. i.e.
W 300, 50
‘sets F4 temperature setpoint
C 7; W 300, 50
‘concatenated command
Writes to sequential Modbus registers are possible with the WB com-
mand.
3.8.5 32-Bit Variables
Most Modbus devices have 16-bit wide registers for setting a parameter and
for reading back data. The prior command examples showed how to read
and write to 16-bit registers. Watlow's new Temperature Controllers like
the Series SD and Series PD have 32-bit registers which are accessed as two
16-bit registers. The value is assumed to have three decimal places.
3.8.6 32-Bit Write
To write a set point of 1250 degrees (which is really 1250.000) to Regis-
ters 27 and 28, multiply the setpoint value (SP) by 1000 to get 1,250,000.
Add 65536 to negative numbers. This produces the setpoint (SP) we want
to send. To determine the most significant word (MSW) for Register 27,
divide the SP by 2^16 or 65536. To determine the least significant word
(LSW) for Register 28, subtract from the SP the result of multiplying the
MSW by 2^16 or 65536. i.e.
SP = 1250 * 1000 = 1250000
MSW = 1250000 / 65536 = 19
LSW = 1250000 - (19 * 65536) = 4816
The 4899A can write each register separately with standard write commands
or both registers can be written together with the Write Block command.
Examples are:
W 27,19
'writes to register 27
W 28,4816
'writes to register 28
or
WB 27,2,19,4816
'writes to registers 27 and 28
3.8.7 32-Bit Read
Содержание 4809A
Страница 5: ...ii This page left intentionally blank...
Страница 51: ...2 30 2 This page left intentionally blank...
Страница 89: ...4 8 4 This page intentionally left blank...
Страница 99: ...5 10 5 This page left intentionally blank...
Страница 125: ...A 26 A3 This page intentionally left blank...
Страница 131: ...I Index 6 This page left intentionally blank...