Specifications
Section 12. Serial Input and Output Functions
12-6
Parameter
& Data Type
Enter
BaudRate
Used to set the rate, in bps, for communication. The options are 300,
1200, 4800, 9600, 19200, 38400, 57600, and 115200. Selecting one of
these options fixes the baud rate at that rate of communication. If a
negative baud rate is entered, the first communication attempt will be at
the specified baud rate, but if communication fails at that rate, the
datalogger will go into autobaud mode where it will try different rates
until successful or until the instruction times out.
ModBusAddr
Integer or
Constant
Specifies the address of the ModBusSlave with which you are trying to
communicate. Valid ranges are 1 - 127 or 1 - 247 for ModBus/PakBus.
ModBusVariable
Variable
The variable array that is used as the source of data to send to the
ModBusMaster, or the variable array that is used as the destination for
data received from the ModBusMaster. This variable can be formatted as
either Floating Point or Integer. If Variable is declared as Long or
Boolean, then this parameter is set as a ModBus integer; otherwise,
floating point ModBus will be used.
Floating point variables take two ModBus registers. The ModBus input
registers are offset by 30000; ModBus holding registers are offset by
40000. Therefore, the first register corresponding to any array location X
is holding register 40000+2X-1. For example, to retrieve array value
number 3, you would ask for two registers starting with 40005.
Most software uses an affixed "F" to denote that the register contains a
floating point value. For example, in the Wonderware's Intouch MMI
screen design you could request the value from Register "40005 F."
Similarly, National Instrument's Lookout could use "Modbus1.F40005"
to refer to the third input location.
BooleanVariable
Constant or
variable
A variable or variable array that is used to hold the result if the master
sends one of the discrete on/off commands to the slave (i.e., 01 Read
Coil/Port Status, 02 Read Input Status, 05 Force Single Coil/Port, 15
Force Multiple Coils/Ports). This parameter must be dimensioned as a
Boolean or a compiler error is returned.
If a 0 is entered for this parameter, then the discrete commands are
mapped to control ports 1 through 8 instead.
Notes:
The datalogger communicates in RTU mode (not ASCII mode) to other
ModBus devices. The communications port, baud rate, data bits, stop bits, and
parity are set in the ModBus driver for PC-based software or on the PLC.
The datalogger usually goes into sleep mode after 40 seconds of inactivity on
the communications port. After going to sleep with some interface methods it
sometimes takes a packet of incoming data to wake it up and then a retry
packet to get the message through. For example, the first byte of the packet is
spent waking up the SC32A/B or SC929, so a packet retry within 40 seconds is
required to get a complete ModBus packet into the datalogger for processing.
If packets continue arriving before the 40 second timeout, the datalogger
should respond very quickly to the new packets. If necessary, you can tie pin 3
of the datalogger's CS I/O port to 5V to keep the datalogger awake. The
drawback to this approach is that the average current draw will be higher than