![background image](http://html1.mh-extra.com/html/omron/nj501-1300/nj501-1300_user-manual_742205342.webp)
10 Sample Programming
10-88
NJ-series CPU Unit Motion Control User’s Manual (W507)
// The axis parameters are set. When setting the parameters is completed,
InitFlag
is changed to TRUE.
IF InitFlag=FALSE THEN
// In-position Check Time
Write1_Sv := UINT#10#10;
Write1_Pn := _eMC_PARAMETER_NUMBER#_mcInPosTime;
// Positive Software Limit
Write2_Sv := LREAL#10000.0;
Write2_Pn := _eMC_PARAMETER_NUMBER#_mcPosiSwLmt;
// Negative Software Limit
Write3_Sv := LREAL#-10000.0;
Write3_Pn := _eMC_PARAMETER_NUMBER#_mcNegaSwLmt;
// The Input Parameter Initialization Completed Flag is changed to TRUE.
InitFlag := TRUE;
END_IF;
// If
StartPg
is TRUE, the setting of the In-position Check Time is changed.
IF StartPg =TRUE THEN
Write1_Ex := TRUE;
END_IF;
// If changing the setting of the In-Position Check Time is completed, the setting of the Positive Software Limit is
changed.
IF Write1_D = TRUE THEN
Write2_Ex := TRUE;
END_IF;
// If changing the setting of the Positive Software Limit is completed, the setting of the Negative Software Limit is
changed.
IF Write2_D = TRUE THEN
Write3_Ex := TRUE;
END_IF;
// MC_Write
WRITE1(
Target
:= MC_Axis000,
SettingValue
:= Write1_Sv,
Execute
:= Write1_Ex,
ParameterNumber
:= Write1_Pn,
Done
=> Write1_D,
Busy
=> Write1_Bsy,
CommandAborted
=> Write1_Ca,
Error
=> Write1_Err,
ErrorID
=> Write1_ErrID
);
ST Programming
Write3_Bsy
Write3_Ca
Write3_Err
Write3_ErrID
Write3_
D
Done
Error
CommandAborted
SettingValue
Busy
ErrorID
Execute
WRITE3
MC_Write
SettingValue
Write3_Sv
ParameterNumber
Write3_Pn
Target
Target
MC_Axis000
Write2_
D
If changing the setting of the Positive Software Limit is completed, the setting of the Negative Software Limit is changed.
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...