APIs, concepts, guides, and more

◆ NetworkOutputSentFirmwareValueGet()

FirmwareValue NetworkOutputSentFirmwareValueGet ( int32_t index)
Parameters
indexThe index of the Network Output.
Returns
(FirmwareValue) The value last sent over the network, placed into the FirmwareValue cell matching NetworkOutputDataTypeGet. Either the intended cyclic value or the override value, depending on NetworkOutputOverrideGet.
Description:
NetworkOutputSentFirmwareValueGet reports the value actually sent over the network in typed form. Signed integer PDOs are sign-extended into the matching signed cell; REAL / LREAL PDOs are bit-reinterpreted into the Float / Double cells. Use NetworkOutputSentValueGet if you only need the raw 64-bit form.
Sample Code:
IO: Input & Output
// get Input values
int inputCount = controller.NetworkInputCountGet(); // get number of Network Inputs (PDOs)
Console.WriteLine($"Network Input Count: {inputCount}");
for (int i = 0; i < inputCount; i++)
{
int size = controller.NetworkInputBitSizeGet(i); // read Input BitSize
int offset = controller.NetworkInputBitOffsetGet(i); // read Input BitOffset
string name = controller.NetworkInputNameGet(i); // read Input Name
UInt64 value = controller.NetworkInputValueGet(i); // read Input Value
Console.WriteLine($"Input {i}: {name}, Size: {size}, Offset: {offset}, Value: {value}");
}
// get Output values
int outputCount = controller.NetworkOutputCountGet(); // get number of Network Outputs (SDOs)
Console.WriteLine($"Network Output Count: {outputCount}");
for (int i = 0; i < outputCount; i++)
{
int size = controller.NetworkOutputBitSizeGet(i); // read Output BitSize
int offset = controller.NetworkOutputBitOffsetGet(i); // read Output BitOffset
string name = controller.NetworkOutputNameGet(i); // read Output Name
UInt64 value = controller.NetworkOutputSentValueGet(i); // read Output Value
Console.WriteLine($"Output {i}: {name}, Size: {size}, Offset: {offset}, Value: {value}");
controller.NetworkOutputOverrideValueSet(i, value);
}
See also
NetworkOutputSentValueGet, NetworkOutputDataTypeGet, NetworkOutputIntendedFirmwareValueGet, NetworkOutputOverrideFirmwareValueGet, NetworkOutputOverrideGet, FirmwareValue