To
access this editor:
Expand the desired controller in the Project
pane, expand Programming, and
expand User Programs. Double-click
an existing User Program, or right-click User
Programs and click New Program
to create a new one.
Use the Step Editor to create a User Program. The Step Editor provides an easy and intuitive programming interface.
User Programs allow you to run a sequence of commands on the RMC. A User Program consists of a series of steps that are linked together in sequences. The steps consist of the following:
Command - This is the command that will be issued to the specified axis or axes on the RMC.
Link - This specifies which step to jump to next and when to jump to that step.
Example User Programs
For examples of user programs, see the Programming Examples Overview topic.
Using the Step Editor
Steps
Adding a Step:
On the Step Editor toolbar, click the Insert New Step button.
Or, right-click in the space below the step number and choose Add Before or Add After.
Or, select a step and press Insert to add a command before, or Alt+Insert to add a step after.
Delete a Step:
On the Step Editor toolbar, click the DeleteStep button.
Or, right-click in the white space below the step number and choose Delete.
Moving a Step:
Click in the white space below the step number and drag the step to the desired location.
Or, select the step and use the Move Step Up and Move Step Down buttons on the toolbar.
When adding and deleting steps, the Step Editor automatically updates the Link Jump To numbers. For example, if step 3 has a Jump To number of 4, and you insert a step before step 3, then the old step 3 becomes the new step 4. The Step Editor automatically increments its Jump To number from 4 to 5.
If a deleted step was linked to with a number from some other step, a warning will appear in the Output window.
Commands
There are two ways to choose a command:
Choosing a command:
In the Command box, click the ellipsis button to choose a command from the command tree.
Or, in the Command box, begin typing the name or number of the command, then choose the command from the pop-up list.
Adding a new Command:
On the Step Editor toolbar, click the Insert Command button .
Or, right-click close to a command and choose Add Before or Add After.
Or, select a command and press Ctrl+Insert to add a command before, or Ctrl+Alt+Insert to add a command after.
Delete a Command:
On the Step Editor toolbar, click the Delete Command button .
Or, right-click close to the command such that the entire command is selected, then choose Delete.
Moving a Command:
Click close to the command such that the entire command is selected, then drag the step to the desired location.
Or, click close to the command such that the entire command is selected, and use the Move Command Up and Move Command Down buttons on the toolbar.
Entering Command Parameters
If the command has any parameters, enter their values. In most parameters, you may enter a number, tag, or an expression. If you use a tag name, register, or expression, it must evaluate to the data type required by the parameter, typically a REAL.
Tip:
For help on the command's parameters, click the command box and press F1.
Click a parameter box.
To enter a number, type the number.
To enter an expressions, type the expression. The Expression Browser is not available for command parameters, but the auto-complete will assist you.
To enter a tag, click the ellipsis button and choose the tag from the list. Or, start typing the tag name and then use the arrow keys to select the address.
Note:
A tag may be a variable or any register in the RMC.
Selecting Commanded Axes
The Commanded Axes specifies which axes to issue the command to.
Click the Command Axes button and choose the axes you wish to issue the command to. For example, selecting Axis 0 and Axis 1 will make the command be issued to both axes.
The Default Axis and Use Expression options are typically used only in advanced applications. If you choose Default Axis, the command will be issued to the same axis as the Start Task command was issued to. The Use Expression option can be used to programmatically select the commanded axes.
Click OK to close the commanded axes list.
Important: A maximum of one non-immediate command per axis can be issued in a single step. If you try to issue more than one command to an axis per step, the verify will report an error and you will not be able to download the programs.
Choosing a Link Type
Click the down-arrow in the Link Type box and choose the desired link type.
If the link type has a condition, enter it according to the table below:
Link Type |
To enter a Link condition: |
Immed |
N/A |
Jump |
N/A |
Delay |
Type a number, or click the ellipsis button to choose a tag. |
Wait For |
Click the ellipsis button to open the Link Condition Wizard. |
Cnd Jump |
Click the ellipsis button to open the Link Condition Wizard. |
End |
N/A |
If you chose Jump, Delay, or CndJump, enter the step to jump to in the Jump To box(es). You can enter a step number, "Next", or a step label.
Adding A Comment
On the Step Editor toolbar, click the Edit Step Comment button. Or, right-click in the space below the step number and choose Edit Step Comment.
Type a comment and click Save.
Adding A Label
On the Step Editor toolbar, click the Edit Label button. Or, right-click in the space below the step number and choose Edit Label.
Type a label and click Save.
Adding Local Variable Declarations
If you are using the Expression (113) command, you can also define local variables for use in the step. See Local Variables in Expressions for details.
On the toolbar, click the Declarations button.
Copy/Paste
The Step Editor fully supports copy and paste. You can copy and paste any section of a step, entire steps, multiple steps, etc. The copy and paste also works between instances of RMCTools.
Undo
Undo is available for all editing actions in the Step Editor. Undo is also available within an individual expression, although once an expression edit is accepted, the undo history internal to the expression box is cleared.
To undo a change, on the Edit menu, choose Undo, or press Ctrl+Z.
To reverse an undo action, choose Redo, or press Ctrl+Y.
Printing
To print the currently open user program, on the Step Editor toolbar, click the Print button . Or, on the File menu, choose Print.
See Also
Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion