Specifications
Section 15. Alternate Telecoms Resource Library
15-4
Holding Registers 40001 - 49999
Hold values resulting from a programming action. Holding registers in
the Modbus domain are read / write. In the CSI domain, the leading digit
in Modbus digital, input and holding registers is ignored, and so digital,
input, and holding registers are assigned together to a single variable
array. Thus, in the CSI domain, holding registers are declared as Dim or
Public variables and are read / write.
RTU / PLC
Remote Telemetry Units (RTUs) and Programmable Logic Controllers
(PLCs) were at one time used in exclusive applications. As technology
increases, however, the distinction between RTUs and PLCs becomes
more blurred. A CR1000 fits both RTU and PLC definitions.
15.2.3 CR1000 Programming for Modbus
15.2.3.1 Declarations
TABLE 15.2-2 shows the linkage between CR1000 ports, flags and Boolean
variables and Modbus registers. Modbus does not distinguish between
datalogger ports, flags, or Boolean variables. By declaring only ports, or flags,
or Boolean variables, the declared feature is addressed by default. A typical
CRBASIC program for a Modbus application will declare variables and ports,
or variables and flags, or variables and Boolean variables.
TABLE 15.2-2. Linkage between CR1000 Ports, Flags,
and Variables and Modbus Registers.
CR1000 Feature
Example CRBASIC
Declaration
Equivalent Example
Modbus Register
Control Port (Port) Public Port(8) 00001 to 00009
Flag Public Flag(17) 00001 to 00018
Boolean Variable Public ArrayB(56) as Boolean 00001 to 00057
Variable Public ArrayV(20)* 40001 to 40041* or
30001 to 30041*
*Because of byte number differences, each CR1000 domain variable translates
to two Modbus domain input / holding registers.
15.2.3.2 Datalogger Commands
Complete descriptions and options of commands are available in CRBASIC
Editor Help.
ModbusMaster
Sets up a datalogger as a Modbus master to send or retrieve data from a
Modbus slave.
Syntax
ModbusMaster (ResultCode, ComPort, BaudRate, ModbusAddr,
Function, Variable, Start, Length, Tries, TimeOut)