Mod Bus Map Format
Mod Bus Map Format
Revision History:
Initial Draf 9/2/2009 Alex Kravchenko
rev 1.0 9/30/2009 Alex Kravchenko
rev 1.1 9/30/2009 Alex Kravchenko
rev 1.3 10/29/2010 Alex Kravchenko
rev 1.4 12/6/2011 Prashantha
rev 1.5 4/18/2013 Alex Kravchenko
rev 1.6 9/24/2013 Alex Kravchenko
rev 1.7 10/13/2016 Anguel Tzavkov
Updated based on Tom H comments
Added mode details for MODBUSMin/Max IONMin/Max scaling attributes
Added Date Time and PF format details for IEC 870-5-4
Added DeviceSpecific01 -DeviceSpecific16 formats
Clarified SetupReg attribute and described new, CacheSpec "S" option
Added Ping attribute (available in PME 8.2)
Entity Entity Type Applies To
ModbusMap Element
DeviceInfo Element ModbusMap
<DeviceInfo GlobalNotAvailable="AllBitsSet"/>
<DeviceInfo GlobalNotAvailable="AllBitsSet"/>
<EnumInfo Name="NoYes12">
<Option Ordinal="1" Value="No"/>
<Option Ordinal="2" Value="Yes"/>
</EnumInfo>
<ModbusInfo IONHandle="141558017" Name="Transformer Presence" ModbusAddress="D003s1" RequestType="R" Format="
<Diagnostics EnableTrace="1"/>
<EnumInfo Name="NoYes12">
<Option Ordinal="1" Value="No"/>
<Option Ordinal="2" Value="Yes"/>
</EnumInfo>
<ModbusInfo IONHandle="141558017" Name="Transformer Presence" ModbusAddress="D003s1" RequestType="R" Format="
<TransactionConfiguration DiagnosticFlags="3">
<DatasetAddressBlock ModbusAddress="408754" NumberOfRegisters="10"/>
<InvalidAddressRange ModbusAddress="400294" NumberOfRegisters="2"/>
</TransactionConfiguration>
U32-4321 (The same as UINT32) is a 32-bit unsigned value returned in two consecutive 16-
bit registers. The high-order word is returned in the first register, the low-order
word in the second. In effect, the 4 bytes are returned in 4-3-2-1 (or big
ENDIAN) format
S32-2143 32-bit signed value returned in two consecutive 16-bit registers. Contrary to
S32_4321, the high-order word is returned in the second register, the high-order
word in the first. In effect, the 4 bytes are returned in 2-1-4-3 format
U32-2143 32-bit unsigned value returned in two consecutive 16-bit registers. Contrary to
U32_4321, the high-order word is returned in the second register, the low-order
word in the first. In effect, the 4 bytes are returned in 2-1-4-3 format
S32-M10k-4321 (The same as S32-MFP) is a 32-bit signed value returned in two consecutive 16-
bit registers. The word stored in the first 16-bit register is multiplied by 10000
and added to the word stored in the second 16-bit register. Also known as
‘signed Modulo 10000’
U32-M10k-4321 (The same as U32-MFP) is a 32-bit unsigned value returned in two consecutive
16-bit registers. The word stored in the first 16-bit register is multiplied by
10000 and added to the word stored in the second 16-bit register. Also known
as ‘unsigned Modulo 10000’
S32-M10k-2143 32-bit signed value returned in two consecutive 16-bit registers. Contrary to
S32_M10k_4321, the word stored in the second 16-bit register is multiplied by
10000 and added to the word stored in the first 16-bit register
U32-M10k-2143 32-bit unsigned value returned in two consecutive 16-bit registers. Contrary to
U32_M10k_4321, the word stored in the second 16-bit register is multiplied by
10000 and added to the word stored in the first 16-bit register
F32-4321 (The same as IEEEFloat) is a 32-bit IEEE floating point value returned in two
consecutive 16-bit registers. The high-order word is returned in the first register
and the low order word in the second. In effect, the 4 bytes are returned in 4-3-
2-1 format
F32-2143 (The same as SwappedFloat) is a 32-bit IEEE floating point value returned in two
consecutive 16-bit registers. Contrary to F32_4321, the high-order word is
returned in the second register and the low order word in the first. In effect, the
4 bytes are returned in 2-1-4-3 format
F64-87-21 64-bit IEEE floating point value returned in four consecutive 16-bit registers. The
high-order word is returned in the first register and the low order word in the
last.
F64-12-78 64-bit value similar to IEEE floating point value returned in four consecutive 16-
bit registers, where registers follow in the reverse order.
S32-MFP (The same as S32-M10k-4321) is a 32-bit signed value returned in two
consecutive 16-bit registers. The word stored in the first 16-bit register is
multiplied by 10000 and added to the word stored in the second 16-bit register.
Also known as ‘signed Modulo 10000’
IEEEFloat (The same as F32-4321) is a 32-bit IEEE floating point value returned in two
consecutive 16-bit registers. The high-order word is returned in the first register
and the low order word in the second. In effect, the 4 bytes are returned in 4-3-
2-1 format
SwappedFloat (The same as F32-2143) is a 32-bit IEEE floating point value returned in two
consecutive 16-bit registers. Contrary to F32_4321, the high-order word is
returned in the second register and the low order word in the first. In effect, the
4 bytes are returned in 2-1-4-3 format
PackedBool (The same as MaskedBool) is a 16-bit value that is interpreted according to the
bit pattern described by the Mask attribute (see below). Bits exposed by the
mask can be read or written without affecting the value of other bits. The value
that is read or written is determined by using enumeration ordinals, described
below. If used for read-only boolean data, enumerations are not required If no
mask is specified, all bits are relevant
MaskedBool (The same as PackedBool) is a 16-bit value that is interpreted according to the
bit pattern described by the Mask attribute (see below). Bits exposed by the
mask can be read or written without affecting the value of other bits. The value
that is read or written is determined by using enumeration ordinals, described
below. If used for read-only boolean data, enumerations are not required If no
mask is specified, all bits are relevant
InvertedMaskedBool Is similar to the MaskedBool format except that it is subject to the logical NOT
operation applied to the resulting Boolean value.
SINT16 16-bit signed value in 2-1 (or big ENDIAN) format. The high order byte is first,
the low-order byte second
UINT16 16-bit unsigned value in 2-1 (or big ENDIAN) format. The high order byte is first,
the low-order byte second
SINT32 (The same as S32-4321) is a 32-bit signed value returned in two consecutive 16-
bit registers. The high-order word is returned in the first register, the low order
word in the second. In effect, the 4 bytes are returned in 4-3-2-1 (or big
ENDIAN) format.
UINT32 (The same as U32-4321) is a 32-bit unsigned value returned in two consecutive
16-bit registers. The high-order word is returned in the first register, the low-
order word in the second. In effect, the 4 bytes are returned in 4-3-2-1 (or big
ENDIAN) format
S64-M10k-21-87 64-bit signed value returned in four consecutive 16-bit registers. R4*10,000^3 +
R3*10,000^2 + R2*10,000 + R1, where R4 is the last register and R1 is the first
register. Each registers range is -9,999 to +9,999
U64-M10k-21-87 64-bit unsigned value returned in four consecutive 16-bit registers.
R4*10,000^3 + R3*10,000^2 + R2*10,000 + R1, where R4 is the last register and
R1 is the first register. Each registers range is 0 to +9,999
S48-M10k-21-65 48-bit signed value returned in four consecutive 16-bit registers. R3*10,000^2 +
R2*10,000 + R1, where R3 is the last register and R1 is the first register. Each
registers range is -9,999 to +9,999
U48-M10k-21-65 48-bit unsigned value returned in four consecutive 16-bit registers.
R3*10,000^2 + R2*10,000 + R1, where R3 is the last register and R1 is the first
register. Each registers range is 0 to +9,999
S64-87-21 64-bit signed value returned in four consecutive 16-bit registers. The highest
order word is returned in the first register, the lowest order word in the fourth.
In effect, the 8 bytes are returned in 8-7-6-5-4-3-2-1 (or big ENDIAN) format
U64-87-21 64-bit unsigned value returned in four consecutive 16-bit registers. The highest
order word is returned in the first register, the lowest order word in the fourth.
In effect, the 8 bytes are returned in 8-7-6-5-4-3-2-1 (or big ENDIAN) format
S64-21-87 64-bit signed value returned in four consecutive 16-bit registers. The highest
order word is returned in the fourth register, the lowest order word in the first.
In effect, the 8 bytes are returned in 2-1-4-3-6-5-8-7 (or little ENDIAN) format
U64-21-87 64-bit unsigned value returned in four consecutive 16-bit registers. The highest
order word is returned in the fourth register, the lowest order word in the first.
In effect, the 8 bytes are returned in 2-1-4-3-6-5-8-7 (or little ENDIAN) format
S16-1-15 16 bit signed value. Bits 1 to 15 bits are unsigned data. If bit 16 is 0 the value is
positive, if bit 16 is 1 the value is negative
PF-Nexus 16 bit unsigned value, range 0 to 3999, representing 3 decimal places of
accuracy. It used for Power Factor values. The following table demonstrates the
conversion of values from 16-bit register values to the Power Factor data.
Hex Value - Decimal Value - Power Factor
000
3E7 999 0.999
3E8 1000 1.000
7CF 1999 0.001
7D0 2000 0.000
BB7 2999 -0.999
BB8 3000 -1.000
F9F 3999 -0.001
ASCII Sequence of bytes representing the ASCII character set. Each word stores 2
ASCII characters. Trailing spaces will be removed. Number of registers
containing the the string is specified by the NumberOfRegisters attribute.
ASCII-Reverse Sequence of bytes representing the ASCII character set. Each word stores 2
ASCII characters in the reversed order. Trailing spaces will be removed. Number
of registers containing the the string is specified by the NumberOfRegisters
attribute.
DateTime4_UTC 4-register compressed format. (Year 2001 is represented as 101 in the year
byte.)
Register 0:Hi Byte = Month (1 – 12) ; Register 0:Lo Byte = Day (1 – 31)
Register 1:Hi Byte = Year (0 – 199) ; Register 1:Lo Byte = Hour (0 – 23)
Register 2:Hi Byte = Minute (0 – 59) ; Register 2:Lo Byte = Second (0 – 59)
Register 3 = Millisecond
This format does not require the translator to convert the value into the UTC
time as it is already provided in the UTC time.
DateTime3_UTC 3-register compressed format. (Year 2001 is represented as 101 in the year
byte.)
Register 0:Hi Byte = Month (1 – 12) ; Register 0:Lo Byte = Day (1 – 31)
Register 1:Hi Byte = Year (0 – 199) ; Register 1:Lo Byte = Hour (0 – 23)
Register 2:Hi Byte = Minute (0 – 59) ; Register 2:Lo Byte = Second (0 – 59)
This format does not require the translator to convert the value into the UTC
time as it is already provided in the UTC time.
DateTime4_LOCAL 4-register compressed format. (Year 2001 is represented as 101 in the year
byte.)
Register 0:Hi Byte = Month (1 – 12) ; Register 0:Lo Byte = Day (1 – 31)
Register 1:Hi Byte = Year (0 – 199) ; Register 1:Lo Byte = Hour (0 – 23)
Register 2:Hi Byte = Minute (0 – 59) ; Register 2:Lo Byte = Second (0 – 59)
Register 3 = Millisecond
This format represents time as the local time. Thus the transltor will be
converting it to the UTC time using the site server time zone information.
DateTime3_LOCAL 3-register compressed format. (Year 2001 is represented as 101 in the year
byte.)
Register 0:Hi Byte = Month (1 – 12) ; Register 0:Lo Byte = Day (1 – 31)
Register 1:Hi Byte = Year (0 – 199) ; Register 1:Lo Byte = Hour (0 – 23)
Register 2:Hi Byte = Minute (0 – 59) ; Register 2:Lo Byte = Second (0 – 59)
This format represents time as the local time. Thus the transltor will be
converting it to the UTC time using the site server time zone information.
DateTime_YMDhms_UTC 3-register compressed format. (Year 2001 is represented as 101 in the year
byte.)
Register 0:Hi Byte = Month (1 – 12) ; Register 0:Lo Byte = Day (1 – 31)
Register 1:Hi Byte = Year (0 – 199) ; Register 1:Lo Byte = Hour (0 – 23)
Register 2:Hi Byte = Minute (0 – 59) ; Register 2:Lo Byte = Second (0 – 59)
This format does not require the translator to convert the value into the UTC
time as it is already provided in the UTC time.
DateTime_YMDhms_LOCAL 3-register compressed format. (Year 2001 is represented as 101 in the year
byte.)
Register 0:Hi Byte = Month (1 – 12) ; Register 0:Lo Byte = Day (1 – 31)
Register 1:Hi Byte = Year (0 – 199) ; Register 1:Lo Byte = Hour (0 – 23)
Register 2:Hi Byte = Minute (0 – 59) ; Register 2:Lo Byte = Second (0 – 59)
This format represents time as the local time. Thus the transltor will be
converting it to the UTC time using the site server time zone information.
DateTime_NSX2_UTC Date-time value represented as number of seconds from Jan 1/2000. This format
does not require the translator to convert the value into the UTC time as it is
already provided in the UTC time.
DateTime_NSX2_LOCAL Date-time value represented as number of seconds from Jan 1/2000. This format
represents time as the local time. Thus the transltor will be converting it to the
UTC time using the site server time zone information.
DateTime_NSX3_UTC Date-time value encoded in 3 16-bit registers. The first two registers represent
number of seconds from Jan 1/2000. The third register provides number of
milliseconds. This format does not require the translator to convert the value
into the UTC time as it is already provided in the UTC time.
DateTime_NSX3_LOCAL Date-time value encoded in 3 16-bit registers. The first two registers represent
number of seconds from Jan 1/2000. The third register provides number of
milliseconds. This format represents time as the local time. Thus the transltor
will be converting it to the UTC time using the site server time zone information.
U16-21-ARRAY Array of 16-bit signed values in 2-1 (or big ENDIAN) format. The high order byte
of each element is first, the low-order byte second. Length of the array is
specified by the NumberOfRegisters attribute.
U16-12-ARRAY Array of 16-bit signed values in 1-2 (or small ENDIAN) format. The high order
byte of each element is secont, the low-order byte first. Length of the array is
specified by the NumberOfRegisters attribute.
PF_ALT True Power Factor format specific for CM devices
Negative power factor is represented by 0-1000 (indicating 0-100% or in IEEE
format 0-1 lagging)
Positive power factor is represented by 1000-2000 (indicating 100%-0 or in IEEE
mode 1-0 leading).
DeviceSpecific01 - These formats can be re-used in Device Drivers for those Modbus data types
DeviceSpecific16 that do not need to be known for other device types. This will allow dPack
drivers with unknown formats to be installed on the system without need of
modifying master Modbus schema definition file.
Source code snippet
if (us < 1000)
{
value = us / -1000.;
}
else if (us < 3000)
{
value = (2000 - us) / 1000.;
}
else if (us < 4000)
{
value = (4000 - us) / 1000.;
}
mt.tm_year = bytes[0]-1900;
mt.tm_mon = bytes[1]-1;
mt.tm_mday = bytes[2];
mt.tm_hour = bytes[3];
mt.tm_min = bytes[4];
mt.tm_sec = bytes[5];
if (us < 1000) // lagging
{
value = us * -0.1;
return avail;
}
if (us >= 1000) // leading
{
value = (2000 - us) * 0.1;
return avail;
}
if(value < -1 && value >= -2) //Check if PF
value falls in 2-nd quadrant
value = -2 - value
else if(value > 1 && value <= 2) //Check if
PF value falls in 4-th quadrant
value = 2 - value;