10-61
10 Sample Programming
NJ/NX-series CPU Unit Motion Control Userās Manual (W507)
10-2 Basic Programming
Samples
10
10-2-13 Using a Cam Profile Curve to Correct the Sync Position
Axis := MC_Axis003,
Enable := Pwr4_En,
Status => Pwr4_Status,
Busy => Pwr4_Bsy,
Error => Pwr4_Err,
ErrorID => Pwr4_ErrID
);
// MC_Home for axis 0
HM1(
Axis := MC_Axis000,
Execute := Hm1_Ex,
Done => Hm1_D,
Busy => Hm1_Bsy,
CommandAborted => Hm1_Ca,
Error => Hm1_Err,
ErrorID => Hm1_ErrID
);
// MC_Home for axis 3
HM4(
Axis := MC_Axis003,
Execute := Hm4_Ex,
Done => Hm4_D,
Busy => Hm4_Bsy,
CommandAborted => Hm4_Ca,
Error => Hm4_Err,
ErrorID => Hm4_ErrID
);
//MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
Direction := Vel_Dir,
InVelocity => Vel_Invel,
Busy => Vel_Bsy,
Active => Vel_Act,
CommandAborted => Vel_Ca,
Error => Vel_Err,
ErrorID => Vel_ErrID
);
//MC_CamIn
CAMIN(
Master := MC_Axis000,
Slave := MC_Axis002,
CamTable := CamProfile0,
Execute := Camin_Ex,
Periodic := Camin_Em,
StartMode := Camin_Sm,
StartPosition := Camin_Sp,
MasterStartDistance := Camin_Msd,
MasterScaling := Camin_Ms,
SlaveScaling := Camin_Ss,
MasterOffset := Camin_Mo,
SlaveOffset := Camin_So,
ReferenceType := Camin_Rt,
Direction := Camin_Dir,
InCam => Camin_InCam,
InSync => Camin_InSync,
EndOfProfile => Camin_Eop,