Motion Control (MC Functions)

These MC functions are compatible with both CANopen and EtherCAT. Multi-Axes MC Functions are compatible with EtherCAT.

The MC function blocks are listed under Motion Control in the Ladder Toolbox.

Note that each MC FB is automatically allocated a data block - a specific, reserved memory section - when you include it in your program. A data block is linked to a struct; you assign a tag for the struct name when you include the FB in your project. The parameters in these structs are read-only.

 Note that the parameters of the data block will vary according to the UMD drive model. For example, UMD drives that support TouchProbe will display parameters for probe number and latch window.

 

 

 

In accordance with PLCopen standards, MC FBs have outputs that are visible in the Ladder.
However, note that the MC outputs reflect the values of the parameters in related struct.

You do not have to link operands to these outputs.

General Notes

These are general notes regarding MC function blocks:

  • Switching modes: while the drive is switching between modes (for example, from position to velocity), the drive stops running.

  • Axis struct parameters are not updated automatically; use the MC Read FB to receive an updated value of a specific parameter.

  • Axis errors:

    • ErrorStop state: when axis is in ErrorStop, the axis struct parameter Axis>Alarmcode, Parameter ID: 1000 will contain the error code. Note that the error code itself will be displayed on the servo drive display.

    • Communication error: check the Drive struct IO>Drive> Is Connected bit, this must be ON

  • MC function block errors:

    • When an error occurs, the FB's Error bit turns ON.

    • The Error ID will return a value that indicates the error.

    • CANopen: Monitor the CANopen Statistics struct, in particular ReceiveQueueIsFull, SendQueueIsFull, NumSendMsgDropped, NumReceivedMsgDropped. Note that applications containing multiple MC Read FBs, many axes, or includes a large number of Sync ladder elements that demand the drive's PDO response may result in heavy CANOpen traffic.

    • Monitor the Global>Axis>Status bit array to track the state of the axis

  • Direction: Move Velocity and Torque Control use direction enums: 0 = PositiveDirection, 1 = ShortestWay, 2 = Negativedirection, 3 = CurrentDirection

  • All values used in FB inputs are expressed in user/technical units as defined in the Axis properties Axis properties.

  • In order to execute motion functions, you must call the FBs at each cycle; it is recommended that you place them directly on the bus bar.

  • MC_Power: use only one per axis.

  • Always check the PLCOpen state in the axis status bit array.

  • Recommendations

    • CANopen: Monitor the CANopen Statistics struct, in particular ReceiveQueueIsFull, SendQueueIsFull, NumSendMsgDropped, NumReceivedMsgDropped. Note that applications containing multiple MC Read FBs, many axes, or includes a large number of Sync ladder elements that demand the drive's PDO response may result in heavy CANOpen traffic.

    • Monitor the Global>Axis>Status bit array to track the state of the axis.

 

MC Power

This FB controls the power flow to the Axis (On or Off).

It activates at the rising edge of the Enable bit.

  • Use one and only one MC Power FB per axis.

  • When drive is disconnected during MC Power initialization, you must trigger the rising edge of MC Power Enable bit.

  • MC Power must be constantly called even if enable input is OFF.

  • If the MC Power FB is called--if the Enable bit turns ON--while the axis is Disabled, the axis state changes to Standstill, unless the drive indicates an error.
    In the case of error, use the MC Reset FB to change the axis state to Standstill.

  • If MC Power Enable bit turns OFF while a motion is executing, the axis will react according to the selected Disable option (Axis>Dynamics>Stop options> Disable options), and the Error bit of the FB currently executing the motion will turn ON, while at the same time the Error ID =300 (PLCOpen: transition not allowed)

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to power

B

Enable

When ON,  power is being supplied to the drive that the Axis is linked to

C

Status

Effective State of the Power phase

D

A Valid set of outputs is available

If true, a valid set of outputs is available for the FB

E

Error bit

Turns ON when an error occurs within the function block

F

Error ID

The value indicates the error code.

 

MC Home

This Function Block commands the axis to perform the «search home» sequence. This is set in Axis> Homing.

The ‘Position’ input is MC Powered to set the absolute position when reference signal is detected. This Function Block completes at ‘Standstill’ if it was started in ‘Standstill’

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to power

B

Execute

