• 沒有找到結果。

MC_MoveAbsolute

The MC_MoveAbsolute instruction moves the axis to a specified absolute target position.

Instruction Name FB/

FUN Graphic expression ST expression

MC_MoveAbso-lute

Absolute Po-sitioning

FB

BufferMode

MC_MoveAbsolute_instance

Deceleration

Active

Axis Axis

Execute Done

Position Busy

Acceleration

Error Jerk

Direction

MC_MoveAbsolute

Velocity

CommandAborted

ErrorID

MC_MoveAbsolute_instance ( Axis :=parameter,

Execute :=parameter, Position :=parameter, Velocity :=parameter, Acceleration :=parameter, Deceleration :=parameter, Jerk :=parameter, Direction :=parameter, BufferMode :=parameter, Done =>parameter, Busy =>parameter, Active =>parameter,

CommandAborted =>parameter, Error =>parameter,

ErrorID =>parameter );

Variables

Input Variables

Name Meaning Data type Valid range

De-fault Description

Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when

the value of this variable changes to TRUE.

Position Target Posi-tion

LREAL Negative number, posi-tive number, or 0

0 Specify the absolute target posi-tion.

The unit is command units.*1 Velocity Target

Ve-locity

LREAL Positive number 0 Specify the target velocity.*2 The unit is command units/s.*1 Acceleration Acceleration

Rate

LREAL Non-negative number 0 Specify the acceleration rate.

The unit is command units/s2.*1 Deceleration

Decelera-tion Rate

LREAL Non-negative number 0 Specify the deceleration rate.

The unit is command units/s2.*1

Jerk Jerk LREAL Non-negative number 0 Specify the jerk.

The unit is command units/s3.*1

Name Meaning Data type Valid range

De-fault Description

Direction Direction _eMC_DIREC-TION

0: _mcPositiveDirection 1: _mcShortestWay 2: _mcNegativeDirection 3: _mcCurrentDirection 4: _mcNoDirection

0*3 Specify the direction of rotation when the Count Mode is Rotary Mode.

0: Positive direction 1: Shortest way 2: Negative direction 3: Current direction 4: No direction specified BufferMode Buffer Mode

Selection

_eMC_BUF-FER_MODE

0: _mcAborting 1: _mcBuffered 2: _mcBlendingLow 3: _mcBlendingPrevious 4: _mcBlendingNext 5: _mcBlendingHigh

0*3 Specify the behavior when execut-ing more than one motion instruc-tion.

0: Aborting 1: Buffered 2: Blending low 3: Blending previous 4: Blending next 5: Blending high

*1. Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) for information on command units.

*2. Always set the target velocity. If the axis is moved without setting a target velocity, an error will occur.

*3. The default value for an enumeration variable is actually not the number, but the enumerator.

Output Variables

Name Meaning Data

type

Valid

range Description

Done Done BOOL TRUE or

FALSE

TRUE when the instruction is completed.

Busy Executing BOOL TRUE or

FALSE

TRUE when the instruction is acknowledged.

Active Controlling BOOL TRUE or

FALSE

TRUE when the axis is being controlled.

CommandAborted Command Aborted

BOOL TRUE or

FALSE

TRUE when the instruction is aborted.

Error Error BOOL TRUE or

FALSE

TRUE while there is an error.

ErrorID Error Code WORD *1 Contains the error code when an error occurs.

A value of 16#0000 indicates normal execution.

*1. The upper four digits of the event code give the error code for ErrorID. Refer to the NJ/NX-series Troubleshooting Manual (Cat. No. W503) for the event codes.

 Output Variable Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

Done When positioning is completed.

When Execute is TRUE and changes to

FALSE.

After one period when Execute is FALSE.

Busy When Execute changes to TRUE.

When Done changes to TRUE.

When Error changes to TRUE.

When CommandAborted changes to TRUE.

MC_MoveAbsolute

3

Variables

Name Timing for changing to TRUE Timing for changing to FALSE

Active When the instruction is started.

When Done changes to TRUE.

When Error changes to TRUE.

When CommandAborted changes to TRUE.

CommandAborted

When this instruction is aborted because an-other motion control instruction was executed with the Buffer Mode set to Aborting.

When this instruction is canceled due to an er-ror.

When this instruction is executed while there is an error.

When you start this instruction during MC_Stop instruction execution.

When Execute is TRUE and changes to FALSE.

After one period when Execute is FALSE.

Error When there is an error in the execution condi-tions or input parameters for the instruction.

When the error is cleared.

In-Out Variables

Name Meaning Data type Valid

range Description

Axis Axis _sAXIS_REF --- Specifies the axis. *1

*1. Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Ax-is*) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).

If you use Sysmac Studio version 1.29 or higher, you can specify the system-defined axis variable name for AT specifi-cation of a user-defined variable. This will allow you to specify the user-defined variable.

If you use Sysmac Studio version 1.28 or lower, do not specify any user-defined variable created in the variable table.

Function

• The absolute target position is specified to perform positioning.

• Absolute positioning starts when Execute changes to TRUE.

• You can execute this instruction even if home is not defined.

• You can specify the Velocity (Target Velocity), Acceleration (Acceleration Rate), Deceleration (De-celeration Rate), and Jerk as input variables.

The following chart shows an operation example of absolute positioning.

Velocity

Target distance Time Command current

position

Deceleration Acceleration

Target velocity

0

When the Acceleration (Acceleration Rate) or Deceleration (Deceleration Rate) is 0 and the instruction is executed, the axis will reach the target velocity without accelerating or decelerating.

The following chart shows an operation example of when the Acceleration (Acceleration Rate) is 0.

Target position Time Command current

position

Deceleration Target

velocity Velocity

0

Specify Jerk when you want to accelerate or decelerate smoothly.

The following chart shows an operation example when Jerk is specified.

0

Time Target position

Command current position Target

velocity Velocity

For details on Jerk, refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No.

W507).

When the positioning is started with Position (Target Position) set to the command current position, the axis will not move but Done will change to TRUE.

Instruction Details

This section describes the instruction in detail.