Specifications
Section 12. Serial Input and Output Functions
12-4
Parameter
& Data Type
Enter
ResultCode
Variable
A variable that holds the results of the communication attempt. ResultCode
is set to 0 if communication is successful; it increments by 1 with each
failure.
Specifies the communication port and mode that will be used when sending
the dial string. If a negative code is entered for the ComPort (e.g., -1), the
datalogger will not wait for successful communication before moving on to
the next instruction. This will help to avoid skipped scans that would
otherwise occur.
Numeric
Code
Alpha
Code
Description
1 ComRS232 RS232 port of the datalogger
2 ComME Datalogger's CS I/O port; modem enabled
3 Com310 Datalogger's CS I/O port; COM 310 modem
4 ComSDC7 Datalogger's CS I/O port; SDC7
5 ComSDC8 Datalogger's CS I/O port; SDC8
6 Com1 Datalogger's control ports 1 (TX) & 2 (RX)
7 Com2 Datalogger's control ports 3 (TX) & 4 (RX)
8 Com3 Datalogger's control ports 5 (TX) & 6 (RX)
ComPort
Constant
9 Com4 Datalogger's control ports 7 (TX) & 8 (RX)
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.
ResponseString
String
Used to specify the response code expected back from the modem when a
connection is made. An entry for this parameter is required. If no response
is expected, enter a null string. When a null string is entered ("") the default
is "1"+CHR(13) (1 + Control M, or carriage return).
Code Name Description
1 Read
Coil/Port
Status
Reads the On/Off status of discrete output(s)
in the ModBusSlave
2 Read Input
Status
Reads the On/Off status of discrete input(s) in
the ModBusSlave
3 Read
Holding
Registers
Reads the binary contents of holding
register(s) in the ModBusSlave
4 Read Input
Registers
Reads the binary contents of input register(s)
in the ModBusSlave
5 Force
Single
Coil/Port
Forces a single Coil/Port in the ModBusSlave
to either On or Off.
15 Force
Multiple
Coils/Ports
Forces multiple Coils/Ports in the
ModBusSlave to either On or Off.
Function
Integer or
Constant
16 Preset
Multiple
Registers
Presets values into a series of holding registers
in the ModBusSlave.