![background image](http://html1.mh-extra.com/html/campbell/cr200/cr200_instruction-manual_489088151.webp)
Section 15. Alternate Telecoms Resource Library
141
Table 20.
CRBASIC Ports, Flags, Variables and Modbus Registers
CR200(X) 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 CR200(X) domain variable translates to two Modbus domain input / holding
registers.
15.1.3.2 CRBASIC Instructions - Modbus
Complete descriptions and options of commands are available in CRBASIC
Editor Help.
ModbusMaster ()
Sets up a CR200(X) 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)
ModbusSlave ()
Sets up a CR200(X) as a Modbus slave device.
Syntax
ModbusSlave (ComPort, BaudRate, ModbusAddr,
DataVariable, BooleanVariable)
15.1.3.3 Addressing (ModbusAddr)
Modbus devices have a unique address in each network. Addresses range from 1
to 247. Address 0 is reserved for universal broadcasts. When using the NL100,
use the same number as the Modbus and PakBus® address.
15.1.3.4 Supported Function Codes (Function)
Modbus protocol has many function codes. CR200(X) commands support the
following.
•
01 Read Coil Status
•
02 Read Input Status
•
03 Read Holding Registers
•
04 Read Input Registers
Содержание CR200
Страница 32: ...Section 2 Quickstart Tutorial 22 ...
Страница 45: ...Section 3 Overview 35 3 3 Specifications ...
Страница 46: ...Section 3 Overview 36 ...
Страница 58: ...Section 4 Sensor Support 48 ...
Страница 62: ...Section 5 Measurement and Control Peripherals 52 ...
Страница 78: ...Section 8 CR200 X Configuration 68 ...
Страница 102: ...Section 9 Programming 92 ...
Страница 138: ...Section 11 Programming Resource Library 128 ...
Страница 156: ...Section 16 Support Software 146 ...
Страница 160: ...Section 17 Care and Maintenance 150 ...
Страница 166: ...Section 18 Troubleshooting 156 18 3 3 Diagnosis and Fix Procedures 18 3 3 1 Battery Voltage Test ...
Страница 167: ...Section 18 Troubleshooting 157 18 3 3 2 Charging Circuit Test Solar Panel ...
Страница 168: ...Section 18 Troubleshooting 158 18 3 3 3 Charging Circuit Test Transformer ...
Страница 169: ...Section 18 Troubleshooting 159 18 3 3 4 Adjusting Charging Circuit Voltage ...
Страница 170: ...Section 18 Troubleshooting 160 ...
Страница 184: ...Appendix A Glossary 14 ...
Страница 190: ...Appendix B Status Table and Settings 20 ...
Страница 192: ...Appendix C Serial Port Pin Outs 22 ...
Страница 211: ......