MC_GearIn

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Performs a slave axis move which follows the master axis based on the ratio specified by RatioNumerator and RatioDenominator.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

0, 1

N/A

No default

On the rising edgeClosed A rising edge is the transition of a digital signal from low to high. It is also called positive edge, request to queue the slave gear ratio move.

Master

AXIS_REF

1, 256

N/A

No default

Name of a declared instance of the AXIS_REF library function.

Slave

AXIS_REF

1, 256

N/A

No default

AXIS_REF.AXIS_NUM is the slave axis number.

See AXIS_REF Structure for more information.

RatioNumerator

DINT

-2147483648 to 2147483647

N/A

No default

Numerator of master/slave ratio.

RatioDenominator

DINT

-2147483648 to 2147483647

N/A

No default

Denominator of master/slave ratio.

Acceleration

LREAL

No range

User unit/sec2

No default

Trapezoidal: Acceleration rate.

S-curve: Maximum acceleration.

See S-curve and Trapezoidal Acceleration / Deceleration for more information.

Deceleration

LREAL

No range

User unit/sec2

No default

Trapezoidal: Deceleration rate.

S-curve: Unused.

See S-curve and Trapezoidal Acceleration / Deceleration for more information.

JerkClosed In physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time

LREAL

No range

User unit/sec3

No default

Trapezoidal: 0 (zero).

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

See S-curve and Trapezoidal Acceleration / Deceleration for more information.

BufferMode

SINT

0, 1

N/A

No default

  • 0 = Abort.
  • 1 = Buffer.
  • See Buffer Modes for more information.

Outputs

Output

Data Type

Range

Unit

Description

InGear

BOOL

No range

N/A

Indicated the slave axis is locked on to the master axis.

Busy

BOOL

No range

N/A

High from the moment the Execute input goes high until the time the move is ended.

Active

BOOL

No range

N/A

Indicates this move is the Active move.

CommandAborted

BOOL

No range

N/A

Indicates the move was aborted.

Error

BOOL

No range

N/A

Indicates either:

  • An invalid input was specified.
  • The move was terminated due to an error.

ErrorID

INT

No range

N/A

Indicates the error if the Error output is set to TRUE.

See PLCopen Function Block ErrorIDs for more information.

Remarks

SlaveCommandPosition = MasterActualPosition * RatioNumerator / RatioDenominator

Aborting Gearing

Gearing functions can generate large accelerations while following the master.

  • If the aborting function block has small, non-zero Jerk, or small acceleration values, it can take a long time for an accelerating axis to reach the target velocity, or position of the aborting function block.
    • If the Jerk and/or acceleration of the aborting function cannot be increased to suitable values, it may be desirable to either:
      • Abort the gearing function with an MC_GearOut with higher accelerations and/or Jerk values (or zero jerk value).
      • Execute the next MC motion function block (e.g., MC_Halt).

Time to Reach the Target Velocity

While following the master, gearing functions can generate large accelerations.

  • If the gearing function is aborted while the axis is currently accelerating, and the aborting function block has small non-zero Jerk or small acceleration values, it can take a long time to reach the target velocity, or position of the aborting function block.
    • If the Jerk and/or acceleration of the aborting function cannot be increased to suitable values, it may be desirable to either:
      • Abort the gearing function with an MC_GearOut with higher accelerations and/or Jerk values (or zero jerk value).
      • Execute the next MC motion function block (e.g., MC_Halt).

MC_GearIn

Figure 6-249: MC_GearIn

Time Diagram

MC_GearIn: Timing Diagram

Figure 6-250: Time Diagram

FBD Language Example

Not available.

FFLD Language Example

MC_GearIn: LD example

IL Language Example

Not available.

ST Language Example

(* MC_GearIn ST example *)
   Inst_MC_GearIn( GearInReq, Axis1, Axis2, 2, 1, 150.0, 150.0, 0, 0 );
//Inst_MC_GearIn is an instance of MC_GearIn