Modbus master – Micromod MOD: MODBUS RTU Communications Guide User Manual
Page 16

MODBUS RTU
COMUNICATIONS GUIDE
12
MODBUS MASTER
MASTER REQUIREMENTS
MODBUS Master communication requires a few special configuration items.
1. MSC Block - Each MSC block that will be used for MODBUS Master communications must have the Port
Functionality set to Master.
2. EX Block for Port Configuration - Each MODBUS Master port requires a specially configured Expression
block to define its parameters.
3. EX Block for Communications - Expression blocks are configured to send and receive the actual
communication messages. The first 10 inputs are dedicated to configuration and status. The remaining
inputs may be used to read or write data. Each block is configured to execute a specific type of MODBUS
function. The only relevant factor that limits the number of these blocks is performance.
DATA CONVERSION
Analog data in a newer Commander instruments and the 2050R is stored as a 16-bit signed integer value.
Integer values in the Modcell MLP and MOD30ML are unsigned. The decimal point position is also read as a
separate value. When reading or writing analog values between these instruments, expression blocks are
used to convert from one integer type to the other. The table below indicates the relationship between the two
number formats.
Table 5. Integer Conversion - Signed to Unsigned
Signed 16-Bit Number
Unsigned 16-Bit Number
0
0
32767
32767
-32768
32768
-1
65535
SCALER BLOCK
One expression block is required for each slave instrument, for decimal point scaling. The expression is as
follows:
if DecPt == 0 then 1.0 else
if DecPt == 1 then 10.0 else
if DecPt == 2 then 100.0 else 1000.0
DecPt is a COUNT input which is read from the slave instrument.
The block’s Result is a FLOATING-POINT scaler.