Run Sequence

NI-Motion

Run Sequence

Setting the Find Reference search type to Run Sequence initiates a predefined search across multiple axes and multiple find types. The sequence run is specified in MAX. You also can use the Load Reference Parameter VI or function to programmatically set the Sequence Order for a given axis and search type.

The Run Sequence option allows you to pre-configure a search sequence. That sequence can then be run with a single function. The sequence gets saved when you save user defaults to Flash (ROM).

To specify a run sequence programmatically, you can use Load Reference Parameter to set the Sequence Order for a given axis and search type. The Sequence Order refers to the phase a particular search is in. The default Sequence Order 0 indicates that a particular search type is not included in the sequence.

Note  Only one search type on a given axis can have the same Sequence Order number. If you set the Find Home Sequence Order of 2, then set the Find Index Sequence Order to 2, Find Home Sequence Order resets to 0 and Find Index Sequence Order is 2. No error is reported if this is the case.

When specifying Sequence Orders you must be sure not to skip over a number, all phases must be contiguous. Any finds specified after the gap is not executed. For example, if you specify a Find Center Sequence Order of 1 and a Find Index Sequence Order of 3, only the Find Center is executed.

Example

Suppose you have a stage configured with its x-axis tied to axis 2, its y-axis tied to axis 3, and another device attached to the stage tied to axis 1. If you want to make sure you center the device attached to the stage before you centered the stage you might set up a run sequence similar to the following:

Phase 1  Wait  Phase 2  Wait  Phase 3
Axis 1  Find Center Find Index
Axis 2    Find Center Find Index
Axis 3    Find Center Find Index

The sequence is specified as different phases. The next phase does not start until all find operations in a given phase are complete. In this example, Phase 1 is the centering of axis 1; Phase 2 consists of finding the index of axis 1, and centering axes 2 and 3; Phase 3 consists of finding the index of axes 2 and 3. For this example you would set Find Center Sequence Order on Axis 1 to 1, Find Index Sequence Order on Axis 1 to 2, Find Center Sequence Order on Axes 2 and 3 to 2, and Find Index Sequence Order on Axes 2 and 3 to 3.