10 Sample Programming
10-44
NJ-series CPU Unit Motion Control User’s Manual (W507)
// If the Servo is ON for axis 0 and home is not defined, the MC_Home instruction is executed.
IF (Pwr_Status=TRUE)
AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm_Ex:=TRUE;
END_IF;
// If homing is defined, interrupt feeding is executed.
IF Hm_D=TRUE THEN
Mv_Feed_Ex:=TRUE;
END_IF;
// MC_Power
PWR(
Axis
:= MC_Axis000,
Enable := Pwr_En,
Status
=> Pwr_Status,
Busy
=> Pwr_Bsy,
Error
=> Pwr_Err,
ErrorID => Pwr_ErrID
);
// MC_Home
HM(
Axis
:= MC_Axis000,
Execute
:= Hm_Ex,
Done
=> Hm_D,
Busy
=> Hm_Bsy,
CommandAborted
=> Hm_Ca,
Error
=> Hm_Err,
ErrorID
=> Hm_ErrID
);
//MC_MoveFeed
MV_FEED(
Axis
:= MC_Axis000,
TriggerInput
:= Mv_Feed_TrigRef,
TriggerVariable
:= Mv_Feed_TrigVar,
Execute
:= Mv_Feed_Ex,
Position
:= Mv_Feed_Pos,
Velocity
:= Mv_Feed_Vel,
Acceleration
:= Mv_Feed_Acc,
Deceleration
:= Mv_Feed_Dec,
Direction
:= Mv_Feed_Dir,
MoveMode
:= Mv_Feed_Mm,
FeedDistance
:= Mv_Feed_FeedDis,
FeedVelocity
:= Mv_Feed_FeedVel,
Done
=> Mv_Feed_D,
InFeed
=> Mv_Feed_InFeed,
Busy
=> Mv_Feed_Bsy,
Active
=> Mv_Feed_Act,
CommandAborted
=> Mv_Feed_Ca,
Error
=> Mv_Feed_Err,
ErrorID
=> Mv_Feed_ErrID
);
Summary of Contents for NJ501-1300
Page 12: ...Sections in this Manual 10 NJ series CPU Unit Motion Control User s Manual W507...
Page 18: ...16 NJ series CPU Unit Motion Control User s Manual W507 CONTENTS...
Page 22: ...Read and Understand this Manual 20 NJ series CPU Unit Motion Control User s Manual W507...
Page 34: ...Revision History 32 NJ series CPU Unit Motion Control User s Manual W507...
Page 86: ...3 Configuring Axes and Axes Groups 3 28 NJ series CPU Unit Motion Control User s Manual W507...
Page 122: ...5 Motion Control Parameters 5 24 NJ series CPU Unit Motion Control User s Manual W507...
Page 158: ...6 Motion Control Programming 6 36 NJ series CPU Unit Motion Control User s Manual W507...
Page 166: ...7 Manual Operation 7 8 NJ series CPU Unit Motion Control User s Manual W507...
Page 182: ...8 Homing 8 16 NJ series CPU Unit Motion Control User s Manual W507...
Page 346: ...10 Sample Programming 10 92 NJ series CPU Unit Motion Control User s Manual W507...
Page 422: ...Appendices A 18 NJ series CPU Unit Motion Control User s Manual W507...
Page 423: ...Index 1 NJ series CPU Unit Motion Control User s Manual W507 I Index...
Page 430: ...Index 8 NJ series CPU Unit Motion Control User s Manual W507 Index...