About Modbus Programming; Endianness - Campbell CR300 Series Product Manual

Compact datalogger
Hide thumbs Also See for CR300 Series:
Table of Contents

Advertisement

will vary, depending on the command sent to the slave. Slave devices only process one command
at a time. So, the master needs to wait for a response, or timeout before sending the next
command.
A broadcast address is specified to allow simultaneous communications with all slaves. Because
response time of slave devices is not specified by the standard, and device manufacturers also
rarely specify a maximum response time, broadcast features are rarely used. When implementing
a system, timeouts in the master will need to be adjusted to account for the observed response
time of the slaves.
Campbell Scientific data loggers can be programmed to be a Modbus master or Modbus slave -
or even both at the same time! This proves particularly helpful when your data logger is a part of
two wider area networks. In one it uses Modbus to query data (as a master) from localized
sensors or other data sources, and then in the other, it serves that data up (as a slave) to another
Modbus master.

15.2.6 About Modbus programming

Modbus capability of the data logger must be enabled through configuration or programming.
See the CRBasic Editor help for detailed information on program structure, syntax, and each
instruction available to the data logger.
CRBasic Modbus instructions include:
ModbusMaster()
l
ModbusSlave()
l
MoveBytes()
l
See the CRBasic Editor help for detailed instruction information and program examples:
https://help.campbellsci.com/crbasic/cr300/.

15.2.6.1 Endianness

Endianness refers to the sequential order in which bytes are arranged into larger numerical values
when stored in memory. Words may be represented in big-endian or little-endian format,
depending on whether bits or bytes or other components are ordered from the big end (most
significant bit) or the little end (least significant bit).
In big-endian format, the byte containing the most significant bit is stored first, then the
following bytes are stored in decreasing significance order, with the byte containing the least
significant bit stored last. Little-endian format reverses this order: the sequence stores the least
significant byte first and the most significant byte last. Endianness is used in some Modbus
programming so it is important to note that the CR300 is a little-endian instrument.
15. Communications protocols
91

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr300Cr310

Table of Contents