APIs, concepts, guides, and more

◆ NetworkInputDataTypeNameGet()

const char *const NetworkInputDataTypeNameGet ( int32_t index)
Parameters
indexThe index of the Network Input.
Returns
(const char*) The data type name from the PDO entry in the device's ESI file, carried through to the running ENI. Typical values are elementary type names such as BOOL, SINT, UINT, DINT, UDINT, REAL, etc., but vendor-defined or structured type names may also appear. Empty string if the ENI does not carry a type name for this input.
Description:
NetworkInputDataTypeNameGet returns the raw type string the ENI carries alongside the PDO's bit size and bit offset. Use it when you need the exact wording the device manufacturer or ESI authoring tool placed in the network description, for example when surfacing diagnostics, mapping vendor-specific record types you recognize by name, or routing the raw bits returned by NetworkInputValueGet into a typed value yourself. For a pre-decoded RSIDataType enum value (and the typed value via FirmwareValue), prefer NetworkInputDataTypeGet and NetworkInputFirmwareValueGet, which apply the mapping described below.
Common elementary type names reported:
These match the elementary-type vocabulary used by IEC 61131-3 PLC programmers and are the names ESI/ENI tooling produces in the common case:
  • BOOL - 1-bit boolean
  • SINT - 8-bit signed integer
  • USINT, BYTE - 8-bit unsigned integer
  • INT - 16-bit signed integer
  • UINT, WORD - 16-bit unsigned integer
  • DINT - 32-bit signed integer
  • UDINT, DWORD - 32-bit unsigned integer
  • LINT - 64-bit signed integer
  • ULINT, LWORD - 64-bit unsigned integer
  • REAL - 32-bit IEEE-754 single-precision floating point
  • LREAL - 64-bit IEEE-754 double-precision floating point
Other shapes that may appear in the wild:
Devices and ESI authoring tools sometimes report names that fall outside the IEC primitive set. Common cases include:
  • Vendor-specific record types prefixed with DT, for example DT8000 or DT1A00 - typically packed structures defined in the vendor's documentation.
  • Array shapes such as "ARRAY[0..7] OF BYTE" for byte buffers.
  • Sub-byte fields such as BIT2 or BIT4 for status nibbles inside a larger byte.
  • Non-power-of-two widths such as INT24, INT48, or UINT48 for extended counters or multi-axis fixed-point values.

Use NetworkInputBitSizeGet alongside this method to size the value correctly for these cases. NetworkInputDataTypeGet falls back to a bit-size-keyed unsigned RSIDataType when the name is empty or unrecognized.

Common CiA 402 (DS402) PDO mappings:
Servo drives following CiA 402 generally report these standard names:
  • 0x6040 Controlword - UINT (16-bit unsigned)
  • 0x6041 Statusword - UINT (16-bit unsigned)
  • 0x6060 Mode of Operation - SINT (8-bit signed)
  • 0x6061 Mode of Op. Display - SINT (8-bit signed)
  • 0x6064 Position Actual Value - DINT (32-bit signed)
  • 0x6077 Torque Actual Value - INT (16-bit signed)
  • 0x607A Target Position - DINT (32-bit signed)
Note
The returned string is taken verbatim from the ENI; vendor capitalization can vary ("DINT" vs "Dint" vs "dint"). The companion NetworkInputDataTypeGet method performs a case-insensitive lookup, but if you compare the raw string yourself, do so case-insensitively to be safe.
See also
NetworkInputDataTypeGet, NetworkInputBitSizeGet, NetworkInputBitOffsetGet, NetworkInputNameGet, NetworkInputFirmwareValueGet, NetworkInputValueGet