EasyManuals Logo
Home>Campbell>Measuring Instruments>CR1000

Campbell CR1000 User Manual

Campbell CR1000
678 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #416 background imageLoading...
Page #416 background image
Section 8. Operation
8.6.2.4 Modbus over IP
Modbus over IP functionality is an option with the CR1000. Contact Campbell
Scientific for details.
8.6.2.5 Modbus Q and A
Q: Can Modbus be used over an RS-232 link, 7 data bits, even parity, one stop
bit?
A: Yes. Precede ModBusMaster() / ModBusSlave() with SerialOpen() and set
the numeric format of the COM port with any of the available formats, including
the option of 7 data bits, even parity. SerialOpen() and ModBusMaster() can be
used once and placed before Scan().
Concatenating two Modbus long 16-bit variables to one Modbus long 32 bit
number.
8.6.2.6 Converting Modbus 16-Bit to 32-Bit Longs
Concatenation of two Modbus long 16-bit variables to one Modbus long 32
bit number is shown in the following example.
CRBasic Example 67. Concatenating Modbus Long Variables
'This program example demonstrates concatenation (splicing) of Long data type variables
'for Modbus operations. Program is compatible with the following or later operating systems:
' CR800 OS v.3
' CR1000 OS v.12
' CR3000 OS v.5
'
'NOTE: The CR1000 uses big-endian word order.
'Declarations
Public Combo As Long 'Variable to hold the combined 32-bit
Public Register(2) As Long 'Array holds two 16-bit ModBus long
'variables
'Register(1) = Least Significant Word
'Register(2) = Most Significant Word
Public Result 'Holds the result of the ModBus master
'query
'Aliases used for clarification
Alias Register(1) = Register_LSW 'Least significant word.
Alias Register(2) = Register_MSW 'Most significant word.
BeginProg
'If you use the numbers below (un-comment them first)
'Combo is read as 131073 decimal
'Register_LSW=&h0001 'Least significant word.
'Register_MSW=&h0002 ' Most significant word.
416

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Campbell CR1000 and is the answer not in the manual?

Campbell CR1000 Specifications

General IconGeneral
BrandCampbell
ModelCR1000
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals