3-9
3 Configuring Axes and Axes Groups
NJ/NX-series CPU Unit Motion Control Userās Manual (W507)
3-1 Axes
3
3-1-4 Synchronizing Axis Variables
The user program for the priority-5 periodic task can access the values of an Axis Variable of an axis
that is controlled in the primary periodic task. The reverse is possible: the user program for the primary
periodic task can access the values of an Axis Variable of an axis that is controlled in the priority-5 peri-
odic task.
Also, the user program for the priority-16 periodic task can access the values of an Axis Variable that is
controlled in the primary periodic task.
The following table shows the relationship between the types of accessing tasks and the Axis Variables.
OK: Access possible ---: Access not possible
*1 The user-defined Axis Variables, such as MC_Axis000, Loader1 and other Axis Variables, that are automatically gener-
ated when you create the axes on the Sysmac Studio. We recommend that you use the user-defined Axis Variables.
*2 _MC_AX[*] or _MC1_AX[*]
*3 _MC2_AX[*]
*4 The Axis Variable for axis 1 is processed every task period of the priority-5 periodic task.
*5 The Axis Variable for axis 1 is processed every primary task period.
*6 The Axis Variables for the maximum number of axes are processed every primary task period. It is not recommended
because the task execution time of the primary periodic task is increased.
*7 The Axis Variables for the maximum number of axes are processed every primary task period.
*8 The Axis Variables for the maximum number of axes are processed every task period of the priority-5 periodic task.
In the user program, an Axis Variable name is specified for the in-out variable Axis in motion control
instructions. In the following example, the Axis Variable name for the axis that was added for the sys-
tem-defined Axis Variable name of _MC_AX[0] has been changed to MyAxis1 in the Sysmac Studio.
You can also use the _MC_AX[0] system-defined variable in place of MyAxis1.
Refer to 6-2 Motion Control Instructions for details on motion control instructions.
Refer to the instruction descriptions in the NJ/NX-series Motion Control Instructions Reference Manual
(Cat. No. W508) for details on motion control instructions.
3-1-4 Synchronizing Axis Variables
Task type
Axis Variable for motion control 1 Axis Variable for motion control 2
User defined
*1
System defined
*2
User defined
*1
System defined
*3
Primary periodic task OK OK OK*4 ---
Priority-5 periodic task
OK
*5
--- OK OK
Priority-16 periodic task
OK*5
OK
*6
OK
*4
---
Priority-17 or priority-18
periodic task
OK
*5
OK
*7
OK
*4
OK
*8
Priority-8 or priority-48
event task
OK
*5
OK
*7
OK
*4
OK
*8
3-1-5 Specifying an Axis in the User Program
In-out variable Axis
Specify an Axis
Variable name.
Enable Status
ErrorID
MC_Power_instance
Error
MC_Power
Axis Axis
Busy
MyAxis1
MyAxis1OnStatus
MyAxis1OnBusy
MyAxis1OnError
MyAxis1OnErrorID
MyAxis1
ServoOn