APIs, concepts, guides, and more

◆ NetworkInputFirmwareValueGet()

FirmwareValue NetworkInputFirmwareValueGet ( int32_t index)
Parameters
indexThe index of the Network Input.
Returns
(FirmwareValue) The current input value placed into the FirmwareValue cell matching NetworkInputDataTypeGet.
Description:
NetworkInputFirmwareValueGet returns the cyclic value last received over EtherCAT for this input, decoded according to the input's data type (see NetworkInputDataTypeGet). Signed integer PDOs (INT, SINT, DINT, LINT) are sign-extended into the matching signed cell of FirmwareValue, so a 16-bit INT PDO carrying 0xFFFF surfaces as -1 in the Int16 cell rather than 65535. REAL and LREAL PDOs are bit-reinterpreted into the Float and Double cells. BOOL maps to the Bool cell.
Note
When the input's data type falls through to the bit-size catch-all (vendor records, ARRAY OF BYTE, sub-byte bitfields, non-power-of-two widths, or an elementary name reported with a wider-than-natural bit size), the raw bits are placed in the UInt32 cell for inputs up to 32 bits or the UInt64 cell for wider inputs. Use NetworkInputValueGet if you only need the raw 64-bit form.
See also
NetworkInputDataTypeGet, NetworkInputDataTypeNameGet, NetworkInputValueGet, FirmwareValue