APIs, concepts, guides, and more

◆ NetworkOutputOverrideFirmwareValueSet()

void NetworkOutputOverrideFirmwareValueSet ( int32_t index,
FirmwareValue value )
Parameters
indexThe index of the Network Output to Override.
valueA FirmwareValue whose bits will be sent in place of the cyclic RMP value. Pre-load the cell that matches the output's data type (for example the Int16 cell for an INT PDO, the Float cell for a REAL PDO).
Description:
NetworkOutputOverrideFirmwareValueSet sets values to override those that would normally be set by the RMP, using a typed FirmwareValue rather than a raw unsigned 64-bit integer. This allows you to take complete control over exchanged EtherCAT PDOs without having to construct unions by hand for signed or floating point types. The override will only be sent if NetworkOutputOverrideSet(index, true) has been called.
Note
Because FirmwareValue is a union, the bits stored in any cell are forwarded directly to the underlying 64-bit override storage. No validation is performed against NetworkOutputDataTypeGet; if you load the Int32 cell of a value that the network expects as REAL, the RMP will still transmit those raw bits.
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
NetworkOutputOverrideFirmwareValueGet, NetworkOutputOverrideValueSet, NetworkOutputOverrideSet, NetworkOutputDataTypeGet, FirmwareValue