XFC_PathPositionCam

XFC_PathPositionCam 1:

XFC_PathPositionCam realizes a path cam that switches a digital output on and off depending on the path.

In contrast to the digital cam controller MC_PathDigitalCamSwitch_MultiEdge, the function block switches precisely one cam on a digital output track. This facilitates parameterization of the block, although it cannot be used if several cams are required on an output track.

In addition to the switching state of the digital output the output data structure contains precise time information for the next switching operations.

This information is used for the actual output at an XFC output terminal with a downstream function block (XFC_EL2252 or XFC_EL2262).

Inputs

VAR_INPUT
    HParam              : UDINT;
    FirstPathId         : UDINT;
    LastPathId          : UDINT;
    FirstOnPathPosition : LREAL;
    LastOnPathPosition  : LREAL;
    OnCompensation      : LREAL; 
    OffCompensation     : LREAL;
    Options             : ST_CamSwitchOptions;
END_VAR

HParam

H_parameter value that corresponds to the switching state.

FirstPathId

Unique ID that continually increases over the path and belongs to the relative path until the cam switches on.

LastPathId

Unique ID that continually increases over the path and belongs to the relative path until the cam switches off.

FirstOnPathPosition

Relative path until the cam switches on.

LastOnPathPosition

Relative path until the cam switches off.

OnCompensation

Compensation time for the rising edge of the cam in [s]. For negative values of OnCompensation the switching time is brought forward, otherwise it is delayed.
The value OnCompensation parameterized here has priority over TRACK_REF

OffCompensation

Compensation time for the falling edge of the cam in [s]. For negative values of OffCompensation the switching time is brought forward, otherwise it is delayed.
The value OffCompensation parameterized here has priority over TRACK_REF

Options

Optional parameters

Options.

EncoderIndex

If more than one encoder is connected to the axis, the encoder index [0 – 9] can be defined here.

The first encoder has the index 0.

Options.

UseAcceleration

UseAcceleration can be set to TRUE in order to incorporate the acceleration of the axis into the position calculation. UseAcceleration can be advantageous if the setpoint values of the acceleration can be used. UseAcceleration may be disadvantageous with encoder axes that supply a noisy position signal, because the acceleration is also erroneous.

Inputs/outputs

VAR_IN_OUT
    NciToPlc : NciChannelToPlc;
    Output   : OUTPUT_REF; 
END_VAR

NciToPlc

The structure of the cyclic channel interface from the NCI to the PLC. This structure is only accessed for reading

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