• 沒有找到結果。

The MC_MoveJog instruction jogs an axis according to the specified target velocity.

Instruction Name FB/

FUN Graphic expression ST expression

MC_MoveJog Jog FB MC_MoveJog_instance

Deceleration

Axis Axis

PositiveEnable Busy

NegativeEnable

Acceleration

Error ErrorID CommandAborted MC_MoveJog

Velocity

MC_MoveJog_instance ( Axis :=parameter,

PositiveEnable :=parameter, NegativeEnable :=parameter, Velocity :=parameter, Acceleration :=parameter, Deceleration :=parameter, Busy =>parameter,

CommandAborted =>parameter, Error =>parameter,

ErrorID =>parameter );

Variables

Input Variables

Name Meaning Data

type Valid range Default Description

PositiveEnable Positive Direc-tion Enable

BOOL TRUE or

FALSE

FALSE When this variable changes to TRUE, the axis starts moving in the positive direction.

When it changes to FALSE, the axis stops mov-ing.

NegativeEnable Negative Direc-tion Enable

BOOL TRUE or

FALSE

FALSE When this variable changes to TRUE, the axis starts moving in the negative direction.

When it changes to FALSE, the axis stops mov-ing.

Velocity Target Velocity LREAL Non-negative number

0 Specify the target velocity.

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 Deceleration

Rate

LREAL Non-negative number

0 Specify the deceleration rate.

The unit is command units/s2.*1

*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.

Output Variables

Name Meaning Data

type

Valid

range Description

Name Meaning Data type

Valid

range Description

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

Busy When PositiveEnable or NegativeEnable changes to TRUE.

When the axis stops.

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 PositiveEnable is TRUE and changes to FALSE.

When NegativeEnable is TRUE and changes to FALSE.

After one period when PositiveEnable and NegativeEnable are 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 MC_MoveJog (Jog) instruction performs jogging according to the specified Velocity (Target Ve-locity).

• To jog in the positive direction, change PositiveEnable (Positive Direction Enable) to TRUE. To jog in the negative direction, change NegativeEnable (Negative Direction Enable) to TRUE.

• If PositiveEnable (Positive Direction Enable) and NegativeEnable (Negative Direction Enable) are changed to TRUE at the same time, PositiveEnable (Positive Direction Enable) takes priority. As a result, the axis will jog in the positive direction.

MC_MoveJog

3

Function

• If the command velocity of the MC_MoveJog (Jog) instruction exceeds the Maximum Jog Velocity

value that is set in the axis parameters, the Maximum Jog Velocity value is used.

Precautions for Correct Use

• When creating a ladder diagram program, you must connect the PositiveEnable (Positive Di-rection Enable) input variable to the left bus bar and specify a variable for the NegativeEnable (Negative Direction Enable) input variable as shown below.

PositiveEnable

ErrorID MC_MoveJog_instance

Error MC_MoveJog

Axis Axis

Busy CommandAborted NegativeEnable

Velocity Acceleration Deceleration MC_Axis000

POS_EN

NEGA_EN

J_ERRID VEL

ACC DEC

J_CA J_ERR

J_DONE

To use the master control instructions (MC and MCR) for the MC_MoveJog (Jog) instruction, do not program the instructions as shown below. If you do, master control is applied only to PositiveEnable (Positive Direction Enable), i.e., it is not applied to NegativeEnable (Negative Direction Enable).

MC_On

MCNo MC In 0 Master control started.

PositiveEnable

ErrorID MC_MoveJog_instance

Error MC_MoveJog

Axis Axis

Busy CommandAborted NegativeEnable

Velocity Acceleration Deceleration MC_Axis000

POS_EN

NEGA_EN

J_ERRID VEL

ACC DEC

J_CA J_ERR

J_DONE MC_MoveJog Instruction

MCNo MCR In 0

Master control ended.

Always use the master control instructions for the MC_Power instruction.

MC_On

MCNo MC In 0 Master control started.

MC_MoveJog

3

Function

Enable Status

ErrorID PWR1

Error MC_Power

Axis Axis

Busy MC_Axis000

Pwr1_En Pwr1_Status

Pwr1_Bsy Pwr1_Err Pwr1_ErrID Servo turned ON.

MCNo MCR In 0

Master control ended.

PositiveEnable

ErrorID MC_MoveJog_instance

Error MC_MoveJog

Axis Axis

Busy CommandAborted NegativeEnable

Velocity Acceleration Deceleration MC_Axis000

POS_EN

NEGA_EN

J_ERRID VEL

ACC DEC

J_CA J_ERR

J_DONE MC_MoveJog Instruction

Timing Charts

• Busy (Executing) changes to TRUE as soon as PositiveEnable (Positive Direction Enable) or NegativeEnable (Negative Direction Enable) changes to TRUE.

• The axis starts deceleration as soon as PositiveEnable (Positive Direction Enable) or

NegativeEnable (Negative Direction Enable) changes to FALSE. Busy (Executing) changes to FALSE when the axis stops completely.

• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy

(Execut-ing) changes to FALSE.

Velocity

Decelerates to a stop when another instruction causes an error.

Time Deceleration

Acceleration

Target velocity Busy

NegativeEnable

CommandAborted Error

16#0000 ErrorID

PositiveEnable

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

Input variables Velocity (Target Velocity), Acceleration (Acceleration Rate), and Deceleration (Deceler-ation Rate) are updated in the motion only when PositiveEnable (Positive Direction Enable) or

NegativeEnable (Negative Direction Enable) changes to TRUE. Therefore, the axis velocity will not

change even if Velocity (Target Velocity) changes while PositiveEnable (Positive Direction Enable) or

NegativeEnable (Negative Direction Enable) remains TRUE.