10-87
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-17 T
empor
ar
ily Changi
ng Axis P
arameters
This sample uses the MC_Write (Write MC Setting) instruction to change the settings of the In-Position
Check Time, Positive Software Limit, and Negative Software Limit.
10-2-17 Temporarily Changing Axis Parameters
Main Variables Used in the Programming Samples
Variable name
Data type
Default
Comment
MC_Axis000
_sAXIS_REF
---
This is the Axis Variable for axis 0.
InitFlag
BOOL
FALSE
This variable indicates the status of parameter settings.
FALSE while parameters are changed.
TRUE after the changes to the parameters are completed.
StartPg
BOOL
FALSE
This variable is used to execute the MC_Write instruction.
Ladder Diagram
Write1_Bsy
Write1_Ca
Write1_Err
Write1_ErrID
Write1_
D
Done
Error
CommandAborted
SettingValue
Busy
ErrorID
Execute
WRITE1
MC_Write
SettingValue
Write1_Sv
ParameterNumber
Write1_Pn
Target
Target
MC_Axis000
StartPg
Write2_Bsy
Write2_Ca
Write2_Err
Write2_ErrID
Write2_
D
Done
Error
CommandAborted
SettingValue
Busy
ErrorID
Execute
WRITE2
MC_Write
SettingValue
Write2_Sv
ParameterNumber
Write2_Pn
Target
Target
MC_Axis000
Write1_
D
InitFlag
1
2
3
4
5
6
7
8
9
10
11
// 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 Initialization Completed Flag is changed to TRUE.
InitFlag := TRUE;
The axis parameters are set. When setting the parameters is completed,
InitFlag
is changed to TRUE.
If
StartPg
is TRUE, the setting of the In-position Check Time is changed.
If changing the setting of the In-Position Check Time is completed,
the setting of the Positive Software Limit is changed.
Содержание NJ501-1300
Страница 12: ...Sections in this Manual 10 NJ series CPU Unit Motion Control User s Manual W507...
Страница 18: ...16 NJ series CPU Unit Motion Control User s Manual W507 CONTENTS...
Страница 22: ...Read and Understand this Manual 20 NJ series CPU Unit Motion Control User s Manual W507...
Страница 34: ...Revision History 32 NJ series CPU Unit Motion Control User s Manual W507...
Страница 44: ...1 Introduction to the Motion Control Function Module 1 10 NJ series CPU Unit Motion Control User s Manual W507...
Страница 58: ...2 Motion Control Configuration and Principles 2 14 NJ series CPU Unit Motion Control User s Manual W507...
Страница 86: ...3 Configuring Axes and Axes Groups 3 28 NJ series CPU Unit Motion Control User s Manual W507...
Страница 98: ...4 Checking Wiring from the Sysmac Studio 4 12 NJ series CPU Unit Motion Control User s Manual W507...
Страница 122: ...5 Motion Control Parameters 5 24 NJ series CPU Unit Motion Control User s Manual W507...
Страница 158: ...6 Motion Control Programming 6 36 NJ series CPU Unit Motion Control User s Manual W507...
Страница 166: ...7 Manual Operation 7 8 NJ series CPU Unit Motion Control User s Manual W507...
Страница 182: ...8 Homing 8 16 NJ series CPU Unit Motion Control User s Manual W507...
Страница 346: ...10 Sample Programming 10 92 NJ series CPU Unit Motion Control User s Manual W507...
Страница 422: ...Appendices A 18 NJ series CPU Unit Motion Control User s Manual W507...
Страница 423: ...Index 1 NJ series CPU Unit Motion Control User s Manual W507 I Index...
Страница 430: ...Index 8 NJ series CPU Unit Motion Control User s Manual W507 Index...