Rising Edge Triggers FB

C

Position

Sets the HOME position (Absolute position when the reference signal is detected)

D

Done

Bit: when ON: axis is in the Home position

E

Busy

FB is currently controlling the axis

F

Active

FB is currently controlling the axis

G

Command Aborted

Bit: when ON, the FB has been aborted by another command

H

Error bit

Turns ON when an error occurs within the function block

I

Error ID

The value indicates the error code.

 

MC Stop

This Function Block decelerates the axis according to the emergency deceleration defined in the axis configuration, commanding a controlled motion stop and transferring the axis to the state ‘Stopping’. It aborts any ongoing Function Block execution. While the axis is in state ‘Stopping’, no other FB can perform any motion on the same axis.

After the axis has reached ‘Velocity’ zero, the ‘Done’ output immediately turns ON.

The axis remains in the state ‘Stopping’ as long as ‘Execute’ is still TRUE or ‘Velocity’ zero is not yet reached. As soon as ‘Done’ turns ON and ‘Execute’ is OFF, the axis goes to state ‘Standstill’.

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Jerk

Value for Jerk. Relevant only if S-curve profile has been selected

D

Done

Bit: when ON, Zero Velocity Reached

E

Busy

Bit:  when ON, the FB has control over the Axis

F

Command Aborted

Bit: When ON, the FB has been aborted by power being switched off, there is no other way to abort a Stop command

G

Error bit

Turns ON when an error occurs within the function block

H

Error ID

The value indicates the error code.

 

The image below shows the behavior of MC Stop in combination with a MC MoveVelocity.

 FB MC MoveVelocity reports an error indicating the busy MC Stop command

MC Halt

This Function Block decelerates the axis according to the rate of deceleration you define in parameter C, commanding a controlled motion stop and transferring the axis to the state 'Standstill'.

The axis is moved to the state ‘DiscreteMotion’, until the velocity is zero. With the ‘Done’ output set, the state is transferred to ‘Standstill’.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Deceleration

Value for deceleration

D

Jerk

Value of the ‘Jerk’ [u/s3]. (always positive). Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.

E

Buffer Mode

Buffer Mode is relevant only for Cyclic or Virtual Axis.
The default value is 0. This is non-buffered mode, which acts immediately, even if this
interrupts another motion.
Any other value starts buffer mode. This waits till the previous FB completes motion. 

Note that all buffered commands will be aborted if the applicable axis moves to the state ‘ErrorStop’. Any subsequent commands will be rejected.

Buffer values
0: Aborting
1: Buffered
2: Blending low
3: Blending previous
4: Blending next
5: Blending high

F

Done

Bit: when ON, Axis has halted successfully

G

Busy

Bit:  when ON, the FB has control over the Axis

H

Active

FB is currently controlling the axis

I

Command Aborted

Bit: When ON, the FB has been aborted by another command

J

Error bit

Turns ON when an error occurs within the function block

K

Error ID

The value indicates the error code.

 

The example below shows the behavior in combination with a MC_MoveVelocity.

The axis can accelerate again without reaching ‘Standstill’.

 

MC Move Absolute

This Function Block commands a controlled motion to a specified absolute position.

This action completes with velocity zero if no further actions are pending.  

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Continuous Update

 If Set, Input parameters are evaluated at each cycle

D

Position

Commanded ‘Position’ for the motion (in technical unit [u]) (negative or positive)

E

Velocity

Value of the maximum ‘Velocity’ (not necessarily reached) [u/s].

F

Acceleration

Value of the ‘Acceleration’ (always positive) (increasing energy of the motor) [u/s2]

G

Deceleration

Value of the ‘Deceleration’ (always positive) (decreasing energy of the motor) [u/s2]. If ‘Deceleration’  = 0, acceleration value will be used.

EtherCAT: Deceleration is not used in EtherCAT; the Acceleration value will be used by the function instea

H

Jerk

Value of the ‘Jerk’ [u/s3]. (always positive). Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.

I

Direction

Direction - Relevant for rotary axis only, ignored for linear axis 0 = Forward
1: Shortest way
2: backward
3:current direction

J

Buffer Mode

Buffer Mode is relevant only for Cyclic or Virtual Axis.
The default value is 0. This is non-buffered mode, which acts immediately, even if this
interrupts another motion.
Any other value starts buffer mode. This waits till the previous FB completes motion. 

