beautypg.com

Default axis – Delta RMC151 User Manual

Page 306

background image

RMC70/150 and RMCTools User Manual

Apply the changes to the RMC by right-clicking Programming and clicking

Download Programs to Controller.

Assigning User Programs to Tasks

By default, a user program is allowed to run on only one task at a time. This setting is

usually sufficient for most applications. You can change this to specify a certain task that

the user program is allowed to run on, or allow the user program to run on any number of

tasks simultaneously. Restricting the tasks that a program can run on will help detect

program errors and help reduce the maximum programming execution time.
To change this setting, in the Project pane, right-click the user program, choose

Properties, and choose the Tasks page.

Default Axis

Each task has a Default Axis associated with it. The Default Axis is used in a User

Program when a command’s Commanded Axes field is set to “Default Axis” or when an

expression in a user program contains an axis register, but does not specify the axis (for

example, _Axis[].StatusBits.InPos).
When a task is started using a Start Task (90) command, the Default Axis for the task will

be automatically set to the axis that received the Start Task command.
When a task is started from the Program Triggers, the Default Axis for the task is left

unchanged. On power-up, the Default Axis for task #n is Axis n, up to the number of

available axes. For any additional tasks, the Default Axis is Axis 0 on power-up. However,

the Default Axis for a task can change through Start Task commands (see above) or the

Current Axis register (see below).
The Default Axis for a task can be changed at any time by changing the Current Axis

register for the task (see _CurAxis below). For example, to restore the Default Axis for a

task to its power-on default axes on an 8-axis controller, you could use the following

expression:

_CurAxis := SEL(_CurTask < 8, _CurTask, 0);

The Default Axis is typically used only in advanced applications and is not recommended

for new users.
Why Bother?
Consider a multi-axis application where each axis runs the exact same sequence. Instead

of creating one user program for each axis, you can create a single user program that

issues commands to the Default Axis, and does not specify an axis in the link condition.

Simply issue the Start Task commands to each axis. The user program can run

independently on separate tasks simultaneously.

Using the Task Tags in Expressions

This section is for advanced users only.
The _Task[] tag has several members that can be used to manage tasks with

expressions. The "_Task[]" tag can be used without any value in the brackets to

reference the task that is running that user program.
_Task[].CurAxis
_Task[].CurProg
_Task[].CurStep
_Task[].Status
_Task[].CurProgStep
Using the Default Axis
In expressions in the user programs, the "_Axis[]" tag can be used without any value in

the brackets to reference the default axis.
Changing the Default Axis

286

Delta Computer Systems, Inc.

This manual is related to the following products: