![background image](http://html1.mh-extra.com/html/omron/nj501-1300/nj501-1300_user-manual_742205297.webp)
10-43
10 Sample Programming
NJ-series CPU Unit Motion Control User’s Manual (W507)
10-2 Basic Pr
o
g
ram
m
in
g
Samples
10
10-2-11 I
nterr
upt F
eed
ing
// If the input parameters for interrupt feeding are not set, the target values and other parameters are set.
IF InitFlag=FALSE THEN
// Parameters for MC_MoveFeed
Mv_Feed_TrigRef.Mode
:= _eMC_TRIGGER_MODE#_mcDrive;
Mv_Feed_TrigRef.LatchID
:= _eMC_TRIGGER_LATCH_ID#_mcLatch1;
Mv_Feed_TrigRef.InputDrive
:= _eMC_TRIGGER_INPUT_DRIVE#_mcEncoderMark;
Mv_Feed_TrigVar
:= FALSE;
Mv_Feed_Pos
:= LREAL#2000.0;
Mv_Feed_Vel
:= LREAL#1000.0;
Mv_Feed_Acc
:= LREAL#10000.0;
Mv_Feed_Dec
:= LREAL#10000.0;
Mv_Feed_Dir
:= _eMC_DIRECTION#_mcCurrentDirection;
Mv_Feed_Mm
:= _eMC_MOVE_MODE#_mcVelocity;
Mv_Feed_FeedDis
:= LREAL#500.0;
Mv_Feed_FeedVel
:= LREAL#500.0;
// The Input Parameter Initialization Completed Flag is changed to TRUE.
InitFlag := TRUE;
END_IF;
// When
StartPg
is TRUE, the Servo is turned ON for axis 0 if process data communications are active and normal.
IF (StartPg=TRUE)
AND (_EC_PDSlavTbl[MC_Axis000.Cfg.NodeAddress]=TRUE)
AND (_EC_CommErrTbl[MC_Axis000.Cfg.NodeAddress]=FALSE) THEN
Pwr_En:=TRUE;
ELSE
Pwr_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 0, the error handler for the device (FaultHandler) is executed.
// Program the FaultHandler according to the device.
IF MC_Axis000.MFaultLvl.Active=TRUE THEN
FaultHandler();
END_IF;
ST Programming
Mv_Feed_InFeed
Mv_Feed_Bsy
Mv_Feed_Act
Mv_Feed_D
MC_Axis000
Hm_D
Mv_Feed_Ca
MvFeed_TrigRef
Mv_Feed_TrigVar
Mv_Feed_Pos
WindowOnly
InFeed
Error
ErrorID
CommandAborted
ReferenceType
Active
Position
MC_MoveFeed
Execute
Done
FirstPosition
Busy
Axis
Axis
TriggerInput
TriggerInput
TriggerVariable
TriggerVariable
Velocity
Acceleration
Deceleration
Jerk
Direction
MoveMode
FeedDistance
MV_FEED
LastPosition
FeedVelocity
BufferMode
ErrorDetect
Mv_Feed_Vel
Mv_Feed_Dec
Mv_Feed_Dir
Mv_Feed_Acc
Mv_Feed_Mm
Mv_Feed_FeedVel
Mv_Feed_FeedDis
Mv_Feed_Err
Mv_Feed_ErrID
If homing is completed, interrupt feeding is executed.
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...