Note that all buffered commands will be aborted if the applicable axis moves to the state ‘ErrorStop’. Any subsequent commands will be rejected.

Buffer values
0: Aborting
1: Buffered
2: Blending low
3: Blending previous
4: Blending next
5: Blending high

K

Done

Bit: turns ON when Axis has reached position

L

Busy

Bit:  when ON, the FB has control over the Axis

M

Active

FB is currently controlling the axis

N

Command Aborted

Bit: When ON, the FB has been aborted by another command

O

Error bit

Turns ON when an error occurs within the function block

P

Error ID

The value indicates the error code.

 

The following figure shows two examples of the combination of two Move Absolute FBs:

 

MC Move Relative

This Function Block commands a controlled motion of a specified distance relative to the set position at the time of the execution.

This action completes with velocity zero.

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Continuous Update

If Set, Input parameters are evaluated at each cycle

D

Distance

Commanded ‘Position’ for the motion (in technical unit [u]) (negative or positive)

E

Velocity

Value of the maximum ‘Velocity’ (not necessarily reached) [u/s].

F

Acceleration

Value of the ‘Acceleration’ (always positive) (increasing energy of the motor) [u/s2]

G

Deceleration

Value of the ‘Deceleration’ (always positive) (decreasing energy of the motor) [u/s2].

EtherCAT: Deceleration is not used in EtherCAT; the Acceleration value will be used by the function instead.

H

Jerk

Value of the ‘Jerk’ [u/s3]. (always positive). Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.

I

Buffer Mode

Buffer Mode is relevant only for Cyclic or Virtual Axis.
The default value is 0. This is non-buffered mode, which acts immediately, even if this
interrupts another motion.
Any other value starts buffer mode. This waits till the previous FB completes motion. 

Note that all buffered commands will be aborted if the applicable axis moves to the state ‘ErrorStop’. Any subsequent commands will be rejected.

Buffer values
0: Aborting
1: Buffered
2: Blending low
3: Blending previous
4: Blending next
5: Blending high

KJ

Done

Bit: turns ON when Axis has reached the commanded distance

L

Busy

Bit:  when ON, the FB has control over the Axis

M

Active

FB is currently controlling the axis

N

Command Aborted

Bit: When ON, the FB has been aborted by another command

O

Error bit

Turns ON when an error occurs within the function block

P

Error ID

The value indicates the error code.

 

The following figure shows the example of the combination of two relative move Function Blocks

 

MC Move Additive

This Function Block commands a controlled motion of a specified relative distance additional to the most recent commanded position in the axis state ‘DiscreteMotion’. The most recent commanded position may be the result of a previous MC_MoveAdditive motion which was aborted.

If the FB is activated in the axis state ‘ContinuousMotion’, the specified relative distance is added to the set position at the time of the execution.

  • In move additive, Continuous Update works on velocity, acceleration and deceleration but not on position.

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Continuous Update

If Set, Input parameters are evaluated at each cycle

D

Distance

Commanded ‘Position’ for the motion (in technical unit [u]) (negative or positive)

E

Velocity

Value of the maximum ‘Velocity’ (not necessarily reached) [u/s].

F

Acceleration

Value of the ‘Acceleration’ (always positive) (increasing energy of the motor) [u/s2]

G

Deceleration

Value of the ‘Deceleration’ (always positive) (decreasing energy of the motor) [u/s2].

H

Jerk

Value of the ‘Jerk’ [u/s3]. (always positive). Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.

I

Done

Bit: turns ON when Axis has reached the commanded distance

J

Busy

Bit:  when ON, the FB has control over the Axis

K

Active

FB is currently controlling the axis 

L

Command Aborted

Bit: When ON, the FB has been aborted by another command

M

Error bit

Turns ON when an error occurs within the function block

N

Error ID

The value indicates the error code.

 

The following figure shows two examples of the combination of two Function Blocks while the axis is in ‘Discrete Motion’ state:

 

Touch Probes 

Some Unitronics Servo drives support Touchprobe. Their function is supported by MC Touch_Probe, and MC Abort_TriggerMC Touch_Probe, and MC Abort_Trigger.

