//The cam nodes are written.
CamNode0[0].Curve :=_eMC_CAM_CURVE#_mcPolynomic5;
CamNode0[0].ConnectingVelEnable := FALSE;
CamNode0[0].ConnectingVel := REAL#0.000;
CamNode0[0].ConnectingAccEnable := FALSE;
CamNode0[0].ConnectingAcc := REAL#0.000;
CamNode0[1].Phase := REAL#200.000;
CamNode0[1].Distance := REAL#-102.000;
CamNode0[1].Curve :=_eMC_CAM_CURVE#_mcStraightLine;
CamNode0[1].ConnectingVelEnable := FALSE;
CamNode0[1].ConnectingVel := REAL#0.000;
CamNode0[1].ConnectingAccEnable := FALSE;
CamNode0[1].ConnectingAcc := REAL#0.000;
CamNode0[2].Phase := REAL#360.000;
CamNode0[2].Distance := REAL#0.000;
CamNode0[2].Curve :=_eMC_CAM_CURVE#_mcPolynomic5;
CamNode0[2].ConnectingVelEnable := FALSE;
CamNode0[2].ConnectingVel := REAL#0.000;
CamNode0[2].ConnectingAccEnable := FALSE;
CamNode0[2].ConnectingAcc := REAL#0.000;
CamNode0[2].PhasePitch := REAL#0.010;
CamNode0[3].Phase := REAL#0.000;
//WriteCamDefinitionDone is changed to TRUE.
WriteCamDefinitionDone := TRUE;
END_IF;
//If WriteCamDefinitionDone is TRUE and cam table creation processing is not in pro
gress, the MC_GenerateCamTable (Generate Cam Table) instruction is executed.
IF(WriteCamDefinitionDone = TRUE)
AND(_MC_COM.Status.GenerateCamBusy = FALSE) THEN
Gene_Exe := TRUE;
END_IF;
//If cam table creation processing is completed and the master axis (axis 1) has re
ached the target velocity, the MC_CamIn (Start Cam Operation) instruction is execut
ed.
IF (Gene_D=TRUE)
AND(_MC_COM.Status.GenerateCamBusy = FALSE)
AND (Vel_InVel=TRUE) THEN
Camin_Ex := TRUE;
END_IF;
// MC_GenerateCamTable
GENE_CAM(
CamTable := CamProfile0,
5 Common Command Instructions
5-43
NY-series Motion Control Instructions Reference Manual (W561)
MC_GenerateCamTable
5
Sample Programming