MC_Reference

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Used to execute a fast homeClosed The homing procedure allows, based on a position measurement, to set a position offset to the motor to ensure it is physically at the home position. to a switch.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

0, 1

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 move and arms reference trigger events.

Axis

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

TriggerInput

TRIGGER_REF

See Description.

N/A

No default

TRIGGER_REF structure defines the trigger.

DirectionClosed The orientation components of a vector in space.INT

Range = 1, 2.

  • 1 = Rising edge.
  • 2 = Falling edge.

InputID INT

Range = 0, 1

TrigidINT

  • Must be 0 (zero).

  • TrigMode INT (TriggerInput.TrigMode) is not presently supported by this function.

VelocityClosed For a group of axes this means: In ACS the velocities of the different axes. In MCS and PCS it provides the velocity of the TCP

LREAL

No range

User unit/sec

No default

Commanded velocity for the reference move.

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 r

User unit/sec2

No default

Commanded acceleration for the reference move.

Deceleration

LREAL

no r

User unit/sec2

No default

Commanded deceleration for the reference move.

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

Commanded jerk for the reference move.

If 0 (zero), the trapezoidal acc/dec is used.

Direction

SINT

0, 1

N/A

No default

Commanded direction of the reference.

PositionClosed Position means a point in space which is described by different coordinates. Depending on the used system and transformation it can consist of a maximum of six dimensions (coordinates).This means three Cartesian coordinates in space and coordinates for the orientation. In ACS there can be even more than six coordinates. If the same position is described in different coordinate systems the values of the coordinates are different.

LREAL

No range

User units

No default

The position the axis is resetClosed New start of the microprocessor. to when at the machineClosed The complete assembly of all connected parts or devices, of which at least one is movable. reference location.

Option

SINT

0, 15

N/A

No default

Option identifier for Resolvers/Modulo reference.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

 

 

Indicates the reference move and position adjustment is complete.

Busy

BOOL

 

 

Indicates this function block is executing.

Active

BOOL

 

 

Indicates this move is the Active move.

CommandAborted

BOOL

 

 

Indicates the move was aborted.

Error

BOOL

 

 

Indicates either:

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

ErrorID

INT

 

 

Indicates the error if Error output is high.

See PLCopen Function Block ErrorIDs.

Remarks


  • At this time, position capture is not available for PLCopen axes assigned to the secondary feedback input (digitizing axes).
    MC_Reference cannot be used to home digitizing axes.

Usage


  • Once the MC_Reference block is queued, but before it is completed, the cycle can be aborted by either:

    • Using a MC_Halt or MC_Stop function block.
    • By queuing a new motion function block with the Abort selected for buffer mode.

These are steps for homing a PLCopen axis using the MC_Reference function block.

Not all of the steps are necessary depending on the configuration and the homing cycle design.

  1. Verify the Axis is not on Reference switchClosed An adjustable hardware switch for indicating a home position..
    • If a switch is used in the homing cycle for the event or precondition to the event, verify the axis is not already tripping the switches that trigger the event and precondition.
    • If it is, move the axis off the switches.
  2. Configure the AKD capture engine.
  3. Call the MC_Reference function to initiate optional homing motion and to arm the AKD capture engine.
    • MC_Reference selects the trigger edge (rising or falling edge) and arms the capture.
    • Then, it optionally moves the axis to the reference location as directed by inputs to this function.
    • When the AKD indicates the capture event has occurred, the coordinate systemClosed The reference system in which a coordinate or path is described. is shifted so the reference position input to this function block is set to the reference location and the reference motion is stopped.
  4. Wait for the completion of the MC_Reference function block.
    • The application is notified by the completion, abort, or error of the homing by the MC_Reference function block.
  5. When the MC_Reference function block is completed, the axis can be moved to the home position with a MC_MoveAbsolute function block.

Figure 1: MC_Reference

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

(* MC_Reference ST example *)
TriggerInput.InputID := 0; //configure the reference InputID
TriggerInput.DIRECTION := 1; //configure the reference direction
Inst_MC_Reference( RefReq, Axis1, TriggerInput, 20.0, 100.0, 100.0, 100.0, 0, 0.0, 0 );

See Also