XFC_EL2262_MultiEdge

XFC_EL2262_MultiEdge 1:

_XFC_EL2262_MultiEdge handles the output of digital cams with the EL2262 XFC oversampling terminal.

The maximum frequency depends on the cycle time. The minimum distance between two rising signal edges = (2*PLC cycle time) / oversampling factor. The minimum distance between rising and falling edges = PLC cycle time / oversampling factor. The switching accuracy is determined by the set oversampling factor of the terminal.

Inputs

VAR_INPUT
    Reset                      : BOOL;
    Preset                     : BOOL;
    OversamplingFactor         : UINT;
    OutputOneCycleDelayed      : BOOL; (* TRUE if EL2262 is updated with the NC SAF task at the beginning of the next cycle *)
    ForceWhenLate              : BOOL; (* forces the output even when the timestamp is missed *)
    Channel                    : INT;  (* select 0 or 1 for Output0 or Output1 *)
END_VAR

Reset

The terminal output is deactivated.

Preset

The terminal output is activated.

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

Defines the output channel of the EL2262, where 0 = Output0 and 1 = Output1.

Outputs

VAR_OUTPUT
    Error             : BOOL;
    ErrorID           : UDINT;
    ErrorOutputMissed : BOOL;
    PrecisionReduced  : BOOL;
    Diagnostics       : ST_EL2262_Diagnostics;
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 could 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 could be determined to an exact cycle. However, the switching edge was output as well as possible.

Diagnostics

Data structure containing diagnostic data that can be used for error analysis

Inputs/outputs

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

Output

The data structure Output contains an array of calculated states of the digital output and the associated timestamp for output on a digital XFC output terminal

TrackOptions

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

EL2262

Process image of the terminal