FB_EcMasterFrameStatistic
The FB_EcMasterFrameStatistic function block reads the frame statistic of the EtherCAT Master. The number of 'lost frames', frames per second, the number of lost queued frames and queued frames per Second is shown at the outputs of the FB.
VAR_INPUT
VAR_INPUT
sNetId : T_AmsNetId;
bExecute : BOOL;
tTimeout : TIME := DEFAULT_ADS_TIMEOUT;
END_VAR
sNetId: This is a string that contains the AMS network identifier of the EtherCAT master device.
bExecute: The block is activated by a rising edge at this input.
tTimeout: Maximum time allowed for the execution of the function block.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrId : UDINT;
nLostFrames : UDINT;
fFramesPerSecond : LREAL;
nLostQueuedFrames : UDINT;
fQueuedFramesPerSecond : LREAL;
END_VAR
bBusy: This output is set when the function block is activated and remains set until an acknowledgement is received.
bError: This output is set up after the bBusy output has been reset if there has been an error in transmission of the command.
nErrId: Supplies the ADS error code associated with the most recently executed command if the bError output is set.
nLostFrames: Actual number of lost frames.
fFramesPerSecond: Actual number of frames per second.
nLostQueuedFrames: Actual number of queued frames.
fQueuedFramesPerSecond: Actual number of queued frames per Second.
Requirements
Development environment | Target system type | PLC libraries to be linked |
---|---|---|
TwinCAT v2.10.0 or higher | PC or CX (x86) | TcEtherCAT.lib |
TwinCAT v2.10.0 Build >= 1301 or higher | CX (ARM) |