beautypg.com

Creating user programs, Create a user program, Create and edit – Delta RMC151 User Manual

Page 323

background image

5 Programming

Expressions

The Expression command makes the User Programs very powerful. The Expression (113)

command can only be used in User Programs. It can be used for mathematical

calculations and to assign values to tags or variables.
There is no limit to the number of Expression commands that can be issued per step in

the User Programs.
Local variables can be declared in a step. These variables can only be accessed within the

step and are not retained after the user program jumps to another step, even if it is to

the same step. Local variables can be used in an expression command, in command

parameters, or in link conditions.

Importing and Exporting User Programs

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

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

the User Program, a dialog guides you in assigning the variables and tags to the new

project.
See the Exporting and Importing User Programs for details.
If you simply wish to copy a User Program from one project into another without

including the variables and tags, you can use standard copy and paste functions.

Disabling User Programs

User programs can be disabled. Disabled user programs will be downloaded to the RMC,

but will not be able to be run. Disabling user programs is useful if you want to keep a

user program in the project for reference or later use even if it has errors.
To enable or disable a user program, right-click the program in the project pane and

choose Disable program or Enable program. You can also use the Programming

Properties dialog to disable and enable programs.

5.11.2. Creating User Programs

Follow the steps below to create a User Program. For example user programs, see the

Programming Examples Overview topic.

deltamotion.com

303

This manual is related to the following products: