L_MC2P_CamDataPointXY

This FB contains the definition of the data points with XY information (not equidistant).

The instance of the FB

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

 

 

 

L_MC2P_CamDataPointXY

 

 

 

LREAL

-

lrX

LREAL

-

lrY

 

 

 

 

 

 

 

 

Name

Data type

Information/possible settings

lrX

LREAL

Master position

lrY

LREAL

Slave position

Example: Create curve with three points
1 Create instances
L_MC2P_CamDataPointXY_1: ARRAY[0..2] OF L_MC2P_CamDataPointXY
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_CamDataPointXY_1[0].lrX := 0.0;
L_MC2P_CamDataPointXY_1[1].lrX := 180.0;
L_MC2P_CamDataPointXY_1[2].lrX := 360.0;
L_MC2P_CamDataPointXY_1[0].lrY := 0.0;
L_MC2P_CamDataPointXY_1[1].lrY := 100.0;
L_MC2P_CamDataPointXY_1[2].lrY := 360.0;
L_MC2P_CamRefFromStruct_1(
xExecute:= TRUE,
sName:= 'Curve1' ,
udiCamDataCount:= 3 ,
itfCamData:= (L_MC2P_CamDataPointXY_1[0]),
eCamType:= L_MC2P_CamType.DataPointsNonEquiXY,
eInterpolationQuality:= L_MC2P_InterpolationQuality.Linear,
lrXStartPos:= 0.0,
lrXEndPos:= 360.0,
xDone=> ,
xBusy=> ,
xError=> ,
eErrorID=> );

Connection for MC_CamIn L_MC2P_CamRefFromStruct