Refer to the drive manual for probe wiring instructions.

  • If you are using a drive that supports touchprobes, and you use two touch probes, you must include an MC Touch_Probe and an MC Abort_Trigger for each probe. The two functions must refer to the same instance.

  • Note that Execute bit of MC Touch_Probe cannot be used to abort the function. Use MC Abort_Trigger.

  • MC TriggerRef: this enables you to define the probe trigger input in MC Touch_Probe, parameter B. You can also use this to switch the trigger mode to C pulse, and to change the Edge Selection on the fly in your application.

 

MC Touch_Probe

This Function Block is used to record an axis position at a trigger event. It records an axis position at the point in time of a digital signal (measuring probe function). 

  • This function is intended for single shot operation,meaning the first event after the rising edge at ‘Execute’ is valid for recording
    only. Possible following events are ignored.

  • After a measuring probe cycle has been initiated by a rising edge on the Execute input, this is only terminated if the outputs Done, Error or CommandAborted become TRUE. If the process is to be interrupted at an intermediate point in time, the function block MC_AbortTrigger with the same TriggerInput must be called up. Otherwise no new cycle can be initiated.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control.

B

Trigger Input

Click to select the MC Trigger_Ref block.

This contains the Probe number; in your application, store 0 to select the first probe and 1 to select the second. Refer to the drive manual for probe wiring instructions. 

You can also use MC Trigger_Ref to switch the trigger mode to C pulse, and to change the Edge Selection on the fly in your application.

C

Execute

Rising Edge triggers the FB.

Note that Execute bit cannot be used to abort the trigger event. 

Use the MC Abort_Trigger function.

D

Window Only

If SET, only use the window (defined in 'First Position' and 'Last Position' parameters) to accept trigger events.

Positions outside the window are rejected and the external position latch is automatically newly activated. Only if the recorded position lies inside the window does Done become TRUE.

In the case of absolute value positions there is exactly one window. In the case of modulo value positions the window repeats itself within the modulo cycle defined in the axis parameters (e.g. 0 to 360 degrees).

E

First Position

Start position from where (positive direction) trigger events are accepted. Value included in window. If 'Window Only' parameter is OFF, this parameter is ignored

F

Last Position

Stop position of the window. Value included in window. If 'Window Only' parameter is OFF, this parameter is ignored

G

Done

Bit: turns ON Trigger event recorded

H

Busy

Bit:  when ON, the FB is not finished and new output values are to be expected

I

Command Aborted

Bit: When ON, the FB has been aborted by MC Abort Trigger

J

Error bit

Turns ON when an error occurs within the function block

K

Error ID

The value indicates the error code.

L

Recorded Position

Position where trigger event occurred

 

MC AbortTrigger

This Function Block interrupts a measuring probe cycle initiated by MC_TouchProbe. MC_TouchProbe initiates a measuring probe cycle by activating a position latch in external encoder or drive hardware. If the process is to be terminated before the trigger signal has activated the position latch, MC_AbortTrigger can be used for this purpose. 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control.

B

Trigger Input

Click to select the MC TriggerRef blockMC TriggerRef block.

C

Execute

Rising Edge triggers the FB and aborts the trigger event.

D

Done

Bit: When ON, Trigger Event has been aborted

E

Busy

Bit:  when ON, the FB is not finished and new output values are to be expected

F

Error bit

Turns ON when an error occurs within the function block

G

Error ID

The value indicates the error code.

 

MC Move Velocity

This Function Block commands a never-ending controlled motion at a specified velocity.

  • Negative velocity * negative direction = positive velocity.

  • To stop the motion, the function block (FB) has to be interrupted by another FB issuing a new command.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Continuous Update

 If Set, Input parameters are evaluated at each cycle

D

Velocity

Value of the maximum ‘Velocity’ (not necessarily reached) [u/s].

E

Acceleration

Value of the ‘Acceleration’ (always positive) (increasing energy of the motor) [u/s2]

F

Deceleration

Value of the ‘Deceleration’ (always positive) (decreasing energy of the motor) [u/s2].

EtherCAT: Deceleration is not used in EtherCAT; the Acceleration value will be used by the function instead

G

Jerk

Value of the ‘Jerk’ [u/s3]. (always positive). Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.

H

Direction

