Professional Documents
Culture Documents
infoPLC.net
142 - 1
Automation Systems
Motion Control Functions
IEC FB MC Function M
142 - 2
Automation Systems
Motion Control Functions
142 - 3
Automation Systems
Motion Control Functions
MC_CombineAxes MC_GearOut
MC_TouchProbe MC_ZoneSwitch
MC_SetOverride
142 - 4
Automation Systems
Motion Control Functions: Power
MC_Power: Description
142 - 5
Automation Systems
Motion Control Functions: Power
142 - 6
Automation Systems
Motion Control Functions: Power
•When Enable changes to TRUE, the axis specified by Axis is made ready to operate.
• You can control the axis when it is ready to operate.
• When Enable changes to FALSE, the ready status is cleared for the axis specified by
Axis.
• You cannot control the axis after the ready status is cleared because it will not
acknowledge operation commands. An operation command will result in an error. You can
execute the MC_Power and MC_Reset instructions even for axes that are not ready.
• You can use this instruction to disable the operation of axes while they are in motion. In
this case,
142 - 7
Automation Systems
Motion Control Functions: Power
•CommandAborted will change to TRUE. Output of the operation command will stop and
the axis will not longer be ready for operation.
• If home is not defined for a Servomotor with an absolute encoder, compensation is
performed using the absolute encoder home offset value to define home.
•You can use this instruction for servo axes and virtual servo axes only. If the instruction is
used for encoder axes, virtual encoder axes, or unused axes, an error will occur.
•This instruction has no Buffer Mode, but in fact is acting as BuffereMode=Aborting. Latest
MC_Power inmediatelly overrides previous instance for same axis.
142 - 8
Automation Systems
Motion Control Functions: Power
142 - 9
Automation Systems
Motion Control Functions: Power
MC_Power: ST Example
142 - 10
Automation Systems
Motion Control Functions: Reset
MC_Reset: Description
142 - 11
Automation Systems
MC_Reset: Input Variables
142 - 12
Automation Systems
Motion Control Functions: Homing
MC_Home: Description
The MC_Home instruction operates the axis to determine home (axis origin
reference).
It may use the limit signals, home proximity signal, and home signal.
The Home sequence is defined in the Axis Variable parameters.
142 - 13
Automation Systems
Motion Control Functions: Homing
142 - 14
Automation Systems
Motion Control Functions: Homing
Double Click
on Axis
Homing
142 - 15
Automation Systems
Motion Control Functions: Homing
Homing Mode
Overtravel
Sensor Settings
Directions
Simulation
Dynamics
Others…
142 - 16
Automation Systems
Motion Control Functions: Homing
142 - 17
Automation Systems
Motion Control Functions: Homing
142 - 18
Automation Systems
Motion Control Functions: Homing
142 - 19
Automation Systems
Motion Control Functions: Homing
142 - 20
Automation Systems
Motion Control Functions: Homing
142 - 21
Automation Systems
Motion Control Functions: Homing
1. Proximity Rising Edge is detected
2. After Distance stops.
Masked
Distance
142 - 22
Automation Systems
Motion Control Functions: Homing
1. Stops on Proximity Signal Rising Edge
2. Stops after Fixed TIme
Time
142 - 23
Automation Systems
Motion Control Functions: Homing
142 - 24
Automation Systems
Motion Control Functions: Homing
142 - 25
Automation Systems
Motion Control Functions: Homing
142 - 26
Automation Systems
Motion Control Functions: Homing
142 - 27
Automation Systems
Motion Control Functions: Homing
142 - 28
Automation Systems
Motion Control Functions: Homing
MC_Home: EXAMPLE
142 - 29
Automation Systems
Motion Control Functions: Set Position
MC_SetPosition: Description
Redefines axis position to a new position value.
142 - 30
Automation Systems
Motion Control Functions: Set Position
MC_SetPosition: Input Parameters
142 - 31
Automation Systems
Motion Control Functions: Set Position
MC_SetPosition: Description
Position Cmd.pos
Act.pos
360
0
time
MC_SetPosition
Automation Systems
142 - 32
Motion Control Functions: Set Position
MC_MoveAbsolute
Position -> 400
MC_SetPosition: Example
142 - 34
Automation Systems
Motion Control Functions: Move
MC_Move: Description
Performs a relative or absolute positioning
142 - 35
Automation Systems
Motion Control Functions: Move
142 - 36
Automation Systems
Motion Control Functions: Move
142 - 37
Automation Systems
Motion Control Functions: Move
142 - 38
Automation Systems
Motion Control Functions: Move
•MC_Move will perform a relative (distance) or absolute (position) profile, according to the
defined Velocity, Acceleration and Jerk
•Jerk Value different than ZERO will generate a trapezoidal acceleration profile and smooth
velocity profile.
142 - 39
Automation Systems
Motion Control Functions: Move
Changing Jerk will affect to MAX Speed and Acceleration Values and the profile total time!
142 - 40
Automation Systems
Motion Control Functions: Move
180 0 180 0
270 270
142 - 41
Automation Systems
Motion Control Functions: Move
142 - 42
Automation Systems
Motion Control Functions: Move Feed
MC_MoveFeed: Description
142 - 43
Automation Systems
Motion Control Functions: Move Feed
MC_MoveFeed: Input parameters
142 - 44
Automation Systems
Motion Control Functions: Move Feed
MC_MoveFeed: Input parameters
142 - 45
Automation Systems
Motion Control Functions: Move Feed
142 - 46
Automation Systems
Motion Control Functions: Move Feed
142 - 47
Automation Systems
Motion Control Functions: Move Feed
142 - 48
Automation Systems
Motion Control Functions: Move Feed
•The axis travels with absolute travel, relative travel, or velocity control depending on the
MoveMode setting when Execute changes to TRUE.
• The initial target position is set in Position (Target Position) for absolute travel and the target
distance is set in Position (Target Distance) for relative travel.
• When the external input (touchprobe) is triggered previous positioning is cancelled and
Relative positioning (feed distance) is performed at the (feed velocity)
Target
Velocity Position/Distance
Feed
Latch Distance
142 - 49
Automation Systems
Motion Control Functions: Move Feed
Window
Velocity
Feed
Latch Distance
142 - 50
Automation Systems
Motion Control Functions: Move Feed
142 - 51
Automation Systems
Motion Control Functions: Move Velocity
MC_MoveVelocity: Description
142 - 52
Automation Systems
Motion Control Functions: Move Velocity
MC_MoveVelocity: Input Variables
142 - 53
Automation Systems
Motion Control Functions: Move Velocity
MC_MoveVelocity: Output Variables
142 - 54
Automation Systems
Motion Control Functions: Stop
MC_Stop: Description
Decelerates an axis to a stop
142 - 55
Automation Systems
Motion Control Functions: Stop
142 - 56
Automation Systems
Motion Control Functions: Stop
The MC_Stop instruction decelerates an axis from the current velocity to a velocity of 0
• The stop operation starts when Execute changes to TRUE.
• An in-position check is not performed when stopping for this instruction.
• CommandAborted for the instruction that is currently in operation will change to TRUE when
MC_Stop is executed.
142 - 57
Automation Systems
Motion Control Functions: TouchProbe
MC_TouchProbe: Description
Captures Axis registration (latch) position.
142 - 58
Automation Systems
Motion Control Functions: TouchProbe
142 - 59
Automation Systems
Motion Control Functions: TouchProbe
142 - 60
Automation Systems
Motion Control Functions: TouchProbe
180 0
Enabled
142 - 62
Automation Systems
Motion Control Functions: TouchProbe
142 - 63
Automation Systems
Motion Control Functions: TouchProbe
142 - 64
Automation Systems
Motion Control Functions: TouchProbe
142 - 65
Automation Systems
Motion Control Functions: TouchProbe
Mc_TouchProbe: Example
d
0 d
1. TouchProbe is enabled
2. Puch starts performing an horizontal absolute movement “d”
3. When registration (edge detection) occurs, a MC_SetPosition
is used to modify the current position and then to reach the right
position ,so Drill will stop at “d” mm from the edge detection
142 - 66
Automation Systems
Motion Control Functions: Abort Trigger
MC_AbortTrigger: Description
Aborts a current latch (touchProbe) operation
142 - 67
Automation Systems
Motion Control Functions: Abort Trigger
142 - 68
Automation Systems
Motion Control Functions: Abort Trigger
MC_AbortTrigger: TRIGGER_REF
142 - 69
Automation Systems
Motion Control Functions: Abort Trigger
142 - 70
Automation Systems
Motion Control Functions: Combine Axes
MC_CombineAxes:
Generates Slave Axis profile from the addition or Substraction of the Master
and Auxiliary axes.
142 - 71
Automation Systems
Motion Control Functions: Combine Axes
_mcAddAxes
Leave it Blank!
142 - 72
Automation Systems
Motion Control Functions: Combine Axes
142 - 74
Automation Systems
Motion Control Functions: Combine Axes
Function Details, CombineMode:mcAddAxes / mcSubAxes
V Master
V Slave
+ =
V Auxiliar
t
V Master
V Slave
-
=
V Auxiliar
t
142 - 75
Automation Systems
Motion Control Functions: Combine Axes
Function Details, Reference Type: LastestCommand / Feedback
mcLastestComman
d
mcFeedback
142 - 76
Automation Systems
Motion Control Functions: Combine Axes
Example
Servo 0
Servo 1
Virtual
142 - 77
Automation Systems
Motion Control Functions: Combine Axes
Example
Master
+ Aux
Slave
142 - 78
Automation Systems
Motion Control Functions: Torque Control
MC_Torque
The MC_TorqueControl instruction uses the Torque Control Mode of the
Servo Drive to control the torque.
142 - 79
Automation Systems
Motion Control Functions: Torque Control
Function Details:
•MC_Torque will apply a Torque Ramp in order to achieve the desired target Torque
•MC_Torque will use Velocity Input parameter to limit axis speed.
Speed
Torque Ramp
142 - 80
Automation Systems
Motion Control Functions: Torque Control
142 - 81
Automation Systems
Motion Control Functions: Torque Control
142 - 82
Automation Systems
Motion Control Functions: Torque Control
142 - 83
Automation Systems
Synchronized Motion
142 - 84
Automation Systems
Motion Control Functions: Synchronism
142 - 85
Automation Systems
Motion Control Functions: Gears
MC_GearIn: Description
142 - 86
Automation Systems
Motion Control Functions: Gears
142 - 87
Automation Systems
Motion Control Functions: Gears
142 - 88
Automation Systems
Motion Control Functions: Gears
Slave
142 - 89
Automation Systems
Motion Control Functions: Gears
*Only possible when Master Axis number < Slave Axis Number
142 - 90
Automation Systems
Motion Control Functions: Gears
Master
Slave
142 - 91
Automation Systems
Motion Control Functions: Gear in Position
MC_GearInPos: Description
142 - 92
Automation Systems
Motion Control Functions: Gear in Position
142 - 93
Automation Systems
Motion Control Functions: Gear in Position
142 - 94
Automation Systems
Motion Control Functions: Gear in Position
142 - 95
Automation Systems
Motion Control Functions: Gear in Position
MC_GearInPos: Function Details
The GearIn not only defines gear ratio but also synchonization position of master
and slave when gear ratio is achieved.
142 - 96
Automation Systems
Motion Control Functions: Gear in Position
142 - 97
Automation Systems
Motion Control Functions: Gear in Position
142 - 98
Automation Systems
Motion Control Functions: Gear Out
MC_GearOut: Description
142 - 99
Automation Systems
Motion Control Functions: Gear Out
MC_GearOut: Input parameters
142 - 100
Automation Systems
Motion Control Functions: Linked Move
MC_MoveLink:
Slave axis performs a trapezoidal linked move to the master axis.
The trapezoid shape is mainly defined by master acceleration and
deceleration distance.
142 - 101
Automation Systems
Motion Control Functions: Linked Move
MC_MoveLink: Input parameters
142 - 102
Automation Systems
Motion Control Functions: Linked Move
MC_MoveLink: Input parameters
142 - 103
Automation Systems
Motion Control Functions: Linked Move
MC_MoveLink: Output parameters
142 - 104
Automation Systems
Motion Control Functions: Linked Move
MC_MoveLink: Function Details
142 - 106
Automation Systems
Motion Control Functions: Linked Move
MC_MoveLink: Application Example, Flying Shear
MC_MoveLink
4 Slave
Master
MC_MoveRelative
142 - 107
Automation Systems
Motion Control Functions: Phasing
MC_Phasing: Description
When executed generates a ‘PhaseShift’ offset between Master and Slave axis
142 - 108
Automation Systems
Motion Control Functions: Phasing
MC_Phasing: Input parameters
142 - 109
Automation Systems
Motion Control Functions: Phasing
MC_Phasing: Output Parameters
142 - 110
Automation Systems
Motion Control Functions: Phasing
Example
MC_Phase
Position
142 - 111
Automation Systems
Motion Control Functions: Cam In
142 - 112
Automation Systems
Motion Control Functions: Cam In
•Cam Table defines a relation between Master and Slave Position
Points
•Example: Simple harmonic Cam Table defines a smooth profile for position Velocity,
Acceleration, and Jerk, based on the Master Position change rate.
142 - 113
Automation Systems
Motion Control Functions: Cam In
(1) Cam is ALWAYS Created in CAM Editor
MyCam
MCE PLC
142 - 114
Automation Systems
Motion Control Functions: Cam In
•In the Logic Controller Cam Tables are defined as an array of Master-Slave Points
Master Slave
0.0 0.0
1.0 2.3
2.0 4.7
TYPE
SMC_CAM_REF :
STRUCT
Phase : REAL;
Distance : REAL;
END_STRUCT;
END_TYPE
142 - 115
Automation Systems
Motion Control Functions: Cam In
Cam Editor
142 - 116
Automation Systems
Motion Control Functions: Cam In
MC_CamIn: Description
Executes Predefined Master-Slave Cam Table
142 - 117
Automation Systems
Motion Control Functions: Cam In
MC_CamIn: Input parameters
142 - 118
Automation Systems
Motion Control Functions: Cam In
MC_CamIn: Input parameters
142 - 119
Automation Systems
Motion Control Functions: Cam In
MC_CamIn: Input parameters
142 - 120
Automation Systems
Motion Control Functions: Cam In
MC_CamIn: Output Parameters
142 - 121
Automation Systems
Motion Control Functions: Cam In
Start Position, Distance and Mode.
Start
Distance
142 - 122
Automation Systems
Motion Control Functions: Cam In
Periodic, Non-Periodic
Periodic
Non-Periodic
Execute
142 - 123
Automation Systems
Motion Control Functions: Cam In
Scaling
Table can be Scaled from Phase and Distance perspective.
142 - 124
Automation Systems
Motion Control Functions: Cam In
Offset
Table can be Offset in Phase and Distance
Phase Offset
Distance Offset
142 - 125
Automation Systems
Motion Control Functions: Cam Out
MC_CamOut: Description
Disenganges Master-Slave Cam
142 - 126
Automation Systems
Motion Control Functions: Cam Out
142 - 127
Automation Systems
Motion Control Functions: Cam Out
142 - 128
Automation Systems