3-28
3
C n
‘sets device address to value n
*SAV 0
‘optional save new default address
Modbus commands should not be mixed on the same command
line with IEEE-488.2 and SCPI commands to prevent query
errors and confusing the 8099 Interface.
3.8.4 Querying a Modbus Device
The next step is to send a query to the 8099 and read back the response from
the Modbus device. The R? command is the basic read command. With the
Watlow F4 controller, register 0 is the Watlow Model number register. The ‘?’
is optional and is included so programs like ICS’s VXI-11 Keyboard control
programs can automatically read back and display the response from a query.
i.e.
R? 0,1
‘reads Watlow model number
‘Watlow F4 response is 5270
A more realistic command might be to read a measured value. Register numbers
and functions vary with different Modbus devices so consult your Modbus de-
vice manual for its register numbers and functions. With the Watlow F4 series
Controllers, register 100 is the measured temperature value.
R? 100,1
'
reads temperature from a Watlow F4
3.8.5 Writing to the Modbus Device
The W command writes 16-bit integers to a register. The command parameters
depend upon the specific Modbus device. In the following example, a value
of 50 is written to register 300. i.e.
W 300, 50
‘sets F4 temperature setpoint
The WB command writes to sequential Modbus registers. The Visual Basic
TempCltr example program on the Support CD-ROM can be used as an example
when writing Temperature Control programs.
3.8.6 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