enum values: 0: mcPositiveDirection, (1: mcShortestWay -not applicable), 2: mcNegativedirection, 3:mcCurrentDirection.

I

Buffer Mode

Buffer Mode is relevant only for Cyclic or Virtual Axis.
The default value is 0. This is non-buffered mode, which acts immediately, even if this
interrupts another motion.
Any other value starts buffer mode. This waits till the previous FB completes motion. 

Note that all buffered commands will be aborted if the applicable axis moves to the state ‘ErrorStop’. Any subsequent commands will be rejected.

Buffer values
0: Aborting
1: Buffered
2: Blending low
3: Blending previous
4: Blending next
5: Blending high

J

Done

Bit: turns ON when Axis has reached the commanded veolcity

K

Busy

Bit:  when ON, the FB has control over the Axis

L

Active

FB is currently controlling the axis

M

Command Aborted

Bit: When ON, the FB has been aborted by another command

N

Error bit

Turns ON when an error occurs within the function block

O

Error ID

The value indicates the error code.

 

The following figure shows two examples of the combination of two MC_MoveVelocity Function Blocks:

 

MC Torque Control

This Function Block continuously exerts a torque or force of the specified magnitude. This magnitude is approached using a defined ramp (‘TorqueRamp’), and the Function Block sets the ‘InTorque’ output if the commanded torque level is reached. This function block is applicable for force and torque. When there is no external load, force is applicable. Positive torque is in the positive direction of velocity.

  • Negative velocity * negative direction = positive velocity.

  • To stop the motion, the function block (FB) has to be interrupted by another FB issuing a new command.

  • The movement is limited by velocity, acceleration / deceleration, and jerk, or by the value of the torque, depending on the mechanical circumstances.

  • Specific additional tests are outside this FB. For instance, checking on the traveled distance could be done via tracing the actual positions during the action.

  • ‘Velocity’ is a limit input and is always a positive value. The direction is dependent on the torque and load.

  •  The axis ceases to be in ‘Torque’ control mode when any motion control (not administrative) Function Block is accepted on the same axis.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Continuous Update

If Set, Input parameters are evaluated at each cycle

D

Torque

Value of the torque (Torque or force in technical unit [u]). Thousandths of related torque

E

Torque Ramp

The maximum time derivative of the set value of the torque or force (in technical unit per sec. [u/s])

F

Direction

enum values: 0: mcPositiveDirection, (1: mcShortestWay -not applicable), 2: mcNegativedirection, 3:mcCurrentDirection.

G

In Torque

Setpoint value of torque or force equals the commanded value

H

Busy

Bit:  when ON, the FB has control over the Axis

I

Active

FB is currently controlling the axis

J

Command Aborted

Bit: When ON, the FB has been aborted by another command

K

Error bit

Turns ON when an error occurs within the function block

L

Error ID

The value indicates the error code.

 

The example below shows the typical behavior of an intermediate “resistive” load (see ‘Deceleration’ limit) with some “inertia” (see ‘TorqueRamp’ limit).

 

This example could be implemented in a Function Block Diagram like:

The second example (below) opposite signs for ‘Direction’ & ‘Torque’ are used (e.g. Retention or brake control). (In the FB: +Direction –Torque). It is like an unwinding application with torque on the material, and a break in the material. When the material breaks, as shown in the middle of the picture, this causes a drop in the real Torque value (in absolute terms): the velocity will decrease, limited by the fastest “deceleration” limit specified by the ‘Deceleration’ VAR_INPUT down to zero velocity (with no tension there is a risk of having shock breakings, so we have to limit to the fastest). In this case the torque setpoint might not be achieved.

  • In an unwinding application (derived from this brake control) material tension is the target, not motor torque. The instantaneous diameter of the roll should be taken into account to transform the “User tension setpoint”. Also additional inertia compensation by modification of the torque setpoint for acceleration / deceleration is common from instantaneous weight data (weight is commonly estimated from diameter). Additionally in unwinding applications, in the case of loose material (same condition as material break), a negative slow velocity reference is usually applied in order to “rewind” the loose material. In this case, this has to be provided by external programming.

 

MC Apply Torque

This Function Block enables you to set Torque and apply it according to the physical values you define in the Axis Configuration, regardless of the motor specification.

