FC_InitCamPointAdvanced

 

FC_InitCamPointAdvanced - General Information

Overview

Type:

Function

Available as of:

V1.1.0.0

Support for:

PacDrive3 pilot template architecture

Versions:

Current version

Task

Function for initialization of an axis that is controlled by the FB_AxisModule function block.

Description

This function is used to assign advance values to a cam point. It also assigns the cam point to a MultiCam table. The table is specified with i_etParId and the axis is specified with iq_stAxis­ModuleItf. Use the FC_InitCamPoint function if you do not need the advance parameters.

This function returns the MultiCam table number (i_etParId) to allow multiple interfaces to be specified as shown below. The function returns -1 if the specified MultiCam table number is not 0, 1, 2, 3, or 4.

Each interface requires a unique number specified by i_diCamPoint. The first cam point is set to 0, the second 1, and so forth up to 32. The total quantity of cam points for a MultiCam table is automatically set.

The i_etCamType input specifies the cam to follow to the next motion point and the PDL.ET_CamType enumeration contains all the possible cam types as follows:

The straight component of a curve is defined by setting the i_lrC input. The linear component of the resulting rule is 1 – i_lrC, which means that a rule with i_lrC = 1 contains no linear component and is therefore equal to the initial rule, a rule with i_lrC = 0.7 has a linear component of 30 % and so on. The valid range of value for i_lrC is of 0,0001 up to 1.

The turning point of a curve is specified with the i_lrLambda input and the straight component of a curve is specified with the i_lrC input. These parameters are used to control the shape of a curve.

Interface

Input

Data type

Description

i_etParId

ET_ParId

Specifies which MultiCam table this cam point belongs to

i_diCamPoint

DINT

Specifies which cam point this is (0 to 32)

i_lrMasterPosition

LREAL

 Specifies the master’s position at this cam point in units

i_lrSlavePosition

LREAL

Specifies the axis’s position at this cam point in units

i_lrSlope

LREAL

Specifies the slope of the curve at this cam point (Horizontal line = 0, 45 degree line = 1)

i_etCamType

PDL.ET_CamType

Specifies the type of curve used to connect to the next cam point

i_lrK

LREAL

Specifies the second derivative of the cam at the start point for a poly5com curve

i_lrLambda

LREAL

Specifies the turning point of a curve

i_lrC

LREAL

Specifies the straight component of a curve

i_lrYUser

LREAL

Specifies the Y position for a user curve

i_lrYUserOffset

LREAL

Specifies an offset of the Y values for a user curve

i_diProfilId

DINT

Specifies a number used to identify a segment of a user curve

Output

Data type

Description

FC_InitCamPointAdvanced

DINT

Returns the MultiCam table number (i_etParId)) or -1 if the specified MultiCam table number is not 0, 1, 2, 3, or 4.

Input/Output

Data type

Description

iq_stAxisModuleItf

The axis interface structure of the associated axis