XFC_EL2262

XFC_EL2262 1:

XFC_EL2262 handles the output of a digital cam with the EL2262 XFC oversampling terminal.

The maximum frequency depends on the cycle time. The minimum distance between two rising signal edges is two PLC cycles. The minimum distance between rising and falling edges can be smaller than a PLC cycle. The switching accuracy is determined by the set oversampling factor of the terminal.

The two channels of the terminal are independent of each other and are served by two instances of the XFC_EL2262 function block.

Inputs

VAR_INPUT
    OversamplingFactor    : UINT;
    OutputOneCycleDelayed : BOOL; (* TRUE if EL2262 is updated with the NC SAF task at the beginning of the next cycle *)
    ForceWhenLate         : BOOL;
    Channel               : INT;
END_VAR

OversamplingFactor

Oversampling factor for the EL2262 terminal

OutputOneCycleDelayed

OutputOneCycleDelayed is TRUE, if the output of the process image is delayed by a cycle due to the set timing.
OutputOneCycleDelayed depends on the timing of the output task to which the EL2262 is linked.

ForceWhenLate

If the time information changes slightly from cycle to cycle, it might not be possible for a switching edge to be output. In such a situation ForceWhenLate forces the best possible switching. In this case the PrecisionReduced output goes TRUE and can be used for diagnosis.
(Can be used in the case of increased jitter in an axis position where the output of a switching edge cannot be determined to an exact output cycle).

Channel

Channel number 0 or 1 of the EL2262 Terminal

Outputs

VAR_OUTPUT
    Error             : BOOL;
    ErrorID           : UDINT;
    ErrorOutputMissed : BOOL;
END_VAR

Error

Becomes TRUE if an error occurs.

ErrorID

If an error output is set, this parameter supplies an error number.

ErrorOutputMissed

indicates that a switching edge cannot be determined to an exact cycle and therefore cannot be output. The ForceWhenLate input can be set in order to output the switching edge as well as possible.

PrecisionReduced

indicates that a switching edge cannot be determined to an exact cycle. However, the switching edge was output as well as possible.

Inputs/outputs

VAR_IN_OUT
    Output       : OUTPUT_REF;
    TrackOptions : TRACK_REF;
    EL2262       : EL2262_IoInterface;
END_VAR

Output

The data structure Output contains the calculated state of the digital output and the associated time stamp for the output at a digital XFC output terminal

TrackOptions

The data structure TrackOptions contains the parameterization for the cam track.

EL2262

Process image of the terminal