Mantracourt DSC User Manual page 52

Strain gauge or load cell embedded digitiser module – 2nd generation
Hide thumbs Also See for DSC:
Table of Contents

Advertisement

The start address must always be a valid parameter address, which is always an odd number (see the following).
The only permitted data length is two registers, i.e. 4 bytes.
Registers cannot be read or written singularly, in larger groups or using other addresses (i.e. even-numbered
registers cannot be addressed directly).
Parameter Addresses
All MODBUS parameter addresses are derived from the equivalent MANTRABUS register number by a simple "times 2
plus 1" calculation.
For example, the 'FLAG' parameter is Mantrabus register#14, so this occupies MODBUS holding registers 29 and 30
(because 2×14+1 = 29).
See the command table in for the starting register numbers.
Parameter Values
All exchanged values (read and write parameters) are in the standard IEEE 4-byte floating-point format:
The 32 Bits Of The Number Are Distributed As Follows
MSB
31
30-23
LSB
22-0
The value of the number is thus
Sign
(Exponent-127)
{ (-1)
* 2
Note the 'assumed 1' before the mantissa. The exception to this is the special value 0.0, which is represented as 4
zeroes.
eg. a floating point number of -12345.678 is represented as – [hex] C6 40 E6 B6
These 32 bits are mapped onto a register pair in the following way: The lower register holds bits 15-0 and the upper
register bits 31-16.
These values are coded according to normal Modbus conventions, so the actual byte sequence in a read/write
message is thus –
R1
, R1
, R2
, R2
hi
lo
hi
– Which in terms of bits is–
15:8, 7:0, 31:24, 23:16
Error Codes
Only Three Modbus Error Codes Are Supported, Which Are Used As Follows
01
'Illegal Function'
02
'Illegal Data Address'
03
'Illegal Data Value'
messages have a known maximum length)
Write Command Example
Write value 1.23 (represents as hex 3F9D70A4) to registers 57,58 on slave#4
by sending
[hex]
station address
04
10
00 38 start-reg hi,lo (NB h38=56 addresses register 57)
00 02 quantity = 2 registers
04
70 A4 first=lower register (17) value = hi,lo
3F 9D second=upper register (18) value = hi,lo
6B AB checksum = hi,lo
A Correct Response Would Then Be
[hex]
station address
04
10
00 38
00 02
C0 50 checksum = hi,lo
51
Micron Meters
Sign bit ,
1=negate
Exponent,
7-bit excess-127
Mantissa,
23-bit fraction with implicit 1
* 1.Mantissa },
lo
request for function other than 3/16
attempt to read an unsupported register address
attempt to write a read-only parameter, or message too long for buffer (valid
function code
byte-count = 4
info copied from command ...
DCell & DSC User Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dcell

Table of Contents