10-51
10 Sample Programming
NJ/NX-series CPU Unit Motion Control Userās Manual (W507)
10-2 Basic Programming
Samples
10
10-2-12 Changing the Cam Table by Re-execution of an Instruction
Error => Camin_Err,
ErrorID => Camin_ErrID
);
END_IF;
IF CamTable1=TRUE THEN
CAMIN(
Master := MC_Axis000,
Slave := MC_Axis001,
CamTable := CamProfile1,
Execute := Camin_Ex,
Periodic := Camin_EM,
StartMode := Camin_StMode,
StartPosition := Camin_StPos,
MasterStartDistance := Camin_MStDis,
MasterScaling := Camin_MSc,
SlaveScaling := Camin_SSc,
MasterOffset := Camin_MO,
SlaveOffset := Camin_SO,
ReferenceType := Camin_RT,
Direction := Camin_Dir,
InCam => Camin_InCam1,
InSync => Camin_InSync,
EndOfProfile => Camin_EOP,
Index => Camin_Index,
Busy => Camin_Bsy,
Active => Camin_Act,
CommandAborted => Camin_Ca,
Error => Camin_Err,
ErrorID => Camin_ErrID
);
END_IF;
// MC_Power for axis 0
PWR1(
Axis := MC_Axis000,
Enable := Pwr1_En,
Status => Pwr1_S,
Busy => Pwr1_Bsy,
Error => Pwr1_Err,
ErrorID => Pwr1_ErrID
);
// MC_Power for axis 1
PWR2(
Axis := MC_Axis001,
Enable := Pwr2_En,
Status => Pwr2_S,
Busy => Pwr2_Bsy,
Error => Pwr2_Err,
ErrorID => Pwr2_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