Subscriber
In the case of the subscriber there are the diagnostic variables Quality, CycleIndex and VarState.
- Quality:
The Quality indicates the age of the data received. - CycleIndex:
Transmission failures can be detected with the help of CycleIndex. - VarState:
The VarState variable indicates whether there are discrepancies between the configured RxData and the incoming ProcessData that are preventing the reception of the data.
Quality
The Quality variable contains the length of time in [100 µs] by which this ProcessData arrived too late at the receiver. It is incremented in each cycle by the cycle time immediately before the input process image of the TwinCAT EAP device is updated. The updating of the input process image takes place during the processing of the received EAP telegrams. During this processing, several values of each telegram are allocated to the corresponding variables of the input process image.
As shown in the illustration above, the received Quality value from the telegram, for example, is allocated to the corresponding Quality variable of the input process image.
If the Quality in an EAP telegram has the value 0, then the Quality of the input process image is reset to the value 0 as soon as the telegram has been received.
The above illustration shows how the delayed arrival of an EAP telegram influences the Quality value: at the start, the EAP telegram is received in good time prior to the start of the 1st cycle. Likewise in the 2nd cycle. After that, the telegram doesn't reach the receiver until after the 3rd cycle has already begun. The consequence of this is that the telegram cannot be processed until the 4th cycle. Accordingly, the value of the Quality variable is incremented by the cycle time during the 3rd cycle, but not reset to the value 0. The Quality variable is only reset to the value 0 in the 4th cycle by allocating the Quality value of the delayed telegram.
Diagnostic variable quality
Assuming the task cycle of the subscriber is ten times as fast as that of the publisher, then an EAP telegram is received only every tenth cycle. Consequently, no telegram arrives at the subscriber for nine cycles, which also means that the Quality variable of the input process image cannot be reset for nine cycles. The Quality variable will thus be incremented by the cycle time for nine cycles. It thus increases up to nine times the cycle time.
The result: A "slow" sender (e.g. 100 ms transmission clock in the publisher) leads with a "fast" receiver (e.g. 10 ms receiving clock in the subscriber) to a correspondingly increasing value of the diagnostic variable Quality.
It is therefore important to consider different cycle times for the transmission and reception of EAP telegrams. In this respect it is particularly important to pay attention to the Trigger conditions (see EAP send mechanism) that are configured in the sender.
EL6601/EL6614 When using the EL66xx, the time of arrival of a ProcessData is precisely when the data are present in the input process image of the EAP device, not when they arrive at the EL66xx or in the input image of the EtherCAT device. |
CycleIndex
The CycleIndex (size: 16 bits) is a counter that is transmitted by the publisher with the ProcessData. It is usually incremented on the sender side with each new cycle before the EAP telegram is sent, thus allowing an inference to transmission interruptions. It can be read on the receiver side (in the subscriber) as CycleIndex (cf. uppermost illustration in this chapter).
VarState
The VarState (size: 16 bits) supplies information about the current status of the RxData.
The following values are possible for VarState:
Short description |
Bit |
Description |
---|---|---|
Invalid Hash/Version |
VS.0 |
The bit is set to 1 if a ProcessData couldn't be received because the version of the received ProcessData didn't correspond to the configured version of this RxProcessData. The bit is otherwise set to 0. |
Invalid Variable Length Received |
VS.1 |
The bit is set to 1 if a ProcessData couldn't be received because the data length of the received variable didn't correspond to the configured RxVariable. The bit is otherwise set to 0. |
EL6601/EL6614 The VarState is not created when using the EL66xx terminals. |