The Event Control feature allows you to execute a sequence of commands without intervention from the Programmable Controller (P/C). This lets the module respond to events within the control-loop time (1ms or 2ms) rather than the scan rate of the P/C. It also reduces the controller programming required.
Event Control consists of a series of Steps that are linked together in sequences. The Steps consist of a command area containing the instruction to be executed and a link area that specifies the next Step number and its trigger. There are a total of 256 Steps that can be shared by all axes.
Steps
Each Step contains a command with its associated parameters, plus the information necessary to link to the next Step in a sequence. The Step format is as follows:
Command Info: |
|
MODE word |
|
Acceleration |
|
Deceleration |
|
Requested Speed |
|
Requested position or command value |
|
Any valid ASCII command |
|
Axis (or axes) to send command to |
|
Link Info: |
|
Condition that triggers execution of next step |
|
Parameter associated with Link Type |
|
Number of next Step in sequence |
Storing Steps
Steps are stored in the motion controller's memory. This step table can be saved in the motion controller's Flash using the Update Flash command. However, in some applications this information should be stored in the Programmable Controller so that it can be downloaded to the motion controller on initialization. Refer to Event Step Transfer for details on storing the steps.
Changing Event Steps
Refer to Editing the Event Step Table for details on using the Event Step editor.
Basic Event Step Flow
After a valid event step sequence is loaded into the motion controller, event control can be used. This section describes the basic flow:
To start a sequence of events, use one of these methods:
Issue a Start Event command to trigger an event from RMCWin or the Programmable Controller.
Use the Input to Event Table to trigger an event sequence from a digital input.
A sequence of events will stop when one of the following occurs:
A Quit Events command has been issued from RMCWin or the Programmable Controller.
A step is executed which has a Link Type of 0.
A Halt or Disable Drive Output command is carried out.
Another Start Event command is carried out. This stops the current sequence and starts the new one.
The following additional details should also be kept in mind:
The Mode, Accel, Decel, Speed and/or Command Value fields need not be filled out if the command does not use them.
The command field can be left blank in a step if only the link type is being used. This is useful for chaining steps together to make a sequence wait for multiple conditions to all be true.
The command in an event will be executed as soon as a step is reached in the event sequence.
The next Step in the sequence will be executed as soon as the conditions from the Link Type and Link Value are met.
Multiple axes can be made to follow identical patterns simultaneously by using the same steps on each.
Steps may be conditionally branched using the Poll (?) command.
Pop-up editors may be used for simplified editing of the Mode, Commanded Axes, Link Type and Link Next fields. For information on using these editors, see Using Popup Editors.
Example
In the following example three steps are executed. They cause the axis to make a move, wait and then make another move:
|
Step 15 |
Step 16 |
Step 17 |
Mode |
0x0001 |
0x0001 |
0x0001 |
Accel |
100 |
100 |
100 |
Decel |
100 |
100 |
100 |
Speed |
10000 |
10000 |
10000 |
Command Value |
15500 |
10000 |
3000 |
Command |
G |
|
G |
Commanded Axes |
Default |
Default |
Default |
Link Type |
BitsON |
DelayMS |
DelayMS |
Link Value |
00001 |
500 |
0 |
Link Next |
16 |
17 |
0 |
Step 15 issues a Go (G) command to 15.5 inches (15500). The BitsON (B) link type with a link value of 0x0001 causes the motion controller to look for the least significant bit in the STATUS word (the In Position bit). When the In Position bit turns on, indicating the move is complete, Step 16 (Link Next – 16) is executed.
Step 16 has no command so no command is issued. The DelayMS (D) link type with a link value of 500 waits 500 milliseconds before jumping to Step 17.
Step 17 issues a Go (G) command to 3 inches. The DelayMS link type with a value of 0 (zero) causes the axis to go immediately to Step 0, which stops the sequence.
Copyright (c) 1997-2015 by Delta Computer Systems, Inc.