The function continuously monitors the actual torque and ramps it up to a specified magnitude. This magnitude is approached using a defined ramp (‘Torque Ramp’), and the Function Block sets the ‘InTorque’ output if the commanded torque level is reached. Positive torque is in the positive direction of velocity.

  • Negative velocity * negative direction = positive velocity.

  • To stop the motion, the function block (FB) has to be interrupted by another FB issuing a new command.

  • The movement is limited by velocity, acceleration / deceleration, and jerk, or by the value of the torque, depending on the mechanical circumstances.

  • Specific additional tests are outside this FB. For instance, checking on the traveled distance could be done via tracing the actual positions during the action.

  • ‘Velocity’ is a limit input and is always a positive value. The direction is dependent on the torque and load.

  •  The axis ceases to be in ‘Torque’ control mode when any motion control (not administrative) Function Block is accepted on the same axis.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Continuous Update

If Set, Input parameters are evaluated at each cycle

D

Torque

Units defined in Axis Configuration

E

Torque Ramp

Units defined in Axis Configuration, torque per sec.

F

Direction

enum values: 0: mcPositiveDirection, (1: mcShortestWay -not applicable), 2: mcNegativedirection, 3:mcCurrentDirection.

G

In Torque

Setpoint value of torque equals the commanded value

H

Commanded Torque

This is the actual Torque value sent to the drive.

I

Actual Torque

This is the actual torque, according to the units defined in the Axis configuration

J

Busy

Bit:  when ON, the FB has control over the Axis

K

Active

FB is currently controlling the axis

L

Command Aborted

Bit: When ON, the FB has been aborted by another command

M

Error bit

Turns ON when an error occurs within the function block

N

Error ID

The value indicates the error code.

 

MC Apply Force

MC Apply Force can only be used with an axis defined with a linear actuator.

This Function Block enables you to set Force and apply it according to the physical values you define in the Axis Configuration, regardless of the motor specification.

The function continuously monitors the actual force and ramps it up to a specified magnitude. This magnitude is approached using a defined ramp (Force Ramp’), and the Function Block sets the ‘InForce’ output if the commanded torque level is reached. Positive torque is in the positive direction of velocity.

Force can be applied when there is no external load, force is applicable. Positive force is in the positive direction of velocity.

  • Negative velocity * negative direction = positive velocity.

  • To stop the motion, the function block (FB) has to be interrupted by another FB issuing a new command.

  • The movement is limited by velocity, acceleration / deceleration, and jerk, or by the value of the force, depending on the mechanical circumstances.

  • Specific additional tests are outside this FB. For instance, checking on the traveled distance could be done via tracing the actual positions during the action.

  • ‘Velocity’ is a limit input and is always a positive value. The direction is dependent on the torque and load.

  •  The axis ceases to be in ‘Force’ control mode when any motion control (not administrative) Function Block is accepted on the same axis.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Continuous Update

If Set, Input parameters are evaluated at each cycle

D

Force

Units defined in Axis Configuration

E

Force Ramp

Units defined in Axis Configuration, torque per sec.

F

Direction

enum values: 0: mcPositiveDirection, (1: mcShortestWay -not applicable), 2: mcNegativedirection, 3:mcCurrentDirection.

G

In Force

Setpoint value of force equals the commanded value

H

Commanded Force

This is the actual Force value sent to the drive.

I

Actual Force

This is the actual Force, according to the units defined in the Axis configuration

J

Busy

Bit:  when ON, the FB has control over the Axis

K

Active

FB is currently controlling the axis

L

Command Aborted

Bit: When ON, the FB has been aborted by another command

M

Error bit

Turns ON when an error occurs within the function block

N

Error ID

The value indicates the error code.

 

MC Set Position

This Function Block shifts the coordinate system of an axis by manipulating both the set-point position as well as the actual position of an axis with the same value without any movement caused. (Re-calibration with same following error).

  • ‘Relative’ means that ‘Position’ is added to the actual position value of the axis at the time of execution. This results in a recalibration by a specified distance. ‘Absolute’ means that the actual position value of the axis is set to the value specified in the ‘Position’ parameter.

  • The axis must be in Standstill in order to execute this function.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Position

Position unit [u] (Means ‘Distance’ if ‘Relative’= TRUE)

D

Relative

0: actual position value of the axis is set to the value of 'Position' parameter

