Function BlockMC_MoveAbsolutePLCopen motion icon

Description

This function block performs a single-axis move to a specified endpoint position based on Axis, Position, Velocity, Acceleration, Deceleration, JerkClosedIn physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time, and Direction parameters.

MC_MoveAbsolute

Figure 8-138: MC_MoveAbsolute

Time Diagram

The following figure shows two examples of the combination of two absolute move FunctionClosedA function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. Blocks:

  • The left part of timing diagram illustrates the case if the Second Function BlockClosedA function block groups an algorithm and a set of private data. It has inputs and outputs. is called after the First one. If First reaches the commanded position of 6000 (and the velocity is 0) then the output Done causes the Second FB to move to the position 10000
  • The right part of the timing diagram illustrates the case if the Second move Function Block starts the execution while the First FB is still executing. In this case the First motion is interrupted and aborted by the Test signal during the constant velocity of the First FB. The Second FB moves directly to the position 10000 although the position of 6000 is not yet reached

MC_MoveAbsolute: Timing Diagram

Arguments

Input

Execute

Description

Requests to queue the move

 

Data type

BOOL

 

Range

0, 1

 

Unit

N/A

 

Default

Axis

Description

Name of a declared instance of the AXIS_REF library function (for more details,About Axis Name and Number)

 

Data type

AXIS_REF

 

Range

[1,256]

 

Unit

N/A

 

Default

Position

Description

Endpoint position. If Rollover Position is nonzero, this value must be in the range

0 <= Position < Rollover Position

When not in Rollover mode, the input accepts a 64-bit floating point value.
When converted to feedback units, the range is [-251,251-1] feedback units.

 

Data type

LREAL

 

Range

[see Description]

 

Unit

User unit

 

Default

Velocity

Description

Velocity setpointClosedSetpoint is the target value that an automatic control system, for example PID controller, will aim to reach

 

Data type

LREAL

 

Range

 

Unit

User unit/sec

 

Default

Acceleration

Description

Trapezoidal: Acceleration rate

S-curve: Maximum acceleration

If Acceleration is not valid, ErrorID is set to 21

Selection of Acceleration and Jerk Parameters for Function Blocks

 

Data type

LREAL

 

Range

 

Unit

User unit/sec2

 

Default

Deceleration

Description

Trapezoidal: Deceleration rate

S-curve: Unused

 

Data type

LREAL

 

Range

 

Unit

User unit/sec2

 

Default

Jerk

Description

Trapezoidal: 0

S-curve: Constant jerkClosedIn physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time

If Jerk is not valid, ErrorID is set to 21

Selection of Acceleration and Jerk Parameters for Function Blocks

 

Data type

LREAL

 

Range

 

Unit

User unit/sec3

 

Default

Direction

Description

When Rollover Position is zero, a value of 0 must be specified.

When Rollover Position is nonzero, a value of 1, 2, 3, or 4 must be specified.

Value

Description

0

no direction specification

1

positive direction. The axis travels in the positive direction to the endpoint

2

shortest distance. The axis travels in the direction that provides the shortest distance to the endpoint

3

negative direction. The axis travels in the negative direction to the endpoint

4

last direction. The axis travels to the endpoint in the same direction as its previous move

If the Position input is the same as the axis's current position, then:

  • when Direction = 2 (shortest distance), the axis does not move and the Done output goes high indicating that the move has been completed.
  • when Direction = 1, 3, or 4, the axis travels in the specified direction, through one rollover cycle, and arrives back at the same position.
 

Data type

SINT

 

Range

[0,4]

 

Unit

N/A

 

Default

BufferMode

Description

0 = abort

1 = buffer

2 = blend to active

3 = blend to next

4 = blend to low velocity

5 = blend to high velocity

See table in Buffer Modes

 

Data type

SINT

 

Range

[0,5]

 

Unit

N/A

 

Default

Output

Done

Description

Indicates the move completed successfully.
The Command Position has reached the endpoint.

 

Data type

BOOL

Busy

Description

High from the moment the Execute input is one-shot to the time the move is ended

 

Data type

BOOL

Active

Description

Indicates this move is the active move

 

Data type

BOOL

CommandAborted

Description

Indicates the move was aborted

 

Data type

BOOL

Error

Description

Indicates an invalid input was specified or the move was terminated due to an error

 

Data type

BOOL

ErrorID

Description

Indicates the error if Error output is set to TRUE

See table in PLCopen Function Block ErrorID Output

 

Data type

INT

Example

Structured Text

            (* MC_MoveAbsolute S
T example *)
Inst_MC_MoveAbsolute( MovAbsReq, Axis1, 1234.567, 100.0, 100.0, 100.0, 0, 0, 0 );  //instance of MC_MoveAbsolute
MovAbsDone := Inst_MC_MoveAbsolute.Done;  //store done output into user defined variable
MovAbsBusy := Inst_MC_MoveAbsolute.Busy;
MovAbsActive := Inst_MC_MoveAbsolute.Active;
MovAbsAborted := Inst_MC_MoveAbsolute.CommandAborted;
MovAbsError := Inst_MC_MoveAbsolute.Error;
MovAbsErrID := Inst_MC_MoveAbsolute.ErrorID;

See also how this function is used in the Hole punch project here

Ladder Diagram

MC_MoveAbsolute: LD example

Go back to the top of the page [Top]