XFC_EL2252_V2
The function block XFC_EL2252_V2 handles the output of a digital cam with the EL2252 XFC timestamp terminal.
The output of the data to the terminal takes place only shortly before reaching the timestamp of one of the outputs. Four PLC cycles are required for activation and acknowledgement of the outputs. Only then can a further edge change take place. The minimum time between two edge changes of the output signal is therefore four PLC cycles, in order to prevent errors or loss of precision. If the output signal is generated by a cam controller, a minimum cam width can be calculated from the maximum velocity and the PLC cycle time.
The outputs Output1 and Output2 cannot be used completely independently of each other since the activation takes place with only one timestamp. As a prerequisite, the switching edges of both channels must be sufficiently far apart. In this case, the respectively nearest timestamp is applied to the block.
Inputs
VAR_INPUT
ForceWhenLate : BOOL;
END_VAR
Name | Type | Description |
---|---|---|
ForceWhenLate | BOOL | If ForceWhenLate is TRUE, the output is activated even if the time stamp is already exceeded. |
/ Inputs/outputs
VAR_IN_OUT
Output1 : OUTPUT_REF;
Output2 : OUTPUT_REF;
TrackOptions1 : TRACK_REF;
TrackOptions2 : TRACK_REF;
EL2252 : EL2252_IoInterface;
END_VAR
Name | Type | Description |
---|---|---|
Output1 | Output state for channel 1 of the Terminal. 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. | |
Output2 | Output state for channel 2 of the Terminal. 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. | |
TrackOptions1 | The TrackOptions1 data structure contains the parameterization of Cam Track 1 for Output1. | |
TrackOptions2 | The TrackOptions2 data structure contains the parameterization of Cam Track 2 for Output2. | |
EL2252 | Process image of the terminal |
Outputs
VAR_OUTPUT
Error : BOOL;
ErrorID : UDINT;
ErrorOutputMissed : BOOL;
PrecisionReduced : BOOL;
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 | The exact switching point transferred in the Output1 or Output2 structures could not be maintained and the output state remains unchanged. |
PrecisionReduced | BOOL | The exact switching point transferred in the Output1 or Output2 structures could not be maintained, but the output status was output with a delay. |
Example for a position cam output
The function block XFC_PositionCam is hardware-independent and transfers the necessary switching information for output to the function block XFC_EL2252_V2 in the OutputRef1 data structure. The data structure is used for data transfer on both function blocks.
Output of two position cams on one output terminal
The outputs Output1 and Output2 cannot be used completely independently of each other with the EL2252 because activation occurs with only one timestamp. As a prerequisite, the switching edges of both channels must be sufficiently far apart (4 PLC cycles). As soon as the switching edges are closer together, they are output inaccurately.