MQTT
11.4.1
Data Type Translation
Anybus data types are translated to JSON data types according to the table below.
Anybus Data Type
BOOL
SINT8/16/32/64
UINT8/16/32/64
FLOAT
CHAR
OCTET
ENUM
BOOL1
BITSx / BITx
PADx
The ENUM data type is encoded as a JSON object:
{
"EnumValue" : <ADI value encoded as a Number>,
"EnumStr" : <Enum string of the ADI value encoded as a String>
}
ADI variables of data type PADx will be ignored and not published.
ADI variables with more than one subelement, are encoded if the data type of the ADI is CHAR or
OCTET. These are encoded and published as a single string. ADI variables with subelements of
other types will be ignored and not published.
An ADI with an array of the data type CHAR will be published as a single string, while other
arrays will be published as arrays.
Anybus Data Type
UINT16
Array of UINT16
BOOL
OCTET string
Array of OCTET
ENUM
BIT2
Array of BIT2
Anybus CompactCom 40 EtherNet/IP IIoT Network Guide
JSON Data Type
Boolean
Number
Number
Number
String
String
A hexadecimal string representation of the octet value.
E.g: 0xFF is translated to "FF".
Object , see below
Boolean
JSON Array of Number where each bit is encoded to a Number of either 0 or 1. The
array starts with the most significant bit.
Data type is ignored and will not be published.
JSON Encoding with Example Values
10
[0, 1, 2, 3, 4]
True
"EDDAEBFE"
["ED", "DA", "EB", "FE"]
{
"EnumValue" : 2,
"EnumStr" : "Two",
}
[1,0]
[[1,0], [1,1], [0,0]]
93 (244)
SCM-1202–069 1.9 en-US
Need help?
Do you have a question about the CompactCom 40 and is the answer not in the manual?
Questions and answers