Motion Control Functions infoPLC.net 142 - 1 Automation Systems Motion Control Functions •Motion Control Functions are the technological part of the NJ engine (implemented in the MC Module) used to control axis. •Motion Control FunctionBlocks are the ‘IEC-61131-3 FB’s’ in the Logic Controller that to invoque Motion Control Functions of the MC •MC and PLC are so highly integrated, that in this training will make no difference between the IEC-61131-3 Motion FB and the MC function itelf. IEC FB 142 - 2 MC Function M Automation Systems Motion Control Functions •Motion Functions can be used by: Motion Commands •Those commands would generate a change in the Motion Position, Speed or Torque Profiler. Administrative Commands •Administrative Commands: Those commands will not directly generate a change in the Profiler. Single Axis Commands Axis Group Commands 142 - 3 •Commands directly affecting to a single axis. •Commands directly affecting to a group of axes: interpolation, coordination,etc.. Automation Systems Motion Control Functions •Some Single Axis Commands : Discrete MC_Home MC_Move/Relative/Absolute MC_MoveZero Continuous MC_MoveJog MC_MoveFeed MC_MoveVelocity MC_CombineAxes Synchronized MC_Phasing MC_GearInPo s Other… MC_Stop MC_Torque MC_GearOut MC_MoveLink MC_CamIn MC_GearIn MC_CamOut MC_Power MC_SetPosition MC_TouchProbe MC_ZoneSwitch MC_SetOverride 142 - 4 Automation Systems Motion Control Functions: Power MC_Power: Description Energizes or deenergizes servo drive 142 - 5 Automation Systems Motion Control Functions: Power MC_Power: Input Variables MC_Power: Output Variables MC_Power: Input/Output Variables 142 - 6 Automation Systems Motion Control Functions: Power MC_Power: Function Details •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 MC_Power: Function Details •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 MC_Power: Timing diagram Status is the reflection of the real Enabling state of the Axis,that’s why not always match with the FB’s Input ‘Enable’ 142 - 9 Automation Systems Motion Control Functions: Power MC_Power: Ladder Example MC_Power: ST Example 142 - 10 Automation Systems Motion Control Functions: Reset MC_Reset: Description Clears the existing errors in MCE FBs or in Drives 142 - 11 Automation Systems MC_Reset: Input Variables MC_Reset: Output Variables MC_Reset: input/Output 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 MC_Home: Input Variables MC_Home: Output Variables MC_Home: Input/Output Variables 142 - 14 Automation Systems Motion Control Functions: Homing MC_Home: Function Details •Sysmac Studio provides an easy way to configure Homing Method. Double Click on Axis Homing 142 - 15 Automation Systems Motion Control Functions: Homing Homing Mode Sensor Overtravel Settings Directions Simulation Dynamics Others… 142 - 16 Automation Systems Motion Control Functions: Homing 1. Proximity Signal Falling Edge(Off) 2. Homing Aproach Speed reached 3. Origin Signal Detection Reverse Start is allowed 142 - 17 Automation Systems Motion Control Functions: Homing 1. Proximity Signal Rising Edge(On) 2. Homing Aproach Speed reached 3. Origin Signal Detection Reverse Start is allowed 142 - 18 Automation Systems Motion Control Functions: Homing 1. Proximity Signal Falling Edge(Off) 2. Homing Aproach Speed reached 3. Origin Signal Detection Direction can’t change 142 - 19 Automation Systems Motion Control Functions: Homing 1. Proximity Signal Rising Edge(On) 2. Homing Aproach Speed reached 3. Origin Signal Detection Direction can’t change 142 - 20 Automation Systems Motion Control Functions: Homing 1. The Overtravel oposed to the Home Definition is Detected Positive Homing Negative Overtravel Limit Negative Homing Positive Overtravel Limit 2. 142 - 21 Stops First Origin Input after Overtravel falling edge 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 Origin Input Only 142 - 24 Automation Systems Motion Control Functions: Homing Define Actual Position as Home Position 142 - 25 Automation Systems Motion Control Functions: Homing Additional Motion Profile after Home is reached 142 - 26 Offset to the Home Position. No Motion, but system is shifted. Automation Systems Motion Control Functions: Homing MC_Home: Timing diagram 142 - 27 Automation Systems Motion Control Functions: Homing MC_Home: Timing diagram 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 MC_SetPosition: Output and I/O Parameters 142 - 31 Automation Systems Motion Control Functions: Set Position MC_SetPosition: Description When MC_SetPosition is executed: •New Value for Actual and Command position is Set. •The actual current position changes at the same time as the command current position changes. •The Following Error (Command Position – Actual Position) is kept the same before and after the change. If you execute this instruction on a command Position Cmd.pos Act.pos 360 0 time 142 - 32 MC_SetPosition Automation Systems Motion Control Functions: Set Position MC_SetPosition: Timing Diagram MC_MoveAbsolute Position -> 400 Actual position =200 MC_SetPosition Position -> 800 Actual position =800 Motion is reversed in order to go from 800 to 400 142 - 33 Actual position =400 Automation Systems Motion Control Functions: Set Position 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 MC_Move: 142 - 36 Input Variables Automation Systems Motion Control Functions: Move MC_Move: 142 - 37 Input Variables Automation Systems Motion Control Functions: Move MC_Move: Output Variables MC_Move: Input/Output Variables 142 - 38 Automation Systems Motion Control Functions: Move MC_Move: Function Details •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 MC_Move: Function Details: Effect of Jerk Jerk=0 (ignore jerk) Jerk= 500 unit/s3 Changing Jerk will affect to MAX Speed and Acceleration Values and the profile total time! 142 - 40 Automation Systems Motion Control Functions: Move MC_Move: Function Details (Relative vs Absolute) Relative Positioning generates an incremental/decremental distance movement from the actual position 0 90 360 180 Move Absolute 180º Absolute Positioning generates a positioning profile to an absolute position from the axis origin. 0 90 142 - 41 360 90 0 270 270 Move Relative 180º 90 180 180 0 180 270 Automation Systems Motion Control Functions: Move MC_Move: 142 - 42 Timing Example Automation Systems Motion Control Functions: Move Feed MC_MoveFeed: Description The MC_MoveFeed instruction performs positioning for the specified travel distance from the position where an external device triggers an interrupt input. Interrupt feeding is possible for absolute positioning, relative positioning, and velocity control. 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 MC_MoveFeed: Input parameters 142 - 46 Automation Systems Motion Control Functions: Move Feed MC_MoveFeed: Output Parameters 142 - 47 Automation Systems Motion Control Functions: Move Feed MC_MoveFeed: I/O Parameters 142 - 48 Automation Systems Motion Control Functions: Move Feed MC_MoveFeed : Function Details •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 Position/Distance Velocity Latch 142 - 49 Feed Distance Automation Systems Motion Control Functions: Move Feed MC_MoveFeed : Function Details •If you specify an error output, Error changes to TRUE and Busy (Executing) and Active (Controlling) change to FALSE. • If you Change WindowOnly to TRUE, then specify FirstPosition and LastPosition to use interrupt masks. Interrupt feeding is performed for the first interrupt signal generated by the actual position between the FirstPosition and the LastPosition. Window Velocity Latch 142 - 50 Feed Distance Automation Systems Motion Control Functions: Move Feed MC_MoveFeed : 142 - 51 Function Details Automation Systems Motion Control Functions: Move Velocity MC_MoveVelocity: Description •The MC_MoveVelocity instruction performs velocity control with the Position Control Mode of the Servo Drive. 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 MC_MoveVelocity: Input/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 MC_Stop: Input parameters MC_Stop: Output parameters 142 - 56 Automation Systems Motion Control Functions: Stop MC_Stop: I/O Variables MC_Stop: Function Description 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 MC_TouchProbe: Input parameters 142 - 59 Automation Systems Motion Control Functions: TouchProbe MC_TouchProbe: Output Parameters MC_TouchProbe: I/O Parameters 142 - 60 Automation Systems Motion Control Functions: TouchProbe MC_TouchProbe: Function Details •G5 EtherCAT Servo (or OMRON EtherCAT Encoder) can transmit up to 2 High Precission captures of Register Positions, triggered by 2 different fast servo inputs. •NJ501 can use Servo Register Function (highest accuracy) or user NJ’s general purpose Input to store actual Axis Position (Not high accuracy). •Up to 2 independent registration positions can be stored per axis. •MC_TouchProbe can define a ‘window’ zone to limit captures to the desired position range. •In case of G5 Servo, Axis can also be stoped when StopMode is defined 90 0 180 Captured Latch Position = 178º 142 - 61 270 Automation Systems Motion Control Functions: TouchProbe MC_TouchProbe: Window Settings When Window is enabled Position is captured within the window defined area: First Positon < Last Position First Positon > Last Position Enabled 142 - 62 Automation Systems Motion Control Functions: TouchProbe MC_TouchProbe: Stop Mode • If mcNonStop is specified, the axis will not stop even if a trigger occurs. • If mcImmediatelyStop is specified, the axis stops at the latched position when a trigger occurs CommandAborted of the instruction that was moving the axis changes to TRUE due to this stop. •mcImmediatelyStop functions in CSP Mode ONLY. • If mcImmediatelyStop is specified in CSV/CST Mode, an error occurs when the instruction is executed. •If you change to CSV/CST Mode during execution formcImmediatelyStop, CommandAborted changes to TRUE Note:- This Option is NOT applicable to EtherCAT Encoder 142 - 63 Automation Systems Motion Control Functions: TouchProbe MC_TouchProbe: Timing Diagram 142 - 64 Automation Systems Motion Control Functions: TouchProbe MC_TouchProbe: Timing Diagram (Aborting) 142 - 65 Automation Systems Motion Control Functions: TouchProbe Mc_TouchProbe: Example 0 d 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 MC_AbortTrigger: Input parameters MC_AbortTrigger: Output parameters 142 - 68 Automation Systems Motion Control Functions: Abort Trigger MC_AbortTrigger: I/O parameters MC_AbortTrigger: TRIGGER_REF 142 - 69 Automation Systems Motion Control Functions: Abort Trigger MC_AbortTrigger: 142 - 70 Time Chart 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 MC Combine Axes: Input parameters _mcAddAxes Leave it Blank! 142 - 72 Automation Systems Motion Control Functions: Combine Axes MC Combine Axes: 142 - 73 Input parameters Leave it Blank! Automation Systems Motion Control Functions: Combine Axes MC Combine Axes: Output parameters MC Combine Axes: Input/Output parameters 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 •NJ allows to to choose the calculated (Lastestcommand) value or the encoder(feedback) value for Master and Auxiliary axis. 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. POSITION CONTROL (CSP) TORQUE CONTROL (CST) Speed Torque Ramp 142 - 80 Automation Systems Motion Control Functions: Torque Control MC Torque: Input 142 - 81 parameters Automation Systems Motion Control Functions: Torque Control MC Torque: Output parameters MC Torque: Input/Output 142 - 82 parameters Automation Systems Motion Control Functions: Torque Control MC Torque: PDO 142 - 83 Mapping Automation Systems Synchronized Motion 142 - 84 Automation Systems Motion Control Functions: Synchronism • Synchronized Motion defines a Master-Slave Relation • Slave Motion Profile is generated based on the Master Profile Examples of Synchronized Motion in mechanical engineering are: • Gearing mechanisms: There is a fix ratio between master and slave position • Cam mechanisms: There is a geometric function that defines slave position based on master position 142 - 85 Automation Systems Motion Control Functions: Gears MC_GearIn: Description Stablishes a gear ratio between Master and Slave axis 142 - 86 Automation Systems Motion Control Functions: Gears MC_GearIn: Input parameters 142 - 87 Automation Systems Motion Control Functions: Gears MC_GearIn: Output parameters MC_GearIn: I/O parameters 142 - 88 Automation Systems Motion Control Functions: Gears MC_GearIn: Function Details When Gear operation begins, Slave axis changes it’s speed according to the defined acceleration, deceleration and jerk in order to achieve the the defined gear ratio with the master (InGear). Master Slave 142 - 89 Automation Systems Motion Control Functions: Gears MC_GearIn: Function Details (Reference Type) Master Command Reference can be: •The actual encoder Position Feedback (encoder value). •The previous cycle Commanded value (profiler value) Master Gear Slave Actual Position (FBK) Numerator Latest Command Position Command Position* Denominator Command Position Remainder *Only possible when Master Axis number < Slave Axis Number 142 - 90 Automation Systems Motion Control Functions: Gears MC_GearIn: Function Details (Example) Master performs discrete trapezoidal profile (MC_Move) Gear 1:1 (Slave accelerates to reach master speed) Master Slave 142 - 91 Automation Systems Motion Control Functions: Gear in Position MC_GearInPos: Description Defines a gear ratio between Master and Slave axis with position conditions 142 - 92 Automation Systems Motion Control Functions: Gear in Position MC_GearInPos: Input parameters 142 - 93 Automation Systems Motion Control Functions: Gear in Position MC_GearInPos: Input parameters 142 - 94 Automation Systems Motion Control Functions: Gear in Position MC_GearInPos: Output parameters MC_GearInPos: I/O parameters 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 MC_GearInPos: Function Details Be aware of the following limitations: •Master axis must have different velocity than zero •Limitation in distance (not always possible!) •Others… 142 - 97 Automation Systems Motion Control Functions: Gear in Position MC_GearInPos: Timing Diagram 142 - 98 Automation Systems Motion Control Functions: Gear Out MC_GearOut: Description Terminates gear opeation initiated with MC_GearIn or MC_GearInPos 142 - 99 Automation Systems Motion Control Functions: Gear Out MC_GearOut: Input parameters MC_GearOut: Output 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 MC_MoveLink: Input/Output parameters 142 - 104 Automation Systems Motion Control Functions: Linked Move MC_MoveLink: Function Details Slave will perform a trapezoidal speed profile in the following way: Master Acceleration Distance Master Deceleration Distance Master Distance Slave Distance Master axis position * Master axis position *When Master is working at constant speed 142 - 105 Automation Systems Motion Control Functions: Linked Move MC_MoveLink: Function Details Usual application is to accelerate Slave Axis in order to achieve Master Speed, and keep speed linked for a defined distance before deceleration (i.e. to perform a flyingshear) When MoveLink is used to achieve Master-Slave speedMatch use following rules: 1.-Master Acc Distance = 2 x Slave Acc Distance 2.-Master Dec Distance = 2 x Slave Dec Distance Slave Trapezoid Master Constant Speed 3.-Master Ct. Speed Distance = Slave Ct. Speed Distance 142 - 106 Automation Systems Motion Control Functions: Linked Move MC_MoveLink: Application Example, Flying Shear •MoveLink can be used to synchronize Slave at Master speed, at a certain position. 2 3 1 1) Slave accelerates to catch Master Speed (ACC Dist) 2) Speed keept Constant (Ct. Dist) 3) Slave decelerates to zero Speed (DEC Dist) 4) Before Master pass ‘0’ Slave Move Relative to origin position 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 MC_Phasing: I/O Parameters 142 - 110 Automation Systems Motion Control Functions: Phasing Example Position MC_Phase 142 - 111 Automation Systems Motion Control Functions: Cam In The CAM Function 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 (3) Execute with MC_CamIn (2) Download MyCam Flash Memory Boot RAM Memory MCE 142 - 114 PLC 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 •NJ has predefined Datatype struct sMC_CAM_REF CAM Points •Each indiviual point of the Cam is a CAM_REF point. •The complete Cam is an Array of CAM_REF points. TYPE SMC_CAM_REF : STRUCT Phase : REAL; Distance : REAL; END_STRUCT; END_TYPE 142 - 115 Automation Systems Motion Control Functions: Cam In •Cam Editor Automatically creates GLOBAL Variable (i.e. My_CAM), consisting in an ARRAY of _sMC_CAM_REF points •All Calculated CAM points are copied to the array. My_CAM: ARRAY [0..N] OF sMC_CAM_REF 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 MC_CamIn: I/O Parameters 142 - 121 Automation Systems Motion Control Functions: Cam In Start Position, Distance and Mode. Start Distance Note.-Start Mode: Defines Absolute or Relative ‘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 MC_CamOut: Input Parameters 142 - 127 Automation Systems Motion Control Functions: Cam Out MC_CamOut: Output Parameters 142 - 128 Automation Systems
Puede agregar este documento a su colección de estudio (s)
Iniciar sesión Disponible sólo para usuarios autorizadosPuede agregar este documento a su lista guardada
Iniciar sesión Disponible sólo para usuarios autorizados(Para quejas, use otra forma )