MC_Reference
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
Execute |
BOOL |
0, 1 |
N/A |
No default |
On the rising edge 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 function 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. Direction The orientation components of a vector in space.INT Range = 1, 2.
InputID INT Range = 0, 1
TrigidINT
|
LREAL |
No range |
User unit/sec |
No default |
Commanded velocity for the reference move. |
|
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. |
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. |
LREAL |
No range |
User units |
No default |
The position the axis is reset New start of the microprocessor. to when at the machine 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:
|
ErrorID |
INT |
|
|
Indicates the error if Error output is high. |
Remarks
-
- This function block starts a motion-related action and stores data for calculations and error checking.
See Call Function Blocks Multiple Times in the Same Cycle if using a dual-core controller.
-
-
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.
- See Function Blocks - General Rules about how inputs and outputs work.
- See PLCopen Homing for more information.
- If the application selects to reference to the index Zero pulse (zero signal) of a hardware pin such as digital input or feedback pin. mark of an encoder Generates an output signal directly proportional to the movement of the motor shaft. This signal is fed into the control circuitry to control the shaft position and speed. The most common types are: Incremental/Serial encoders, Hall effect sensors, Resolvers, Tachometer Generators See: Optical encoders., or the null of a resolver (which is typical), the new position value is assigned to the position of the index of the encoder (or the null of the resolver) and not the position of the switch.
- The ECATWriteSDO function block is used to setup the trigger event and any desired preconditions.
- This function block utilizes the Position Capture Mode of the AKD.
-
- There are a differences between how an AKD and an AKD2G are used with this function block.
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.
- See Buffer Modes for more information.
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.
- Verify the Axis is not on Reference switch 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.
- Configure the AKD capture engine.
- Configuration of the AKD capture engine is performed by writing drive In electrical engineering, a drive is an electronic device to provide power to a motor or servo. Control device for regulating the speed, torque and position of a motor. A unit controlling a motor using the current and timing in its coils. CAN Controller area network - CAN is a broadcast, differential serial bus standard developed for connecting electronic control units. Each node is able to send and receive messages, but not simultaneously. objects via SDO.
- Use the ECATWriteSdo function for this action.
- The AKD Capture mode must be set to POSITION CAPTURE.
- See AKD Capture Engine Configuration for information about the available configurations.
- See PLCopen Homing Methods for example AKD capture engine configurations and references.
- 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 system 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.
- 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.
- 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