![background image](http://html1.mh-extra.com/html/omron/nj501-1300/nj501-1300_user-manual_742205299.webp)
10-45
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-12 C
hanging the Ca
m T
ab
le b
y
R
e-e
x
ecution o
f an Instr
uctio
n
This sample changes the cam table during cam motion.
CamProfile0
is used when the command posi-
tion for axis 0 is 5000 or less and
CamProfile1
is used when it is over 5000.
* The array elements ARRAY[0..N] are set with the Cam Editor in the Sysmac Studio. The range of the array is 0 to
109 in this sample.
10-2-12 Changing the Cam Table by Re-execution of an Instruction
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.
MC_Axis001
_sAXIS_REF
---
This is the Axis Variable for axis 1.
CamProfile0
ARRAY[0..100] OF
_sMC_CAM_REF
---
This is the cam data variable.*
CamProfile1
ARRAY[0..10] OF
_sMC_CAM_REF
---
This is the cam data variable.*
Pwr1_S
BOOL
FALSE
This variable is assigned to the
Status
out-
put variable from the PWR1 instance of the
MC_Power instruction. It is TRUE when the
Servo is ON.
Pwr2_S
BOOL
FALSE
This variable is assigned to the
Status
out-
put variable from the PWR2 instance of the
MC_Power instruction. It is TRUE when the
Servo is ON.
CamTable0
BOOL
FALSE
TRUE when
CamProfile0
is used for the
cam table.
CamTable1
BOOL
FALSE
TRUE when
CamProfile1
is used for the
cam table.
Camin_InCam0
BOOL
FALSE
This variable is assigned to the
InCam
out-
put variable from the CAMIN instance of the
MC_CamIn instruction. It is TRUE during
cam motion for
CamProfile0
. After this vari-
able changes to TRUE, it remains TRUE
until the operation is completed or canceled.
Camin_InCam1
BOOL
FALSE
This variable is assigned to the
InCam
out-
put variable from the CAMIN instance of the
MC_CamIn instruction. It is TRUE during
cam motion for
CamProfile1
. After this vari-
able changes to TRUE, it remains TRUE
until the operation is completed or canceled.
Mv_Abs_Act
BOOL
FALSE
This variable is assigned to the
Active
out-
put variable from the MV_ABS instance of
the MC_MoveAbsolute instruction.
Hm1_Ex
BOOL
FALSE
This variable is used to re-execute the
MC_Home instruction for axis 0.
Hm2_Ex
BOOL
FALSE
This variable is used to re-execute the
MC_Home instruction for axis 1.
Mv_Abs_Ex
BOOL
FALSE
This variable is used to execute the
MC_MoveAbsolute (Absolute Positioning)
instruction.
Camin_Ex
BOOL
FALSE
This variable is used to execute the
MC_CamIn (Start Cam) instruction. It is
used in ST programming.
StartPg
BOOL
FALSE
When
StartPg
is TRUE, the Servo is turned
ON if EtherCAT process data communica-
tions are active and normal.
Содержание 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...