10-13
10 Sample Programming
NJ/NX-series CPU Unit Motion Control Userās Manual (W507)
10-2 Basic Programming
Samples
10
10-2-4 Error Monitoring and Error Resetting for Multi-axes Coordinated Operation
Busy => Pwr1_Bsy,
Error => Pwr1_Err,
ErrorID => Pwr1_ErrID
);
//MC_Power2
PWR2(
Axis := MC_Axis001,
Enable := Pwr2_En,
Status => Pwr2_Status,
Busy => Pwr2_Bsy,
Error => Pwr2_Err,
ErrorID => Pwr2_ErrID
);
// MC_Home1
HM1(
Axis := MC_Axis000,
Execute := Hm1_Ex,
Done => Hm1_D,
Busy => Hm1_Bsy,
CommandAborted => Hm1_Ca,
Error => Hm1_Err,
ErrorID => Hm1_ErrID
);
// MC_Home2
HM2(
Axis := MC_Axis001,
Execute := Hm2_Ex,
Done => Hm2_D,
Busy => Hm2_Bsy,
CommandAborted => Hm2_Ca,
Error => Hm2_Err,
ErrorID => Hm2_ErrID
);
//MC_GroupEnable
GRP_EN(
AxesGroup := MC_Group000,
Execute := Grp_En_Ex,
Done => Grp_En_D,
Busy => Grp_En_Bsy,
CommandAborted => Grp_En_Ca,
Error => Grp_En_Err,
ErrorID => Grp_En_ErrID
);
//MC_GroupDisable
GRP_DIS(
AxesGroup := MC_Group000,
Execute := Grp_Dis_Ex,
Done => Grp_Dis_D,
Busy => Grp_Dis_Bsy,
CommandAborted => Grp_Dis_Ca,
Error => Grp_Dis_Err,
ErrorID => Grp_Dis_ErrID
);
//MC_GroupReset
GRP_RESET(
AxesGroup := MC_Group000,
Execute := Grp_Reset_Ex,
Done => Grp_Reset_D,
Busy => Grp_Reset_Bsy,