L_MC2P_CamDataXYVA

This FB contains the definition of the data points with XYVA information

The instance of the FB

  • is an interface of L_MC2P_IMotionData type
  • can be directly connected to an input of L_MC2P_IMotionData type of another FB, e.g.
    Programming example:
    L_MC2P_CamRefFromStruct1.itfCamData:= L_MC2P_CamDataPoint XYVA1

 

 

 

L_MC2P_CamDataXYVA

 

 

 

L_MC2P_LawOfMotion

-

eLawOfMotion

LREAL

-

lrX

LREAL

-

lrY

LREAL

-

lrYs

LREAL

-

lrYss

LREAL

-

lrYsss

LREAL

-

lrLambda

LREAL

-

lrParam1 ... lrParam4

 

 

 

 

 

 

 

 

Name

Data type

Information/possible settings

eLawOfMotion

L_MC2P_LawOfMotion

Coding of the motion rules

Note: The law of motion effective for one segment is preselected with the starting point of the segment.

lrX

LREAL

Master starting position

lrY

LREAL

Slave starting position

lrYs

LREAL

dY/dX (with reference to the master the gradiant)

lrYss

LREAL

dY/dX 2 (with reference to the master the deflection)

lrYsss

LREAL

dY/dX 3 (with reference to the master the change in deflection)

lrLambda

LREAL

Scaled position of the inflection point for the following laws of motion:

  • ModSine_VV
  • SimpleSine
  • SlopedSine
  • ModAccTrapezoid_RR

When lrLambda = 0.5, the profile is divided symmetrically.

lrParam1 ... lrParam4

LREAL

Additional parameter 1 ... 4 (reserve; not currently used)

Example: Create curve with three points
Create instances
L_MC2P_CamDataXYVA_1: ARRAY[0..2] OF L_MC2P_CamDataXYVA;
L_MC2P_CamREfFromStruct_1: L_MC2P_CamREfFromStruct;
MC_CamIn_1: MC_CamIn;
Call FBs and execute curve
// define 3 points within the curve 360 units
L_MC2P_CamDataXYVA_1[0].lrX  := 0.0;
L_MC2P_CamDataXYVA_1[0].lrY  := 0.0;
L_MC2P_CamDataXYVA_1[0].lrYs  := 1;
L_MC2P_CamDataXYVA_1[0].lrYss  := 0.0;
L_MC2P_CamDataXYVA_1[0].eLawOfMotion := L_MC2P_LawOfMotion.Poly5;
L_MC2P_CamDataXYVA_1[1].lrX  := 180.0;
L_MC2P_CamDataXYVA_1[1].lrY  := 100.0;
L_MC2P_CamDataXYVA_1[1].lrYs  := 0;
L_MC2P_CamDataXYVA_1[1].lrYss  := 0.0;
L_MC2P_CamDataXYVA_1[1].eLawOfMotion := L_MC2P_LawOfMotion.Poly5;
L_MC2P_CamDataXYVA_1[2].lrX  := 360.0;
L_MC2P_CamDataXYVA_1[2].lrY  := 360.0;
L_MC2P_CamDataXYVA_1[2].lrYs  := 1;
L_MC2P_CamDataXYVA_1[2].lrYss  := 0.0;
L_MC2P_CamDataXYVA_1[2].eLawOfMotion := L_MC2P_LawOfMotion.Poly5;
L_MC2P_CamRefFromStruct_1(
xExecute:= TRUE,
sName:= 'Curve1' ,
udiCamDataCount:= 3 ,
itfCamData:= (L_MC2P_CamDataXYVA_1[0]),
eCamType:= L_MC2P_CamType.XYVA ,
eInterpolationQuality:= L_MC2P_InterpolationQuality.Linear,
lrXStartPos:= 0.0,
lrXEndPos:= 360.0,
xDone=> ,
xBusy=> ,
xError=> ,
eErrorID=> );

Connection for MC_CamIn L_MC2P_CamRefFromStruct