beautypg.com

Rockwell Automation 1746-QS,D17466.19 SYNCHRONIZED AXES MODULE User Manual

Page 30

background image

5–4

Publication 1746-6.19 March 1998

Back and Forth Motion with State-machine Logic
(Programming for Automatic Operation)

This ladder logic example moves axes 1 and 2 back and forth with
Go “G” commands. Each move has its own set of motion profile
words (mode, accel, decel, speed, and position).

The example is a state machine with four automatic states:

State:

Description:

0

No motion. Used when automatic mode is not enabled

1

Moves axis 1 and 2 independently
Uses profile command words N12:0-5 (axis 1) and N12:12-17 (axis 2)

2

Synchronizes axis 1 and 2 to reach the end point at the same time
Uses profile command words N12:6-11 (axis 1) and N12:18-23 (axis 2)

3

Pauses five seconds, then returns to state 1.

Error detection and recovery logic is application dependent, and
should include (for each axis) recovery from module-detected errors
and axis timeouts.

The mode words in these profile commands put the module into
simulate mode, which means it is isolated from LDT inputs and
output drive. It allows for axis-position update and axis plotting.

You cannot be jogging when you attempt to enter automatic mode, and
you cannot be in automatic mode when attempting a jog.

Important: If you intend to use this sample program on a live machine
(module NOT in simulate mode), be sure that you have:
– stored valid motion profiles in N12 files
– initialized the module with valid configuration parameters such as

axis limits, scale, offset, and feedforwards

Assuming that axes are initialized, the setting of bit B3:0/7 simulates
an auto operation switch that starts the state machine in state 1.

| To run this example, set HYDRAULICS OK bit in the data table. |
| Then set the AUTO_SS bit. |
| |
| Valve drive power |
| Imitates and pumps are ON, |
| Operator electronic servo Run state |
| Auto Mode valve is enabled, Axis has received machine |
| select SW blocking valves open valid “P” command Axis is jogging example |
| AUTO_SS HYDRAULICS_OK AXIS1_INITIALIZED AXIS JOGGING AUTO_MODE |
| B3:0 B3:0 I:2 B13:3 B3:0 |
|–––] [–––––––––] [–––––––––––––––––––] [–––––––––––––––––––]/[––––––––––––( )––––|
| 7 2 70 0 14 |
| |
| Set the state machine to state 1 for all axes when entering auto mode. |
| This fill command initializes all four axes. |
| |
| Run state |
| machine |
| example One Shot |
| AUTO_MODE AUTO_MODE_OS AXIS1_NEXT_STATE |
| B3:0 B3:0 +FLL–––––––––––––––+ |
|–––] [––––––––––––––[OSR]––––––––––––––––––––––––––––––––––––+FILE FILL +–|
| 14 15 |Source 1 | |
| |Dest #N7:4 | |
| |Length 4 | |
| +––––––––––––––––––+ |