Protocol implementation – Lenze E94P PositionServo Modbus User Manual

Page 25

Advertising
background image

25

P94MOD01C

Protocol Implementation

To access the <variable index> as EPM-float, use the following formula to calculate this register address
(maximum address allowed is 2047):
<register address> = 1536 + 2 * <variable index> + 1;
Two special methods are created for those terminals that can ony handle 16-bit registers:
To access the <variable index> as a RAM- 16 bit integer register (the RAM copy of a variable that is represented
as a 16 bit integer) use the following formula to calculate this register address (maximum address allowed is
2303):
<register address> = 2048 + <variable index> + 1;

For these terminals the values are represented only as integers. The variable index is not multiplied by 2
because one variable is mapped to one register only. If the variable, which is represented as a 32 bit value
internally, is out of range (lower than minimum or higher than maximum value for 16 bit integers), then the
return value is truncated to the closest value supported by the 16 bit signed number. The access to a variable
using this register address range will only read/write the RAM copy of a variable.

To access the <variable index> as an EPM -16 bit signed integer register (the EPM copy of a variable that is
represented as a 16 bit integer) use the following formula to calculate this register address (maximum address
allowed is 2560):
<register address> = 2304 + <variable index> + 1;

For these terminals the values are represented only as integers. The variable index is not multiplied by 2
because one variable is mapped to one register only. If the variable, which is represented as a 32 bit value
internally, is out of range (lower than minimum or higher than maximum value for 16 bit integers), then the
return value is truncated to the closest value supported by the 16 bit register. The access to a variable using
this register address range will read only the RAM copy of a variable and write both the RAM and EPM copies
of a variable.
Refer to section 6 for a complete list of Modbus registers for each variable.

5.3 Register Numbering

Modbus registers start at 1 which historically coincided with many older slave devices that often have parameters
starting at address 1. However, the true data addressed within a Modbus telegram starts at address 0. This
means that registers are offset by 1 compared to the true data address transmitted on the network, e.g.
Holding register 40001 is actually accessed as 0000 in the message telegram address field
The conversion from Modbus register number to the Modbus data address field is performed automatically by
the Modbus Master/Client. The PositionServo adheres to the Modbus Standard in that its registers start at 1.

NOTE:

Some Modbus masters will allow for the first register number to be 0. This is known as ‘zero based’
addressing. If this is the case, the Modbus register numbers listed in this manual must be offset by -1 to
properly program a master using ‘zero-based’ addressing.

• Using a master that supports traditional register addressing to access PositionServo

parameter 100 (user variable VAR_V0) as a 16-bit value would use Modbus register 42405

• Using a master that has zero based addressing enabled would use Modbus register 42404

Advertising