![Campbell MetSENS Series Product Manual Download Page 15](http://html1.mh-extra.com/html/campbell/metsens-series/metsens-series_product-manual_3900888015.webp)
NOTE:
Short Cut
cannot edit programs after they are imported and edited in
CRBasic Editor
.
A
Short Cut
tutorial is available in
(p. 2). If you wish to import
Short Cut
code into
CRBasic Editor
to create or add to a customized program, follow the procedure in
Short Cut code into CRBasic Editor
(p. 24). Programming basics for CRBasic data loggers are
provided in the following section. Downloadable example programs are available at:
www.campbellsci.com/downloads/metsens200-example-programs
www.campbellsci.com/downloads/metsens300-example-programs
www.campbellsci.com/downloads/metsens500-example-programs
www.campbellsci.com/downloads/metsens550-example-programs
www.campbellsci.com/downloads/metsens600-example-programs
6.2.1 Modbus programming
The RS-485 output can be directly read by a MeteoPV, CR6-series, CR1000X-series, or Modbus
RTU RS-485 network. Other Campbell Scientific data loggers can use an MD485 multidrop
interface to read the RS-485 output. Refer to the MD485 manual for information about using the
MD485. Refer to
www.campbellsci.com/videos/meteopv
for information about using the
MeteoPV.
A CR6 or CR1000X data logger programmed as a Modbus client can retrieve the values stored in
the input registers (
[p. 15]). To do this, the CRBasic program requires
SerialOpen()
followed by
ModbusClient()
.
NOTE:
ModbusClient()
was formerly
ModbusMaster()
. Campbell Scientific, in conjunction
with the Modbus Organization, is now using "client-server" to describe Modbus
communications. The Modbus client(s) initiates communications and makes requests of
server device(s). Server devices process requests and return an appropriate response (or error
message). See
for more information. Existing programs that use the old
Modbus terminology will still compile in the data logger.
The
SerialOpen
instruction has the following syntax:
SerialOpen
(ComPort, Baud, Format, TXDelay, BufferSize, Mode)
The
Format
parameter is typically set to logic 1 low; even parity, one stop bit, 8 data bits. The
Mode
parameter should configure the ComPort as RS-485 half-duplex, transparent.
MetSENS-Series Compact Weather Sensors
12