beautypg.com

Exporting and importing user programs, Using expressions for commanded axes, Programmatically select the commanded axes – Delta RMC151 User Manual

Page 331: Exports, Imports, E exporting and importing user programs, To programmatically select the commanded, Axes

background image

5 Programming

5.11.7. Exporting and Importing User Programs

User Programs can be exported to a file to be imported later into another project. When

exporting a User Program, all the tags it uses are included. When importing the User Program,

a dialog guides you in assigning the variables and tags to the new project.

Exporting a User Program

To export a User Program, in the project pane, right-click the User Program and click

Export User Program. Choose a location and name to save the file to and click Save.

Importing a User Program

To import a User Program:

In the project pane, right-click Programming and click Import User Program.

Choose a file and click Open.

If the User Program uses any variables or tags, the User Program Import dialog will

open. The dialog lists all the variables used by the User Program. In order for the

program to verify correctly, these tags must be assigned to locations in the project.

The User Program Import dialog attempts to automatically allocate the tags. If no

space is available for a tag, the user must assign the tag to a new destination address,

or choose to skip importing that specific tag. After you are finished assigning or

skipping the tags, click OK.

For more details, see the User Program Import Dialog topic.

5.11.8. Using Expressions for Commanded Axes

This topic describes the Use Expressions option in the Commanded Axes list in user

program commands. This allows the commanded axes to be programmatically selected when

the user program is running. This feature is useful for machines that occasionally may need to

disable an axis but yet run the user programs that normally send commands those axes.
This is an advanced feature that will not typically be used in most applications.

Overview

The Use Expression option provides an expression box to provide a mask for selecting

the commanded axes. The expression must evaluate to a DWORD. The bits in the DWORD

correspond to the axis number. If the bit is set, the command will be sent to the

corresponding axis. If the no bits are set, the command will not be sent to any axis. Any

bits set for which no axis exists will be ignored.

Example 1: Single Command to Multiple Axes

This example demonstrates how to send a single command to any axes as set by a

variable.

1. MyMask is as a DWORD variable in the Variable Table.
2. This user program sends a Move Absolute (20) command to the axes defined by the

bits set in the MyMask variable:

deltamotion.com

311

This manual is related to the following products: