Execute mc_movevelocity and mc_halt – Rockwell Automation 2080-LC50 Getting Started with Motion Control Using a Simulated Axis User Manual

Page 76

Advertising
background image

66

Publication 2080-QS001A-EN-E - January 2013

Chapter 5 Execute Your Motion Control Function Blocks

Execute MC_MoveVelocity and MC_Halt

The MC_MoveVelocity function block commands a never ending axis to move at a specified velocity until the hard or soft
limit is reached.

Before execution, the MC_MoveVelocity program should appear as shown.

TIP

Velocity can be a signed value. Users are advised to use positive velocity.

Direction input for the MC_MoveVelocity function block can be used to define the direction of the move
(that is, negative velocity x negative direction = positive velocity).

TIP

For MC_MoveVelocity, direction input value can be 1 (positive direction), 0 (current direction) or -1
(negative direction).

For any other value, only the sign is taken into consideration. For example, -3 denotes negative direction,
+2 denotes positive direction, and so on.

For MC_MoveVelocity, the resulting sign of the product value derived from velocity x direction decides the
motion direction, if the value is not 0. For example, if velocity x direction = +300, then direction is positive.

Advertising
This manual is related to the following products: