Application modules – Rockwell Automation 193 Drives and Motion Accelerator Toolkit Quick Start User Manual

Page 214

Advertising
background image

214

Rockwell Automation Publication IASIMP-QS019E-EN-P - August 2013

Appendix A

Logic Program Overview

Application Modules

The application modules contain all of the application specific code. This is where a majority of the customizing
is expected to occur and is essentially a programming space where you spend a significant portion of your efforts
to develop proprietary logic specific to your application.

In this example, application code is shown for the Widg-O-matic machine’s assembly application.

============================================================================================

============================================

SERCOS / CIP MOTION

SIMPLE INCREMENTAL MOVE

The following application example demonstrates how to control a SERCOS / CIP MOTION drive using sequencers &

Motion Instructions.

While the Machine is STARTING / RUNNING, the drive will be operated as follows:

1) Lower Y-Axis - Incremental Distance -2.0 revs

2) DWELL - Time 1 sec

3) Raise Y-Axis - Incremental Distance 2.0 revs

4) Extend X-Axis - Incremental Distance 3.0 revs

5) Lower Y-Axis - Incremental Distance -2.0 revs

5) DWELL - Time 1 sec

6) Raise Y-Axis - Incremental Distance 2.0 revs

7) Retract X-Axis- Incremental Distance -3.0 revs

8) Repeat

The Run Sequence is continuously repeated until the Stop Sequence is initiated by a Machine ABORT or STOP

command.

============================================================================================

NOP

============================================================================================

============================================

SERCOS / CIP MOTION

SIMPLE INCREMENTAL MOVE

The following application example demonstrates how to control a SERCOS / CIP MOTION drive using sequencers &

Motion Instructions.

While the Machine is STARTING / RUNNING, the drive will be operated as follows:

1) Lower Y-Axis - Incremental Distance -2.0 revs

2) DWELL - Time 1 sec

3) Raise Y-Axis - Incremental Distance 2.0 revs

4) Extend X-Axis - Incremental Distance 3.0 revs

5) Lower Y-Axis - Incremental Distance -2.0 revs

5) DWELL - Time 1 sec

6) Raise Y-Axis - Incremental Distance 2.0 revs

7) Retract X-Axis- Incremental Distance -3.0 revs

8) Repeat

The Run Sequence is continuously repeated until the Stop Sequence is initiated by a Machine ABORT or STOP

command.

============================================================================================

============================================================================================

============================================

RUN SEQUENCE

============================================================================================

============================================

NOP

============================================================================================

============================================

RUN SEQUENCE

============================================================================================

============================================

INCREMENTAL MOVE

Lower Y-Axis

Incremental Distance -2.0 revs

Equal
Source A RunSEQ[0]

0

Source B

1

EQU

EN

DN

ER

IP

PC

Motion Axis Move
Axis

Gantry_Y_Axis ...

Motion Control

Gantry_Y_Axis_Ctrl.MI.MAM[1]

Move Type

1

Position

-2

Speed

Gantry_Y_Axis_Ctrl.Data.MoveSpd[1]

1.0

Speed Units

Units per sec

Accel Rate

Gantry_Y_Axis_Ctrl.Data.MoveAccel[0]

50.0

Accel Units

% of Maximum

Decel Rate Gantry_Y_Axis_Ctrl.Data.MoveDecel[0]

50 0

MAM

Motion Axis Move

INCREMENTAL MOVE

Lower Y-Axis

Incremental Distance -2.0 revs

Advertising