1: 'Position' parameter is added to current position at the time FB started

E

Done

Bit: turns ON when Axis has reached position

F

Busy

Bit:  when ON, the FB has control over the Axis

G

Error bit

Turns ON when an error occurs within the function block

H

Error ID

The value indicates the error code.

 

MC Reset

This Function Block makes the transition from the state ‘ErrorStop’ to ‘Standstill’ or ‘Disabled’ by resetting all internal axis-related errors – it does not affect the output of the FB instances. 

  •  If the axis is not in Errorstop, the Done bit will still turn ON.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Execute

Rising Edge Triggers FB

C

Done

Bit: turns ON when Axis has reached position

D

Busy

Bit:  when ON, the FB has control over the Axis

E

Error bit

Turns ON when an error occurs within the function block

F

Error ID

The value indicates the error code.

 

MC Jog

This Function Block is not PLCopen-defined; it is a feature added by Unitronics.

  •  ‘Jog Forward’ and ‘Jog Backward’ cannot be ON at the same time.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to control

B

Jog Forward

Rising Edge Triggers Jog Forward

C

Jog Backward

Rising Edge Triggers Jog Backward

D

Velocity

Value of the maximum ‘Velocity’ (not necessarily reached) [u/s].

E

Acceleration

Value of the ‘Acceleration’ (always positive) (increasing energy of the motor) [u/s2]

F

Deceleration

Value of the ‘Deceleration’ (al+ways positive) (decreasing energy of the motor) [u/s2].

G

Jerk

Value of the ‘Jerk’ [u/s3]. (always positive). Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.Relevant only if S-curve profile has been selected in the Axis parameters Axis> Dynamics>Motion>Motion Profile; if S-curve has not been selected, this is ignored.

H

Done

If currently jogging : velocity reached. Else : velocity is 0

I

Busy

Bit:  when ON, the FB has control over the Axis

J

Command Aborted

Bit: When ON, the FB has been aborted by another command

K

Error bit

Turns ON when an error occurs within the function block

L

Error ID

The value indicates the error code.

 

MC Read

This FB returns the value of a specific parameter according to the Parameter ID number.

It activates at the rising edge of the Enable bit.

  • As long as the ‘Enable' input bit is ON, the FB will try to read the specified parameter continuously.

  • The parameter number may be modified “on the fly”, without resetting the Enable input bit.

  • Note that if a large number of MC Read FBS are constantly active, placed on the bus bar, network performance may be reduced because of bus overload.

  • Reading the Alarm Code parameter is not advisable, since the PLC automatically updates that field every second, and masks the raw value in the drive with the value FF00. Automatic periodic reading does remove the misleading mask; this means that if you monitor the parameter via UniLogic's online mode, you will see the actual alarm code value, while reading the same parameter with PC Read will show only the masked value.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to power

B

Enable

When ON,  power is being supplied to the drive that the Axis is linked to

C

Parameter number

Use this tag to supply the parameter to read

D

A Valid set of outputs is available

If true, a valid set of outputs is available for the FB

E

Busy

FB is currently 'reading'

F

Error bit

Turns ON when an error occurs within the function block

G

Error ID

The value indicates the error code.

 

MC Write

This FB writes a value to a specific parameter according to the Parameter ID number.

It activates at the rising edge of the Enable bit.

  • The FB will write the specified parameter once, at the rising edge of the Execute bit.

  • If MC Write successfully writes the parameter to the drive, the FB will also write value into the corresponding field of the axis struct.

 

 

Parameter Name

Purpose

A

Axis

Select the Axis you want to power

B

Execute

Rising Edge Triggers FB

C

Parameter number

Use this tag to supply the parameter to write to

D

Done

Parameter value was written

E

Busy

FB is currently 'writing'

F

Error bit

Turns ON when an error occurs within the function block

G

Error ID

The value indicates the error code.

Related Topics

EtherCAT Motion

CANopen Motion

Axis Structs

UMD Servo Firmware Update

Servo COM Functions

COM: Servo Ladder Function Status Codes

Multi-Axes MC Functions (EtherCAT)

MC Function Block Status (Error ID) Codes

Servo: Ready-made Motion Code

Motion: Diagnostics & Tuning

Servo Drive Alarm Codes

Axis Homing Methods