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

FALSE, TRUE

N/A

No default

On the rising edgeClosed The transition of a digital signal from low to high. AKA: 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 functionClosed A 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..

Slave

AXIS_REF

1, 256

N/A

No default

AXIS_REF.AXIS_NUM is the slave axis number.

See AXIS_REF Structure.

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.

AccelerationClosed A change in velocity over time. Because velocity is a vector, it can change in two ways: a change in magnitude and/or a change in direction. In one dimension, acceleration is the rate at which something speeds up or slows down. However, more generally, acceleration is a vector quantity expressing the change with time of the velocity both in magnitude and in direction. See these Wikipedia articles for more information: http://en.wikipedia.org/wiki/Velocity http://en.wikipedia.org/wiki/Euclidean_vector http://en.wikipedia.org/wiki/Rate_(mathematics)

LREAL

No range

User unit/sec2

No default

Trapezoidal: Acceleration rate.

S-curve: Maximum acceleration.

See S-curve and Trapezoidal Acceleration / Deceleration.

Deceleration

LREAL

No range

User unit/sec2

No default

Trapezoidal: Deceleration rate.

S-curve: Unused.

See S-curve and Trapezoidal Acceleration / Deceleration.

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

See S-curve and Trapezoidal Acceleration / Deceleration.

BufferMode

SINT

0, 1

N/A

No default

Outputs

Output

Data Type

Range

Unit

Description

InGear

BOOL

FALSE, TRUE

N/A

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

Busy

BOOL

FALSE, TRUE

N/A

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

Active

BOOL

FALSE, TRUE

N/A

Indicates this move is the Active move.

CommandAborted

BOOL

FALSE, TRUE

N/A

Indicates the move was aborted.

Error

BOOL

FALSE, TRUE

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.

Remarks

SlaveCommandPosition = MasterActualPosition * RatioNumerator / RatioDenominator

Aborting Gearing

Gearing functions can generate large accelerations while following the master.

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

Figure 1: MC_GearIn

Time Diagram

Figure 2: Time Diagram

FBD Language Example

Not available.

FFLD Language 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