XFC_EL2262_MultiEdge
The function block XFC_EL2262_Multiedge 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 = (2*PLC cycle time) / oversampling factor. The minimum distance between a rising and falling edge = 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
Name | Type | Description |
---|---|---|
Reset | BOOL | The terminal output is deactivated. |
Preset | BOOL | The terminal output is activated. |
OversamplingFactor | UINT | Oversampling factor for the EL2262 terminal |
OutputOneCycleDelayed | BOOL | OutputOneCycleDelayed is TRUE, if the output of the process image is delayed by a cycle due to the set timing. |
ForceWhenLate | BOOL | 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. |
Channel | INT | Defines the output channel of the EL2262, where 0 = Output0 and 1 = Output1. |
/ Inputs/outputs
VAR_IN_OUT
Output : OUTPUT_REF_MULTIEDGE;
TrackOptions : TRACK_REF;
EL2262 : EL2262_IoInterface;
END_VAR
Name | Type | Description |
---|---|---|
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 |
Outputs
VAR_OUTPUT
Error : BOOL;
ErrorID : UDINT;
ErrorOutputMissed : BOOL;
PrecisionReduced : BOOL;
Diagnostics : ST_EL2262_Diagnostics;
END_VAR
Name | Type | Description |
---|---|---|
Error | BOOL | Becomes TRUE if an error occurs. |
ErrorID | UDINT | If an error output is set, this parameter supplies an error number |
ErrorOutputMissed | BOOL | One of the switching points transferred in the Output structure could not be maintained and the output state remains unchanged. |
PrecisionReduced | BOOL | One of the switching points transferred in the Output structure could not be maintained, but the output state was output with a delay. |
Diagnostics | Data structure containing diagnostic data that can be used for error analysis. |