Home
Local PDF
Contents
1. members Mnemonic Data Type Description OutputBit DINT You must select an output bit within the range of 0 to 31 selection of less than 0 or greater than 31 results in an Illegal Output Cam error and the cam element is not considered LatchType DINT The Latch Type determines how the corresponding output bit is set A value of less than 0 or greater than 3 results in an Illegal Output Cam error and a latch type of Inactive is used Value Description 0 Inactive The output bit is not changed 1 Position The output bit is set when the axis enters the compensated cam range 2 Enable The output bit is set when the enable bit becomes active 3 Position and Enable The output bit is set when the axis enters the compensated cam range and the enable bit becomes active UnlatchType DINT The Unlatch Type determines how the output bit is reset Selecting a value less than 0 or greater than 5 results in an Illegal Output Cam error and an unlatch type of Inactive is used Value Description 0 z Inactive The output bit is not changed 1 Position The output bit is reset when the axis leaves the compensated cam range 2 Duration The output bit is reset when the duration expires 3 Enable The output bit is reset when the enable bit becomes inactive 4 zPosition and Enable The output bit is reset when the axis leaves the compensated cam range or the enable bit becomes inactive 5 Duration and Enable The output bit is
2. Stop Type Jog Change Decel No ER2 Decel Rate Stop Jog Decel 100 0 IP5 Units per sec2 Decel Units Change Decel Jerk Yes l Decel Jerk Stop_Jog_Decel_Jerk 100 0 Jerk Units of Time jes Less Publication 1756 RM 007H EN P December 2006 378 Troubleshoot Axis M otion Cause When you use an Scurve profile jerk determines how fast an axis can change its acceleration and deceleration e When the MAJ instruction starts again the controller recalculates jerk and builds a new Scurve profile e If the MAJ instruction uses a lower deceleration the jerk is lower It takes longer at the lower jerk to get deceleration to zero e In the meantime the axis continues past zero speed and moves in the opposite direction The following trends show how the axis stops and starts with a trapezoidal profile and an S curve profile Start while decelerating and reduce the deceleration rate Trapezoidal S curve 100 80 60 acceleration The axis speeds back up as soon as you start the jog jog instruction reduces the deceleration of the axis It now again The lower deceleration doesn t change the takes longer to bring the deceleration to zero The speed response of the axis overshoots zero and the axis moves in the opposite direction Publication 1756 RM 007H EN P December 2006 Troubleshoot Axis M otion 379 Corrective action Revision 15 or Earlier Jog_PB sLo
3. as This operand Has these options which you enter as text or enter as a number M oveType no enumeration 0 Absolute 1 Incremental Circle Type no enumeration 0 Via 1 Center 2 Radius 3 Center Incremental Direction 2D 3D clockwise shortest 0 counterclockw ise longest 1 clockwisefull shortestfull 2 counterclockwisefull longestfull 3 Speed Units unitspersec 0 ofmaximum 1 Accel Units unitspersec 0 ofmaximum 1 Decel Units unitspersec 0 ofmaximum 1 Profile trapezoidal 0 S Curve 1 Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 279 This operand Has these options which you enter as text or enter as a number Termination Type no enumeration 0 Actual Tolerance 1 No Settle 2 Command Tolerance 3 No Decel 4 Follow Contour Velocity Constrained 5 Follow Contour Velocity Unconstrained See Choose a termination type on page 259 M erge Disabled 0 Coordinatedmotion 1 Allmotion 2 M erge Speed Programmed 0 Current 1 Description The Motion Coordinated Circular Move MCCM performs a circular move using up to three 3 axes statically coupled to the coordinate system as primary axes in a Cartesian coordinate system The circular move is specified as either absolute or incremental and done at a desired speed The actual speed of the MCCM is a function of the mode of the move comma
4. e i L i Cyde Time i On Duty Time Duty Cyde Time Mode Compensation Output Compensation Array Checks If you select a latch and unlatch delay combination that results in a compensated cam of less than minimum width the width of the compensated cam is set to the minimum If you select a mode less than 0 or greater than 3 a Normal mode is considered and the user is warned with an instruction error Illegal Output Compensation If you select a duty cycle less than 0 or greater than 100 and the mode is set to Pulsed or Inverted and Pulsed a 0 or 100 duty cycle is considered and the user is warned with an instruction error Illegal Output Compensation If you select a cycle time less than or equal to 0 and the mode is set to Pulsed or Inverted and Pulsed the output bit is not pulsed and the user is warned with an instruction error Illegal Output Compensation Publication 1756 RM 007H EN P December 2006 M otion Event Instructions M AW M DW M AR M DR MAOC M DOC 201 Output The output is the set of 32 output bits that can be set and reset depending on the specified Output Cam The output can be either a memory location or a physical output e g Local 0 0 Data Input The input is the set of 32 input bits that are can be used as enable bits depending on the specified Output Cam The input can be either a memory location or a physical input e g Lo
5. M DOC Scheduled Output M odule Operation Publication 1756 RM 007H EN P December 2006 The 1756 OB16IS Scheduled Output module is designed to work in conjunction with the Motion Axis Output Cam MAOC motion instruction to provide position based output control also know as PLS The MACC instruction by itself allows position based output control using the position of any motion axis in ControlLogix as the position reference and any output or boolean as the output The MAOC updates the outputs based on motion axis position at the motion group coarse update rate typically 2ms 10ms While this is adequate for some applications it is too slow for many high speed applications typically found in converting and packaging segments The 1756 OB16IS module improves performance by supporting the ability to schedule the output turn on turn off time of 8 of its 16 outputs outputs 0 7 in 100us increments Outputs are scheduled by entering data into one or more of the 16 schedules provided by the output connection data store Scheduled Outputs as defined here should not be confused with the earlier implementation of scheduled outputs The previous implementation schedules outputs on a per module basis and all output points are controlled by a single timestamp This implementation schedules outputs on a per point basis and each individual output point is controlled by its own timestamp Individual schedules are created in the controller
6. Publication 1756 RM 007H EN P December 2006 390 Data Types Structures CAM PROFILE Structure M nemonic Status Data Type DINT The CAM PROFILE data type is an array of coefficients representing a calculated cam profile that can be used as input to a time cam or position cam instruction The only element available to the user is Status which is defined in the following table Description The status parameter is used to indicate that the Cam Profile array element has been calculated If execution of a camming instruction is attempted using an uncalculated element in a Cam Profile the instruction produces an error Value Description 0 Cam profile element has not been calculated 1 Cam profile element is being calculated 2 Cam profile element has been calculated n Cam profile element has been calculated and is currently being used by n 2 MAPC and MATC instructions Publication 1756 RM 007H EN P December 2006 Motion related Data Types Structures 391 M OTION_ GROUP Structure There is one MOTION GROUP structure per controller This structure contains status and configuration information about the motion group Mnemonic Data Type Description GroupStatus DINT The status bits for the group Bit Number Data Type Description InhibStatus 00 DINT inhibit status
7. se to separate each value a range of values valuel valueN statement se two periods to identify the range distinct values plus a range valuea valueb valuel valueN statement of values The CASE construct is similar to a switch statement in the C or programming languages However with the CASE construct the controller executes only the statements that are associated with the first matching selector value Execution always breaks after the statements of that selector and goes to the END CASE statement Publication 1756 RM 007H EN P December 2006 If you want this Example If recipe number 1 then Ingredi Ingred If recipe num Ingred Ingredi If recipe num Ingredi Ingred If recipe num Ingred Ingred ent A out ent B out ber 2 or ent A out ent B out ber 4 5 ent A out ent B out et 1 open 1 et 4 open 1 3 then et 4 open 1 et 2 open 1 6 or 7 then et 4 open 1 et 2 open 1 ber 8 11 12 or 13 then ent A out ent B out Otherwise al et 1 open 1 et 4 open 1 outlets closed 0 Structured Text Programming 415 Enter this structured text CASE recipe_number OF ls Ingredient A Outlet 1 1 Ingredient B Outlet 4 1 3 Ingredient_A Outlet_4 1 Ingredient_B Outlet_2 1 Hz Ingredient A Outlet 4 1 Ingredient B Outlet 2 1 8 11 13 Ingredient A O
8. Axis m Motion Control DN Direction Speed Speed Units Accel Rate Accel Units Decel Rate Decel Units Profile Accel Jerk Decel Jerk Jerk Units Merge Merge Speed lt lt Less Format Description Tag Name of the axis to jog M otion Control MOTION_INSTRUCTION Tag Control tag for the instruction Direction DINT Immediate For this jog direction Enter Tag Forward 0 Reverse 1 Speed REAL Immediate Speed to move the axis in Speed Units Tag Speed Units DINT Immediate Which units do you want to use for the Speed e Units per sec 0 e of Maximum 1 Publication 1756 RM 007H EN P December 2006 66 Motion Move Instructions MAS M AH MAM MAG MCD M RP M CCP M ATC M CSV Operand Type Format Description Accel Rate REAL Acceleration rate of the axis in Accel Units ag Accel Units DINT Immediate Which units do you want to use for the Accel Rate e Units per sec 0 e of M aximum 1 Decel Rate REAL Immediate Deceleration rate of the axis in Deceleration Units Tag Decel Units DINT Immediate Which units do you want to use for the Decel Rate e Units per sec 0 e of M aximum 1 Profile DINT Immediate Select the velocity profile to run the jog e Trapezoidal 0 e S Curve 1 For more information see Program a Velocity Profile on page 1 22 Accel J erk REAL Immediate instruction only uses the je
9. Motion Control MCCM 3 N Move Type 0 Move Type is Absolute Position MCCM_Move_position 6 Position defined in Axis 11 1 absolute units Axis Cl le n isR di Cina Tos 2 rcle Type is Radius oe co Ra dus defined as 15 units Speed 10 Speed Units Units per sec Accel Rate 5 Direction is Clockwise Accel Units Units per sec2 Decel Rate 5 Decel Units Units per sec2 Profile Trapezoidal Termination Type Merge Disabled Merge Speed Current MCCM Instruction M ove Type Absolute Circle Type Radius Publication 1756 RM 007H EN P December 2006 M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 291 MCCM Motion Coordinated Circular Move Coordinate System Coordinated sys Motion Control MCCM 4 N2 Position defined as an Move Type 1 incremental distance from He start point of 10 4 1 3 NS M ove Type is Incremental Position MCCM Move position 8 AxisO 21 6 Axis 7 9 Circle Type 2 o Via Center Radius Radius 1 Co Direction 0 Circle Type is Radius Radius defined as 15 Speed 10 units Speed Units Units per sec Accel Rate Accel Units Units per sec2 Direction is Clockwise Decel Rate Decel Units Units per sec2 Profile Trapezoidal Termination Type Merge Disabled Merge Speed Current lt lt Less MCCM Instruction M ove Type Incremental Circle Type Radius The Move Type has no effect on the Radius value sp
10. ad Smet Ae Sed 17 Instructor TIMING E S KA A 17 Program a Velocity 22 Choose a 26 Chapter 2 Mio ducuo Mr aso hk SER DA ER ER 29 Motion Servo 31 Motion Servo Off 34 Motion Axis Shutdown 37 Motion Axis Shutdown Reset 5 40 Motion Direct Drive On 42 Motion Direct Drive Off 45 Motion Axis Fault Reset 47 Chapter 3 Introduction 49 Motion Axis Stop MAS 50 Motion Axis Home 60 Motion Axis Jog 65 Motion Axis Move 75 Motion Axis Gear 87 Motion Change Dynamics 98 Motion Redefine Position 103 Motion Calculate Cam Profile 109 Motion Axis Position Cam 115 Motion Axis Time Cam 138 Motion Calculate Slave Values 151 NOLS deu ddr ey 154 Chapter 4 IntroduclbDToc ob E Rs 155 Mot
11. Bit Name State Meaning RegEventArmedStatus True The axis is looking for a registration event RegEventStatus False The previous registration event is cleared Example When the input conditions are true the controller arms servo module registration event checking for axis 0 Relay Ladder MAR Motion Arm Registration N gt Axis Axis2 N Motion Control MAR 2 R gt Trigger Condition Positive_Edge P Windowed Registration Enabled o Min Position minmarpos 1 Max Position maxmarpos 1 Input Number 1 MAR Ladder Example Structured Text MAR Axis2 MAR 2 positive edge enabled minmarpos 1 maxmarpos 1 1 Publication 1756 RM 007H EN P December 2006 otion Event Instructions MAW MDW MAR MDR MAOC M DOC 183 Motion Disarm Registration Use the MDR instruction to disarm the specified motion module M DR registration input event checking for the specified axis This instruction has the affect of clearing both the RegEventStatus and the RegArmedEventStatus bits The In Process bit of the controlling Motion Arm Registration instruction if any is cleared as a result of executing the MDR instruction Operands Relay Ladder Format Description Name of the axis to perform operation on Structure used to access instruction status parameters Specifies the Registration Input to select 1 Registration 1 Position 2 Registration 2 Posit
12. Indicates the output bit associated with this schedule Entered as a value 00 07 Next state of output bit specified in Point ID 0 Off 1 0 Point ID 1 byte Point Value 1 byte Time Stamp 4 bytes The lower 32 bits of CST Indicates when to change the state of the specified output bit Schedule Processing The Value and Mask fields are processed and all unscheduled data bits are moved to the module output data store This data is written to the output terminals after all schedules have been processed Each schedule is processed The schedule is not considered if e The Schedule ID is not in the range of 1 16 e The Point ID is not in the range of 0 7 Publication 1756 RM 007H EN P December 2006 212 M otion Event Instructions M AW M DW MAR M DR MAOC M DOC The Sequence Number has not changed If the schedule is to be considered it is marked active All active schedules are examined every 200 micro seconds The schedule Time Stamp is compared to the current CST If the cument CST is greater than or equal to the scheduled Time Stamp the Point Value in the schedule is moved to the module output data store for the specified output bit M Example Relay Ladder ADC Motion Arm Output Cam N Axis Axis3 E Execution T arget exec trati NC Motion Control MADC 3 RE Dutput output Input inputl C Output Cam outputcam 1 Cam Start Position cam strtl Cam End Positi
13. take on the position units of the master and slave axes respectively By contrast Publication 1756 RM 007H EN P December 2006 124 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV Publication 1756 RM 007H EN P December 2006 the Master and Slave Scaling parameters are unitless values that are simply used as multipliers to the cam profile Profile Scaled with M aster and Slave Profile Scaled with Slave Scaling Scaling x ii Scaled with M aster Scaling Master Axis Position Profile Stored in Cam Profile Array Cam Profile Array By default both the Master Scaling and Slave Scaling parameters are set to 1 To scale a position cam profile enter a Master Scaling or Slave Scaling value other than 1 Note that increasing the master scaling value of a cam profile decreases the velocities and accelerations of the profile while increasing the slave scaling value increases the velocities and accelerations of the profile To maintain the velocities and accelerations of the scaled profile approximately equal to those of the unscaled profile the master scaling and slave scaling values should be equal For example if the slave scaling value of a profile is 2 the master scaling value should also be 2 to maintain approximately equal velocities and accelerations during execution of the scaled position cam ATTENTION Decreasing the M aster Scaling value or increasing the Slave S
14. CASE OF Use CASE to select what to do based on a numerical value Operands Structured Text CASE numeric_expression OF acne Format Enter een a eL numeric SINT tag tag or expression that evaluates to a _ expression NT expression number numeric expression ELSE DINT statement REAL END CASE selector SINT immediate same as numeric expression INT DINT REAL you use REAL values use a range of values for a selector because a REAL value is more likely to be within a range of values than an exact match of one specific value Description The syntax is CASE numeric_expression OF selectorl lt statement gt lt q statements to execute when numeric expression selectorl selector2 statement e statements to execute when specify as many numeric expression selector alternative selector values paths as you need selector3 lt statement gt lt q statements to execute when numeric expression selector3 ELSE statement statements to execute when optional numeric expression any selector END_CASE See the table on the next page for valid selector values Publication 1756 RM 007H EN P December 2006 414 Structured Text Programming The syntax for entering the selector values is When selector is Enter one value value statement multiple distinct values valuel value2 valueN statement
15. Position REAL Immediate Absolute position or incremental distance for the move Tag For this M ove Type Enter this Position value Absolute Position to move to Incremental Distance to move Rora Shortest han Position to move to Enter a positive Rotary Positive value that is less than the Position Unwind value Rotary Negative Absolute M aster Offset Absolute offset position Incremental M aster Offset Incremental offset distance Speed REAL Immediate Speed to move the axis in Speed Units Tag Speed Units DINT Immediate Which units do you want to use for the Speed e Units per sec 0 e of Maximum 1 Accel Rate REAL Immediate Acceleration rate of the axis in Accel Units Tag Accel Units DINT Immediate Which units do you want to use for the Accel Rate e Units per sec 0 e of Maximum 1 Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS M AH MAJ MAG M CD M CCP M APC M ATC M CSV 77 Operand Type Format Description Decel Rate REAL eee Deceleration rate of the axis in Deceleration Units ag Decel Units DINT Immediate Which units do you want to use for the Decel Rate e Units per sec 0 e of Maximum 1 Profile DINT Immediate Select the velocity profile to run for the move e Trapezoidal 0 e S Curve 1 For more information see Program a Velocity Profile on page 1 22 Accel J erk REAL Immediate The instruction only uses the jerk operands if the Profile i
16. Type Format Enter UNTIL bool expression bool BOOL tag BOOL tag or expression that evaluates to D REPEAT expression expression BOOL value BOOL expression IM PORTANT Make sure that you do not iterate within the loop too many times in a single scan e The controller does not execute any other statements in the routine until it completes the loop e If the time that it takes to complete the loop is greater than the watchdog timer for the task a major fault occurs e Consider using a different construct such as Description The syntax is REPEAT lt statement gt statements to execute while bool expression is false IF bool_expression2 THEN EXN f there are conditions when you want to optional exit the loop early use other statements ENDIF such as an IF THEN construct to condition an EXIT statement UNTIL bool expressionl END REPEAT Publication 1756 RM 007H EN P December 2006 Structured Text Programming 423 These diagrams show how a REPEAT UNTIL loop executes and how an EXIT statement leaves the loop early statement 1 statement 2 statement 3 statement 4 BOOL expression false rest of the routine While the bool_expression is false the controller executes only the statements within the REPEAT UNTIL loop Example 1 If you want this The REPEAT UNTIL loop executes the statements
17. exec trgt2 Motion Control MDOC 2 Disarm Type All MDOC Ladder Example Structured Text MDOC Axis3 exec trgt2 MDOC 2 al1 Publication 1756 RM 007H EN P December 2006 216 Motion Event Instructions MAW M DW MAR M DR M AOC M DOC Notes Publication 1756 RM 007H EN P December 2006 Introduction Chapter 6 Motion Configuration Instructions M M RAT MAHD M RHD Tags used for the motion control attribute of instructions should only be used once Re use of the motion control tag in other instructions can cause unintended operation This may result in damage to equipment or personal injury Configuration instructions include all motion instructions that are used establish and apply servo configuration parameters to an axis This group of instructions includes hookup test diagnostic instructions and tuning instructions Use the motion configuration instructions to tune an axis and to run diagnostic tests for the servo system These tests include e A motor encoder hookup test e An encoder hookup test e A marker test The motion configuration instructions are If you want to Use this instruction Available in these languages Compute a complete set of servo gains and M AAT Relay Ladder dynamic limits based on a previously executed M RAT instruction Structured Text The M AAT instruction also updates the servo module with the new gain parameters Command the servo module to
18. If the Execution Schedule is set to Forward or Reverse execution of the MAPC instruction initially sets the Position Cam Status bit to True and the Position Cam Lock Status bits to False Position Cam Lock Status transitions to True when the Execution Schedule condition is satisfied Bit Name State Meaning Position Cam TRUE Position Camming is Enabled Status Position Cam FALSE Slave Axis is waiting for M aster Axis to reach Lock Status Lock Position Position Cam FALSE No pending Position Cam Pending Status If the Execution Schedule is set to Pending execution of the MAPC instruction does not affect the current state of either the Position Cam Status or Position Lock Status bits Position Cam Pending Status bit is Motion M ove Instructions MAS MAH MAJ MAG MRP MAPC MATC MCSV 137 set to True immediately and transitions to False when the pending cam becomes the active cam Bit Name State Meaning Position Cam N A Position Camming is Enabled Status Position Cam N A Slave Axis is waiting for M aster Axis to reach Lock Status Lock Position Position Cam True Pending Position Cam Pending Status Example Relay Ladder Motion Axis Position Cam Slave Axis Axis Master Axis Axis Motion Control MAPC 1 Direction 1 Slave Scaling Master Scaling 1 0 Execution Mode Once Execution Schedule Immediate Master Lock Position Mlckpos Cam Lo
19. Laf Tran 001 When the move is in process IP the SFC goes to the next step and queues the next move CLM Arm X2 X3 rm MI Move 0 0 rm Positions 0 0 Speed Unitspersec Cartesian Vars C uto Accel Unitspersec2 artesian Vars C uto Decel Unitspersec2 Trapezoidal l Disabled Programmed Tran 003 Arm MI Move 0 IP amp NOT Arm X2 X3 MovePendingQueueFullStatus Publication 1756 RM 007H EN P December 2006 348 Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Example 2 Change Orientation Suppose you want to move the target coordinate system in a rectangular path In that case execute the MCT instruction to start the transform Then execute four Motion Coordinated Linear Move MCLM instructions to produce the rectangular path Second M CLM instruction 2 oe Third M CLM instruction First M CLM instruction Represents both the source and the target coordinate systems Fourth M CLM instruction Now suppose you want to rotate the Cartesian positions of the target coordinate system by 20 counterclockwise around the X3 axis In that case 1 Enter orientation values of 0 0 20 into the MCT instruction 2 Execute the MCT instruction again to apply the orientation to the transform 3 Execute the same four MCLM instructions again Represents the target coordinate system
20. Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 359 Motion Coordinated Use the Motion Coordinated Shutdown Reset MCSR instruction to reset all axes in a coordinate system The MCSR instruction resets the Shutdow n Reset M CSR axes from a shutdown state to an axis ready state Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Operands Relay Ladder Operand Type Format Description Coordinate COORDINATE SYSTEM tag Name of the axis which provides MCSR Motion Coordinated Shutdown Reset N gt System the position input to the Output Coordinate System i Cam Ellipsis launches Axis Motion Control A gt Properties dialog Motion MOTION INSTRUCTION tag Structure used to access instruction Control status parameters Structured Text CoordinateSystem MotionControl The operands are the same as those for the relay ladder MCSR instruction Description The Motion Coordinated Shutdown Reset MCSR instruction initiates a reset of all axes within a specified coordinate system from a shutdown state to an axis ready state MCSR also clears any axis faults Coordinate System The Coordinate System operand specifies the set of motion axes that define the dimensions of a Cartesian coordinate system For this release the coordinate system suppor
21. No 0 No 0 Unitspersec UnitspersecZ UnitspersecZ Auto Speed Last Auto Speed m Stop 8 Servo Axis Servo Axis MI Stop Auto All Yes Servo Axis Vars C Auto Decel ofMaximum Yes Servo xis Vars C uto Decel Jerk ofTime Tran 003 Before the SFC leaves the step stop Servo Axis The PO qualifier Servo Axis Vars I Stop limits this to the last scan of the step T The SFC leaves the step when Servo Axis Vars l Stop turns on Publication 1756 RM 007H EN P December 2006 58 Motion Move Instructions MAS MAJ MAM MAG MCD M RP M CCP M APC M ATC M CSV Example 2 The operator uses a pushbutton to jog an axis The pushputton turns the Jog Fwd PB tag on and off When the operator releases the button the MAS instruction stops the axis The MAS instruction uses an S curve profile to stop the axis because e The MAJ instruction uses an S curve profile e The Stop Type is Jog for the MAS instruction Relay Ladder Fwd PB Servo Axis ServoActionStatus AJ p a Motion Axis Jog EN Axis Servo Axis Motion Control Servo Axis MI Manual Jog DN5 Direction 0 ER Speed Servo Axis Vars C Manual Jog Speed 600 IP3 Speed Units Units per sec Accel Rate Servo Axis Vars C Manual Jog Accel 200 Accel Units i C2 Decel Servo Axis Vars C Manual Jog Decel Same deceleration rate This prevents axis reversals if 200 the operator quickly goes back and f
22. lt lt Less e 9 31 Reserved for future use M otion Control MOTION_ tag Structure used to access INSTRUCTION instruction status parameters Output DINT tag A set of 32 output bits that are set or reset based on the specified Output Cam It can be either a memory location or a physical output If Pending is selected as the Execution Schedule then Output is ignored Input DINT tag A set of 32 input bits that can be used as enable bits depending on the specified Output Cam It can be either a memory location or a physical input If Pending is selected as the Execution Schedule then Input is ignored Output Cam OUTPUT CAM arraytag of OUTPUT CAM elements The elements do not need to be ordered and the array size is determined by the number of cam elements Specified The array size is limited by the available memory of the Logix controller Publication 1756 RM 007H EN P December 2006 188 M otion Event Instructions M AW MDW MAR M DR MAOC M DOC Publication 1756 RM 007H EN P December 2006 Operand Type Format Description Cam Start SINT INT DINT or immediate Cam Start Position with the Cam Position REAL or tag End Position define the left and right boundaries of the Output Cam range Cam End Position SINT INT DINT or immediate Cam End Position with the Cam REAL or tag Start Position define the left and right boundaries of the Output Cam range Output OUT
23. 195 The following diagram shows the effect of the selected unlatch type on the output bit for different compensated cam and enable bit combinations as function of position Position Position Position Position Position 1 Position Unlatch as Function of Position and as function of time Time i 1 Time a Position Position Position i 1 Position Position Position Output bit initially set Output bit initially not set Time Time Output bit initially set Unlatch as a Function of Time Output bit initially not set Publication 1756 RM 007H EN P December 2006 196 Motion Event Instructions MAW MDW MAR M DR MAOC M DOC Publication 1756 RM 007H EN P December 2006 Left and Right Cam Positions The Left and Right cam positions define the range of an Output Cam element If the latch or unlatch type is set to Position or Position and Enable with the enable bit active the left and right cam positions specify the latch or unlatch position of the output bit Duration If the unlatch type is set to Duration or Duration and Enable with the enable bit active the cam duration specifies the time between the latching and the unlatching of the output bit Enable Type Depending on the selected enable type the enable bit is an element of either the input inverted input
24. Arithmetic Status Flags Fault Conditions Error Codes MAFR Changes to Status Bits MAFR Example Publication 1756 RM 007H EN P December 2006 This instruction is most commonly used as part of a fault handler program which provides application specific fault action in response to various potential motion control faults Once the appropriate fault action is taken the MAFR instruction can be used to clear all active fault status bits To successfully execute a MAFR instruction the targeted axis must be configured as either a Servo or Feedback Only axis Otherwise the instruction errors fe MAFR instruction execution may take multiple scans to execute because it requires transmission of a message to the motion module The Done DN bit is not set until after this message has been successfully transmitted There is no guarantee that all faults are cleared by this instruction as one or more faults may be the result of a persistent condition This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions None When the input conditions are true the controller clears all motion faults for axis1 Relay Ladder Motion Axis Fault Reset
25. Axes ABC will fol ow the respective CS2 axes MCS on CS3 Coordinated M ove The MCLM instruction on CS2 will continue The MAM on Y w ill continue The MAM on S ill continue The onZw ill continue T1 stays active Axes ABC will fol ow the respective CS2 axes MAS on Y All The MCLM instruction on CS2 will stop The MAM on Y w ill stop The MAM onS w ill continue The MAM on Z will continue T1 is canceled Axes ABC will stop due to canceling the transform Publication 1756 RM 007H EN P December 2006 334 Motion Coordinated Instructions CLM M CCM M CCD M CS MCSD CTP M CSR Instruction MAS on Y Stop Type M ove Result The MCLM instruction on CS2 will continue The on Y will stop The MAM on S will continue The MAM on Z will continue T1 stays active Axes ABC will follow the respective CS2 axes MAS onZ All The MCLM instruction on CS2 will continue The MAM on Y will continue The MAM onS will continue The MAM on Z will stop T1 stays active Axes ABC will follow the respective CS2 axes MAS onZ M ove The MCLM instruction on CS2 will continue The M AM on Y will continue The MAM on S will continue The MAM on Z will stop T1 stays active Axes ABC will follow the respective CS2 axes M CS on C
26. Co Accel Rate 1 Incremental C TUNE Accel Units Position REAL array tag coordination units Decel Rate k Speed SINT INT DINT or immediate coordination units Decel Units REAL or tag Profle Speed Units SINT INT or DINT immediate 0 Units per Sec Termination Type 9 1 of Maximum Merge Speed Accel Rate SINT INT DINT or immediate coordination units lt lt Less REAL or tag Accel Units SINT INT or DINT immediate 0 Units per 1 of Maximum Decel Rate SINT INT DINT or immediate coordination units REAL or tag Decel Units SINT INT or DINT immediate 0 Units per 1 of Maximum Profile SINT INT or DINT immediate 0 Trapezoidal 1 S Curve Publication 1756 RM 007H EN P December 2006 254 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Operand Type Format Description Termination Type SINT INT or DINT immediate or tag 0 Actual Tolerance 1 Settle 2 Command Tolerance 3 No Decel 4 Follow Contour Velocity Constrained 5 Follow Contour Velocity Unconstrained See Choose a termination type on page 259 Merge SINT INT or DINT immediate 0 Disabled 1 Coordinated M otion 2 All M otion Merge Speed Publication 1756 RM 007H EN P December 2006 SINT INT or DINT immediate
27. Continuous Once started the cam profile is executed indefinitely This feature is useful in rotary applications where it is necessary that the cam position run continuously in a rotary or reciprocating fashion 2 Persistent When the M aster Axis moves beyond the defined range cam motion on the Slave Axis stops and the PositionCamLockStatus bit is cleared Slave motion does resume if the M aster Axis moves back into the cam profile range and the PositionCamLockStatus bit is set Publication 1756 RM 007H EN P December 2006 118 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV Publication 1756 RM 007H EN P December 2006 Operand Type Format Description Execution Schedule UINT32 immediate Selects the method used to execute the cam profile Options are 0 Immediate The slave axis is immediately locked to the master axis and the position camming process begins 1 Pending lets you blend a new position cam execution after an in process position cam is finished When Pending is selected the following parameters are ignored M aster Axis M aster Lock Position and M aster Reference 2 Forward only the cam profile starts when the master position crosses the Master Lock Position in the forward direction 3 Reverse only the cam profile starts when the master position crosses the M aster Lock Position in the reverse direction 4 B
28. Corrective Action or Cause Notes 67 e Change the target positions to values that are within the Invalid Transform Position reach of the robot e If X2b 2 isn t zero stay out of this region e You re trying to move to a place the robot can t reach M CT attempted while at origin X2b 4X2 X2b 4X2e f gt lt gt X2 68 M ove the joints so that the end of the robot isn t at the origin of Transform At Origin the coordinate system You can t start the transform if the joint angles result in X1 0 and X2 0 69 e Check the maximum speed configuration of the joints M ax J oint Velocity Exceeded e Use target positions that keep the robot from getting fully stretched or folding back on itself at the origin of the The calculated speed is very high This happens when the coordinate system robot either Move ina relatively straight line through positions where e gets fully stretched X1 0 and X2 0 e folds back on itself e moves away from X1 20 and X2 0 in a different angle than it approached that position e is configured with the wrong velocity limit Example These moves produce this error x3 ww 7 i NS Next move is at 4 First move is at this angle this angle X2 10 Look for source or target axes that are configured as rotary Axes In Transform M ust Be Linear positioning mode Change them to linear positioning mode A transform works only with linear axes 71 Wait until the transform that you ar
29. Homing In Process Error 16 and Illegal Axis Data type 38 errors all function in the same fashion A number between 0 and n is displayed for the Extended Error Code This number is the index to the Coordinate System indicating the axis that is in the error condition For Error Code Axis Not Configured 11 there is an additional value of 1 which indicates that Coordinate System was unable to setup the axis for coordinate motion For the MCCM instruction Error Code 13 Parameter Out of Range Extended Errors return a number that indicates the offending parameter as listed on the faceplate in numerical order from top to bottom beginning with zero For example 2 indicates the parameter value for Move Type is in error Error Code and Number Extended Error Instruction Description Numeric Parameter Indicator Parameter Out Of Range 13 0 Coordinate System Number of primary axes is not 2 or 3 Parameter Out Of Range 13 2 M ove Type M ove Type is either less than 0 or greater than 1 Parameter Out Of Range 13 3 Position The position array is not large enough to provide positions for all the axes in the coordinate system Parameter Out Of Range 13 4 Circle Type Circle Type is either less than 0 or greater than 4 Parameter Out Of Range 13 5 Via Center Radius The size of the Via Center array is not large enough to provide positions for all of the axes in the defining via center point Parameter Out O
30. Motion Configuration Instructions M AAT RAT M AHD M RHD Publication 1756 RM 007H EN P December 2006 Motor Encoder Hookup Test If the Motor Encoder Test is selected the motion module enables the external drive and generates a 1 Volt per second output ramp to the drive while monitoring the encoder feedback When the axis has moved a distance greater than or equal to the configured Motor Encoder Test Increment the test voltage is set back to zero and the drive disabled The motion module than reports the direction of travel which is stored as one of the following output parameters Axis Parameter Data Type Units Definition Test Status Integer Status Report of the Hookup Diagnostic Test Process Test Direction Boolean Direction of axis travel during hookup Forward test as seen by the motion module If due to improper hookup or some other problem with the system the axis feedback fails to detect that axis reaching the configured Motor Encoder Test Increment within 2 seconds the servo sets the test voltage back to zero and disables the drive The control reflects this condition through the Test Status axis output parameter This usually indicates that either the cabling to the drive or the cabling to the encoder is incorrect Running MRHD with the Encoder Hookup Test selected is an effective method of isolating the problem to the encoder or drive Encoder Hookup Test If the Encoder Test is selected th
31. ass D X Motion Control MOTION INSTRUCTION tag Structure used to access Motion Control D instruction status parameters Structured Text MCSD CoordinateSystem MotionControl The operands are the same as those for the relay ladder MCSD instruction Description The Motion Coordinated Shutdown MCSD instruction shuts down all of the axes in the associated coordinate system Coordinate System The Coordinate System operand specifies the set of motion axes that define the dimensions of a Cartesian coordinate system For this release the coordinate system supports up to three 3 primary axes Only the axes configured as primary axes up to 3 are included in the coordinate velocity calculations M otion Control The following control bits are affected by the MCSD instruction Mnemonic Description EN Enable Bit 31 The Enable Bit sets when the rung transitions from false to true It resets when the rung goes from true to false DN Done Bit 29 The Done Bit sets when the coordinated shutdown is successfully initiated It resets when the rung transitions from false to true ER Error Bit 28 The Error Bit sets when the coordinated shutdown fails to initiate successfully It resets when the rung transitions from false to true Publication 1756 RM 007H EN P December 2006 336 Motion Coordinated Instructions CLM M CCM M CCD MCS MCSD M CTP M CSR MCSD is a transitional instructi
32. lt 2 21 NE i 4 x Z axis oor e 1 MESE Ee X axis 3D Arc Using Circle Type of Via This path is achieved by using an MCCM instruction with a Move Type of Absolute and a Circle Type of Via When Via is selected the Publication 1756 RM 007H EN P December 2006 otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 301 Via Center Radius position defines a point through which the arc must pass MCCM Three dimensional coordinate system Motion Coordinated Circular Move N gt Coordinate System Coordinated sysl Motion Control MCCM 8 ND Move Type 0 R2 Position MCCM Move position 16 Axis 20 IP gt Position defined in Axis 2 0 Axis 00 absolute units Circle Type 0 a Co Circle Type is Via Via Center Radius VIA 4 Direction 0 Via position defined in absolute units as Speed 10 1 0 1 0 1 414 Speed Units Units per sec Accel Rate Direction is ignored for Via Circle Type Accel Units Units per sec2 Decel Rate Decel Units Units per sec2 Profile Trapezoidal Termination Type Merge Disabled Merge Speed Current MCCM Ladder Instruction for 3D Arc Using Circle Type of Via 3D Arc Using M CCM with Circle Type Center The following example shows the use of the MCCM with a Circle Type of Center and a Move Type of Absolute to create a three dimensional arc The basic assumpt
33. Axis Axis3 Motion Control MAFR_3 vvv MAFR Ladder Example Structured Text MAFR Axis0 MAFR 1 Introduction If You Want To Stop any motion process on an axis Chapter 3 Motion Move Instructions MAS MAH MAJ MAM MAG MCD MRP MCCP MAPC MATC MCSV Use the Motion Move instructions to control axis position Use This Instruction Available In These Languages Motion Axis Stop MAS relay ladder structured text Home an axis M otion Axis Home M AH relay ladder structured text og an axis Motion Axis J og relay ladder structured text M ove an axis to a specific position Motion Axis M ove relay ladder structured text Start electronic gearing between 2 axes M otion Axis Gear M AG relay ladder structured text Change the speed acceleration or deceleration of a M otion Change Dynamics M CD relay ladder move or a jog that is in progress structured text Change the command or actual position of an axis M otion Redefine Position M RP relay ladder structured text Calculate a Cam Profile based on an array of cam points M otion Calculate Cam Profile M CCP relay ladder structured text Start electronic camming between 2 axes Motion Axis Position M APC relay ladder structured text Start electronic camming as a function of time Motion Axis Time Cam M ATC relay ladder structured text Calculate the slav
34. BitName State Meaning DriveEnableStatus TRUE e The axis is in the drive control state e The drive enable output is active while the tuning profile is running TestStatus TRUE The axis is running a testing process Example When the input conditions are true the controller runs the encoder diagnostic test on 11 Relay Ladder RHD Motion Run Hookup Diagnostics Axis Axis Motion Control MRHD 1 Diagnostic Test Marker MRHD Ladder Example Structured Text MRHD Axis1 MRHD 1 Marker Publication 1756 RM 007H EN P December 2006 240 Motion Configuration Instructions M AAT M RAT M AHD M RHD Notes Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions MCCM MCCD MCS MCSD MCT MCTP MCSR Introduction Use the motion coordinated instructions to move up to three axes in a coordinate system Coordinate Systems with Orthogonal Axes V jes a 5 cL ix One Dimension Cartesian Coordinate Two Dimension Cartesian Coordinate Three Dimension Cartesian System System Coordinate System Coordinate Systems with Non orthogonal Axes or Articulated Dependent Coordinate Articulated Independent Coordinate System System Use this table to choose a motion coordinated instruction Publication 1756 RM 007H EN P December 2006 242 Motion Coordinated Instructions CLM M M CCD
35. Fault Conditions Error Codes Extended Error Codes Motion Configuration Instructions M AAT M RAT MAHD MRHD 227 The Tune Status Parameter is not to be mistaken for the STATUS sub tag of the M RAT instruction To successfully execute a MRAT instruction on an axis the targeted axis must be configured as a Servo Axis Type and the axis must be in the Axis Ready state If any of these conditions are not met than the instruction errs W hen the M RAT instruction is initially executed the In Process IP bit is set and the Process Complete PC bit is cleared The M RAT instruction execution can take multiple scans to execute because it requires transmission of multiple messages to the motion module The Done DN bit is not set immediately but only after these messages are successfully transmitted The In Process IP bit is cleared and the Process Complete PC bit is set at the same time that the Done DN bit is set This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e n structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The following Extended Error codes help to pinpoint the pro
36. M CS MCSD MCT M CTP M CSR If you wantto Use this instruction Available in these languages Initiate a single or multi dimensional linear coordinated Motion Coordinated Linear M ove Relay ladder move for the specified axes within a Cartesian coordinate system Structured text Initiate a two or three dimensional circular M otion Coordinated Circular M ove Relay ladder coordinated move for the specified axes within a Cartesian coordinate system Structured text Initiate a change in path dynamics for coordinate Motion Coordinated Change Dynamics Relay ladder motion active on the specified coordinate system CCD Structured text Stop the axes of a coordinate system or cancel a M otion Coordinated Stop M CS Relay ladder transform Structured text Initiate a controlled shutdown of all of the axes of the Motion Coordinated Shutdown MCSD Relay ladder specified coordinate system Structured text Start a transform that links two coordinate systems Motion Coordinated Transform M Relay ladder together Structured text Calculate the position of one coordinate system with Motion Calculate Transform Position Relay ladder respect to another coordinate system CTPJ Structured text Initiate a reset of all of the axes of the specified Motion Coordinated Shutdown Reset Relay ladder coordinate system from the shutdown state to the axis MCSR ready
37. MCSD M CTP M CSR Guideline Examples and notes Expect bi directional motion between the source and target coordinate Systems Use an M CS instruction to cancel the transform A transform is bi directional gt Target oorainate Coordinate System Transform System 4 When you start the transform the position of the source coordinate system changes to match the corresponding position of the target coordinate system After that if you move either system the other system moves in response The controller continues to control the axes even if you stop scanning the MCT instruction or its rung goes false Use a M otion Coordinated Stop MCS instruction to stop the motion in the coordinate system cancel the transform or both Execute the M CT instruction again if you change the orientation or translation Suppose you change orientation or translation values after the transform is running ET Motion Coordinated Transform EN gt Source System Cartesian DN Target System Articulated Arm Motion Control Joint MI Run Transform C poem Orientation Arm Orientation Translation Arm Translation In that case execute the instruction again To execute the instruction toggle the rung condition in from false to true Also execute the instruction again if you change the geometry of the equipment Arithmetic Status Flags not affecte
38. MCT M CTP M CSR Publication 1756 RM 007H EN P December 2006 No No change is made to the Speed of the coordinated motion Yes The speed of the coordinated motion is changed by the value defined in the Speed and Speed Units operands Speed The Speed operand defines the maximum speed along the path of the coordinated move Speed Units The Speed Units operand defines the units applied to the Speed operand either directly in coordination units of the specified coordinate system or as a percentage of the maximum values defined in the coordinate system Change Accel The Change Accel operand determines whether or not to change the acceleration of the coordinated motion profile No No change is made to the acceleration of the coordinated motion Yes The acceleration of the coordinated motion is changed by the value defined in the Accel Rate and Accel Units operands Accel Rate The Accel Rate operand defines the maximum acceleration along the path of the coordinated move Accel Units The Accel Units operand defines the units applied to the Accel Rate operand either directly in coordination units of the specified coordinate system or as a percentage of the maximum values defined in the coordinate system otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 323 Change Decel The Change Decel operand determines whether or not to change the deceleration of the coordinated
39. MRP MCCP MAPC MATC MCSV M AH Changes to Status Bits Bit Name State Meaning HomingStatus TRUE Axis is Homing J ogStatus FALSE Axis is no longer J ogging M oveStatus FALSE Axis is no longer M oving GearingStatus FALSE Axis is no longer Gearing StoppingStatus FALSE Axis is no longer Stopping During portions of the active homing sequence these bits may be set and cleared The MAH instruction uses the Move and Jog motion profile generators to move the axis during the homing sequence This also means that any disruption in the Move or Jog motion profiles due to other motion instructions can affect the successful completion of the MAH initiated homing sequence If in Passive homing mode the MAH instruction simply sets the Homing Status bit Relay Ladder Motion Axis Home Axis Motion Control Axis zz 1 TYTTT MAH Ladder Example Structured Text MAH Axis0 MAH 1 Motion M ove Instructions M AS M AH MAJ MAM MAG MCD MRP MCCP M APC MATC MCSV 65 Motion Axis J og MAJ Operand Axis Operands Type AXIS_VIRTUAL AXIS_GENERIC AXIS_SERVO AXIS_SERVO_DRIVE Use the MAJ instruction to move an axis at a constant speed until you tell it to stop ATTENTION Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Relay Ladder AJ Motion Axis Jog EN
40. Motion Axis Home M AH 26 M otion Axis J og M AJ 26 M otion Axis M ove M AM 26 Motion Axis Position Cam M APC 26 M otion Axis Stop M AS 26 M otion Axis Time Cam M ATC 26 Index 431 M otion Calculate Cam Profile M C CP 26 M otion Calculate Slave Values 26 M otion Change Dynamics M CD 26 M otion Redefine Position M RP 26 M otion State Instructions M otion Axis Fault Reset M AFR 26 M otion Axis Shutdown M ASD 26 M otion Axis Shutdown Reset M ASR 26 M otion Direct Drive Off M DF 26 M otion Direct Drive On M DO 26 M otion Servo Off M SF 26 M otion Servo On M SO 26 motion instructions error codes 383 motion move M CD 98 Motion Move Instructions Introduction 49 M CSV 151 M otion Axis Gearing M AG 87 Changes to Status Bits 96 Changing M aster Axes 94 Changing the Gear Ratio 92 Clutch 93 Description 90 Extended Error Codes 95 Fraction Gear Ratios 92 Gearing in the Opposite Direction 92 Gearing in the Same Direction 92 MOTION INSTRUCTION structure 90 M oving While Gearing 95 Operands 87 Relay Ladder 87 Structured Text 89 Real Number Gear Ratios 92 Reversing the Gearing Direction 92 Slaving to the Actual Position 91 Slaving to the Command Position 91 M otion Axis Home M AH 60 Absolute Homing 61 Active Homing 61 Changes to Status Bits 64 Description 61 Extended Error Codes 62 M OTION INSTRUCTION structure 60 Operands 60 Relay Ladder 60 Structured Text 60 Passive Homing
41. POSTAGE WILL BE PAID BY THE ADDRESSEE Allen Bradley DOOGE ROCKWELL FESS Rockwell Automation 1 ALLEN BRADLEY DR MAYFIELD HEIGHTS OH 44124 9705 Rockwell Automation Rockwell Automation provides technical information on the Web to assist you in using its products At http support rockwellautomation com you can Support find technical manuals a knowledge base of FAQs technical and application notes sample code and links to software service packs and a MySupport feature that you can customize to make the best use of these tools For an additional level of technical phone support for installation configuration and troubleshooting we offer TechConnect Support programs For more information contact your local distributor or Rockwell Automation representative or visit http supportrockwellautomation com Installation Assistance If you experience a problem with a hardware module within the first 24 hours of installation please review the information that s contained in this manual You can also contact a special Customer Support number for initial help in getting your module up and running United States 1 440 646 3223 M onday Friday 8am 5pm EST Outside United Please contact your local Rockwell Automation representative for any States technical support issues New Product Satisfaction Return Rockwell tests all of its products to ensure that they are fully operational when shipped f
42. Systems 3 You are attempting to use either a 2 or 3 axis Cartesian target coordinate system with transform directions other than forward and inverse You can use inverse mirror directions only when both these conditions are true e You have a 3 axis coordinate system e The base offset X2b and end effector offset X2e of the X2 dimension are zero Introduction CAM Structure Appendix B Motion related Data Types Structures Use this appendix for information about the following motion related data types Data type Page CAM Structure 389 CAM PROFILE Structure 390 MOTION GROUP Structure 391 MOTION INSTRUCTION Data Type 392 OUTPUT CAM Structure 393 OUTPUT COM PENSATION Structure 394 Additional Resources For other motion related data types see this publication Motion Modules in Logix5000 Control Systems User Manual publication LOGIX UM002A EN P The Cam data type consists of slave and master point pairs as well as an interpolation type Since there is no association with a specific axis position or time the point values are unit less The interpolation type can be specified for each segment as either linear or cubic The format of the cam element is shown in the following table Mnemonic Data Type Description MASTER REAL The x value of the point SLAVE REAL The y value of the point Segment Type DINT The type of interpolation Value Description 0 linear 1 cubic
43. group is forced to perform a Fast Disable process regardless of the configured Programmed Stop Mode Fach axis in the group is decelerated at the Maximum Deceleration rate and once stopped placed into the Axis Ready servo inactive and drive disabled state Publication 1756 RM 007H EN P December 2006 158 Motion Group Instructions M GS M GSD M GSR M GSP Publication 1756 RM 007H EN P December 2006 There are five Programmed Stop Modes that are currently supported by the MGPS instruction Fast Stop Fast Disable Hard Disable Fast Shutdown and Hard Shutdown Each axis may be configured to use any of these five stop modes The following is a description of the effect of each these five stopping modes as they apply to an individual axis in the specified group Fast Stop For an axis configured for a Fast Stop the MGPS instruction initiates a controlled stop much like that initiated by an MAS instruction In this case the Motion Group Programmed Stop MGS instruction brings the axis motion to a controlled stop without disabling the axis servo loop It is useful when a fast decelerated stop the axis is desired with servo control retained The MGPS instruction uses the configured Maximum Deceleration for the axis in this stop mode as the basis for the deceleration ramp applied to the axis Fast Disable For an axis configured for a Fast Disable the MGS instruction initiates a controlled stop much like that initiated by an MAS
44. output or inverted output Output Cam Array Checks If you select an output bit less than 0 or greater than 31 the Output Cam element is not considered and the user is warned with an instruction error Illegal Output Cam If you select a latch type less than 0 or greater than 3 a value of Inactive is used and the user is warned with an instruction error llegal Output Cam If you select an unlatch type less than 0 or greater than 5 a value of Inactive is used and the user is warned with an instruction error llegal Output Cam If you select a left cam position greater than or equal to the right cam position and the latch or unlatch type is set to Position or Position and Enable the Output Cam element is not considered and the user is warned with an instruction error Illegal Output Cam If you select a left cam position less than the cam start position and the latch type is set to Position or Position and Enable the cam start position is used and the user is warned with an instruction error llegal Output Cam If you select a right cam position greater than the cam end position and the unlatch type is set to Position or Position and Enable the cam end position is used and the user is warned with an instruction error Illegal Output Cam If you select a duration less than or equal to 0 and the unlatch type is set to Duration or Duration and Enable the Output Cam element M otion Event Instr
45. select the Diagnostic Test and the Observed Direction and the desired physical axis If the targeted axis does not appear in the list of available axes the axis has not been configured for operation Use the Tag Editor to create and configure a new axis The MAHD instruction uses axis configuration parameters as input and output The input configuration parameters that MAHD uses are shown in the table below The Test Direction Forward bit is automatically established as output from the MRHD instruction Refer Motion Configuration Instructions MRAT MAHD MRHD 231 to the Motion Axis Object specification for detailed description of these and other parameters Axis Parameter Data Type Units Definition Test Direction Boolean Direction of axis travel during hookup Forward test as seen by the motion module Motor Encoder Hookup Test If the Motor Encoder Test is selected the controller computes the proper setting for both the Encoder Polarity and the Drive Polarity based on the Observed Direction instruction parameter and the state of Test Direction Forward bit which was established by the output of the MRHD instruction Once the Encoder Polarity and Drive Polarity settings are computed the MAHD applies these values to the corresponding axis configuration parameter bits as shown in the following table Axis Parameter Data Type Units Definition Encoder Polarity Boolean Inverts the sense
46. 0 ofmaximum 1 AccelUnits unitspersec2 0 ofmaximum 1 DecelUnits unitspersec2 0 ofmaximum 1 Profile trapezoidal 0 scurve 1 J erk Units unitspersec3 0 ofmaximum 1 oftime 2 Merge disabled 0 enabled 1 M ergeSpeed programmed 0 current 1 MOTION_INSTRUCTION Data Type To See If Check If This Bitis Data Type Notes Set A false to true transition caused the instruction EN BOOL The EN bit stays set until the process is complete to execute and the rung goes false The jog was successfully initiated DN BOOL An error happened ER BOOL The axis is jogging IP BOOL Any of these actions stop this jog and clear the IP bit e Another MAJ instruction supersedes this MAJ instruction e MAS instruction e Merge from another instruction e Shutdown command e Fault Action Publication 1756 RM 007H EN P December 2006 68 Motion M ove Instructions M AS M AH MAJ MAM MAG MCD M RP M CCP M CSV Description Use the MAJ instruction to move an axis at a constant speed without regard to position Programming Guidelines If You Use An S curve Profile Be careful if you change the speed acceleration deceleration or jerk while an axis is accelerating or decelerating along an S curve profile You can cause an axis to overshoot its speed or reverse direction For more information see Troubleshoot Axis M otion on page 9 367 Guideline Details e In relay ladder toggle the rung This is a transi
47. 1 INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and emains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when the axis drive enable bit is activated and the specified analog output is successfully applied Error Bit 28 It is set to indicate that the instruction detected an error such as if you entered a Drive Output value that was too large M otion State Instructions M SO M SF MASD MASR MDO MDF MAFR 43 Description For motion module s with an external servo drive interface like the 1756 MO2AE or 1784 PMO2AE the Motion Direct Drive On MDO instruction can be used to directly enable the Drive Enable output of the axis and set the analog output to a specified level determined by the Drive Output parameter The Drive Output parameter can be expressed as a voltage or as a percent of the maximum configured output voltage value given by the Output Limit attribute The MDO instruction can only be used on a physical axis whose Axis Type is configured for Servo The instruction only executes when the axis is in the Axis Ready state i e servo action is OFF The resulting state of the axis is referred to as the Drive Control state The MDO instruction automatically enables the specified axis by activating the appropriate Drive Enable outp
48. 1 Manual Jog P4 Start Manual Jog Start the jog AJ Servo Axis Servo Axis MI Manual Jog Jog Direction Servo xis Vars C Manual Jog Speed Unitspersec Servo xis Vars C Manual Jog Accel Unitspersec Servo Axis Vars C Manual Jog Decel Unitspersecz2 SCurve Servo Axis Vars C Manual Jog Accel Jerk Servo xis Vars C Manual Jog Decel Jerk tofTime Disabled Programmed Stop Manual Jog AS Servo_ Axis Servo Axis MI Stop Manual Jog Yes Servo xis Vars C Manual Jog Decel Unitspersec Yes Servo Axis Vars C Manual Jog Decel Jerk ofTime m EE Before the SFC leaves the step stop Servo Axis The PO qualifier limits this to the last scan of the step Stop Not Jog Fwd_ PB amp Not Jog Rev PE The SFC leaves the step when both J og Fwd PBorJog Rev are off Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS M AH MAJ MAM MAG MCD MRP MCCP M APC MATC MCSV 75 Motion Axis Move MAM Use the Motion Axis Move MAM instruction to move an axis to a specified position ATTENTION Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Operands Relay Ladder AM Motion Axis Move EN gt Axis P Motion Control DN5 Move Type Position IP Speed Speed Units Accel Rate Accel Units Decel
49. 100 0 Decel Jerk 100 0 Jerk Units Merge Merge Speed 36 of Time Disabled Programmed lt lt Less Troubleshoot Axis M otion 373 Cause When you use an S curve profile jerk determines how fast an axis can change its acceleration and deceleration e When the stopping instruction starts the controller recalculates jerk and builds a new S curve profile e If the stopping instruction uses a lower acceleration the jerk is lower It takes longer at the lower jerk to get acceleration to zero e In the meantime the axis continues past its initial target speed The following trends show how the axis stops with a trapezoidal profile and an S curve profile Stop while accelerating and reduce the acceleration rate Trapezoidal S curve NENNEN 80 speed goes past its target 40 target speed 20 I 20 acceleration 40 The axis slows down as soon as you start the The stopping instruction reduces the acceleration of the axis It stopping instruction The lower acceleration doesn t now takes longer to bring the acceleration to zero The axis change the response of the axis continues past its target speed until acceleration equals zero Publication 1756 RM 007H EN P December 2006 374 Troubleshoot Axis M otion Corrective action Use a Motion Axis Stop MAS instruction to stop the axis Publication 1756 RM 007H EN P December 2006 lt Local 4 Data 1 0 gt Use the same
50. 15 11 180 12 2108 14 3 63 26 otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 357 Data Flow of MCTP Instruction The following illustrations show the flow of data when an MCTP Between Two Coordinate Instruction is executed to perform a forward transformation and an Systems inverse transformation The CS1 indicator represents a Cartesian Coordinate system containing X1 X2 and X3 axes as the source of the MCTP instruction The CS2 indicator represents the joint coordinate system containing J1 J2 and J3 axes as the target of the MCTP instruction Data Flow When a Move is Executed with an Instruction Forward Transform Motion Calculate Transform Position EN5 Source System Target System Motion Control cs1 B c52 E DN3 MCT1 Orientation OrientDisabled ER Translation TranslationDisabled Transform Direction Forward Reference Position Ref1 Transform Position Trans1 Input Data C52 DATA SOURCE Link Lengths L1 L2 Base Offsets X1b X2b X3b End Effector Offsets X1e X2e X3e Zero Angle Orientations Z1 Z2 Z3 Orientation Array 3 Translations Array 3 Transform Direction Reference Position Typically oint Target Coordinate System dialog Coordinate System dialog Coordinate System dialog Coordinate System dialog Instruction Faceplate Instruction Faceplate Instruction Faceplate Instr
51. 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis IP In Process Bit26 It is set on positive rung transition and cleared after the watch event has occurred or has been superseded by another M otion Arm Watch or terminated by a M otion Disarm Watch command PC Process It is set when a watch event occurs Complete Bit 27 Description The Motion Arm Watch MAW instruction sets up a Watch Position event to occur when the specified physical axis reaches the specified Set point position as shown below Setpoint Position Axis Position 1 0 Watch Pos status Watch Watch Position Position Event Event Set Up Occurs Set Point Position Watch Position events are useful for synchronizing an operation to a specified axis position while the axis is moving such as activating a solenoid to push a carton off a conveyor at a certain axis position Select or enter the desired physical axis the desired Trigger Condition and enter a value or tag variable for the desired Watch Position If the targeted axis does not appear in the list of available axes the axis has not been configured for operation Use the Tag Editor to create and configure a new axis When an Arm Watch Position instruction is executed the WatchEventStatus bit is set to 0 FALSE and the actual position of a physical axis is monitored at the servo l
52. 61 Publication 1756 RM 007H EN P December 2006 Publication 1756 RM 007H EN P December 2006 M otion Axis J og MAJ 65 338 Description 68 341 352 MOTION_ INSTRUCTION structure 67 339 351 Operands 65 338 350 Relay Ladder 65 Structured Text 67 339 351 Velocity Profile Effects 25 Motion Axis M ove MAM 75 Absolute M oves 82 Description 79 Extended Error Codes 84 MOTION INSTRUCTION structure 19 Operands 75 Relay Ladder 75 Structured Text 78 Rotary Shortest Path M oves 82 M otion Axis Position Cam M APC 115 Cam Profile Array Checks 122 Cam Profile Execution M odes 124 Camming Direction 121 Camming in the Opposite Direction 121 Camming in the Same Direction 121 Changes to Status Bits 136 Changing the Cam Lock Position 126 Description 120 Execution Schedule 125 Immediate Execution 125 Extended Error Codes 135 Fault Recovery 133 Forward Only Reverse Only or Bi di rectional Execution 127 Incremental M oves 132 Linear and Cubic Interpolation 123 M aster Direction 132 M aster Offset M oves 132 M aster Reference 131 M erging from a Cam 133 MOTION INSTRUCTION structure 120 M oving While Camming 132 Operands 116 Relay Ladder 116 Structured Text 119 Pending Cam Execution 129 Preserving the Current Camming Di rection 121 Reversing the Current Camming Di rection 122 Scaling Position Cams 123 Slaving to the Actual Position 131 Slaving to the Command Position 131 Specifying the Cam Profi
53. At that point the instruction is complete and a queued M CLM 2e or M CCM instruction can start 4 00 209 The deceleration point depends on whether you use a trapezoidal or S curve profile 2 00 e f you don t have a queued M CLM or M CCM instruction the axes 1 00 stop 0 00 4 Follow Contour Velocity Constrained Move 1 Move 2 M ove 3 0 00 1 00 2 00 3 00 400 500 6 00 Publication 1756 RM 007H EN P December 2006 The instruction stays active until the axes get to the target position At that point the instruction is complete and a queued M CLM or MCCM instruction can start e This termination type works best with tangential transitions For example use it to go from a line to a circle a circle to a line ora circle to a circle e The axes follow the path e f the moves are long enough the axes won t decelerate between moves If the moves are too short the axes decelerate between moves M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR Example path 5 Follow Contour Move 1 Move 2 Velocity E Unconstrained i 4 00 3 00 200 M ove 3 1 00 0 00 How do I geta triangular velocity profile 251 Termination type Description This termination type is similar to the contour velocity constrained It has these differences e Use this termination type to get a triangular velocity profile acros
54. Bit Status at the various transition points shown in the preceding graph with Termination Type of Command Tolerance For Command Tolerance Termination Type distance to go for transition point TP2 is equal to command tolerance for the coordinate system cs1 Bit M ovel DN TP1 TP2 v 4 M ovel IP M ovel AC M ovel PC M ove2 DN M ove2 IP M ove2 AC M ove2 PC 1 oveTransitionStatus CS1 M ovePendingStatus CS1 M ovePendingQueueFullStatus al ms ms my Ay Ay omy Ay a nm my A om A Ay Ay omy omy mn my mm A A A Ay omy omy mn om A ms my Ay Ay my omy Publication 1756 RM 007H EN P December 2006 248 Motion Coordinated Instructions M CLM M M M CS MCSD MCT M CTP M CSR Bit States at Transition Points of Blended M ove Using Follow Contour Velocity Constrained or Unconstrained linear circular move Y X axis The following table shows the bits at the transition points Bit TP1 TP2 TP3 M ovel DN T T T M ove1 IP T F F M ove1 AC T F F M ovel PC F T T M ove2 DN T T T M 2 F Move2 AC F T F M ove2 PC F F T 1 oveTransitionStatus F F F cs1 M ovePendingStatus T F F 1 ovePendingQueueFullStatus T F F Publication 1756 RM 007H EN P December 2006 Choose a termination t
55. DN bit is not set immediately but only after this message is successfully transmitted This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The following Extended Error codes help to pinpoint the problem when the MAHD instruction receives a Servo Message Failure 12 error message Extended Error Code decimal Associated Error Code decimal SERVO MESSAGE FAILURE Meaning No Resource 2 Not enough memory resources 12 to complete request SERCOS SERVO MESSAGE FAILURE Object M ode conflict Axis is in shutdown 12 12 SERVO MESSAGE FAILURE Permission denied 15 Enable input switch error 12 SERCOS SERVO_M ESSAGE_FAILURE Device wrong state Redefine Position Home and 12 16 Registration 2 are mutually exclusive SERCOS device state not correct for action SERCOS M AHD Changes to Status Bits None When the input conditions are true the controller applies the results of a previously executed Motion Run Hookup Diagnostics MRHD instruction to axis1 Motion Configuration
56. DRIVE Input Number 2 M otion MOTION _ tag Structure used to access control INSTRUCTION instruction status parameters Trigger BOOLEAN immediate Defines the Registration Input condition transition that defines the registration event Select either 0 trigger on positive edge 1 trigger on negative edge Windowed BOOLEAN immediate Set 1 if registration is to be registration Windowed meaning that the computed Registration Position must fall within the specified M in and M ax Position limits to be accepted as a valid registration event Select either 0 disabled 1 enabled Publication 1756 RM 007H EN P December 2006 Axis MotionControl TriggerCondition WindowedRegistration MinimumPosition MaximumPosition InputNumber M nemonic M otion Event Instructions M AW M DW M AR M DR M AOC M DOC 177 Operand Type Format Description Minimum position REAL immediate or tag Used when Window ed Registration is enabled Registration Position must be greater than M in Position limit before registration event is accepted M aximum position REAL immediate ortag Used when Window ed Registration is enabled Registration Position must be less than M ax Position limit before registration event is accepted Input Number UINT32 lor2 Specifies the Registration Input to select 1 Registration 1 Position 2 Registration 2
57. Decel Rate Jog_2_Decel from stopping to starting again 400 Decel Units Units per sec2 Profile S Curve Publication 1756 RM 007H EN P December 2006 370 Troubleshoot Axis M otion IMPORTANT Publication 1756 RM 007H EN P December 2006 Revision 16 or Later Leave bit 0 of the DynamicsConfigurationBits attribute for the axis turned ON Otherwise this corrective action won t work See the RSLogix 5000 online help for more information Help gt Contents gt GSV SSV Objects gt Axis gt Dynamics Configuration Bits Revision 16 and later lets you increase the deceleration jerk of an MAS instruction to get a quicker stop If the J erk Units are Then make this change to the Decel J erk of Time Reduce the of Time of Maximum Increase of Maximum Units per sec3 Increase Units per sec3 Troubleshoot Axis M otion 371 W hy does my axis While an axis is accelerating you try to stop the axis or change its gt Speed The axis keeps accelerating and goes past its initial target overshoot its target speed speed Eventually it starts to decelerate Revision 16 improved how the controller handles changes to an S curve profile See the RSLogix 5000 online help for more information Help gt Contents gt GSV SSV Objects gt Axis gt Dynamics Configuration Bits Example You start a Motion Axis Jog MAJ instruction Before the axis gets to its target speed you try to stop it with another MAJ instruction The spee
58. December 2006 Use the MDW instruction to disarm watch position event checking for an axis This instruction has the affect of clearing both the Watch Event Status and Watch Armed Status bits in the axis data structure Executing this instruction also clears the In Process bit associated with the controlling Motion Arm Watch MAW instruction Relay Ladder Operand Type Format Description Axis AXIS FEEDBACK tag Name of the axis to perform operation on AXIS GENERIC AXIS SERVO AXIS SERVO DRIVE Structure used to access instruction status parameters M otion control MOTION _ tag INSTRUCTION Structured Text The operands are the same as those for the relay ladder MDW instruction MOTION_ INSTRUCTION Structure Mnemonic EN Enable Bit 31 Description It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when axis watch event checking has been successfully disarmed Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis The Motion Disarm Watch MDW instruction cancels watch position event checking set up by a previous MAW instruction The Disarm Watch Position instruction requires no parameters simply enter or select the desired physical axis If the targeted axis does not appear in t
59. EN P December 2006 194 Motion Event Instructions MAW M DW MAR M DR M AOC M DOC Compensated Can Enable Bit Output Bit Inactive Position Enable Position and Enable The following diagram shows the effect of the selected latch type on the output bit for different compensated cam and enable bit combinations as function of position Position Position Position Position Output bit initially set Latched Position Unlatch Type Output bit initially not set Depending on the selected UnlatchType the corresponding output bit is reset according to the following table Unlatch Type Behavior Inactive The output bit is not changed Position The output bit is reset when the axis leaves the compensated cam range Duration The output bit is reset when the duration expires Enable The output bit is reset when the enable bit becomes inactive Position and Enable The output bit is reset when the axis leaves the compensated cam range or the enable bit becomes inactive Duration and Enable The output bit is reset when the duration expires or the enable bit becomes inactive Publication 1756 RM 007H EN P December 2006 Compensated Cam Enable Bit Output Bit Inactive Position Enable Position and Enable Compensated Cam Enable Bit Output Bit Duration Duration and Enable M otion Event Instructions MAW MDW MAR MDR MAOC M DOC
60. If the comparison is The result is true 1 false 0 Use these relational operators For this comparison Use this operator Optimal Data Type equal DINT REAL string less than lt DINT REAL string less than or equal lt DINT REAL string greater than gt DINT REAL string greater than or equal gt DINT REAL string not equal gt DINT REAL string Use this format valuel operator value2 Structured Text Programming 405 For example Example For this situation You d write If temp is a DINT tag and your specification IF temp 100 THEN says If temp is less than 100 then stringtagl operator stringtag2 If bar code and dest are string tags and your specification says If bar code equals dest then IF bar_code dest THEN Charl operator char2 If bar code is a string tag and your IF bar code DATA 0 65 specification says If bar code DATA 0 equals THEN To enter an ASCII character directly into A then the expression enter the decimal value of the character bool tag If count and length are DINT tags done is a done count gt length bool expressions BOOL tag and your specification says If count is greater than or equal to length you are done counting How Strings Are Evaluated The hexadecimal values of the ASCII characters determine if one string is less than or greater than another string
61. Instructions M AAT MRAT MAHD MRHD 233 Relay Ladder MAHD Motion Apply Hookup Diagnostics Axis Axis zz Motion Control MAHD_1 Diagnostic Test Marker Observed Direction Forward MAHD Ladder Example Structured Text MAHD 1 1 marker forward Publication 1756 RM 007H EN P December 2006 234 Motion Configuration Instructions M AAT M RAT M AHD M RHD Motion Run Hookup Diagnostics M RHD Use the MRHD instruction to command the motion module to run any one of three different diagnostics on the specified axis as selected by the Test ID Currently diagnostics are available to test the motor encoder hookup for a servo axis the encoder hookup only and the encoder marker hookup Only the motor encoder diagnostic initiates motion on the axis This action consists of a short move of a user Motor Encoder Test Increment The move is initiated by roughly 1 Volt per second ramping level of the servo s drive output The result of executing the MRHD instruction is that the parameters Test Status and Test Direction Forward are updated Operands Relay Ladder RHD Motion Run Hookup Diagnostics Axis mi Motion Control Diagnostic Test y VYTTY MRHD Axis MotionControl DiagnosticTest Publication 1756 RM 007H EN P December 2006 Operand Type Format Description Axis AXIS SERVO tag Name of the axis to perform operation on AXIS SERVO DRIVE Motion
62. M oveStatus eared after M CSD executes M oveTransitionStatus eared after M CSD executes M ovePendingStatus eared after M CSD executes M ovePendingQueueFullStatus Cr O O COD CDI CD eared after M CSD executes Relay Ladder Coordinate System Motion Control MCSD Ladder Instruction Structured Text CSD Motion Coordinated Shutdown Coordinated sys T MCSD 2 MCSD Coordinated_sys MCSD 2 Publication 1756 RM 007H EN P December 2006 338 Motion Coordinated Instructions M CLM M M CCD M CS MCSD MCT M CTP M CSR Motion Coordinated Transform MCT Operand Source System Operands Type COORDINATE SYSTEM Use the MCT instruction to start a transform that links two coordinate systems together ATTENTION Use a motion control tag only once Do not reuse it in another instruction Otherwise you can cause unexpected equipment motion and injury to people You can use this instruction only with 1756 L6x controllers Ladder Diagram CT Motion Coordinated Transform Source System DN5 Target System Motion Control Orientation Translation Format Description Tag Coordinate system that you use to program the moves Typically this is the Cartesian coordinate system Target System COORDINATE_SYSTEM Tag Non Cartesian coordinate system that controls the actual equipment MOTIO
63. MOTION _ tag Structure used to access control INSTRUCTION instruction status parameters Diagnostic DINT immediate Selects the specific test for the test motion module to run 0 motor encoder hookup test 1 encoder hookup test 2 encoder marker hookup test 3 Watchdog OK test Structured Text The operands are the same as those for the relay ladder MRHD instruction For the operands that require you to select from available options enter your selection as This operand Has these options which you enter as text or enter as a number DiagnosticTest motor encoder 0 encoder 1 marker 2 Motion Configuration Instructions M AAT MRAT MAHD MRHD 235 MOTION_ INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set after the hookup test process has been successfully executed ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis IP In Process Bit26 It is set on positive rung transition and cleared after the diagnostic test process is complete or terminated by a stop command shutdown ora servo fault Process It is set after the diagnostic test process has been Complete Bit 27 successfully completed De
64. Output Cam is armed immediately Pending The Output Cam is armed when the cam position of an armed Output Cam moves beyond its cam start or cam end position Forward Only The Output Cam is armed when the axis approaches or passes through the specified axis arm position in the forward direction Reverse Only The Output Cam is armed when the axis approaches or passes through the specified axis arm position in the reverse direction Bi Directional The Output Cam is armed when the axis approaches or passes through the specified axis arm position in the forward or reverse direction Axis Arm and Cam Arm Positions The axis arm position defines the axis position where the Output Cam is armed if the execution schedule is set to either forward only reverse only or bi directional and the axis moves in the specified direction The cam arm position defines the cam position that is associated with the axis arm position when the Output Cam is armed Changes to the axis arm or cam arm position only take effect after the execution of an MAOC instruction Axis Arm Position Axis Position Cam Position i Cam Am Position Cam Start Position Cam End Position Axis Arm and Cam Arm Positions Publication 1756 RM 007H EN P December 2006 M otion Event Instructions M AW M DW M AR M DR M DOC 203 Reference Depending on the selected reference the Output Cam is connected to either the actual or command position
65. Path move Rotary Negative Rotary Negative move from 45 to Important Only use a Rotary Shortest Path move if 225 e The Positioning M ode of the axis is Rotary Rotary axis e The axis is standing still and not moving Otherwise the axis could move in the wrong direction A Rotary Negative move is a special type of absolute move for a Rotary axes The axis e moves to the specified Position in the negative direction regardless of its current position e moves through 0 if needed You can t move the axis more than one revolution with a single Rotary Shortest Path move Arithmetic Status Flags not affected Fault Conditions none ErrorCodes See Error Codes ERR for Motion Instructions on page A 383 Publication 1756 RM 007H EN P December 2006 84 Motion Move Instructions MAS M AH MAJ MAM MAG MCD M RP M CCP M ATC M CSV Extended Error Codes Use Extended Error Codes EXERR for more information about an error If ERR is And EXERR is Then Cause Corrective Action 13 Varies An operand is outside its The EXERR is the number of the operand that is out of range range The first operand is 0 For example if EXERR 4 then check the Speed EXERR Operand 0 Axis 1 M otion Control 2 M ove Type 3 Position 54 1 The coordinate system hasa Go to the Properties for the coordinate system and set a M aximum Deceleration of 0 Maximum Deceleration 0 or more An axis in the coo
66. Position is used to update the Actual or Command position of Axis The position redefinition can be calculated on an Absolute or Relative basis If Absolute is selected the Position value is assigned to the current Actual or Command position If Relative is selected the Position value is added as a displacement to the current Actual or Command position The process of redefining the current axis position has no affect on motion in progress as the instruction preserves the current servo following error during the redefinition process As a result axis position can be redefined on the fly without disturbing axis motion ATTENTION Use a motion control tag only once Do not reuse it in another instruction Otherwise you can cause unexpected equipment motion and injure people Operands Relay Ladder Operand Type Format Description Axis AXIS FEEDBACK tag Name of the axis to perform 7 operation m Redefine Position N2 AXIS VIRTUAL Motion Control 7 he e i AXIS GENERIC Position Select Position AXIS SERVO AXIS SERVO DRIVE Motion MOTION_ tag Structure used to access control INSTRUCTION instruction parameters Type BOOLEAN immediate The way you want the redefinition operation to work Select either 0 absolute 1 relative Position BOOLEAN immediate Choose what position to perform select the redefinition operation on Select either 0 actual position 1 2 command position Position
67. Represents the source coordinate system x2 The Cartesian positions rotate 20 counterclockwise around the X3 axis x3 Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 349 Example 3 Change Translation Suppose you want to move the target coordinate system in a rectangular path In that case execute the MCT instruction to start the transform Then execute four Motion Coordinated Linear Move MCLM instructions to produce the rectangular path Second M CLM instruction Third M CLM instruction First MCLM instruction Represents the source and target coordinate systems Fourth M CLM instruction Now suppose you want to offset the Cartesian positions of the target coordinate system by 1 unit along both the X1 and X2 axes In that case 1 Enter translation values of 1 1 0 into the MCT instruction 2 Execute the MCT instruction again to apply the translation to the transform 3 Execute the same four MCLM instructions again Represents the target Represents the source x2 coordinate system S The Cartesian positions of the target coordinate system t offset by 1 unit along X1 and 2 Publication 1756 RM 007H EN P December 2006 350 Motion Coordinated Instructions CLM M CCM M CCD M CS MCSD M CTP
68. Servo Axis Vars I amp utoRun Ad Motion Axis Jog EN Axis Servo Axis Motion Control Servo Axis MI Run Jog DN5 Direction 0 ER2 Speed Auto Speed 60 0 1 5 Speed Units Units per sec Accel Rate Servo_Axis_Vars C Auto_Accel 200 Accel Units Units per sec2 Decel Rate Servo Axis Vars C amp uto Decel 200 Decel Units Units per sec2 Profile Trapezoidal The instruction doesn t use Accel Jerk 100 0 the jerk values because the ur Decel Jerk 100 0 profile is Trapezoidal Jerk Units of Time Merge Disabled Merge Speed Programmed lt lt Less NEG MCD Not Equal Motion Change Dynamics EN Source Auto_Speed Axis Servo_Axis E 50 0 Motion Control Servo Axis Ml Change Jog DN5 Source Auto Speed Last Motion Type Jog 00 Change Speed Yes ER Speed Auto Speed 500 Change No Accel Rate 0 Change Decel No Decel Rate 0 Speed Units Units per sec Accel Units Units per sec2 Decel Units Units per sec2 The NEQ and M OV instructions limit the M CD instruction to just one scan when Auto Speed changes lov Move Auto Speed 50 0 Dest Auto Speed Last 0 0 Source Servo_Axis_vars Stop AS Motion Axis Stop EN Axis Motion Control Stop Type Change Decel Decel Rate Decel Units Change Decel Decel Jerk Jerk Units Servo Axis Servo Axis MI Stop Auto All Yes ER Servo Axis Vars C amp uto Decel 200 IP Units per sec2 Je
69. Set Vias Actuals OK Apply Help MCCM Instruction Target Position Entry Dialog Box Position Tab Publication 1756 RM 007H EN P December 2006 M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 309 Feature Description Axis Name This column has the names of each axis in the coordinate system named in the ladder faceplate These names are not editable Target Position Target The values in this column are numeric They show the Increment endpoint or incremental departure of the move depending on the active M ove Type The column heading indicates which is displayed Actual Position This column contains the current actual position of the axes in the coordinate system These values update dynamically when on line and the Coordinate System Auto Tag Update is enabled Via Position Via Increment Center Position Center Increment Radius Depending on the Circle Type selected this column contains the Via point position or increment the Center Position or increment Set Targets Actuals This button is enabled when the M ove Type is Absolute and is used to copy the value from the Actual Position fields to the Target Position fields Set Vias Actuals This button is only active if the M ove Type is Absolute It is used to copy the values from the Actual Position fields to the Vias Fields The Move Type and Circle Type selec
70. The enable bit is set when the rung transitions from false to true and stays set until the rung goes false DN Done Bit 29 The done bit is set when the axis time cam instruction is successfully initiated ER Error Bit 28 The error bit indicates when the instruction detects an error Such as if the axis is not configured IP In Process Bit26 The in process bit is set on positive rung transition and cleared when terminated by a stop command merge shutdown or servo fault Process The Process Complete bit is cleared on positive rung transition Complete Bit 27 and set in Once Execution M ode when the time leaves the time range defined by the currently active cam profile Description The Motion Axis Time Cam MATC instruction executes a time cam profile set up by a previous Motion Calculate Cam Profile MCCP instruction or alternatively by the RSLogix 5000 Cam Profile Editor Time cams provide the capability of implementing complex motion profiles other than the built in trapezoidal and S Curve motion profiles provided No maximum velocity acceleration or deceleration limits are used in this instruction The speed acceleration and deceleration of the slave axis are completely determined by the designated cam profile derived from the associated cam table The maximum velocity acceleration or deceleration limits established during axis configuration do not apply to electronic camming Camming Di
71. The instruction cannot apply the diagnostic parameters because Test Process Error of an error in the run diagnostic test instruction 16 Wait until the homing process is done Home In Process Error 17 The instruction tried to execute a rotary move on an axis that is Axis Mode Not Rotary not configured for rotary operation 18 The axis type is configured as unused Axis Type Unused 19 The motion group is not in the synchronized state This could be Group Not Synchronized caused by a missing or mis configured servo module 20 The axis is in the faulted state Axis In Faulted State 21 The group is in the faulted state Group In Faulted State B22 Stop the axis before you execute this instruction Axis In Motion 23 An instruction attempted an illegal change of dynamics Illegal Dynamic Change p 24 Take the controller out of test mode Illegal AC M ode Op 25 You attempted to execute an instruction that is not correct Illegal Instruction 26 The cam array is of an illegal length Illegal Cam Length 2 The cam profile array is of an illegal length Illegal Cam Profile Length 28 You have an illegal segment type in the cam element Illegal Cam Type 29 You have an illegal order of cam elements Illegal Cam Order 30 You tried to execute a cam profile while itis being calculated Cam Profile Being Calculated 31 The cam profile array you tried to execute is in use Cam Profile Being Used 32 The cam profile array you tried to execute has not been Cam Profile
72. Tolerance 2 Make sure this is the right choice for you Example path 0 00 1 00 2 00 3 00 4 00 500 600 700 Description The instruction stays active until both of these happen e Command position equals target position e The vector distance between the target and actual positions is less than or equal to the Actual Position Tolerance of the coordinate system At that point the instruction is complete and a queued M CLM or instruction can start Important M ake sure that you set the actual tolerance to a value that your axes can reach Otherwise the instruction stays in process 0 00 1 00 2 00 3 00 400 500 600 7 00 1 No Settle The instruction stays active until the command position equals the target position At that point the instruction is complete and a queued MCLM or MCCM instruction can start 000 100 200 300 400 500 600 700 2 Command 6 00 Move 1 Move 2 The instruction stays active until the command position gets within Tolerance ove ove the command position tolerance of the coordinate system At that point the instruction is complete and a queued M CLM or M CCM 4 00 instruction can start 3 00 If you don t have a queued M CLM or M instruction the axes x stop at the target position 1 00 0 00 0 00 1 00 2 00 3 00 4 00 5 00 6 00 7 00 3 No Decel Em The instruction stays active until the axes get to the deceleration point
73. Units Units per sec Accel Rate 1 Accel Units Units per sec2 Decel Rate 1 Decel Units Units per sec2 P Profile S Curve Since the Profile is S curve the instruction Accel Jerk 100 uses the J erk values Use tags instead of immediate values if you plan to tune the jerk at run time Jerk Units 36 of Time Merge Disabled Merge Speed Programmed Decel Jerk 100 lt lt Less Servo_Axis_Ml Reg_Correction_Move PC UL Multiply Source Reg Sequence 8 2 Source Dest Reg_Sequence 8 Publication 1756 RM 007H EN P December 2006 86 Motion Move Instructions MAS M AH MAJ MAM MAG MCD M RP M CCP M APC M ATC M CSV Reg Correction Tran 010 M ove Structured Text When the SFC starts the Reg Correction step move Servo Axis the distance of Reg Error The P1 qualifier limits this to the first scan of the step Make Correction AM Servo_Axis Servo Axis MI Reg Correction Move 1 Reg Error Unitspersec 1 UnitspersecZ l Unitspersecz SCurve 100 100 ofTime Disabled Programmed Servo_Axis_MI Reg Correction Move PC The PC bit for the move turns on when the move is complete The SFC leaves the step when the PC bit turns on Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS M AH MAJ MAM MAG MCD MRP MCCP M APC MATC MCSV 87 Motion Axis Gear M AG MAG Motion Axis Gear Slave Axis Master Axis Motion Contro
74. acceleration 40 target speed 20 acceleration The axis slows down as soon as you start the The axis continues to speed up until the S curve profile brings Stopping instruction the acceleration to zero Publication 1756 RM 007H EN P December 2006 Troubleshoot Axis M otion 369 Corrective action Revision 15 or Earlier Jog_PB sLocal 4 Data 1 0 My_Axis_OK Speed Units Accel Units AJ Motion Axis Jog Axis My_Axis Motion Control Manual_Jog Direction 0 Speed Manual Jog Speed 50 0 Units per sec Accel Rate Manual Jog amp ccel 200 Units per sec2 Decel Units Decel Rate Manual Jog Decel 40 0 Units per sec2 Use an MAJ instruction to stop the axis Profile Set the speed of the stopping to zero Use a higher acceleration in the stopping MAJ Reason This increases the acceleration jerk The axis can begin to stop sooner at S Curve SAME DECELERATION AJ Motion Axis Jog the higher acceleration jerk ais M ic Motion Control Jog 2 Use a deceleration that gives you the Direction 0 you want without too much ee 00 Speed Units Units per sec Important Use the same deceleration Accel Rate mors De in both instructions Otherwise the axis Accise Uks could reverse directions when you go
75. acceleration as the instruction that stops the axis sLocal 4 Data 1 0 Jog_PB My_Axis_OK Or set up your instructions like this AJ Or use a lower acceleration Jog_PB My_Axis_OK lt Use the same acceleration as the instruction that starts the axis Or use a higher acceleration Motion Axis Jog EN Axis My Axis Motion Control Manual Jog DN Direction 0 ER Speed Manual_Jog_Speed 50 0 IP Speed Units Units per sec Accel Rate Manual Jog Accel 20 0 Accel Units Units per sec2 Decel Rate Manual_Jog_Decel 200 Decel Units Units per sec2 Profile S Curve Accel Jerk Manual Jog amp ccel Jerk 100 0 Decel Jerk Manual Jog Decel Jerk 100 0 Jerk Units of Time Merge Disabled Merge Speed Programmed lt lt Less AJ Motion Axis Jog EN Axis My Axis Motion Control Jog 2 DN5 Direction 0 ER Speed Jog 2 Speed 00e IP5 Speed Units Units per sec Accel Rate Accel Units Jog_2_Accel 200 Units per sec2 Decel Rate Decel Units Prafile Accel Jerk Decel Jerk Jerk Units Merge Merge Speed Jog 2 Decel 200 Units per sec2 S Curve 100 0 100 0 of Time Disabled Programmed lt lt Less Why is there a delay when stop and then restart a jog Example Look for Troubleshoot Axis M otion 375 While an axis is jogging at its target speed you stop the axis Before the axis stops completely you restart t
76. and deceleration and S Curve controlled jerk velocity profiles A guide to the effects of these motion profiles on various application requirements is given below Velocity Profile Effects Profile ACC DEC Motor Priority of Control Type Time Stress Highest to Lowest Publication 1756 RM 007H EN P December 2006 266 Motion Coordinated Instructions CLM M CCM M CCD M CS MCSD CTP M CSR Profile ACC DEC Motor Priority of Control Trapezoidal Fastest Worst Acc Dec Velocity Position S Curve 2X Slower Best J erk Acc Dec Velocity Position Trapezoidal Publication 1756 RM 007H EN P December 2006 The trapezoidal velocity profile is the most commonly used profile since it provides the most flexibility in programming subsequent motion and the fastest acceleration and deceleration times The maximum change in velocity is specified by acceleration and deceleration Since jerk is not a factor for trapezoidal profiles it is considered infinite and is shown as series of vertical lines in the following graph Trapezoidal Accel Decel Time S Curve S Curve velocity profiles are most often used when the stress on the mechanical system and load needs to be minimized The S Curve profile however sacrifices acceleration and deceleration time compared to the trapezoidal The maximum rate at which velocity can accelerate or decelerate is further limited by jerk The Jerk rate is calculated as fo
77. axis hardware supports an absolute feedback device Absolute Homing Mode may be used The only valid Home Sequence for an absolute Homing Mode is immediate In this case the absolute homing process establishes the true absolute position of the Publication 1756 RM 007H EN P December 2006 62 Motion Move Instructions MAS M AH MAJ MAM MAG MCD M RP M CCP M M CSV Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes Publication 1756 RM 007H EN P December 2006 axis by applying the configured Home Position to the reported position of the absolute feedback device Prior to execution of the absolute homing process via the MAH instruction the axis must be in the Axis Ready state with the servo loop disabled To successfully execute a MAH instruction on an axis configured for Active homing mode the targeted axis must be configured as a Servo Axis Type To successfully execute an MAH instruction the targeted axis must be configured as either a Servo or Feedback Only axis If any of these conditions are not met the instruction errs When the M AH instruction is initially executed the In process P bit is set and the Process Complete PC bit is cleared The M AH instruction execution may take multiple scans to execute because it requires transmission of multiple messages to the motion module Thus the Done DN bit is not set until after these messages have been successfully
78. controller for process or drives applications Logix5000 Controllers Process Control and Drives Instructions Reference M anual publication 1756 RM 006 Program the controller for motion applications You are here gt Logix5000 Controllers M otion Instructions Reference M anual publication 1756 RM 007 Program the controller to use equipment phases PhaseM anager User M anual publication LOGIX UM 001 Import a text file or tags into a project Export a project or tags to a text file Convert a PLC 5 or SLC 500 application to a Logix5000 application Logix5000 Controllers Import Export Reference M anual publication 1756 RM 084 Logix5550 Controller Converting PLC 5 or SLC 500 Logic to Logix5550 Logic Reference M anual publication 1756 6 8 5 You can use these Logix5000 controllers for motion control e 1756 ControlLogix controllers e 1768 CompactLogix ontrollers available in the future e 1789 SoftLogix5800 controllers e 20D PowerFlex 7005 with DriveLogix controllers If you have a PowerFlex 700S Drive with DriveLogix controller You can t use these instructions with a DriveLogix controller e Motion Direct Drive On MDO e Motion Direct Drive Off MDF e Motion Apply Axis Tuning MAAT e Motion Run Axis Tuning MRAT e Motion Apply Hookup Diagnostics MAHD e Motion Run Hookup Diagnostics MRHD Publication 1756 RM 007H EN P December 2006 14 Preface W ho Should Use This This document p
79. desired Axis Type Position Selection and enter a value or tag variable for the desired New Position If the targeted axis does not appear in the list of available axes the axis has not been configured for operation Use the Tag Editor to create and configure a new axis The MRP instruction may be used while the axis is moving as well as when it is at rest MRP is used to redefine position on the fly for certain registration slip compensation and re calibration applications Absolute M ode When Absolute is selected or entered as the MRP Type the New Position specifies the new absolute position of the axis No motion Motion M ove Instructions MAS MAH MAJ MAG MCD MRP MCCP MAPC MATC MCSV 105 occurs the current axis position actual or command is simply redefined to be the specified new position If software overtravel limits are used refer to Motion Axis Object specification for more information on software overtravel configuration the new position must be between the Max Positive and Max Negative Travel configuration values Otherwise a software overtravel fault is generated when the instruction is executed If software overtravel limit checking is in effect execution of an MRP in Absolute M ode may invalidate the current M ax Positive and M ax Negative Travel limits in the absolute sense Exercise caution when redefining the absolute position of an axis that has travel limits Absolute and relative mo
80. detects the fault and does a controlled stop of all active axes by stopping the virtual master axis At the profiler level everything is still fully synchronized Use the following error on faulted axis to determine how far it is out of position Reset the fault on the faulted axis bring into position at a controlled speed using the MAM instruction and the computed following error Finally start moving virtual master axis Same configuration as above but in this case when the slave axis faults the axis fault action disables the drive This of course would terminate the active cam process on the slave axis At this point the application program should stop all other axes via the virtual master axis Next reposition the faulted axis by determining where the master is and then calculating where the slave axis should be had the fault not occurred Finally do an immediate lock MAPC to resynchronize with the Cam Lock Position set to the calculated value The instruction execution completes in a single scan thus the Done DN bit and the In Process IP bit are set immediately The In Process IP bit remains set until the initiated PCAM process completes is superseded by another M APC instruction terminated by a M otion Axis Stop command M erge operation or Servo Fault Action The Process Complete bit is cleared immediately when the M APC executes and sets when the cam process completes when configured for Once Execution M
81. error 746 shows a situation where the difference in radial start end lengths exceeds 1596 of the radial start length The program is trying to generate a two dimensional arc from 0 0 current position to 21 51 0 using a centerpoint at 10 10 Because the difference of the radial start end lengths is 21 51 10 1 51 it exceeds 15 of the radial start length 15 10 1 5 Had the endpoint been 21 5 this example would have worked and the centerpoint would have been recomputed to lie exactly halfway between start and end points Publication 1756 RM 007H EN P December 2006 314 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD MCT M CTP M CSR MCC Motion Coordinated Circular Move M Coordinate System Coardineted_sys Motion MCCM 0 Move 0 A gt Target Position Entry Coordinated sys MCCM Move position 0 Center 1 x Position MCCM Move posiior 0 Axis 21 51 Axist 00 Cicle Type 1 Via CenleiR adius Certei 1 Direction 0 Speed 20 Speed Unis Unils per sec Accel Rate 50 Accel Unis ol Maximum Decel Rate 50 Decel Units of Maximum Prolie Trapezcidal Termnabon Type 1 Merge Disabled Merge Speed Programmed Ladder Program and Target Entry Screen that Generate Error 46 CIRCULAR_SMALL_R_ERROR 49 Example This first example of error 49 depicts a situation where the radius type circle uses a radius that is too short to span the distance between the sta
82. group of axes to perform MGS Slop W gt GROUP operation on Group M Motion MOTION tag Structure used to access instruction Motion Control 2 F gt control INSTRUCTION status parameters Stop Mode gt 2 X StopMode UDINT immediate Controls how the axes in the group Stopped Select one of the following methods 0 Programmed each axis is stopped according to how the individual axis has been configured 1 Fast Stop each axis the group is decelerated at the M aximum Deceleration rate and the stopped axis is left in the Servo Active state 2 Fast Disable each axis in the group is decelerated at the M aximum Deceleration rate and the stopped axis is placed in the Axis Ready state Structured Text MGS Group MotionControl The operands are the same as those for the relay ladder StopMode MGS instruction Publication 1756 RM 007H EN P December 2006 Motion Group Instructions MGS MGSD MGSR MGSP 157 For the operands that require you to select from available options enter your selection as This operand Has these options which you enter as text or enter as a number StopM ode programmed 0 faststop 1 fastdisable 2 MOTION_ INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed
83. in the construct and then determines if the conditions are true before executing the statements again This differs from the W HILE DO loop because the W HILE DO The WHILE DO loop evaluates its conditions first If the conditions are true the controller then executes the statements within the loop The statements in a REPEAT UNTIL loop are always executed at least once The statements in a WHILE DO loop might never be executed ad statement 1 statement 2 statement 3 statement 4 Exit no M true BOOL expression ey false rest of the routine To stop the loop before the conditions are false use an EXIT statement Enter this structured text pos c1 EAT pos pos 2 UNTIL pos 101 OR structarray pos value targetvalue end repeat Publication 1756 RM 007H EN P December 2006 424 Structured Text Programming Example 2 If you wantthis M ove ASCII characters from a SINT array into a string tag In a SINT array each element holds one character Stop when you reach the carriage return mn Initialize Element number to 0 nM Count the number of elements in SINT array array that contains the ASCII characters and store the result in SINT array size DINT tag SetString tag element number the character at SINT array element number gt Add 1 to element_number This lets the control
84. it is in use by this axis When the cam completes or terminates the Status member of the first cam profile array element is decremented to maintain track of the number of cams actively using the associated cam profile Linear and Cubic Interpolation Time cams are fully interpolated This means that if the current master time value does not correspond exactly with a point in the cam table associated with the cam profile the slave axis position is determined Publication 1756 RM 007H EN P December 2006 144 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M APC M ATC M CSV Publication 1756 RM 007H EN P December 2006 by linear or cubic interpolation between the adjacent points In this way the smoothest possible slave motion is provided Each point in the Cam array that was used to generate the Cam Profile can be configured for linear or cubic interpolation Electronic camming remains active through any subsequent execution of jog or move processes for the slave axis This allows electronic camming motions to be superimposed with jog or move profiles to create complex motion and synchronization Scaling Time Cams A time cam profile can be scaled in both time and distance when it is executed This scaling is useful to allow the stored profile to be used only for the form of the motion with the scaling used to define the time or distance over which the profile is executed as shown below Profile
85. latch and unlatch position When the latch or unlatch event is detected the delta time from the start of the coarse update to the event is calculated and the output is scheduled to occur at the Coordinated System Time CST corresponding to the next coarse update period To facilitate this Output Cam functionality has access to the CST captured when the current coarse update period occurred The MAOC is able to process both scheduled and unscheduled output bits for the 1756 OB16IS The MACC allocates all eight scheduled outputs for exclusive use by the motion planner Output Cam The MAOC sets the Mask field to Oxff every coarse period in case the user attempts to change it What this implies is that the user cannot directly affect output bits 0 7 but does have the ability to modify output bits 8 15 The outputs 0 7 can be forced by forcing the Data Bit to 0 or 1 and its corresponding bit in the ScheduleM ask to 0 For outputs 8 15 only the Data Bit needs to be forced Due to the limit of sixteen schedules supported by the 1756 OB16IS some constraints are applied to the number of events that can be processed every coarse update period Only eight schedules are available each coarse update This allows for two consecutive coarse updates in which each update contains eight output events As a group of eight schedules are currently being processed by the 1756 OB16IS a second group of eight schedules can concurrently be set up for the
86. motion etc for all axes defined in the current coordinate system Publication 1756 RM 007H EN P December 2006 308 Motion Coordinated Instructions M CLM M CCM M CCD MCS MCSD MCT M CTP M CSR MCCM Target Position Entry The MCCM Target Position Entry Dialog box is accessed by pressing Dialog Box the ellipsis button to the right of the position operand of the ladder instruction faceplate The Target Position Entry box can only be accessed if the coordinate system for the instruction has been named has a valid tag name for the Position operand that contains enough elements to accommodate the number of axes selected a valid Move Type and a valid Circle Type If these criteria have not been satisfied an error message is displayed on the status bar Valid Coordinate System MCCM Motion Coordinated Circular Move Coordinate System Coordinated_sys Motion Control MCCM O Valid M ove Type Move Type 0 Position MCCM_Move_position Press on ellipsis button to AxisO access the M Target Axis 5 0 Position Entry Box Circle Type 0 Via Center Radius VIA Valid Circle Type Direction 0 MCCM Ladder Valid Values for Accessing Target Position Entry Box Press the ellipsis and the following dialog box displays Target Position Entry Coordinated sys MCCM Move position 0 VIA 0 Position Tag Axis Name Target Position Actual Position Via Position Set Targets Actuals
87. motion profile No No change is made to the deceleration of the coordinated motion Yes The deceleration of the coordinated motion is changed by the value defined in the Decel Rate and Decel Units operands Decel Rate The Decel Rate operand defines the maximum deceleration along the path of the coordinated move Decel Units The Decel Units operand defines the units applied to the Decel Rate operand either directly in coordination units of the specified coordinate system or as a percentage of the maximum values defined in the coordinate system Impact of Changes to Acceleration and Deceleration Values on M otion Profile The following graph illustrates what could happen when a MCCD instruction is used to reduce the acceleration as velocity approaches maximum The new acceleration Jerk Rate becomes smaller further limiting the maximum change in acceleration Velocity overshoot occurs due to the additional time required for acceleration to reach Publication 1756 RM 007H EN P December 2006 324 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR zero Another profile is generated to bring velocity back to the programmed maximum Point where acceleration was decreased Velocity Effect of Change to Acceleration The following graph illustrates what could happen when an MCCD instruction is used to reduce the deceleration as velocity and position approach their ta
88. next coarse update M otion Event Instructions M AW M DW M AR M DR MAOC M DOC 209 The following diagram illustrates the relationship between the coarse update period a cam latch event and the time slots 225 go Delta Position 05 275 Coarse Update Period 10 ms Latch Position 250 Gam Element Time Slot assignment for Latch Event Interval 5000 uSec Coarse Updates are divided into 15 time slots For 10 ms updates each time slot is 525 uSec Inter relationship of Coarse Update Period Cam Latch and Time Slots Each Time Slot stores the following information Latch Event Mask When a latch event is detected the time slot in which it belongs is calculated and the bit in the Latch Event Mask corresponding to the output bit of the latch is set Unlatch Event Mask When an unlatch event is detected the time slot in which it belongs is calculated and the bit in the Unlatch Event Mask corresponding to the output bit of the unlatch is set Interval The time in micro seconds from the start of the coarse update in which the Latch or Unlatch event occurs Pulse On Mask For pulsed outputs the time slot in which a pulse on event is calculated and the bit in the Pulse On Mask corresponding to the output bit of the pulse event is set Pulse Off Mask For pulsed outputs the time slot in which a pulse off event is calculated and the bit in the Pulse Off Mask corresponding to the output bit of the
89. ode This is a transitional instruction Motion M ove Instructions MAS MAJ MAM MAG MCD MRP MCCP MAPC MATC MCSV 135 e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C Gam Profile Slave Axis Lock Position Master Axis Position ON 4 OFF 0 Position Cam Lock Status ON 1 m Position Cam Status OFF 0 Position Gam Initiated Position Cam Timing Diagram Arithmetic Status Flags not affected Fault Conditions none Error Codes See Error Codes ERR for Motion Instructions on page A 383 Extended Error Codes Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions Extended Error Codes for Axis Not Configured 11 error code are as follows e Extended Error Code 1 signifies that the Slave Axis is not configured e Extended Error Code 2 signifies that the Master Axis is not configured Extended Error codes for the Parameter Out of Range 13 error code lists a number that refers to the number of the operand as they are listed in the faceplate from top to bottom with the first operand being counted as zero Therefore for the MAPC instruction an extended error code of 5 would refer to the Slave Scaling operand s value You would then have to check your
90. of Time Merge Disabled Merge Speed Programmed lt lt Less Tune an S curve Profile 365 3 Test your equipment and observe its jerk 4 Adjust the Jerk values If there Is Then Which results In NOT too much jerk Reduce the of Time M ore erk Shorter Cycle Time Too much jerk Increase the of Time Less erk ae Longer Cycle Time 5 Repeat steps 3 and 4 until you have the desired balance between smoothness and cycle time Additional Resources Program a Velocity Profile on page 22 e Troubleshoot Axis Motion on page 367 Publication 1756 RM 007H EN P December 2006 366 Tune an S curve Profile Notes Publication 1756 RM 007H EN P December 2006 Introduction Why does my axis accelerate when stop it Example Look for Chapter 9 Troubleshoot Axis Motion Use this information to troubleshoot some situations that could happen while you are running an axis Situation See page Why does my axis accelerate when stop it 367 Why does my axis overshoot its target speed 371 Why is there a delay when stop and then restart a jog 375 Why does my axis reverse direction when stop and start it 377 Why does my axis overshoot its position and reverse direction 381 While an axis is accelerating you try to stop it The axis keeps accelerating for a short time before it starts to deceler
91. of the acceleration or deceleration programming and tuning of jerk For more information see e Program a Velocity Profile on 1 25 e Tune an S curve Profile on page 8 363 Arithmetic Status Flags not affected Fault Conditions none Error Codes See Error Codes ERR for Motion Instructions on page A 383 Extended ErrorCodes Use Extended Error Codes EXERR for more information about an error If ERR is And EXERR is Then Cause Corrective Action 13 Varies An operand is The EXERR is the number of the operand that is out of range The outside its range first operand is 0 For example if EXERR 24 then check the Decel Rate EXERR MAS Operand 0 Axis 1 M otion Control 2 Stop Type 3 Change Decel 4 Decel Rate Publication 1756 RM 007H EN P December 2006 56 Motion Move Instructions MAS M AH MAM MAG MCD M RP M CCP M APC M ATC M CSV Changes to Status Bits Motion Status Bits If the Stop Typ is NOT Then The instruction clears the M otion Status bit for the motion process that you stopped All Publication 1756 RM 007H EN P December 2006 The instruction clears all M otion Status bits Bit Status Meaning M oveStatus FALSE Axis is not M oving J ogStatus FALSE Axis is not J ogging GearingStatus FALSE Axis is not Gearing HomingStatus FALSE Axis is not Homing StoppingStatus TRUE Axis is Stopping PositionCamStatus FALSE Axis is not Po
92. of the axis MAOC instruction execution completes in a single scan The IM PORTANT IMPORTANT thus the Done DN bit and the In Process IP bit are set immediately The In Process IP bit remains set until the cam pos ition moves beyond the cam start or cam end position in Once execution mode is superseded by another M AOC instruction or is disarmed by the M DOC instruction The Process Complete bit is cleared immediately when the M AOC executes and set when the cam position moves beyond the cam start or cam end position in Once execution mode This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute n structured text condition the instruction so that it only executes on a Arithmetic Status Flags not affected Fault Conditions none transition See Appendix C Error Codes MAOC Error Codes ERR Error Message Code Description Execution Collision 3 Attempted execution with another Output Cam currently in process Shutdown State Error 7 Attempted execution with the axis in the Shutdown state Axis Not Configured 11 Passed axis value references unconfigured axis meaning the axis has not been assigned to a physical motion module channel Value Out of Range 13 Attempted execution with an input parameter that was out of range 1 Cam start position gt cam end position 2 Ca
93. of the encoder Negative feedback input to the motion module Drive Polarity Boolean Inverts the sense of the DAC analog Negative output from the motion module Encoder Hookup Test If the Encoder Test is selected the controller computes the proper setting for just the Encoder Polarity based on the Observed Direction instruction parameter and the state of Test Direction Forward bit which was established by the output of the MRHD instruction Once the Encoder Polarity and Drive Polarity settings are computed the MAHD applies these values to the corresponding axis configuration parameter bits as shown in the following table Axis Parameter Data Type Units Definition Encoder Polarity Boolean Inverts the sense of the encoder Negative feedback input to the motion module To successfully execute a MAHD instruction running the Motor Encoder Test the targeted axis must be configured as either a Servo or Publication 1756 RM 007H EN P December 2006 232 Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes Status Bits Example Publication 1756 RM 007H EN P December 2006 Motion Configuration Instructions M AAT M RAT M AHD M RHD Feedback Only axis type If any of these conditions are not met than the instruction errs IM PORTANT The M AHD instruction execution can take multiple scans to execute because it requires transmission of a message to the motion module The Done
94. percentage of the maximum values defined in the coordinate system Accel Rate The Accel Rate operand defines the maximum acceleration along the path of the coordinated move Accel Units The Accel Units operand defines the units applied to the Accel Rate operand either directly in coordination units of the specified coordinate system or as a percentage of the maximum values defined in the coordinate system Decel Rate The Decel Rate operand defines the maximum deceleration along the path of the coordinated move Decel Units The Decel Units operand defines the units applied to the Decel Rate operand either directly in coordination units of the specified coordinate system or as a percentage of the maximum values defined in the coordinate system Profile The Profile operand determines whether the coordinated move uses a trapezoidal or an S Curve velocity profile See the Profile section of M otion Coordinated Instructions M M CCM M CCD MCS MCSD MCT M CTP M CSR 307 the MCLM instruction earlier in this chapter for more information about Trapezoidal and S Curve profiles M erge The merge defines whether or not to tum the motion of all specified axes into a pure coordinated move The options are Merge Disabled Coordinated Motion or All Motion Merge Disabled Any currently executing single axis motion instructions involving any axes defined in the specified coordinate system are not affected by the activ
95. positions of the specified physical axis on the specified edge of the selected dedicated high speed Registration input for that axis When an MAR instruction is executed the RegEventStatus bit is set to 0 FALSE and the selected Registration input for the specified axis is monitored by the motion module until a Registration input transition of the selected type the registration event occurs When the registration event occurs the RegEventStatus bit for the axis is set to 1 TRUE and the Actual Position of the axis is stored in the Registration Position variable corresponding to the registration input e g Registration 1 Position 1 or Registration 2 Position Registration Registration status Y Registration status Input 0 1 Registration Registration Event Event Set Up Occurs Registration Multiple registration events may be active at any time fora given axis but only one may be active per registration input Each event is monitored independently and may be checked using the appropriate RegEventStatus bit Windowed Registration When the Windowed Reg checkbox is checked the selected trip state only results in a registration event if it occurs when the axis is within the window defined by the minimum and maximum positions as shown below Minimum Maximum Position Na ra Position Axis Position Window ed Registration Enter values or tag variables for the desired absolute positio
96. pulse event is set Output On Mask For normal outputs the bit corresponding to the output bit of the Latch or Pulse On event is set indicating that the output is to be turned on for these events Publication 1756 RM 007H EN P December 2006 210 Motion Event Instructions MAW M DW MAR M DR M AOC M DOC 1 0 Subsystem Publication 1756 RM 007H EN P December 2006 For inverted outputs the bit corresponding to the output bit of the Unlatch or Pulse Off event is set indicating that the output is to be turned on for these events Output Off Mask For normal outputs the bit corresponding to the output bit of the Unlatch or Pulse Off event is set indicating that the output is to be turned off for these events For inverted outputs the bit corresponding to the output bit of the Latch or Pulse On event is set indicating that the output is to be turned off for these events The following is a simplified overview of how Time Slot data is utilized nteruat Latch Event Mask Untatch Ewent Mask Pulsed Output Processing Normal Inverted Output Processing Gutput On Mask DO utput Off Mask W rite O utputs Overview of How Time Slot Data Utilization Time slots are also used to process overlapping cam elements A semaphore is maintained to indicate the currently active state of each output bit In addition if a programmed cam element Latch and Unlatch event occurs i
97. reset when the duration expires or the enable bit becomes inactive Left REAL The left cam position along with the right cam position define the cam range of the Output Cam element The left and right cam positions specify the latch or unlatch positions of the output bit when the latch or unlatch type is set to Position or Position and Enable with the enable bit active If the left position is less than the Cam Start position or greater than the Cam End position an Illegal Output Cam error is returned and the cam element is not considered Publication 1756 RM 007H EN P December 2006 394 Motion related Data Types Structures Mnemonic Data Type Description Right REAL The right cam position along with the left cam position define the cam range of the Output Cam element The right and left cam positions specify the latch or unlatch positions of the output bit when the latch or unlatch type is set to Position or Position and Enable with the enable bit active If the right position is less than the Cam Start position or greater than the Cam End position an Illegal Output Cam error is returned and the cam element is not considered Duration REAL Duration specifies the time in seconds between latching and unlatching when the Unlatch Type is Duration or Duration and Enable with the enable bit active A value less than or equal to 0 results in an Illegal Output Cam error and the cam element is not considered Enable
98. servo active status bits have been set ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis The Motion Servo On MSO instruction directly activates the drive and enables the configured servo loops associated with a physical servo axis It can be used anywhere in a program but should not be used while the axis is moving If this is attempted the MSO instruction generates an Axis in Motion error The MSO instruction automatically enables the specified axis by activating the drive and by activating the associated servo loop The resulting state of the axis is referred to the Servo Control state The most common use of this instruction is to activate the servo loop for the specified axis in its current position in preparation for commanding motion Publication 1756 RM 007H EN P December 2006 32 M otion State Instructions M SO MSF MASD MASR M DO M DF M AFR To successfully execute a MSO instruction the targeted axis must be configured as a Servo axis If this condition is not met the instruction errors The M SO instruction execution may take multiple scans to IM PORTANT execute because it requires transmission of a message to the motion module and time for the drive output to stabilize and the servo loop to activate The Done DN bit is not set immediately but only after the axis is in the Servo Control state This is a transiti
99. specifying a Fractional gear ratio Sets the master position reference to either Command position or Actual position 0 Actual slave axis motion is generated from the current position of the master axis as measured by its encoder or other feedback device 1 slave axis motion is generated from the desired or commanded position of the master axis Ratio format BOOLEAN immediate The desired ratio specification format Select either 0 real gear ratio 1 integer fraction of slave encoder counts to master encoder counts Publication 1756 RM 007H EN P December 2006 MAG SlaveAxis MasterAxis MotionControl Direction Ratio SlaveCounts MasterCounts MasterReference Ratio Format Cl utch AccelRate Motion M ove Instructions M AS M AH MAJ MAG MATC MCSV 89 Operand Type Format Description Clutch BOOLEAN immediate When Clutch is enabled motion control ramps the slave axis up to gearing speed at the instruction s defined Acceleration value If not enabled the Slave axis immediately locks onto the M aster axis If the M aster Axis is currently moving this condition results in an abrupt uncontrolled acceleration event of the Slave Axis which can cause the axis to fault Select either 0 z enabled 1 disabled Accel rate BOOLEAN immediate Acceleration rate of the Slave Axis in or tag or Acceleration Uni
100. state and clear the axis faults Structured text You can use this instruction only with 1756 L6x controllers Publication 1756 RM 007H EN P December 2006 M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CSR 243 Using Different Termination To blend 2 MCLM or MCCM instructions start the first one and queue the second one The tag for the coordinate system gives you 2 bits for Types When Blending queueing instructions Both bits always have the same value because Instructions you can queue only one instruction at a time When an instruction Then enters the queue e MovePendingStatus bit 21 e MovePendingQueueFullStatus bit 21 e You can t queue another instruction leaves the queue and starts e MovePendingStatus bit 0 e MovePendingQueueFullStatus bit 0 e You can queue another instruction For example the following ladder diagram uses Coordinate System cs1 to blend Movel into Move2 If Step 1 then M ovel starts and moves the axes to a position of 5 0 And once M ovel is in process And there is room to queue another move Step 2 MCLM Equal Motion Coordinated Linear Move EN5 Source Step Coordinate System csi ES DN Motion Control 1 ER2 Source B 1 Move Type 0 IP5 AC Position My Path 0 X Axis 5 0 Y Axis 0 0 More gt gt MovellP cs1 MovePendingGueueFullStatus Move So
101. status bits have both been cleared ER Done Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis The Motion Servo Off MSF instruction directly and immediately turns off drive output and disables the servo loop on any physical servo axis This places the axis in the Axis Ready state The MSF instruction also disables any motion planners that may be active at the time of execution The MSF instruction requires no parameters simply enter or select the desired axis If the targeted axis does not appear in the list of available axes the axis has not been configured for operation Use the Tag Editor to create and configure a new axis You can use the MSF instruction to turn servo action orr when you must move the axis by hand Since the position continues to be Arithmetic Status Flags Fault Conditions Error Codes Motion State Instructions M SO M SF M ASD M ASR M DO M DF M AFR 35 tracked even with servo action OFF When the servo loop is tumed ON again by the MSO instruction the axis is again under closed loop control at the new position The axis stopping behavior varies depending upon the type of drive In some cases the axis coasts to a stop and in other cases the axis decelerates to a stop using the drive s available stopping torque To execute an MSF instruction successfully the targeted axis must be configured as a Servo axis If this conditi
102. the ellipsis button next to the offending axis to access the Axis Properties screen Go to the Dynamics tab and make the appropriate change to the Maximum Deceleration Value If the Extended Error number is 1 this means the Coordinate System has a Maximum Deceleration Value of 0 Go to the Coordinate System Properties Dynamics Tab to correct the Maximum Deceleration value Due to the complexity of the MCCM instruction and the error codes it can generate the following simple examples are given to aide in the understanding of the MCCM instruction CIRCULAR COLLIN EARITY ERROR 44 Example The following example for error 744 shows a situation where the startpoint via point and endpoint all lie on a straight line The program is trying to generate a two dimensional arc going from 0 0 current position to 20 0 through the location 10 0 Because these points all lie on a straight line no circular centerpoint can be computed for the circle This error would also be generated if the program was for a three dimensional center type circle using a startpoint centerpoint and endpoint all lying on a straight line Here an infinite number of circles could be fit through the programmed points in an infinite number of planes Target Position Entry Coordinated sys MCCM Move position 0 VIA 0 x Position Tag Axis Target Postion Actual Postion Via Position Axis 200 00 100 Axis1 00 00 0 0 Set Targats Actuals Set Vias Act
103. the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The following Extended Error codes help to pinpoint the problem when the MAR instruction receives a Servo Message Failure 12 error message Associated Error Code Extended Error Meaning decimal Code decimal 12 resources to complete request SERCOS SERVO MESSAGE FAILURE Invalid value 3 Registration input provided 12 is out of range SERVO MESSAGE FAILURE Device in wrong state Redefine Position Home 12 16 and Registration 2 are mutually exclusive SERCOS Extended Error codes for the Parameter Out of Range 13 error code work a little differently Rather than having a standard enumeration the number that appears for the Extended Error code refers to the number of the operand as they are listed in the faceplate from top to bottom with the first operand being counted as zero Therefore for the MAR instruction an extended error code of 4 would refer to the Min Position value You would then have to check your value with the accepted range of values for the instruction Publication 1756 RM 007H EN P December 2006 182 M otion Event Instructions M AW MDW MAR M DR MAOC M DOC Status Bits MAR Changes to Status Bits
104. to 11 2 6 6 units with a center of 3 7 6 4 units at the vector speed of 10 0 units per second with the Motion Coordinated Instructions M M CCM M CCD MCS MCSD CTP M CSR 283 acceleration and deceleration values of 5 0 units per second The following graph shows the path generated by the preceding information 20 2 Enlf 4 104 13 Sharif 4 433 C Cont 12 20 20 2 4 amp 12 2 Plot of Instruction with Circle Type of Center The vector speed of the selected axes is equal to the specified speed in the units per second or percent of the maximum speed of the coordinate system Likewise the vector acceleration and deceleration is equal to the specified acceleration deceleration in the units per second or percent of maximum acceleration of the coordinate system This path can be achieved by using an MCCM instruction in the Clockwise direction with a Move Type Absolute or with a Move Type Incremental When a Circle Type of Center is chosen the Via Center Radius position defines the center of the arc Publication 1756 RM 007H EN P December 2006 284 Motion Coordinated Instructions M CLM M CCM M CCD MCS MCSD MCT M CTP M CSR Publication 1756 RM 007H EN P December 2006 MCCM Instruction Move Type Absolute MCCM Motion Coordinated Circular Move Coordinate System Coordinated_sys Motion Control MCCM O Move Type D Position
105. to the command position of the master the master axis must be commanded to move to cause any motion on the slave axis Refer to the Motion Axis Object Specification for more information on Command Position and Actual Position axis parameters M aster Direction Normally the Master Direction parameter is set to Bi directional default However when Forward Only is selected for Master Direction the slave axis tracks the master axis in the forward direction of the master axis When Reverse Only is selected the slave axis tracks the master axis in the reverse direction of the master axis If the master axis changes direction the slave axis does not reverse direction but stays where it was when the master reversed This Uni directional feature of position cams is used to provide an electronic slip clutch which prevents the cam motion generator from moving backward through the cam profile if the master reverses direction When the master axis again reverses resuming motion in the desired direction the slave axis picks up again when the master reaches the position where it initially reversed In this way the slave axis maintains synchronization with the master while motion in the wrong direction is inhibited This is especially useful where motion in a certain direction can cause physical damage to the machine or to the product M oving While Camming Motion Axis Moves may be performed while camming to provide sophisticated phase
106. transform position here with an X1 orientation of 20 Change Translation Suppose you enter translation values of 0 1 1 into example 1 In that example the MCTP instruction does a forward transform 5 0 40 3 0 20 If the reference position is here in 10 e Cartesian space 5 0 6 0 7 0 80 x2 NI the M CTP calculates a transform position here with an X2 and X3 translation of 1 20 30 40 4 Inverse left arm X 10 J3 215 Base Offset 1 0 2 106 84 3 98 63 Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 355 Transform Direction If your robot has base offsets there can be up to four different ways to get to a given point Suppose your robot has this geometry e Li 10 e 12 10 e X1b 3 0 e X3b 24 0 This example shows the ways to get a position of X1 10 X2 0 and X3 15 Inverse left arm mirror 1 2256 015 1 15 Base is rotated aw ay from the endofthearm J 1 180 2 171 39 J3 6326 Publication 1756 RM 007H EN P December 2006 356 Motion Coordinated Instructions M CLM M CCM M CCD MCS MCSD MCT M CTP M CSR Inverse rightarm 5 1 0 AP Un J120 2 8 22 3 98 63 Publication 1756 RM 007H EN P December 2006 Inverse right arm mirror 12256 05 J3 1
107. value with the accepted range of values for the instruction Publication 1756 RM 007H EN P December 2006 136 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M APC M ATC M CSV Status Bits Publication 1756 RM 007H EN P December 2006 For the Error Code 54 Maximum Deceleration Value is Zero if the Extended Error returns a positive number 0 n it is referring to the offending axis in the coordinate system Go to the Coordinate System Properties General Tab and look under the Brackets column of the Axis Grid to determine which axis has a Maximum Deceleration value of 0 Click on the ellipsis button next to the offending axis to access the Axis Properties screen Go to the Dynamics tab and make the appropriate change to the Maximum Deceleration Value If the Extended Error number is 1 this means the Coordinate System has a Maximum Deceleration Value of 0 Go to the Coordinate System Properties Dynamics Tab to correct the Maximum Deceleration value M APC Changes to Status Bits If the Execution Schedule is set to Immediate execution of the MAPC instruction simply sets both the Position Cam Status and the Position Cam Lock Status bits to True Bit Name State Meaning Position Cam TRUE Position Camming is Enabled Status Position Cam TRUE Slave Axis is Locked to the M aster Axis Lock Status according to the Cam Profile Position Cam FALSE No pending Position Cam Pending Status
108. you write into an expression are performed in a prescribed order not necessarily from left to right e Operations of equal order are performed from left to right e f an expression contains multiple operators or functions group the conditions in parenthesis This ensures the correct order of execution and makes it easier to read the expression Order Operation 1 2 function 3 4 negate 5 NOT 6 MOD 7 subtract 8 lt lt gt gt 9 lt gt 10 amp AND 11 XOR 12 OR Publication 1756 RM 007H EN P December 2006 408 X Structured Text Programming Instructions Structured text statements can also be instructions See the Locator Table at the beginning of this manual for a list of the instructions available in structured text A structured text instruction executes each time it is scanned A structured text instruction within a construct executes every time the conditions of the construct are true If the conditions of the construct are false the statements within the construct are not scanned There is no rung condition or state transition that triggers execution This differs from function block instructions that use EnableIn to trigger execution Structured text instructions execute as if EnableIn is always set This also differs from relay ladder instructions that use rung condition in to trigger execution Some relay ladder instruc
109. 0 Programmed 1 Current MCLM CoordinateSystem Motion Control MoveType Position Speed SpeedUnits AccelRate A ccelUnits DecelRate DecelUnits VelocityProfile TerminationType Merge MergeSpeed otion Coordinated Instructions M CLM M CCM M CCD MCS MCSD MCT M CTP M CSR 255 Structured Text The operands are the same as those for the relay ladder MCLM instruction When entering enumerations for the operand value in Structured Text multiple word enumerations must be entered without spaces For example when entering Decel Units the value should be entered as unitspersec rather than Units per Sec as displayed in the ladder logic For the operands that have enumerated values enter your selection as This operand Has these options which you enter as text or enter as a number M ove Type no enumeration 0 Absolute 1 Incremental Speed Units unitspersec 0 96 ofmaximum 1 Accel Units unitspersec 0 ofmaximum 1 Decel Units unitspersec 0 ofmaximum 1 Profile trapezoidal 0 scurve 1 Publication 1756 RM 007H EN P December 2006 256 Motion Coordinated Instructions M CLM M CCM M CCD MCS MCSD MCT M CTP M CSR This operand Has these options which you enter as text or enter as a number Termination Type no enumeration 0 Actual Tolerance 1 No Settle 2 Command Tolerance 3 No Decel 4 Follow Contour Velocity Constraine
110. 0000 0000 DODO O000 O000 0000 0000 0011 Bit 1 should be on 2 If bit 1 is off tum it on 55 Set System Value Class Name AXIS Name of the axis instance Name My Axis Attribute Name DynamicsConfigurationBits DINT tag to set the value Source DynamicsConfigBitsSet 2 0000_0000_0000_0000_0000_0000_0000_0011 Turn on bit 1 See the RSLogix 5000 online help for more information Help gt Contents gt GSV SSV Objects gt Axis gt Dynamics Configuration Bits Publication 1756 RM 007H EN P December 2006 Why does my axis overshoot its position and reverse direction Example Look for Troubleshoot Axis M otion 381 While an axis is moving to a target position you change a parameter of the move The axis overshoots its target position Eventually the axis stops and moves back to its target position You use a Motion Change Dynamics MCD instruction to reduce the deceleration while a Motion Axis Move MAM instruction is in process The axis continues past the target position of the move stops and returns to the target position Move_Cmnd Reduce_Deceleration MCD instruction that lt reduces the deceleration of the move AM Motion Axis Move EN Axis My Axis Motion Control My Axis Ml Move Move 1 ER Position 600 IP5 Speed C Speed Units Units per sec Accel Rate My Axis Vars C A amp uto Accel 200 Accel Units Units
111. 006 38 M otion State Instructions M SO M SF MASD MASR M DO M DF M AFR Arithmetic Status Flags Fault Conditions Error Codes Publication 1756 RM 007H EN P December 2006 The MASD instruction forces the targeted axis into the Shutdown state One of the unique characteristics of the Shutdown state is that when available the OK solid state relay contact for the motion module or drive is Open This feature can be used to open up the E Stop string that controls main power to the drive system Note that there is typically only one OK contact per motion module which means that execution of an MASD instruction for either axis associated with a given module opens the OK contact Another characteristic of the Shutdown state is that any instruction that initiates axis motion is blocked from execution Attempts to do so result in an execution error Only by executing one of the Shutdown Reset instructions can motion be successfully initiated To successfully execute a MASD instruction the targeted axis must be configured as either a Servo or Feedback Only axis If not the instruction errs The axis remains in the shutdown state until either a Motion Axis Shutdown Reset MASR instruction or a Motion Group Shutdown Reset MGSR instruction executes The M ASD instruction execution may take multiple scans to IM PORTANT LR execute because it requires transmission of a message to the motion module Thus the Done DN bit is not
112. 1 MOTION INSTRUCTION structure 177 Operands 176 Relay Ladder 176 Structured Text 177 Windowed Registration 178 M otion Arm Watch M AW 170 Changes to Status Bits 173 Description 171 Extended Error Codes 172 MOTION INSTRUCTION structure 171 Operands 170 Relay Ladder 170 Structured Text 170 M otion Disarm Output Cam M DOC 213 Description 214 Extended Error Codes 214 MOTION INSTRUCTION structure 214 Operands 213 Relay Ladder 213 Structured Text 213 M otion Disarm Output Cam M DOC Status Bits 215 M otion Disarm Registration M DR 183 Changes to Status Bits 185 Description 183 Extended Error Codes 184 MOTION_ INSTRUCTION structure 183 Publication 1756 RM 007H EN P December 2006 Operands 183 Relay Ladder 183 Structured Text 183 M otion Disarm Watch M DW 174 Changes to Status Bits 175 Description 174 MOTION INSTRUCTION structure 174 Operands 174 Relay Ladder 174 Structured Text 174 motion group MGSR 164 Motion Group Instructions 155 Introduction 155 M otion Group Shutdown M GSD 161 Changes to Status Bits 163 Description 161 MOTION INSTRUCTION structure 161 Operands 161 Relay Ladder 161 Structured Text 161 M otion Group Shutdown Reset M GSR 164 Changes to Status Bits 165 Description 164 MOTION_ INSTRUCTION structure 164 Operands 164 Relay Ladder 164 Structured Text 164 M otion Group Stop M GS 156 Changes to Status Bits 160 Description 157 Fast Disable 158 Fast Shutdown 158 Fast Stop 158 Hard Di
113. 16 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Coordinate System Status Bits BitName Meaning M otionStatus Sets when the M CCM instruction is active and the Coordinate System is connected to its associated axes Coordinate M otion Status Bits BitName Meaning AccelStatus Sets when vector is accelerating Clears when a blend is in process or when vector move is at speed or decelerating DecelStatus Sets when vector is decelerating Clears when a blend is in process or when vector move is accelerating or when move completes ActualPosToleranceStatus Sets for Actual Tolerance Termination Type only The bit is set after the following two conditions have been met 1 Interpolation is complete 2 The actual distance to the programmed endpoint is less than the configured coordinate system s Actual Tolerance value It remains set after the instruction completes It is reset when a new instruction is started CommandPosToleranceStatus StoppingStatus Sets for all Termination Types whenever the distance to the programmed endpoint is less than the configured coordinate system s Command Tolerance value and remains set after the instruction completes It is reset when a new instruction is started The Stopping Status bit is cleared when the M CCM instruction executes M oveStatus Sets when M CCM begins axis motion Clears on the
114. 243 Choose a termination 249 How do I get a triangular velocity profile 251 Blending Moves at Different Speeds 252 Motion Coordinated Linear Move MCLM 253 Motion Coordinated Circular Move MCCM 276 Motion Coordinated Change Dynamics MCCD 319 Motion Coordinated Stop MCS 327 Motion Coordinated Shutdown MCSD 335 Motion Coordinated Transform 338 Motion Calculate Transform Position MCTP 350 Motion Coordinated Shutdown Reset MCSR 359 Chapter 8 Introduction 363 D TIS When sea XC tee 363 Before You EPIO UG dE 364 Procedure o RD RI DOR te eS 364 Additional 365 Chapter 9 InitOd Uu CHOT Ea Mb Ead E bacc sdb T up 367 Why does my axis accelerate when I stop it 367 Why does my axis overshoot its target speed 371 Why is there a delay when I stop and then restart a jog 375 Error Codes ERR for Motion Instructions Motion related Data Types Structures Structured Text Programming Index Table of Contents 11 Why does my axis reverse dir when I stop and start it 377 Why does my axis overshoot its position and reverse dir 381 Appendix A bs MBs Ds Na qa Sete inn hes Se
115. 34 MOTION INSTRUCTION structure 34 Operands 34 Relay Ladder 34 Structured Text 34 M otion Servo On MSO 31 Description 31 MOTION INSTRUCTION structure 31 Operands 31 Relay Ladder 31 Structured Text 31 MOTION GROUP data type 391 MOTION INSTRUCTION data type 392 MRAT 223 MRHD 234 MRP 103 MSF34 Publication 1756 RM 007H EN P December 2006 434 Index MSO 31 Multi Axis Coordinated M otion Circular Programming Reference Guide 318 Multi Axis Coordinated M otion Instructions 241 Introduction 241 MCCD 319 MCCM 276 MCLM 253 Operands 253 MCS 327 MCSD 335 M CSR 359 M CT 338 M otion Coordinated Change Dynamics M CCD Arithmetic Status Flags 325 Changes to Status Bits 326 Description 321 Error Codes 325 Extended Error Codes 325 Fault Conditions 325 Operands 319 Accel Rate 322 Accel Units 322 Change Accel 322 No 322 Yes 322 Change Decel 323 No 323 Yes 323 Change Speed 321 No 322 Yes 322 Coordinate System 321 Decel Rate 323 Decel Units 323 M otion Control 321 M otion Type 321 Coordinated M ove 321 Relay Ladder 319 Scope 325 Speed 322 Speed Units 322 Structured Text 320 M otion Coordinated Circular M ove 276 M otion Coordinated Circular M ove Arithmetic Status Flags 310 Publication 1756 RM 007H EN P December 2006 Changes to Status Bits 315 Axis Status Bits 315 Coordinate System Status Bits 316 Description 279 Extended Error Codes 311 Fault Conditions 310 Operands 276 Accel Rate 306 Acc
116. 5000 DriveLogix PowerFlex and SoftLogix are trademarks of Rockwell Automation Inc Trademarks not belonging to Rockwell Automation are property of their respective companies W here to Find an Instruction If the locator lists a page number Instruction Locator Use this locator to find the reference details about Logix instructions the grayed out instructions are available in other manuals This locator also lists which programming languages are available for the instructions The instruction is documented in this manual general Logix5000 Controllers General Instructions Reference M anual 1756 RM 003 process Logix5000 Controllers Process Control and Drives Instructions Reference M anual 1756 RM 006 phase Logix5000 Controllers PhaseM anager User M anual LOGIX UM 001 Instruction Location Languages Instruction Location Languages Publication 1756 RM 007H EN P December 2006 Instruction Locator 4 Instruction Languages Instruction Languages Publication 1756 RM 007H EN P December 2006 Instruction Locator 5 Instruction Location Languages M AAT 218 relay ladder Motion Apply Axis Tuning structured text MAFR 4 relay ladder Motion Axis Fault Reset structured text MAG 87 relay ladder Motion Axis Gear structured text Instruction Location Languages MAHD 229 relay ladder M otion Apply Hookup structured text Diagnostics MAH 60 rel
117. 9 CAM PROFILE 390 MOTION GROUP 391 MOTION INSTRUCTION 392 OUTPUT CAM 393 OUTPUT COM PENSATION 394 description structured text 425 Direct Commands Supported Commands M otion State 26 document structured text 425 error motion instructions 383 error codes Index motion instructions 383 expression BOOL expression structured text 401 numeric expression structured text 401 order of execution structured text 407 structured text arithmetic operators 403 bitwise operators 407 functions 403 logical operators 406 overview 401 relational operators 404 F FOR DO 416 functions structured text 403 IF THEN 410 immediate motion instructions 17 J jerk troubleshoot 367 tune 363 K kinematics See multi axis coordinated motion instructions L logical operators structured text 406 M MAAT 218 MAFR 47 MAG 87 MAH 60 MAHD 229 MAJ 65 MAM 75 MAOC 186 213 Publication 1756 RM 007H EN P December 2006 428 Index Instruction 191 MAPC 115 MAR 176 MAS 50 MASD 37 Changes to Status Bits 39 Axis Status Bits 39 M otion Status Bits 39 MASR 40 MATC 138 math operators structured text 403 MAW 170 MCCD Examples Impact of Changes to Acceleration and Deceleration Values on M o tion Profile 323 Relay Ladder 326 Structured Text 326 Operands Relay Ladder 319 Structured Text 320 MCCM Examples Circular Error 312 CIRCULAR COLLINEARITY ERR OR 44 312 CIRCULAR R1 R2 MISMATCH _ERROR 46 313 CIR
118. 953030 45 Please complete the sections below Where applicable rank the feature 1 needs improvement 2 satisfactory and 3 outstanding Overall Usefulness 1 2 3 How can we make this publication more useful for you 2 3 Can we add more information to help you Completeness all necessary information procedure step illustration feature is provided T example guideline other explanation definition Technical Accuracy 1 2 3 Can we be more accurate all provided information is correct text illustration Clarity 1 2 3 How can we make things clearer all provided information is easy to understand Other Comments You can add additional comments on the back of this form Your Name Your Title Function Would you like us to contact you regarding your comments Location Phone No there is no need to contact me ___ Yes please call me ___ Yes please email me at Yes please contact me via 1 1 1 11 Return this form to Rockwell Automation Technical Communications 1 Allen Bradley Dr M ayfield Hts OH 44124 9705 Fax 440 646 3525 Email RADocumentComments ra rockw ell com Publication CIG CO521C EN P M ay 2003 PN953030 45957782 91 PLEASE FASTEN HERE DO NOT STAPLE Other Comments PLEASE FOLD HERE NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES BUSINESS REPLY MAIL FIRST CLASS MAIL PERMIT 18235 CLEVELAND OH
119. AL immediate The acceleration rate of the axis in or tag or Acceleration units Change BOOLEAN immediate Set to enable a deceleration decel change Select either 0 no 1 yes Motion M ove Instructions M AS M AH MAJ MAG MATC MCSV 99 Operand Type Format Description Decel rate REAL immediate The deceleration rate of the axis in or tag or Deceleration units The axis could overshoot its target position if you reduce the deceleration while a move is in process Speed units BOOLEAN immediate Units used to display the Speed value Select either 0 units per sec 1 of maximum speed Accel units BOOLEAN immediate Units used to display the Acceleration value Select either 0 units per sec 1 of maximum acceleration Decel units BOOLEAN immediate Units used to display the Deceleration value Select either 0 units per sec 1 of maximum deceleration Structured Text The operands are the same as those for the relay ladder MCD instruction For the operands that require you to select from available options enter your selection as This operand Has these options which you MCD Axis MotionControl SP MotionType ChangeSpeed enter as text or enter as a number Speed ChangeAccel AccelRate C MotionType jog 0 hangeDecel DecelRate SpeedUnits AccelUnits move 1 DecelUnits ChangeSpe
120. Allen Bradley Logix5000 Controllers Motion Instructions Catalog Numbers 1756 L1M 1 1756 L1M 2 1756 L1M 3 1756 L55M 12 1756 L55M 13 1756 L55M 14 1756 L55M 16 1756 L55M 22 1756 L55M 23 1756 L55M 24 1756 L60M 03S E 1756 L61 1756 L62 1756 L63 1756 L64 1768 L43 1789 L60 1789 20D Reference M anual mn e i Rockwell Automation Important User Information Solid state equipment has operational characteristics differing from those of electromechanical equipment Safety Guidelines for the Application Installation and Maintenance of Solid State Controls publication SGI 1 1 available from your local Rockwell Automation sales office or online at http literature rockwellautomation com describes some important differences between solid state equipment and hard wired electromechanical devices Because of this difference and also because of the wide variety of uses for solid state equipment all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable In no event will Rockwell Automation Inc be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment The examples and diagrams in this manual are included solely for illustrative purposes Because of the many variables and requirements associated with any particular installation Rockwell Automation Inc cannot assume resp
121. CCM Ladder Instruction with Move Type of Absolute M ove Type is Absolute Circle Type is Via Direction is Shortest Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 297 The preceding MCCM instruction produces the following plot ENSE Plot of MCCM with Three Axes One Rotary Axis amp Move Type of Absolute The axis actually travels counter clockwise in an arc from 0 0 0 to 5 5 5 via the 5 3 5 3 5 position The Direction was specified as clockwise but with Via specified for the Circle Type the Direction operand is ignored The move stops after generating a 90 degree arc There was one travel through the unwind for Axis0 even though it was in Move Type of Absolute It should be noted that the path of the coordinated motion is determined in linear space but the position of the axes is limited by the rotary configuration The End and Via points are required to fit within the absolute position defined by the rotary unwind of Axis0 However the resulting motion from these choices can travel through the unwind of the rotary axis M with Two Rotary Axis and M ove Type of Incremental The second example uses a coordinate system of two Rotary axes and a Move type of Incremental The plot of the path is based on the following assumptions e 2 axis Coordinate System named Coordinated sys e Axis0 is Rotary with an unwind of 1 rev e Axis is Rotary with an unwind of 2 revs e S
122. CCP MAPC MATC MCSV 109 Motion Calculate Cam The Motion Calculate Cam Profile MCCP instruction calculates a cam Profile M CCP profile based on an array of cam points An array of cam points may be established programmatically or by use of the RSLogix 5000 Cam Profile Editor Each cam point in the cam array consists of a slave position value a master position position cam or time time cam value and an interpolation type linear or cubic The resulting cam profile may be used by an Motion Axis Position Cam MAPC or Motion Axis Time Cam MATC instruction to govern the motion of a slave axis according to master position or time ATTENTION Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Operands Relay Ladder Operand Type Format Description Motion MOTION _ tag Structure used to access block status Motion Calculate Cam Profile control INSTRUCTION parameters Motion Control Cam CAM array Tag name of the cam array used to Cam m N compute the cam profile The numerical Length array index indicates the starting cam 1 Ro element in the array used in the cam Start Slope profile calculation Ellipsis launches Cam Profile Editor End Slope 7 Length UINT immediate Determines the number of cam elements Cam Profile m or tag in the array used in the cam profile calculation Start Slope REAL immediate This is t
123. CLM instruction initiates the status bits undergo the following changes Publication 1756 RM 007H EN P December 2006 274 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Axis Status Bits BitName Meaning CoordinatedM otionStatus Sets when the instruction starts Clears when the instruction ends Coordinate System Status Bits BitName Meaning M otionStatus Sets when the M CLM instruction is active and the Coordinate System is connected to its associated axes Coordinate M otion Status Bits BitName Meaning AccelStatus DecelStatus Sets when vector is accelerating Clears when a blend is in process or when vector move is decelerating Sets when vector is decelerating Clears when a blend is in process or when vector move is accelerating ActualPosToleranceStatus Sets for Actual Tolerance Termination Type only It sets after the following two conditions are met 1 Interpolation is complete 2 The actual distance to the programmed endpoint is less than the configured coordinate system Actual Tolerance value The bit remains set after an instruction completes The bit is reset when a new instruction is started CommandPosToleranceStatus Sets for all Termination Types whenever the distance to the programmed endpoint is less than the configured coordinate system Command Tolerance value The bit remains set after an instru
124. CT M CTP M CSR MCCM Instruction Move Type Incremental MCCM Motion Coordinated Circular Move N Move Type is Incremental Coordinate System Coordinated sys Motion Control dim ID position defined as an Move Type incremental distance from R gt Position MCCM Move position 5 start point of 10 4 1 3 Axis 21 6 IP2 Axis 7 8 Circle Type 0 o gt Via Center Radius Cc Circle Type is Via Direction 0 Via position is defined as Speed 10 an incremental distance of 14 1 9 9 from start pee baie Unite per a point of 10 4 1 3 Accel Units Units per sec2 Dacel Rate Direction is Clockwise Decel Units Units per sec2 Profile Trapezoidal Termination Type D Merge Disabled Merge Speed Current MCCM Ladder Instruction with Operand Values of Via and Incremental Since there are three points the current position of the axes the specified end point and the specified via point it is difficult to program a bad arc While it is still certainly possible to program an arc which is not the intended one a Circular Programming Error runtime fault occurs with an arc if the three points are co linear all three on the same line or not unique two or more points are the same In addition the via point implies that the direction of the arc and thus it is not necessary and is ignored to specify the direction M Using Radius Circle Type The following examples show the use of the MCC
125. CULAR SMALL R ERROR 49 314 315 CIRCULAR START END ERRO R 45 312 Relay Ladder 317 Rotary Axes 295 M ove Type of Absolute 295 M ove Type of Incremental 297 Structured Text 317 Three Dimensional Arcs 299 Circle Type Center 301 Circle Type Via 300 Two Dimensional Arc 282 Using Center Circle Type 282 Using Center Incremental Circle Type 291 Using Radius Circle Type 288 Using Via Circle Type 286 Two Dimensional Full Circle 293 MCCP 109 MCD instruction 98 Publication 1756 RM 007H EN P December 2006 MCLM Examples Additional Note On M erging Instruc tions 270 Blending Different Speeds 252 Termination Types 243 M erge 268 M ove Type 258 Relay Ladder 275 Rotary Axes 261 M ove Type of Absolute 261 M ove Type of Incremental 263 Structured Text 275 MCS Examples Relay Ladder 331 332 Structured Text 331 Operands Relay Ladder 327 MCSD Examples Relay Ladder 337 Structured Text 337 MCSR Examples Relay Ladder 361 Structured Text 361 MCSV Examples Relay Ladder 153 Structured Text 153 MCT 338 MCT instruction 338 MCTP 350 MDF 45 MDO instruction 42 MDR 183 MDW 174 message motion instructions 19 MGS 156 MGSD 161 MGSP 166 MGSR instruction 164 motion data types 389 error codes 383 immediate type instructions 17 message type instructions 19 process type instructions 20 Motion Apply Axis Tuning 27 218 Motion Apply Hookup Diagnostic 27 Motion Apply Hookup Diagnostics 229 M otion Arm Output Cam 27 186 Motion Arm Re
126. Cam is armed when the axis approaches or passes through the specified axis arm position in the forward direction 3 Reverse only Output Cam is armed when the axis approaches or passes through the specified axis arm position in the reverse direction 4 Bi directional Output Cam is armed when the axis approaches or passes through the specified axis arm position in either direction Publication 1756 RM 007H EN P December 2006 190 Motion Event Instructions MAW M DW MAR M DR M AOC M DOC MAOC Axis ExecutionTarget MotionControl Output Input OutputCam CamStartPosition CamEndPosition OutputCompensation ExecutionMode ExecutionSchedule AxisArmPosition CamArmPosition Reference Publication 1756 RM 007H EN P December 2006 Operand Type Format Description Axis Arm Position SINT INT DINT or REAL immediate or tag This defines the axis position where the Output Cam is armed when the Execution Schedule is set to Forward Only Reverse Only or Bi Directional and the axis moves in the specified direction If Pending is selected as the Execution Schedule then Axis Arm Position is ignored Cam Arm Position SINT INT DINT or REAL immediate or tag This defines the cam position associated with the axis arm position when the Output Cam is armed Reference UINT32 immediate Sets whether the Output Cam is connected to either Com
127. Cam Status bit of the Motion Status word for specified slave axis is set Slave axis motion is then initiated according to the specified cam profile starting at the specified Cam Lock Position of the cam profile From this point on only the incremental change in the master axis position is used to determine the corresponding slave axis position from the defined cam profile This is important for applications where the master axis is a rotary axis since the position cam is then unaffected by the position unwind process When the master axis moves out of the range defined by the cam profile assuming Execution Mode configured for Once both the Position Cam Lock Status and the Position Cam Status bits of the Motion Status word are cleared This Motion Status bit condition indicates that the cam process has completed This fact is also reflected in the bit leg behavior of the associated MAPC instruction PC bit set and IP bit clear After position cam motion is started when the master axis passes the specified Master Lock Position in either the Forward Only or Reverse Only direction the master axis can change direction and the slave axis reverses accordingly If an MAPC instruction is executed on a slave axis that is already actively position camming an Illegal Dynamic Change error is Motion M ove Instructions MAS MAJ MAG MCD MRP MCCP MAPC MATC MCSV 129 Slave Axis Position generated error code 23 The only exceptio
128. Command If You Want To And Use This Instruction Motion Direct Command Change the state of an axis Enable the servo drive and activate the axis servo MSO Yes loop M otion Servo On Disable the servo drive and deactivate the axis servo MSF Yes loop Motion Servo Off Force an axis into the shutdown state and block any MASD Yes instructions that initiate axis motion Motion Axis Shutdown Transition an axis to the ready state If all of the axes MASR Yes of a servo module are removed from the shutdown Motion Axis Shutdown Reset state as a result of this instruction the OK relay contacts for the module close Enable the servo drive and set the servo output MDO Yes voltage of an axis Motion Direct Drive On Disable the servo drive and set the servo output MDF Yes voltage to the output offset voltage M otion Direct Drive Off Clear all motion faults for an axis M AFR Yes M otion Axis Fault Reset M otion Axis Stop Home an axis MAH Yes Motion Axis Home an axis MAJ Yes Motion Axis J og M ove an axis to a specific position MAM Yes M otion Axis M ove Start electronic gearing between 2 axes MAG Yes Motion Axis Gear Change the speed acceleration or deceleration ofa MCD Yes move or a jog that is in progress Motion Change Dynamics Change the command or actual position of an axis Yes M otion Redefine Position Calculate a Cam Profile based on an array of cam M CCP
129. CoordinateSystem The operands are the same as those for the relay ladder MCCD MotionControl MotionType ChangeSpeed Speed SpeedUnits instruction ChangeAccel AccelRate AccelUnits ChangeDecel When entering enumerations for the operand value in Structured DecelRate DecelUnits Scope Text multiple word enumerations must be entered without spaces For example when entering Decel Units the value should be entered as unitspersec rather than Units per Sec as displayed in the ladder logic For the operands that have enumerated values enter your selection as This operand Has these options which you enter as text or enter as a number M otiontype Coordinatedmove 1 ChangeSpeed No 0 Yes 1 SpeedUnits Unitspersec 0 ofmaximum 1 ChangeAccel No 0 Yes 1 AccelUnits Unitspersec 0 ofmaximum 1 ChangeDecel No 0 Yes 1 ofmaximum 1 5 activemotion 0 Publication 1756 RM 007H EN P December 2006 M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 321 Description The Motion Coordinated Change Dynamics MCCD instruction starts a change in the path dynamics of the specified coordinate system Based upon the Motion Type the MCCD changes the coordinated motion profile that is currently active on the system If You Use An S curve Profile Be careful if you change the speed acceleration deceleration or jerk while an axis A is accelerating or
130. December 2006 Operand Type Format Description Axis AXIS FEEDBACK tag Name of the axis to perform operation on AXIS_GEN ERIC AXIS_SERVO AXIS_SERVO_DRIVE M otion MOTION _ tag Structure used to access instruction control INSTRUCTION status parameters Trigger BOOLEAN immediate Select the watch event trigger condition condition 0 forward the servo module looks for the actual position to change from less than the watch position to greater than the watch position 1 reverse the servo module looks for the actual position to change from greater than the watch position to less than the watch position Position REAL immediate The new value for the watch position or tag Structured Text The operands are the same as those for the relay ladder MAW instruction For the operands that require you to select from available options enter your selection as This operand Has these options which you enter as text or enter as a number TriggerCondition forward 0 reverse 1 Motion Event Instructions M AW M DW MAR M DR M AOC M DOC 171 INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when the axis watch event checking has been successfully armed ER Error Bit
131. Execution In the case where the Execution Schedule parameter of the instruction is set to Forward Only Reverse Only or Bi directional the slave axis is not locked to the master until the master axis satisfies the specified condition In this case the master axis is monitored by the camming process to determine when the master axis passes the specified Master Lock Position in the specified direction In a rotary axis configuration this lock criterion is still valid independent of the turns count If the position reference of the master axis is redefined e g an MRP instruction after the M APC instruction executes but before the lock condition is satisfied the cam profile generator monitors the master axis based on the absolute position reference system in effect prior to the redefine position operation Publication 1756 RM 007H EN P December 2006 128 Motion M ove Instructions MAS MAH M Publication 1756 RM 007H EN P December 2006 AJ MAM MAG MCD M CCP M ATC M CSV Master Cam Profile Slave Axis Start Position Position Master Axis Position 1 0 Position Cam Lock Status 1 5 Position Cam Status Position Cam Initiated Forward Only Reverse Only or Bi directional Execution When the absolute position of the master axis passes the specified Master Lock Position in the specified direction Forward Only direction in the illustration below the Position
132. GroupSynced 01 DINT synchronization status no tag 02 DINT Timer Event started Reserved 03 31 M otionFault DINT The motion fault bits for the group Bit Number Data Type Description ACAsyncConnFault 00 DINT asynchronous connection fault ACSyncConnFault 01 DINT synchronous connection fault Reserved 02 31 ServoFault DINT The servo module fault bits for the group Bit Number Data Type Description POtrviFault 00 DINT positive overtravel fault NOtrvlFault 01 DINT negative overtravel fault PosErrorFault 02 DINT position error fault EncCHALossFault 03 DINT encoder channel A loss fault EncCHBLossFault 04 DINT encoder channel B loss fault EncCHZLossFault 05 DINT encoder channel Z loss fault EncNsFault 06 DINT encoder noise fault DriveFault 07 DINT drive fault Reserved 08 31 Bit Number Data Type Description SyncConnFault 00 DINT synchronous connection fault HardFault 01 DINT servo hardware fault Reserved 02 31 GroupFault DINT The fault bits for the group Bit Number Data Description GroupOverlapFault 00 DINT group task overlap fault CSTLossFault 01 DINT The controller has lost synchronization with the CST master GroupTaskLoadingFault 02 DINT The group coarse update period is too low user application tasks are not getting enough time to execute Reserved 03 31 Publication 1756 RM 007H EN P December 2006 392 Motion related Data Types Structures MOTION INSTRUCTION You must define a motion contro
133. If EXERR is zero check the axis for dimension zero 9 The instruction tried to execute in a direction that aggravates Overtravel Condition the current overtravel condition 10 The master axis reference is the same as the slave axis M aster Axis Conflict reference 11 At least one axis is not configured to a physical motion module Axis Not Configured or has not been assigned to a Motion Group For a motion coordinated instruction look at the extended error code EXERR It identifies which axis caused the error Example If EXERR is zero check the axis for dimension zero 12 M essaging to the servo module failed Servo M essage Failure Publication 1756 RM 007H EN P December 2006 384 Error Codes ERR for M otion Instructions Error Corrective Action or Cause Notes 13 Look at the extended error code EXERR for the instruction It Parameter Out Of Range identifies an operand that is outside its range An EXERR 0 means the first operand of the instruction is Example Suppose an M AJ instruction has an ERR 13 and an outside its range EXERR 23 In that case change the speed so that it s in range MAJ Motion Axis Jog Axis Servo Axis Motion Control Servo Axis MI Run Jog 2 Direction 0 Speed Auto Speed 50 0 14 The instruction cannot apply the tuning parameters because of Tune Process Error an error in the run tuning instruction 15
134. Instructions MRAT MAHD MRHD 219 The MAAT instruction uses axis configuration parameters as input output The input configuration parameters that MRAT uses are shown in the table below Refer to the Motion Axis Object specification for a detailed description of these parameters The axis configuration parameters that MAAT uses as input depends on the External Drive configuration If the External Vel Servo Drive configuration bit parameter is TRUE indicating interface to an external velocity servo drive the following input parameters are required Bandwidth Axis Parameter Data Type Units Meaning Tuning Velocity Rea pos units sec Top Speed of Tuning Profile Tune Accel Rea pos units sec Calculated Acceleration Time of Tuning Profile Tune Decel Rea pos units sec Calculated Deceleration Time of Tuning Profile Tune Velocity Rea mV KCPS M easured Velocity Scaling factor of Scaling axis Drive M otor Encoder system Tune Velocity Rea Hertz Bandwidth of External Velocity Servo Drive If the External Vel Servo Drive configuration bit parameter is FALSE indicating interface to an external torque servo drive the following input parameters are required Bandwidth Axis Parameter Data Type Units Meaning Damping Factor Rea Damping Factor used to calculate the the gains Tuning Velocity Rea pos units sec Top Speed of Tuning Profile Tune Accel Rea pos unit
135. L The axis is stopping IP BOOL Any of these actions ends the M CS instruction and turns off the IP bit e The coordinate system is stopped e Another MCS instruction supersedes this M CS instruction e Shutdown instruction e Fault Action The axis is stopped PC BOOL ThePC bit stays on until the rung makes a false to true transition Arithmetic Status Flags not affected Fault Conditions none Error Codes See Error Codes ERR for Motion Instructions Extended Error Codes Publication 1756 RM 007H EN P December 2006 See Error Codes ERR for Motion Instructions It has information about how to use the extended error codes M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 331 Changes to Status Bits The instruction changes these status bits when it executes In the tag for the This bit When the stop type is Turns Axis CoordinatedM otionStatus Off when the coordinated move stops TransformStateStatus Coordinated M ove Unchanged e Al Off e Coordinated Transform ControlledByTransformStatus Coordinated M ove Off when the axes stop and the PC bit of the M CS instruction turns on e Al Off e Coordinated Transform Coordinate system M otionStatus Off when the coordinated move stops AccelStatus gt Off DecelStatus gt On during the stop and then off when the stop completes StoppingStatus durin
136. M CSR Motion Calculate Use the MCTP instruction to calculate the position of a point in one Transform Position M CTP coordinate system to the equivalent point in a second coordinate Operand Source System system ATTENTION Use a motion control tag only once Do not reuse it in another instruction Otherwise you can cause unexpected equipment motion and injury to people You can use this instruction only with 1756 L6x controllers Operands Ladder Diagram Motion Calculate Transform Position EN gt Source System m Target System m DN5 Motion Control Orientation Translation Transform Direction Reference Position Transform Position Type Format Description COORDINATE SYSTEM Tag Cartesian coordinate system for Cartesian positions of the robot Target System COORDINATE SYSTEM Tag Non Cartesian coordinate system that controls the actual equipment M otion Control MOTION INSTRUCTION Tag Control tag for the instruction Orientation REAL 3 Array Do you want to rotate the target position around the X1 X2 or X3 axis If Then No Leave the array values at zero Yes Enter the degrees of rotation into the array Put the degrees of rotation around X1 in the first element of the array and so on Use an array of three REALs even if a coordinate system has only one or two axes Translation REAL 3 Array Do you want to offset the targe
137. M with a Circle Type of Radius and a Move Type of Absolute first example and Incremental second example to arrive at the same result The basic assumptions are e The 2 axes Axis0 and 1 are both members of the coordinate system Coordinated sys e Axis0 and Axis1 are orthogonal to each other e Coordinated sys is initially at 10 4 1 3 units Publication 1756 RM 007H EN P December 2006 otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 289 Move Coordinated sys along an arc to 11 2 6 6 units with a radius of 15 units at the vector speed of 10 0 units per second with the acceleration and deceleration values of 5 0 units per second The following graph shows the paths generated by the preceding information using a Radius value of 15 units and 15 units x f 12 CE End 10 4 13 Start j 20 42 4 4 12 2 Plot of Path with Circle Type of Radius This path can be achieved by using an MCCM instruction in the Clockwise direction with a Move Type Absolute or with a Move Publication 1756 RM 007H EN P December 2006 290 Motion Coordinated Instructions CLM M CCM M CCD MCS MCSD M CTP M CSR Type Incremental When a Circle Type of Radius is chosen the Via Center Radius position defines the radius of the arc MCCM Motion Coordinated Circular Move ND Coordinate System Coordinated sys
138. MAG MCSV 91 Slaving to the Actual Position When Actual Position is entered or selected as the Master Reference source the slave axis motion is generated from the actual position of the master axis as shown below Slave Axis Electronic Gearing Master Slave Actual position is the current position of a physical axis as measured by the axis encoder This is the only valid selection when the master axis Axis Type is configured as Feedback Only Slaving to Actual Position Slaving to the Command Position When Command Position is entered or selected as the Master Reference source the slave axis motion is generated from the command position of the master axis as shown below Electronic Gearing Slave Axis Command Position Master Axis Master Slave Slaving to Command Position Command position only valid when the master axis Axis Type is configured as Servo is the current desired or commanded position for the master axis Since the command position does not incorporate any associated following error external position disturbances or quantization noise Publication 1756 RM 007H EN P December 2006 92 Motion Move Instructions MAS M AH MAM MAG MCD M RP M CCP M APC ATC M CSV Publication 1756 RM 007H EN P December 2006 it is a more accurate and stable reference for gearing When gearing to the command position of the master the ma
139. MAM MAG MCD M CCP M M CSV Slave Axis Master Axis Motion Control Direction Cam Profile Slave Scaling Master Scaling Execution Mode Execution Schedule Master Lock Position Cam Lock Position Master Reference Master Direction Motion Axis Position Cam PITT Publication 1756 RM 007H EN P December 2006 Operands Relay Ladder Operand Type Format Description Slave Axis AXIS VIRTUAL tag The name of the axis that the cam profile is applied to Ellipsis launches AXIS GENERIC Axis Properties dialog AXIS SERVO AXIS SERVO DRIVE Master Axis AXIS FEEDBACK tag The axis that the slave axis follows according to the cam profile Ellipsis AXIS_CONSUM ED launches Axis Properties dialog If Pending is selected as the Execution AXIS_ VIRTUAL Schedule then M aster Axis is ignored AXIS GENERIC AXIS SERVO AXIS SERVO DRIVE M otion M OTION_ tag Structure used to access block status Control INSTRUCTION parameters Direction UINT32 immediate Relative direction of the slave axis to or tag the master axis e Same the slave axis position values are in the same sense as the master s e Opposite the slave axis position values are in the opposite sense of the master s Or relative to the current or previous camming direction e Reverse the current or previous direction of the position cam is reversed on exec
140. MAM this occurs on the first scan For others like M AH the DN bit is not set until the entire homing process is complete One of the following occurs during the motion process e The motion process completes e Another instance of the instruction executes e Another instruction stops the motion process e A motion fault stops the motion process Clears the IP bit 4 After the initiation of the motion process the program scan can continue The remainder of the instruction and the control process continue in parallel with the program scan 5 The next time the rung becomes false after either the DN bit or the ER bit sets the controller clears the EN bit Publication 1756 RM 007H EN P December 2006 22 Motion Concepts 6 When the rung becomes true the instruction can execute again EN Scan Scan Execution Scan Process rungtrue rungfalse complete rung false complete Process Type Instructions Rung Conditions Program a Velocity Profile You can use either of these motion profiles for various instructions Trapezoidal profile for linear acceleration and deceleration e S curve profiles for controlled jerk For See Page Definition of J erk 22 Choose a Profile 23 Use of Time for the Easiest Programming of J erk 24 Velocity Profile Effects 25 J erk Rate Calculation 25 Definition of J erk Jerk is the rate of change of acceleration or deceleration Example If a
141. MCCM Move position O 11 2 Circle Type 1 Via Center Radius Center 0 Direction 0 Speed 10 Speed Units Units per sec Accel Rate 5 Accel Units Units per sec2 Decel Rate 5 Decel Units Units per sec2 Profile Trapezoidal Termination Type 0 Merge Disabled Merge Speed Current MCCM Ladder Instruction with Move Type of Absolute Move Type is Absolute Position defined in absolute units Clrcle Type is Center Center position defined in absolute units as 3 7 6 4 Direction is Clockwise Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 285 MCCM Instruction Move Type Incremental MCCM Motion Coordinated Circular Move Coordinate System Coordinated sys ND M ove Type is Incremental Motion Control MCCM 1 N2 Position defined as an Move Type 1 incremental distance from Position MCCM Move position 2 IN Stane point Of UAA AxisO 21 6 IP2 Axis 7 9 Circle Type 1 Via Center Radius Center 1 oO Circle Type is Center Direction 0 Center is defined as Speed 10 incremental distance of 14 1 5 1 from start point Speed Units Units per sec of 10 4 1 3 Accel Rate 5 Accel Units Units per sec2 Decel Rate Direction is Clockwise Decel Units Units per sec2 Profile Trapezoidal Termination Type 0 Merge Disabled Merge Speed Current MCCM Ladder Instruction with M ove Type of Incremental Had a Direction of Counter
142. Motion Axis Gear M AG instruction together with an MAM instruction This superimposes the gearing on top of the move or the move on top of the gearing Example Superimpose an incremental move on top of electronic gearing for phase advance and retard control Publication 1756 RM 007H EN P December 2006 82 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M RP M CCP M ATC M CSV Choose a M ove Type for a Rotary Axis Move Type Example Description Absolute Absolute move to 225 The direction With an Absolute move the direction of travel depends on the starting position of depends on the current position of the axis and isn t the axis necessarily the shortest path to the end position Starting positions less than the end position result in motion in the positive direction while starting positions greater than the end position result in motion in the negative direction The specified position is interpreted trigonometrically and can be positive or negative It can also be greater than the Position Unwind value Negative position values are equivalent to their corresponding positive values and are useful when rotating the axis through 0 For example 90 is the same as 270 When the position is greater than the Position Unwind value the axis moves through more than one revolution before stopping at an absolute position Incremental The specified distance is interpreted trigonometrically and can be pos
143. Motion Axis Shutdown MASD instruction Relay Ladder Operand Type Format Description Group MOTION _ tag Name of the group of axes to perform GROUP operation on Motion M OTION _ tag Structure used to access instruction control INSTRUCTION status parameters Structured Text The operands are the same as those for the relay ladder MGSD instruction MOTION_ INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 The enable bit indicates when the instruction is enabled It remains set until servo messaging completes and the rung condition in goes false DN Done Bit 29 The done bit indicates when the instruction sets the group of axes to the shutdown operating state ER Error Bit 28 The error bit indicates when the instruction detects an error Such as if messaging to the servo module failed The Motion Group Shutdown MGSD instruction turns drive output off disables the servo loops of all axes in the specified group and opens any associated OK contacts for all applicable motion modules in the group This action places all group axes into the Shutdown state The MGSD instruction takes only one parameter simply select or enter the desired group to shutdown Another action initiated by the MGSD instruction is the clearing of all motion processes in progress and a clearing of all the motion status bits Associated with this action the command also clears all motion instruction IP bits that may currentl
144. Motion Control Stop Type P gt Change Decel Decel Rate Decel Units Operand Type Format Description Coordinate System COORDINATE SYSTEM Tag Name of the coordinate system M otion control MOTION_ Tag Control tag for the instruction INSTRUCTION Stop Type DINT Immediate If you want to Choose this Stop Type Stop all motion for the axes of the All 0 coordinate system and stop any transform that the coordinate system is a part of Stop only coordinated moves Coordinated M ove 2 Cancel any transform that the coordinate Coordinated Transform 3 system is a part of Publication 1756 RM 007H EN P December 2006 328 Motion Coordinated Instructions M CLM M M CCD M CS MCSD MCT M CTP M CSR Operand Change Decel Type DINT Format Description Immediate If you want to Then choose Use the maximum deceleration rate of No 0 the coordinate system Specify the deceleration rate Yes 1 Decel Rate REAL Immediate Important An axis could overshoot its target position if you reduce the or tag deceleration while a move is in process Deceleration along the path of the coordinated move The instruction uses this value e Only if Change Decel is Yes e Only for coordinated moves Enter a value greater than 0 Decel Units DINT MCS CoordinateSystem MotionControl StopType ChangeDecel DecelRate DecelUnits Publication 1756 RM 007H EN P Dec
145. Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M APC M M CSV Publication 1756 RM 007H EN P December 2006 Reversing the Current Camming Direction When Reverse is selected the current or previous direction of the position cam is changed from Same to Opposite or from Opposite to Same For first time execution of a cam with Reverse selected the control defaults the direction to Opposite Specifying the Cam Profile To execute a MAPC instruction a calculated Cam Profile data array tag must be specified Cam Profile array tags may be created by the RSLogix 5000 tag editor or the MAPC instruction using the built in Cam Profile Editor or by executing an Motion Calculate Cam Profile MCCP instruction on an existing Cam array The data within the Cam Profile array can be modified at compile time using the Cam Profile Editor or at run time with the Motion Calculate Cam Profile MCCP instruction In the case of run time changes a Cam array must be created in order to use the MCCP instruction Refer to the MCCP instruction specification for more detail on converting Cam arrays All but the status element of this Cam Profile array structure element are hidden from the RSLogix 5000 tag editor These elements are of no value to the user The Status member is used to indicate that the corresponding Cam Profile array element has been calculated If execution of a camming instruction is attempted with any unca
146. NSERT An expression is a tag name equation or comparison To write an expression use any of these elements e tag name that stores the value variable e number that you enter directly into the expression immediate value e functions such as ABS TRUNC operators such as lt gt And Or As you write expressions follow these general rules e Use any combination of upper case and lower case letter For example these three variations of AND are acceptable AND And and e For more complex requirements use parentheses to group expressions within expressions This makes the whole expression easier to read and ensures that the expression executes in the desired sequence See Determine the order of execution on page 407 Publication 1756 RM 007H EN P December 2006 402 Structured Text Programming In structured text you use two types of expressions BOOL expression An expression that produces either the BOOL value of 1 true or 0 false e A bool expression uses bool tags relational operators and logical operators to compare values or check if conditions are true or false For example tag1 gt 65 e A simple bool expression can be a single BOOL tag e Typically you use bool expressions to condition the execution of other logic Numeric expression An expression that calculates an integer or floating point value e A numeric expression uses arithmetic operators arithmetic functions an
147. N_INSTRUCTION Tag Control tag for the instruction M otion Control Orientation REAL 3 Array Do you want to rotate the target position around the X1 X2 or X3 axis If Then No Leave the array values at zero Yes Enter the degrees of rotation into the array Put the degrees of rotation around X1 in the first element of the array and so on Use an array of three REALs even if a coordinate system has only one or two axes Translation REAL 3 Publication 1756 RM 007H EN P December 2006 Array Do you want to offset the target position along the X1 X2 or X3 axis If Then No Leave the array values at zero Yes Enter the offset distances into the array Enter the offset distances in coordination units Put the offset distance for X1 in the first element of the array and so on Use an array of three REALs even if a coordinate system has only one or two axes Motion Coordinated Instructions M M CCM M CCD MCS MCSD CTP M CSR 339 Structured Text E gion en E The structured text operands the same as the ladder diagram ystem Motion Control operands Orientation Translation MOTION_ INSTRUCTION Data Type To see if Check if this bitis Data type Notes The rung is true EN BOOL Sometimes the EN bit stays on even if the rung goes false This happens if the rung goe
148. No points Motion Calculate Cam Profile Start electronic camming between 2 axes MAPC No M otion Axis Position Cam Start electronic camming as a function of time MATC No M otion Axis Time Cam Calculate the slave value slope and derivative of MCSV No the slope for a cam profile and master value Motion Calculate Slave Values Control axis position Stop any motion process on an axis MAS Yes Publication 1756 RM 007H EN P December 2006 Motion Concepts 27 If You Want To And Use This Instruction Motion Direct Command Initiate action on all axes Stop motion of all axes M 65 Yes Motion Group Stop Force all axes into the shutdown state MGSD Yes Motion Group Shutdown Transition all axes to the ready state MGSR Yes Motion Group Shutdown Reset Latch the current command and actual position of all GSP Yes axes Motion Group Strobe Position Arm and disarm special event the watch position event checking foran axis MAW Yes checking functions such as __ Motion Arm Watch Position registration and watch position Disarm the watch position event checking for an M DW Yes axis Motion Disarm Watch Position Arm the servo module registration event checking MAR Yes for an axis Motion Arm Registration Disarm the servo module registration event checking M DR Yes for an axis Motion Disarm Registration Arm an output cam for an axis and output MAOC No Motion Arm Output Cam Disarm one or all outp
149. Not Calculated calculated 33 It attempted to execute an M AH instruction without a position Position Cam Not Enabled cam in process 34 A MAH instruction is trying to start while a registration is Registration in Progress already running 35 Eitherthe controller orthe Output Cam module does not support Illegal Execution Target the specified Output Cam axis input or output 36 Either the size of the Output Cam array is not supported orthe Illegal Output Cam value of one of its members is out of range Publication 1756 RM 007H EN P December 2006 Error Codes ERR for M otion Instructions 385 Error Corrective Action or Cause Notes 37 Either the size of the Output Compensation array is not Illegal Output Compensation supported or the value of one of its members is out of range 38 The axis data type is illegal It is incorrect for the operation Illegal Axis Data Type For a motion coordinated instruction look at the extended error code EXERR It identifies which axis caused the error Example If EXERR is zero check the axis for dimension zero 39 You have a conflict in your process Test and Tune cannot be run Process Conflict at the same time 40 You are trying to run a M SO or M AH instruction when the drive Drive Locally Disabled is locally disabled 41 The Homing configuration is illegal You have an absolute Illegal Homing Config homing instruction when the Homing s
150. OC 199 Mode Compensation Depending on the selected mode the compensated output bit is set according to the following table Mode Behavior Normal The output bit is set when the output of the latch and unlatch operation becomes active The output bit is reset when the output of the latch and unlatch operation becomes inactive Inverted The output bit is set when the output of the latch and unlatch operation becomes inactive The output bit is reset when the output of the latch and unlatch operation becomes active Pulsed The output bit is pulsed when the output of the latch and unlatch operation is active The on duty state of the pulse corresponds to the active state of the output bit The output bit is reset when the output of the latch and unlatch operation becomes inactive Inverted and The output bit is pulsed when the output of the latch and unlatch operation is active The on duty state of the pulse Pulsed corresponds to the inactive state of the output bit The output bit is set when the output of the latch and unlatch operation becomes inactive Publication 1756 RM 007H EN P December 2006 200 Motion Event Instructions MAW M DW MAR M DR MAOC M DOC The following diagram shows the effect of the mode cycle time and duty cycle on an output bit out oi tm Compensated Output Bit I i pudo 888 Te Inverted Pulsed Time Inverted and Pulsed Time On Duty Time
151. Output Cam data array tag must be specified Output Cam array tags may be created by the RSLogix 5000 tag editor or the MAOC instruction using the built in otion Event Instructions MAW MDW MAR MDR MAOC M DOC 193 Output Cam Editor The data defines the specifics for each Output Cam element The number of Output Cam elements is limited by the amount of available memory Zero or more cams can be defined for each output bit There is no constraint on how these elements are arranged within the Output Cam array Refer to the description of the OUTPUT_CAM structure for more information about data types and programming units The following diagram shows the relationships between the axis input and output that are defined by the Output Cam element Latch amp Unlatcn Output Bit Operation Position Enable Bit Enable Selection amp Inversion Input Bit 0 31 Output Bit 0 31 Output Cam Element Relationships Latch Type Depending on the selected LatchType the corresponding output bit is set according to the following table Latch Type Behavior Inactive The output bit is not changed Position The output bit is set when the axis enters the compensated cam range Enable The output bit is set when the enable bit becomes active Position and Enable The output bit is set when the axis enters the compensated cam range and the enable bit becomes active Publication 1756 RM 007H
152. PUT arraytag Is an array of 1 to 32 Compensation COM PEN SATION OUTPUT COMPENSATION elements The array indices correspond to the output bit numbers The minimum size of an array is determined by the highest compensated output bit Execution Mode UINT32 immediate There are three 3 possible execution modes The behavior is determined by the mode selected The options are 0 Once Output Cam is disarmed and the Process Complete Bit of the M otion Instruction is set when the cam position moves beyond the cam start or the cam end position 1 Continuous Output Cam continues on the opposite side of the Output Cam range when the cam position moves beyond the cam start or the cam end position 2 Persistent Output Cam disarms when the cam position moves beyond the cam start or the cam end position The Output Cam is rearmed when the cam position moves back into the Output Cam range M otion Event Instructions M AW M DW M AR M DR MAOC M DOC 189 Operand Type Format Description Execution UINT32 immediate Selects when to arm the Output Schedule Cam Options are 0 Immediate Output Cam is armed at once 1 Pending Output cam is armed when the cam position of a currently executing Output Cam moves beyond its cam start or cam end position W hen Pending is selected the following parameters are ignored Output Input Axis Arm Position and Reference 2 Forward only Output
153. Position Structured Text The operands are the same as those for the relay ladder MAR instruction For the operands that require you to select from available options enter your selection as This operand Has these options which you enter as text or enter as a number TriggerCondition positive edge 0 negative edge 1 Window edRegistration disabled 0 enabled 1 MOTION_ INSTRUCTION Structure Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 tis set when the axis registration event checking has been successfully armed ER Error Bit 28 cr axis is set to indicate that the instruction detected an error such as if you specified an unconfigured IP In Process Bit 26 It is set on positive rung transition and cleared after the registration event has occurred or has been superseded by another M otion Arm Reg command or terminated by a M otion Disarm Reg command Process Complete Bit 27 It is set when a registration event occurs Publication 1756 RM 007H EN P December 2006 178 Publication 1756 RM 007H EN P December 2006 otion Event Instructions MAW MDW MAR M DR MAOC Description The Motion Arm Registration MAR instruction sets up a registration event to store the actual
154. Position move position 5 AxisO 5 0 Axis 5 0 Speed 1 Speed Units Units per sec Accel Rate 100 Accel Units of Maximum Decel Rate 100 Decel Units of Maximum Profile 5 Termination 3 Merge Disabled Merge Speed Programmed MCLM Ladder Instruction with Move Type of Incremental Publication 1756 RM 007H EN P December 2006 264 Motion Coordinated Instructions CLM M CCM M CCD MCS MCSD MCT M CTP M CSR Publication 1756 RM 007H EN P December 2006 The previous MCLM ladder program produces the following plot of the moves path B trend Motson 9 t ee Cae f BREL CN Min NK RN C Plot of MCLM with Two Rotary Axes and Move Type of Incremental In the plot above the axes travel a reverse z pattern two and one half times stopping at an actual position of 0 1 This equates to 5 revolutions unwinds for 0 and 2 5 revolutions unwinds for Axis1 The position increments for this move are positive therefore the axes move in a positive direction with Axis0 moving from 0 to 1 and Axis1 moving from 0 to 2 In this example the endpoint is not required to fit within the absolute position defined by the rotary unwind of the axes The path of the coordinated motion is determined in linear space but position of the axes is limited by the rotary configuration Position A one dimensional array whose dimension is defined to be at least the equivalen
155. REAL immediate The value to use to change the axis or tag position to or offset to current position Publication 1756 RM 007H EN P December 2006 104 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV MRP Axis MotionControl Type PositionSelect Position Structured Text The operands are the same as those for the relay ladder MRP instruction For the operands that require you to select from available options enter your selection as This operand Has these options which you enter as text or enter as a number Type absolute 0 relative 1 PositionSelect actual 0 command 1 MOTION_ INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when the axis position action been successfully redefined ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis Description The Motion Redefine Position MRP instruction directly sets the actual Publication 1756 RM 007H EN P December 2006 or command position of the specified axis to the specified absolute or relative position No motion is caused by this instruction the current axis position is simply redefined Select or enter the
156. Rate Decel Units Profile Accel Jerk Decel Jerk Jerk Units Merge Merge Speed lt lt Less Operand Type Format Description Axis AXIS_VIRTUAL Tag Name of the axis AXIS_GENERIC For an Absolute or Incremental aster Offset move enter the slave axis AXIS SERVO AXIS SERVO DRIVE M otion Control MOTION INSTRUCTION Tag Control tag for the instruction Publication 1756 RM 007H EN P December 2006 76 Motion Move Instructions MAS M AH MAJ MAM MAG MCD M RP M CCP M ATC M CSV Operand Type Format Description M ove Type DINT Immediate Use This Move And enter Tag Type M ove an axis to an absolute position Absolute 0 M ove an axis a specified distance Incremental 1 from where it is now Move a Rotary axis to an absolute Rotary Shortest Path 2 position in the shortest direction regardless of its current position Move a Rotary axis to an absolute Rotary Positive 3 position in the positive direction regardless of its current position Move Rotary axis to an absolute Rotary Negative 4 position in the negative direction regardless of its current position Off set the master value of a position Absolute M aster 5 cam to an absolute position Offset Off set the master value of a position IncrementalMaster 6 cam by an incremental distance Offset See Choose a M ove Type for a Rotary Axis on page 3 82 for more information about rotary moves
157. S1 Coordinated Transform M CLM instruction on CS2 continues The on Y will continue The MAM on S will continue The MAM on Zwill continue T1 stays active Axes ABC will follow the respective CS2 axes M CS on CS2 Coordinated Transform T1 is canceled CLM instruction on CS2 continues The MAM on Y will continue The MAM on S will continue The MAM on Z will continue Axes ABC will stop due to canceling the transform M CS on CS3 Publication 1756 RM 007H EN P December 2006 Coordinated Transform T1 is canceled CLM instruction on CS2 continues The MAM on Y will continue The MAM on S will continue The on Zwill continue Axes ABC will stop due to canceling the transform M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 335 Motion Coordinated Use the Motion Coordinated Shutdown MCSD instruction to perform Shutdown MCSD a controlled shutdown of all the axes in the named coordinate system ATTENTION Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Operands Relay Ladder Operand Type Format Description Coordinate COORDINATE SYSTEM tag Coordinated group of axes MCSD System Motion Coordinated Shutdown ME Coordinate System
158. SYSTEM tag Coordinate group of axes Motion Coordinated Circula Move EN System Coordinate Syst E Motion Conti T 2 Motion MOTION _ tag Structure used to access Move Type Control INSTRUCTION instruction status parameters LAER Postion gl Move Type SINT INT or DINT immediate 0 Absolute Circle Type r lt iP gt or ta g Via Center Radius Hao 1 Incremental Direction E SIE 27 LPO Position REAL array tag coordination units Speed Circle Type SINT INT or DINT immediate 0 z Via Speed Units 1 or tag Accel Rate 1 Center Accel Units Decel Rate 2 Radius Decel Units Profile 3 Center Incremental Termination Type eS Via Center REAL array tag coordination units Merge 2 Radius via center Merge Speed lt lt Less Immediate or tag radius Direction SINT INT or DINT immediate 2D 3D or tag 0 CW Shortest 1 CCW Longest 2 CW Full Shortest Full 3 CCW Full Longest Full Publication 1756 RM 007H EN P December 2006 MCCM CoordinateSystem MotionControl MoveType Position Speed Speedunits AccelRate AccelUnits DecelRate DecelUnits VelocityProfile TerminationType Merge MergeSpeed otion Coordinated Instructions MCLM MCCM MCCD MCS MCSD M CTP M CSR 277 Operand Type Format Description Speed SINT INT DINT or REAL immediate coordination units or
159. Scaled with Distance Profile Scaled in Time and Distance Scaling Scaling Slave Axis Position Profile Scaled with Time Scaling Master Time Profile Stored in Cam Profile Array Scaling Time Cams When a cam profile array is specified by an MATC instruction the master coordinate values defined by the cam profile array take on the time units seconds and the slave values take on the units of the slave axis By contrast the Time and Distance Scaling parameters are unitless values that are simply used as multipliers to the cam profile By default both the Time and Distance Scaling parameters are set to 1 To scale a time cam profile enter a Time Scaling or Distance Scaling value other than 1 Increasing the Time Scaling value of a cam profile decreases the velocities and accelerations of the profile while increasing the Distance Scaling value increases the velocities and accelerations of the profile To maintain the velocities and accelerations of the scaled profile approximately equal to those of the unscaled profile the Time Scaling and Distance Scaling values should be equal For example if Motion M ove Instructions MAS MAH MAJ MAG MRP MCSV 145 the Distance Scaling value of a profile is 2 the Time Scaling value should also be 2 to maintain approximately equal velocities and accelerations during execution of the scaled time cam ATTENTION Decreasing the Time S
160. Status FALSE Axis is not Decelerating M oveStatus FALSE Axis is not M oving J ogStatus FALSE Axis is not J ogging GearingStatus FALSE Axis is not Gearing HomingStatus FALSE Axis is not Homing StoppingStatus FALSE Axis is not Stopping PositionCamStatus FALSE Axis is not Position Camming TimeCamStatus FALSE Axis is not Time Camming PositionCamPendingStatus FALSE Axis does not have a Position Cam Pending TimeCamPendingStatus FALSE Axis does not have a Time Cam Pending GearingLockStatus FALSE Axis is not in a Gear Locked condition PositionCamLockStatus FALSE Axis is not in a Cam Locked condition Example When the input conditions are true the controller disables the servo Publication 1756 RM 007H EN P December 2006 drive and the axis servo loop configured by Axis0 Relay Ladder MSF Motion Servo Off Axis Axisl E Motion Control MSF Ladder Example Structured Text 0 1 Motion Axis Shutdown MASD MASD Motion Axis Shutdown Axis Motion Control MASD Axis MotionControl 8 Operands vvv Description Motion State Instructions M SO M SF M ASD M ASR M DO M DF M AFR 37 Use the MASD instruction to force a specified axis into the Shutdown state The Shutdown state of an axis is the condition where the drive output is disabled servo loop deactivated and any available or associated OK solid state relay contacts open The axis will remai
161. Status T F F F cs2 M ovePendingQueueFullStatus T F F F Currently Coordinated Motion only supports the queueing of one coordinated motion instruction Therefore the MovePendingStatus bit and the MovePendingQueueFullStatus bit are always the same Publication 1756 RM 007H EN P December 2006 270 Additional Note On Merging Instructions MCLM Target Position Entry Dialog Box Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions CLM CCD M CS MCSD MCT M CTP M CSR A move from point A to point B is initiated as shown in the figure below When the axis is at point C a merge to point D is initiated As a result the current instruction is terminated at point C The control computes the deceleration distance needed at point C along the vector AB from the current velocity to zero velocity This distance is shown as vector CE The imaginary point F is then computed by adding the vector CF to point C The resultant merged motion from C to D is as shown below It follows the curved line starting from C then joins the straight line from F to D This path is identical as if the original programmed move was made from point A to F then from F to D with a Termination Type of No Decel C Merge Example The Target Position Entry Dialog box for the MCLM instruction provides an easy format for editing Position To gain access to the Target Position Entry dialog box you must have inserted the nam
162. Structure used to access control INSTRUCTION instruction status parameters Structured Text The operands are the same as those for the relay ladder MAAT instruction MOTION_ INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 The enable bit indicates when the instruction is enabled It remains set until servo messaging completes and the rung condition in goes false DN Done Bit 29 The done bit indicates when the instruction completes an apply axis tuning process ER Error Bit 28 The error bit indicates when the instruction detects an error Such as if the axis is not configured The Motion Apply Axis Tuning MAAT instruction is used to execute a series of computations resulting in values for gain and dynamic configuration parameters on the specified axis As part of the work performed by MAAT these resultant configuration parameters are applied so that the axis is ready for full servo operation This instruction is designed to follow execution of the MRAT instruction which generates axis input configuration values for the MAAT instruction See the MRAT instruction description for more information MAAT requires no explicit input parameters simply enter or select the desired physical axis If the targeted axis does not appear in the list of available axes the axis has not been configured for operation Use the Tag Editor to create and configure a new axis Motion Configuration
163. Type DINT This defines the source and polarity of the specified EnableBit when LatchType or UnlatchType is Enable Position and Enable or Duration and Enable A value of less than 0 or greater than 31 results in an Illegal Output Cam error and the cam element is not considered Value Description 0 Input The enable bit is in the Input parameter 1 Inverted Input The enable bit is in the input parameter and is active low 2 Output The enable bit is in the Output parameter 3 Inverted Output The enable bit is in the Output parameter and is active low EnableBit DINT The value of the Enable Bit selected must be between 0 and 31 when LatchType or UnlatchType is Enable Position and Enable or Duration and Enable A value of less than 0 or greater than 31 results in an Illegal Output Cam error and the cam element is not considered OUTPUT COMPENSATION The OUTPUT_COMPENSATION data type defines the details for each Structure output bit by setting the characteristics of each actuator OUTPUT_COMPENSATION contains the following members Publication 1756 RM 007H EN P December 2006 Motion related Data Types Structures 395 Mnemonic Data Type Description Offset REAL Offset provides position compensation for both the latch and unlatch operations LatchDelay REAL Latch delay programmed in seconds provides time compensation for the latch operation UnlatchDelay REAL Unlatch delay programmed in seconds p
164. W Aaxis1 MDW 1 Publication 1756 RM 007H EN P December 2006 176 Motion Event Instructions MAW M DW MAR M DR M AOC M DOC Motion Arm Registration Use the MAR instruction to arm servo module registration event M AR checking for the specified axis When the instruction is called a registration event is armed based on the selected Registration Input and the specified Trigger Condition When the specified Registration Input transition satisfies the Trigger Condition the motion module computes the axis position at the moment the event occumed based on hardware latched encoder count data and stores it in the associated Registration Position variable in the axis data structure Also the instruction s Event PC bit is simultaneously set as well as the Registration Event Status bit in the axis data structure If Windowed Registration is selected only registration events whose computed registration position falls within the Max and Min Position window are accepted If the Registration Position falls outside this window the registration event checking is automatically rearmed Operands Relay Ladder Operand Type Format Description Axis AXIS FEEDBACK tag Name of the axis to perform MAR operation on Motion Arm Registration AXIS VIRTUAL Axis mi N gt Motion Control 7 R gt Trigger Condition P gt AXIS_GEN ERIC windowed Registration gt Min Position AXIS_SERVO Max Position AXIS SERVO
165. a value are cleared to 0 An instruction executes faster and requires less memory if all the operands of the instruction use the same optimal data type typically DINT or REAL Rung condition The controller evaluates ladder instructions based on the rung condition preceding the instruction rung condition in Based on the rung condition in and the instruction the controller sets the rung condition following the instruction rung condition out which in turn affects any subsequent instruction input instruction output instruction rung in rung out condition condition If the rung in condition to an input instruction is true the controller evaluates the instruction and sets the rung out condition based on the results of the instruction If the instruction evaluates to true the rung out condition is true if the instruction evaluates to false the rung out condition is false Introduction Instruction Timing Chapter 1 Motion Concepts This chapter covers concepts that are common to all the motion instructions For This Information See Page Instruction Timing 17 Program a Velocity Profile 22 Choose a Command 26 Motion instructions use three types of timing sequences Timing type Description Immediate The instruction completes in one scan Message The instruction completes over several scans because the instruction sends messages to the servo module Process The instruction could take an indefinite amo
166. adder diagram toggle the rung condition in from false to execute the instruction true each time you want to execute the instruction In structured text condition the In structured text instructions execute each time they are scanned Condition the instruction so instruction so that it only executes on that it only executes on a transition Use either of these methods a transition e Qualifier of an SFC action e Structured text construct Arithmetic Status Flags not affected Fault Conditions none Error Codes See Error Codes ERR for Motion Instructions Extended Error Codes none Changes to Status Bits none Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 353 Example 1 Suppose you want to write a recovery sequence for faults As one of your steps you want to get the current position of an articulated independent robot In that case you can use an MCTP instruction to calculate the robot s Cartesian position when you know its joint angles Calculate Position Ladder Diagram If Recovery Step 1 turns on then Calculate the X1 X2 and X3 positions of the robot based on its current joint angles When the instruction is done the MUL instruction takes the sequence to the next step Recovery Step 1 MCTP mmn Motion Calculate Transform Position MEN Source System Arm X1 X2 X3 Target System Arm J1 J2 J3 H Motio
167. affected none See Error Codes ERR for Motion Instructions Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The following Extended Error codes help to pinpoint the problem when the MAW instruction receives a Servo Message Failure 12 error message Associated Error Code Extended Error Meaning decimal Code decimal SERVO MESSAGE FAILURE No Resource 2 Not enough memory 12 resources to complete request SERCOS Status Bits Example otion Event Instructions MAW MDW MAR MDR MAOC 173 MAW Changes to Status Bits Bit Name State Meaning WatchEventArmedStatus TRUE The axis is looking for a watch position event WatchEventStatus FALSE The previous watch event is cleared When the input conditions are true the controller arms watch position event checking for axis1 Relay Ladder MAW Motion Arm Watch Axis Axis E Motion Control MAW 1 Trigger Condition Forward Position fwdmypos_1 OYE MAW Ladder Example Structured Text MAW 5 1 1 Forward fwdmvpos_1 Publication 1756 RM 007H EN P December 2006 174 Motion Event Instructions MAW M DW MAR M DR M AOC M DOC Motion Disarm Watch MDW MDW Motion Disarm Watch Axis Motion Control MDW Axis MotionControl J Operands Description Publication 1756 RM 007H EN P
168. age given for this particular instruction Their behavior is dependent upon the Error Code with which they are associated The Extended Error Codes for Servo Off State 5 Shutdown State 7 Axis Type Not Servo 8 Axis Not Configured 11 Homing In Process Error 16 and Illegal Axis Data type 38 errors all function in the same fashion A number between 0 and n is displayed for the Extended Error Code This number is the index to the Coordinate System indicating the axis that is in the error condition For Error Code Axis Not Configured 11 there is an additional value of 1 which indicates that Coordinate System was unable to setup the axis for coordinate motion For the MCLM instruction Error Code 13 Parameter Out of Range Extended Errors return a number that indicates the offending parameter as listed on the faceplate in numerical order from top to bottom beginning with zero For example 2 indicates the parameter value for Move Type is in error Referenced Error Code and Extended Error Instruction Description Number Numeric Parameter Indicator Parameter Out Of Range 13 2 M ove Type M ove Type is either less than 0 or greater than 1 Parameter Out Of Range 13 3 Position The position array is not large enough to provide positions for all the axes in the coordinate system Parameter Out Of Range 13 4 Speed Speed is less than 0 Publication 1756 RM 007H EN P December 2006 otion Coordinated Instru
169. alse to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when the axis drive signals have been successfully disabled and the drive enable status bit is cleared ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis For motion module s with an external servo drive interface e g the 1756 MO2AE the Motion Direct Drive Off MDF instruction directly disables the motion module Drive Enable output of the specified physical axis and also zeroes the modules servo output to the external drive by applying the configured Output Offset value The MDF instruction is used to stop motion initiated by a preceding MDO instruction and transition the axis from the Direct Drive Control state back to the Axis Ready state To successfully execute an MDF instruction the targeted axis must be configured as either a Servo or Feedback Only axis Otherwise the instruction errors The M DF instruction execution may take multiple scans to IMPORTANT Ax execute because it requires transmission of a message to the motion module The Done DN bit is not set until after the message has been successfully transmitted Publication 1756 RM 007H EN P December 2006 46 M otion State Instructions M SO M SF MASD MASR M DO M DF M AFR This is a transitional instruction e In r
170. an be programmed separately with an Output Cam profile and compensated for position offset and time delay The Motion Arm Output Cam MAOC instruction initiates the arming of a specific Output Cam between the designated axis and output When executed the specified output cam bits are synchronized to the designated axis using an Output Cam Profile established by the RSLogix 5000 Output Cam Fditor This relationship can be viewed as a master slave relationship with the axis representing the master and the output bit representing the slave Hence the Output Cam functionality is related to the position cam functionality which provides a relationship between a master axis and a slave axis To accurately synchronize the output cams to the designated axis an execution schedule and associated axis and cam arm positions are specified When the axis travels past the axis arm position in the direction specified by the Execution Schedule parameter the cam position becomes locked to the axis position starting at the specified Cam Arm Position parameter At this time the output cam is armed and the Output Cam Armed status is set The output cam can also be configured via the Execution Schedule parameter to execute Immediately or Pending completion of a currently executing output cam The output cam can also be executed Once Continuously or Persistently by specifying the desired Execution Mode Persistent behavior allows the output cam to become disarmed whe
171. and offset control while the slave axis is running Incremental M oves An Incremental Motion Axis Move MAM instruction may be used on the slave axis or master axis if configured for Servo operation while the position cam is operating This is particularly useful to accomplish phase advance retard control The incremental move distance can be used to eliminate any phase error between the master and the slave or to create an exact phase relationship M aster Offset M oves A MAM instruction can also be used while the position cam is operating to shift the master reference position of the cam on the fly Unlike an incremental move on the slave axis a master offset move Motion M ove Instructions MAS MAH MAJ MAG MCD MRP MCCP MAPC MATC MCSV 133 on the slave axis shifts the cam profile relative to the master axis as shown below Profile After Incremental M ove of Slave Axis Slave Axis Profile After M aster Offset M ove of Position m Slave Axis Master Axis Position Initial Cam Profile Master Offset M ove When the MAPC instruction except pending is initiated the corresponding active Master Offset Move is disabled and the corresponding Master Offset Strobe Offset and Start Master Offset are reset to zero In order to achieve the master reference position shift the MAM instruction must be initiated after the MAPC is initiated See the Motion Axis Move MAM instruction for more information on Master Offset mo
172. and the rung goes false DN Done Bit 29 It is set when the group Programmed Stop has been successfully initiated for all axes in the group ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured group IP In Process Bit 26 It is set on positive rung transition and cleared after the M otion Group Programmed Stop is complete Process It is set after all the axes in group have been successfully Complete Bit 27 brought to a stop according to each axis Programmed Stop M ode configuration Description With the Stop Mode parameter set for Programmed the Motion Group Stop MGS instruction brings motion for all of the axes in the specified group to a stop according to the configured Programmed Stop Mode for each axis This instruction initiates the same programmed stopping action that is automatically applied when the processor s operating system changes operating mode i e Run Mode to Program Mode etc This is particularly useful in designing custom motion fault handlers If the MGS Stop Mode parameter is set to Fast Stop each axis in the group is forced to perform a Fast Stop process regardless of the configured Programmed Stop Mode Fach axis in the group is decelerated at the Maximum Deceleration rate and once stopped the axis is left in the Servo Active state If the MGS Stop Mode parameter is set to Fast Disable each axis in the
173. any changes in small increments to make sure a change doesn t cause an overshoot during normal operation Publication 1756 RM 007H EN P December 2006 Appendix A Error Codes ERR for Motion Instructions Error Corrective Action or Cause Notes 3 Look for another instance of this type of instruction See if its Execution Collision EN bit is on but its DN and ER bits are off enabled but not done or errored Wait until its DN or ER bit turns on You can t execute an instruction if the same type of instruction is enable but not done or errored 4 Open the servo loop before you execute this instruction Servo On State Error 5 Close the servo loop before you execute this instruction Servo Off State Error For a motion coordinated instruction look at the extended error code EXERR It identifies which axis caused the error Example If EXERR is zero check the axis for dimension zero 6 Disable the axis drive Drive On State Error 1 Execute a Motion Axis Shutdown Reset M ASR instruction or Shutdown State Error direct command to reset the axis For a motion coordinated instruction look at the extended error code EXERR It identifies which axis caused the error Example If EXERR is zero check the axis for dimension zero 8 The configured axis type is not correct W rong Axis Type For a motion coordinated instruction look at the extended error code EXERR It identifies which axis caused the error Example
174. argeted group must be configured The M GSP instruction execution completes in a single scan setting the Done DN bit immediately This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e n structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions M GSP Changes to Status Bits None When the input conditions are true the controller latches the curent command and the actual position of all axes in groupl Relay Ladder MGS Motion Group Strobe Position N 5 Group Motion ND Motion Control MGSP 2 R gt MGSP Ladder Example Structured Text MGSP Motion MGSP 2 Publication 1756 RM 007H EN P December 2006 168 Motion Group Instructions M GS M GSD M GSR M GSP Notes Publication 1756 RM 007H EN P December 2006 Introduction Chapter 5 Motion Event Instructions MAW MDW MAR MDR MAOC ATTENTION A Tags used for the motion control attribute of instructions should only be used once Reuse of the motion control tag in other instructions can cause unintended operation This may result in damage to equipment or personal injury Motion event instructions control the arming and disarming of special event checking functions such as registration and watch position The motion event in
175. arting from standstill Distance Velocity End Time d Time Decel Accel Velocity Decel Speed Position _ Distance v Endpoint d Publication 1756 RM 007H EN P December 2006 80 Motion Move Instructions MAS MAM MAG MCD M RP M CCP M ATC M CSV Programming Guidelines ATTENTION A Guideline e In relay ladder toggle the rung condition each time you want to execute the instruction If You Use An S curve Profile Be careful if you change the speed acceleration deceleration or jerk while an axis is accelerating or decelerating along an S curve profile You can cause an axis to overshoot its speed or reverse direction For more information see Troubleshoot Axis M otion on page 9 367 Details This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time you want to execute the instruction e n structured text condition the instruction so thatitonly executes on a transition In structured text instructions execute each time they are scanned e Condition the instruction so that it only executes on a transition Use either of these methods e qualifier of an SFC action e Structured text construct For more information see Appendix C e For a Master Offset move enter the slave axis but use master units Use an Absolute or Incremental M aster Offset move to off set the master value of a p
176. ashion To generate smooth continuous motion using this technique however care must be taken in designing the cam points of the cam table to ensure that there are no position velocity or acceleration discontinuities between the start and end points of the calculated cam profile Execution Schedule Control over the MAPC instruction s execution is via the Execution Schedule parameter Immediate Execution By default the MAPC instruction is scheduled to execute Immediately In this case there is no delay to the enabling of the position camming process and the Master Lock Position parameter is irrelevant The slave axis is immediately locked to the master axis beginning at the Cam Lock Position of the specific cam profile As illustrated in the diagram below when the MAPC instruction is executed the camming process is initiated on the specified slave axis and the Position Cam Status bit in the slave axis Motion Status word is set If the Execution Schedule parameter is set to Immediate the slave axis is immediately locked to the master according to the specified Publication 1756 RM 007H EN P December 2006 126 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV Cam Profile This is indicated by the fact that the Position Cam Lock Status bit for the specified slave axis is also set Cam Cam Profile Slave Axis Start Position Position Publication 1756 RM 007H EN P Dece
177. ata Type Units Definition Test Status Integer Status Report of the Hookup Diagnostic Test Process Test Direction Boolean Direction of axis travel during hookup Forward test as seen by the motion module If due to improper hookup or some other problem with the system the axis feedback fails to detect that axis reaching the configured Motor Encoder Test Increment after moving the axis at least that distance then abort the test using the MAS instruction and check the encoder wiring Watchdog OK Test If the Watchdog OK Test is selected the motion module does not generate any axis motion but simply simulates a CPU Watchdog failure which opens the OK contacts The OK contacts should remain closed for 2 seconds This test is used to check the OK contact wiring into the E Stop string of the Drive system In the event of a motion module DSP failure this mechanism is used to shut off the power supply to the drive s When the two second Watchdog OK Test is complete the motion module then reports success via the Test Status as shown below Axis Parameter Data Type Units Definition Test Status Integer Status Report of the Hookup Diagnostic Test Process Test Status Conditions may occur that make it impossible for the control to properly perform the test operation When this is the case the test process is automatically aborted and a test fault is reported and stored in the Test Status output paramet
178. ate You start a Motion Axis Jog MAJ instruction Before the axis gets to its target speed you start a Motion Axis Stop MAS instruction The axis continues to speed up and then eventually slows to a stop Jog PB sLocal 4 Data 1 0 My Axis OK MAJ Motion Axis Jog EN Axis My Axis Motion Control Manual Jog DN em Direction 0 ete ER S curve profile in the instruction Speed Manual_dog Speed that starts the motion 60 0 IP3 Speed Units Units per sec Accel Rate Manual Jog A amp ccel 200 Accel Units Units per sec2 Decel Rate Manual_Jog_Decel 200 Decel Units Units per sec2 Profile S Curve Accel Jerk Manual Jod amp ccel Jerk 100 0 Decel Jerk Manual Jog Decel Jerk 100 0 Jerk Units of Time Merge Disabled Merge Speed Programmed lt lt Less Publication 1756 RM 007H EN P December 2006 368 Troubleshoot Axis M otion Cause When you use an Scurve profile jerk determines how fast an axis can Stop while accelerating 100 80 60 40 acceleration change its acceleration and deceleration e An S curve profile has to get acceleration to zero before the axis can slow down e The time it takes depends on the jerk acceleration and speed e n the meantime the axis continues to speed up The following trends show how the axis stops with a trapezoidal profile and an S curve profile Trapezoidal S curve speed goes up until
179. ation of this instruction and result in superimposed motion on the affected axes An error is flagged if a second instruction is initiated in the same coordinate system or in another coordinate system containing any axes in common with the coordinate system that is active Coordinated M otion Any currently executing coordinated motion instructions involving the same specified coordinate system are terminated and the active motion is blended into the current move at the speed defined in the merge speed parameter Any pending coordinated motion instructions in the specified coordinate system are cancelled Any currently executing system single axis motion instructions involving any axes defined in the specified coordinate system are not affected by the activation of this instruction and result in superimposed motion on the affected axes All Motion Any currently executing single axis motion instructions involving any axes defined in the specified coordinate system and any currently executing coordinated motion instructions are terminated The prior motion is merged into the current move at the speed defined in Merge Speed parameter Any pending coordinated move instructions are cancelled M erge Speed The Merge Speed operand defines whether the current speed or the programmed speed is used as the maximum speed along the path of the coordinated move when Merge is enabled Current speed is the vector sum of all motion jogs MAM s geared
180. atus of the drive enable output the action of the servo and the condition of the OK contact depend on the faults and fault actions that are present This operating state allows the OK relay contacts to open a set of contacts in the E stop string of the drive power supply In this state e the servo module drive enable output is inactive e servo action is disabled e the OK contact is open Motion Servo On MSO Operands MSO Motion Servo On Axis mi Motion Control TU MSO Axis MotionControl Description Motion State Instructions M SO M SF M ASD M ASR M DO M DF M AFR 31 Use the MSO instruction to activate the drive amplifier for the specified axis and to activate the axis servo control loop Relay Ladder Operand Type Format Description Axis AXIS GENERIC tag Name of the axis to perform operation on AXIS SERVO AXIS SERVO DRIVE Motion MOTION _ tag Structure used to access control INSTRUCTION instruction status parameters Structured Text The operands are the same as those for the relay ladder MSO instruction M OTION_INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when the axis servo action has been successfully enabled and the drive enable and
181. axis in the opposite direction of the master axis Structured Text MAPC SlaveAxis MasterAxis The operands are the same as those for the relay ladder MotionControl Direction MAPC instruction For the array operands you do not have to include CamProfile SlaveScaling the array index If you do not include the index the instruction starts MasterScaling ExecutionMode with the first element in the array 0 ExecutionSchedule MasterLockPosition CamLockPosition MasterReference Publication 1756 RM 007H EN P December 2006 120 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M ATC M CSV For the operands that require you to select from available options enter your selection as This operand Has these options w hich you enter as text or enter as a number ExecutionM ode once 0 continuous 1 persistent 2 ExecutionS chedule immediate 0 pending 1 forwardonly 2 reverseonly 3 bidirectional 4 asterReference actual 0 command 1 asterDirection bidirectional 0 forwardonly 1 reverseonly 2 MOTION_ INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 DN Done Bit 29 It t gt is set when the rung makes a false to true transition and mains set until the rung goes false is set when axis position cam has been successfully initiated ER Error Bit 28 It is set to indicate that the instruction detec
182. ay ladder Motion Axis Home structured text MAJ 65 relay ladder M otion Axis J og structured text MAM 75 relay ladder Motion Axis M ove structured text MAOC 186 relay ladder Motion Arm Output Cam structured text 115 relay ladder Motion Axis Position Cam structured text MAR 176 relay ladder Motion Arm Registration structured text MASD 37 relay ladder Motion Axis Shutdown structured text MAS 50 relay ladder Motion Axis Stop structured text MASR 40 relay ladder Motion Axis Shutdown structured text Reset MATC 138 relay ladder Motion Axis Time Cam structured text MAW M otion Arm Watch 170 relay ladder structured text M 109 relay ladder M otion Calculate Cam structured text Profile MCD 98 relay ladder M otion Change Dynamics structured text MCT 338 relay ladder M otion Coordinated structured text Transform MCTP 350 relay ladder M otion Calculate Transform structured text Position MDF 45 relay ladder M otion Direct Drive Off structured text M DOC 213 relay ladder M otion Disarm Output Cam structured text Publication 1756 RM 007H EN P December 2006 Instruction Locator 6 Instruction Location Languages MDO 42 relay ladder Motion Direct Drive On structured text MDR 183 relay ladder Motion Disarm Registration structured text MDW 174 relay ladder Motion Disarm Watch structured text MGSD 161 relay ladder Motion Group Shutdown struct
183. bit of the last motion instruction or a motion instruction executes which causes a stop oveTransitionStatus Sets when No Decel or Command Tolerance Termination Type is satisfied When blending collinear moves the bit is not set because the machine is always on path It clears when a blend completes the motion of a pending instruction starts ora motion instruction executes which causes a stop Indicates not on path M ovePendingStatus Sets when one pending coordinated motion instruction is in the instruction queue Clears when the instruction queue is empty M ovePendingQueueFullStatus Sets when the instruction queue is full It clears when the queue has room to hold another new coordinated move instruction Currently Coordinated Motion only supports the queueing of Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions M M CCM M CCD MCS MCSD CTP M CSR 317 one coordinated motion instruction Therefore the MovePendingStatus bit and the MovePendingQueueFullStatus bit are always the same Example Relay Ladder Coordinate System Motion Control Move Type Position MCCM Move position 0 0 0 AxisO Axis Circle Type Via Center Radius Direction Speed Speed Units Accel Rate Accel Units Decel Rate Decel Units Profile Termination Type Merge Merge Speed MCCM Ladder Instruction Structured Text MCCM Motion Coordinated Circula
184. blem Publication 1756 RM 007H EN P December 2006 Motion Configuration Instructions M AAT M RAT M AHD M RHD when the MRAT instruction receives a Servo Message Failure 12 error message Associated Error Code Extended Error decimal Code decimal SERVO MESSAGE FAILURE Process terminated on 12 request 1 Meaning Tune execution follow ed by an instruction to shutdow n disable drive or a motion stop instruction or a Processor change requests a cancel of Tune SERVO MESSAGE FAILURE Object M ode conflict 12 Axis is in shutdown 12 SERVO_M ESSAGE_FAILURE Device in wrong state Incorrect Tune Process 12 16 order SERCOS Status Bits MRAT Changes to Status Bits Bit Name State Meaning DriveEnableStatus TRUE Axis is in Drive Control state with the Drive Enable output active while the Tuning Profile is running TuneStatus TRUE The axis is running a tuning process Example When the input conditions are true the controller commands the servo module to run a tuning motion profile for axis1 Relay Ladder Publication 1756 RM 007H EN P December 2006 MRAT Motion Run Axis Tuning Axis Motion Control MRAT_1 MRAT Ladder Example Structured Text MAR Axisl MRAT_1 Motion Configuration Instructions MRAT MAHD MRHD 229 Motion Apply Hookup The Motion Apply Hookup Diagnostics MAHD instruction is used to Diagnostics M AHD apply th
185. blication 1756 RM 007H EN P December 2006 98 Motion M ove Instructions M AS M AH MAJ MAG MCD M RP M CCP M ATC M CSV Motion Change Dynamics MCD MCD Motion Change Dynamics Axis Motion Control Motion Type Change Speed Speed Change Accel Accel Rate Change Decel Decel Rate Speed Units Accel Units Decel Units lt lt Less Publication 1756 RM 007H EN P December 2006 Operands Relay Ladder TIS Use the MCD instruction to selectively change the speed acceleration rate or deceleration rate of a move profile or a jog profile in process ATTENTION motion and injure people Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment Operand Type Format Description Axis AXIS VIRTUAL tag Name of the axis to perform operation on AXIS GENERIC AXIS SERVO AXIS SERVO DRIVE Motion MOTION _ tag Structure used to access control INSTRUCTION instruction status parameters M otion type UDINT immediate Motion profile jog or move to change Select either 0 jog 1 move Change BOOLEAN immediate Set to enable a change of speed Speed Select either 0 no 1 yes Speed REAL immediate The new Speed to move the axis in or tag or Speed Units Change BOOLEAN immediate Set to enable an acceleration accel change Select either 0 no 1 yes Accel rate RE
186. blication 1756 RM 007H EN P December 2006 Units per sec Units per sec2 Units per sec2 Trapezoidal 0 Disabled Current Three dimensional gt coordinate system i FO IP2 Position defined in gt absolute units Co Circle Type is Center Center position defined in absolute units as 1 0 1 0 0 0 Direction is Shortest Full Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 303 For full circles set Position operand to any point except the start point and use one of the Full Direction types The endpoint is assumed to be the start point This is because in the three dimensional space you need three points to specify a plane for the circle By changing the Direction operand to Shortest in the preceding MCCM instruction the following path is generated The Shortest option of the Direction operand takes the shortest route from the start point to the point defined by the Position operand of the MCCM instruction axis 53 2A x 0 i Y axis X axis 3D Path Using Shortest for Direction Operand Change the Direction operand to Longest in the preceding MCCM instruction and the path followed is the longest from the start point to Publication 1756 RM 007H EN P December 2006 304 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Publication 1756 RM 007H EN P December 2006 the poi
187. cal 0 I Data Cam Start and Cam End Positions The cam start and cam end positions define the left and right boundary of the Output Cam range When the cam position moves beyond the cam start or cam end position the behavior of the Output Cam is defined by the execution mode and execution schedule Changes to the cam start or cam end position don t take effect until the execution of a current MAOC instruction completes Execution Mode Depending on the selected execution mode the Output Cam behavior may differ when the cam position moves beyond the cam start or cam end position Execution mode Behavior Once W hen the cam position moves beyond the cam start or cam end position the Output Cam is disarmed and the Process Complete bit of the M otion Instruction is set Persistent When the cam position moves beyond the cam start or cam end position the Output Cam is disarmed However when the cam position moves back into the Output Cam range the Output Cam is rearmed Continuous W hen the cam position moves beyond the cam start or cam end position the Output Cam continues on the opposite side of the Output Cam range Publication 1756 RM 007H EN P December 2006 202 M otion Event Instructions M AW M DW MAR M DR MAOC M DOC Execution Schedule Depending on the selected execution schedule the Output Cam is armed according to the following table Execution Schedule Behavior Immediate The
188. cal 4 Data 1 0 gt My_Axis_OK AJ Motion Axis Jog EN Axis My Axis Motion Control Manual_Jog ON Direction 0 ER Speed Manual_Jog_Speed 50 0 IP5 Speed Units Units per sec Accel Rate Manual_Jog_Accel 20 0 Accel Units Units per sec2 Use the same deceleration in Decel Rate Manual_Jog_Decel i 200 both instruction Decel Units Units per sec2 Profile S Curve Accel Jerk Manual amp ccel Jerk 100 0 Decel Jerk Manual Jog Decel Jerk 100 0 of Time Disabled Merge Gpeed Programmed Jog_PB sLocal 4 Data 1 0 Motion Control p DN em Stop Type Set Change Decel to Yes Change Decel ER This lets the axis use the Decel Rate og DI Decel Rate of the Decel Units Units per sec2 instruction Change Decel Jerk Yes Decel Jerk Stop_Jog_Decel_Jerk 100 0 Jerk Units of Time lt lt Less Publication 1756 RM 007H EN P December 2006 380 Troubleshoot Axis M otion Revision 16 or Later Revision 16 improved how the controller handles changes to an S curve profile If you re still seeing an axis reversal make sure bit 1 of the DynamicsConfigurationBits for the axis is on 1 Use a Get System Value GSV instruction to see if the algorithm is on SV Get System Value Class Name AXIS Name of the axis Instance Name My Axis Attribute Name D ynamicsConfigurationBits DINT tag to store the value Dest DynamicsConfigBits 24
189. caling value of a position cam increases the required velocities and accelerations of the profile This can cause a motion fault if the capabilities of the drive system are exceeded Cam Profile Execution M odes Execution Modes of Once or Continuous can be selected to determine how the cam motion behaves when the master position moves beyond the start and end points of the profile defined by the original cam table Motion M ove Instructions MAS MAH MAJ MAG MRP MAPC MATC MCSV 125 If Once is selected default the cam motion of the slave axis starts only when the master axis moves into the range defined by the start and end points of the cam profile When the master axis moves outside the range of the profile cam motion on the slave axis stops and the Process Complete bit of the MAPC instruction is set Note that contrary to the current S Class practice slave motion does not resume when and if the master moves back into the profile range specified by the start and end points When Continuous mode is selected the specified cam profile once started is executed indefinitely With continuous operation the profile s master and slave positions are unwound when the position of the master axis moves outside the profile range causing the cam profile to repeat This feature is particularly useful in rotary applications where it is necessary that the position cam run continuously in a rotary or reciprocating f
190. caling value or increasing the Distance Scaling of a time cam increases the required velocities and accelerations of the profile This can cause a motion fault if the capabilities of the drive system are exceeded Cam Profile Execution M odes Execution Modes of Once or Continuous can be selected to determine how the cam motion behaves when the time moves beyond the end point of the profile defined by the original cam table If Once is selected default the cam profile motion of the axis starts immediately When the time cam execution time exceeds the time range defined by the cam profile the MATC instruction completes axis motion stops and the Time Cam Status bit in the slave axis Motion Status word is cleared When Continuous mode is selected the specified cam profile starts immediately and is executed indefinitely With continuous operation time is unwound to the beginning of the cam profile when it moves beyond the end of the cam profile causing the cam profile to repeat indefinitely This feature is particularly useful in rotary applications where it is necessary that the time cam run continuously in a rotary or reciprocating fashion To generate smooth continuous motion using this technique however care must be taken in designing the cam points of the cam table to ensure that there are no position velocity or acceleration discontinuities between the start and end points of the calculated cam profile Execution Sched
191. cation 1756 RM 007H EN P December 2006 42 M otion State Instructions M SO M SF MASD MASR M DO M DF M AFR Motion Direct Drive On MDO Operands MDO Motion Direct Drive On NE Axis ml Motion Control Drive Output Drive Units Axis MotionControl DriveOutput DriveUnits Publication 1756 RM 007H EN P December 2006 Use the MDO instruction in conjunction with motion modules that support an external analog servo drive interface e g the 1756 M02AE or 1784 PMO2AE servo module This instruction activates the module s Drive Enable enabling the external servo drive and also sets the servo module s output voltage of the drive to the specified voltage level The value for Drive Output may be specified in Volts or of maximum axis Output Limit Relay Ladder Operand Data Type Description Axis Tag Name of the axis to perform operation on Motion MOTION_ Structure used to access instruction status control INSTRUCTION Tag parameters Drive Output REAL Voltage to output in of servo Output Limit or in Volts Drive Units Boolean Units in which the Drive Output value is interpreted Structured Text The operands are the same as those for the relay ladder MDO instruction For the operands that require you to select from available options enter your selection as This operand Has these options which you enter as text or enter as a number DriveUnits volts 0 percent
192. cceleration changes from 0 to 40 mm s in 0 2 seconds the jerk is 40 mm s amp 0 mm s 0 25 200 mm s Publication 1756 RM 007H EN P December 2006 Motion Concepts 23 Choose a Profile Consider cycle time and smoothness when you choose a profile If you want Choose this Profile Consideration e Fastest acceleration and Trapezoidal J erk doesn t limit the acceleration deceleration times and deceleration time e More flexibility in programming subsequent motion e The Acceleration and Deceleration rates control the maximum change in Velocity e Your equipment and load get more stress than with an S curve profile e J erkis considered infinite and is shown as a vertical line Smoother acceleration and S curve J erk limits the acceleration and deceleration that reduces the deceleration time stress on the equipment and load e Ittakes longer to accelerate and decelerate than a trapezoidal profile e f the instruction uses an S curve profile the controller calculates acceleration deceleration and jerk when you start the instruction e The controller calculates triangular acceleration and deceleration profiles Publication 1756 RM 007H EN P December 2006 24 X Motion Concepts Example 100 of Time 60 of Time Use of Time for the Easiest Programming of J erk Use of Time to specify how much of the acceleration or deceleration time has jerk You don t have to calculate a
193. changing its speed to zero Use another MCD instruction with a non zero speed value to complete the move as originally specified Changing J og Dynamics When a Motion type of Jog is entered or chosen the speed acceleration and or deceleration of a Jog in progress may be changed to the specified value The speed change occurs at the specified acceleration rate if the new speed is higher than the current speed or at the specified deceleration rate if the new speed is lower than the current speed not affected none See Error Codes ERR for Motion Instructions on page A 383 Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions Extended Error codes for the Parameter Out of Range 13 error code lists a number that refers to the number of the operand as they are listed in the faceplate from top to bottom with the first operand being counted as zero Therefore for the MCD instruction an extended error code of 4 would refer to the Speed operand s value You would then Publication 1756 RM 007H EN P December 2006 102 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV MCD Changes to Status Bits Example Publication 1756 RM 007H EN P December 2006 have to check your value with the accepted range of values for the instruction For the Error Code 54 Maximum Deceleration Value is Zero if the Extended E
194. cified axis The tuning motion profile consists of one or more acceleration and deceleration ramps induced by applying fixed voltages to the servo s drive output Note that this instruction does not at any time close the servo loop While this instruction takes no explicit input parameters it does derive input from the Axis Tuning Configuration parameters The result of executing the MRAT instruction is a set of measurement data that is stored in the Axis Object for subsequent use with the Motion Apply Axis Tuning MAAT instruction Relay Ladder Operand Type Format Description Axis AXIS SERVO tag Name of the axis to perform operation on AXIS SERVO DRIVE Motion MOTION _ tag Structure used to access control INSTRUCTION instruction status parameters Structured Text The operands are the same as those for the relay ladder MRAT instruction M OTION_INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set after the tuning process has been successfully completed Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis IP In Process Bit 26 It is set on positive rung transition and cleared after the tuning process is complete or terminated b
195. ck Position Clckpos Master Reference Actual Master Direction Forward Only MAPC Ladder Example Structured Text Cam Profile _ 1 0 L 1 0 YY VF 150 1 1 1 Cam pro1 0 1 0 1 0 0nce immediate Mlckpos Clckpos Actual Forwardonly Publication 1756 RM 007H EN P December 2006 138 Motion M ove Instructions M AS MAJ MAG MCD M CCP M APC M ATC M CSV Motion Axis Time Cam The Motion Axis Time Cam MATO instruction provides electronic M ATC camming of an axis as a function of time according to the specified Cam Profile Time cams allow the execution of complex motion profiles other than the built in trapezoidal or S curve move profiles When executed the specified Axis is synchronized in time using a time Cam Profile established by the RSLogix 5000 Cam Profile Editor or by a previously executed Motion Calculate Cam Profile MCCP instruction The direction of axis motion relative to the cam profile is defined by a very flexible Direction input parameter The camming Direction may be explicitly set as the Same or Opposite or set relative to the current camming direction as Reverse or Unchanged The cam profile can be configured via the Execution Schedule parameter to execute Immediately or Pending completion of a currently executing time cam profile The cam profile can also be executed Once or Continuously by specifying the desired Execution Mode Distanc
196. clockwise been selected Direction 1 the axes move along the curve shown in the following graph Mp p 112 46 Ena N 104 13 S821 j 37 di Sees duc mE Plotof Path with Direction as Counterclockwise Publication 1756 RM 007H EN P December 2006 286 X Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Publication 1756 RM 007H EN P December 2006 M Using Via Circle Type The following examples show the use of the MCCM with a Circle Type of Via and a Move Type of Absolute first example and Incremental second example to arrive at the same result The basic assumptions are e The 2 axes Axis0 and 1 are both members of the coordinate system Coordinated sys e Axis0 and Axis1 are orthogonal to each other e Coordinated sys is initially at 10 4 1 3 units Move Coordinated sys along an arc to 11 2 6 6 units passing through the point 3 7 8 6 units at the vector speed of 10 0 units per second with the acceleration and deceleration values of 5 0 units per second The following graph shows the path generated by the preceding information 37 8 0 Vis 112 1 End 104 4 3 Sat acc door Eb AS see Plot of Path of MCCM with Operands of Via and Absolute The vector speed of the selected axes is equal to the specified speed in the units per s
197. controller does not execute any other statements in the routine until it completes the loop e If the time that it takes to complete the loop is greater than the watchdog timer for the task a major fault occurs e Consider using a different construct such as Description The syntax is FOR count initial_value TO final_value optional BY increment If you don t specify an increment the loop increments by 1 DO statement IF bool expression THEN If there are conditions when you want to optional exit the loop early use other statements END IF such as an IF THEN construct to condition an EXIT statement END FOR Publication 1756 RM 007H EN P December 2006 Structured Text Programming 417 These diagrams show how a FOR DO loop executes and how an EXIT statement leaves the loop early Donexnumber yes pt of times no statement 1 statement 2 statement 3 Statement 4 v rest of the routine The FOR DO loop executes a specific number of times Example 1 If you want this Clear bits 0 31 in an array of BOOLs mn Initialize the subscript tag to 0 N Clear array subscript For example when subscript 5 clear array 5 99 Add 1 to subscript p If subscript is to 31 repeat 2 and 3 Otherwise stop Donexnumber yes lag of times no statement 1 statement 2 statement 3 state
198. ction move is Command Tolerance Then slower 2 3 No Decel Contour Velocity Constrained Contour Velocity Unconstrained Vector speed Target position of first move faster 2 Command Tolerance No Decel Target position of first move Vector speed Contour Velocity Constrained Contour Velocity Unconstrained Publication 1756 RM 007H EN P December 2006 Target position of first move Vector speed Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 253 Use the MCLM instruction to start a single or multi dimensional linear coordinated move for the specified axes within a Cartesian coordinate system You can define the new position as either absolute or incremental ATTENTION Motion Coordinated Linear Move MCLM Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Operands Relay Ladder Operand Type Format Description MCLM Coordinate COORDINATE SYSTEM tag Coordinated group of axes Motion Coordinated Linear Move N2 System Coordinate Syst m nd ci gt Motion MOTION_ tag Structure used to access Move Type Control INSTRUCTION instruction status parameters Position 2 Move SINT INT or DINT immediate Select the M ove Type Speed P gt or tag 0 Absolute Speed Units
199. ction completes It resets when a new instruction is started StoppingStatus The Stopping Status bit is cleared when the M CLM instruction initiates M oveStatus Sets when M CLM begins axis motion Clears on PC bit of the last motion instruction or when a motion instruction executes which causes a stop M oveTransitionStatus Sets when No Decel or Command Tolerance Termination Type is satisfied When blending collinear moves the bit is not set because the machine is always on path It clears when a blend completes the motion of a pending instruction starts ora motion instruction executes which causes a stop Indicates not on path Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 275 BitName Meaning M ovePendingStatus Sets when one pending coordinated motion instruction is in the instruction queue Clears when the instruction queue is empty M ovePendingQueueFullStatus Sets when the instruction queue is full It clears when the queue has room for a new coordinated motion instruction Currently Coordinated Motion only supports the queueing of one coordinated motion instruction Therefore the MovePendingStatus bit and the MovePendingQueueFullStatus bit are always the same Example Relay Ladder CLM Motion Coordinated Linear Move Coordinate System Coordinated sys Motion Control MCLM 3 Move T
200. ction with a Move Type Absolute or with a Move Type Incremental When a Circle Type of Center Incremental is chosen the Via Center Radius position defines the center of the arc MCCM Motion Coordinated Circular Move Coordinate System Coordinated_sys Motion Control MCCM 5 Move Type 0 Pasition MCCM Move position 10 AxisO 11 2 Axis1 6 6 Circle Type 3 Via Center Radius VIA 2 Direction 0 Speed 10 Speed Units Units per sec Accel Rate 5 Accel Units Units per sec2 Decel Rate 5 Decel Units Units per sec2 Profile Trapezoidal Termination Type 0 Disabled Merge Speed Current M ove Type is Absolute Position defined in absolute units Circle Type is Center Incremental Center defined as an incremental distance of 14 1 5 1 from start point of 10 4 1 3 Direction is Clockwise MCCM Instruction Move Type Absolute Circle Type Center Incremental Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 293 The MCCM Instruction with Move Type of Incremental and Center Type of Center Incremental is the same as an MCCM instruction with Move Type Incremental and Circle Type of Center Two Dimensional Full Circle Creating a full circle is a special case of a circular arc The following is Example an example of a two dimensional full circle M Full Circle The following examples show th
201. ctions M M CCM M CCD MCS MCSD MCT CTP M CSR 273 Referenced Error Code and Extended Error Instruction Description Number Numeric Parameter Indicator Parameter Out Of Range 13 6 Accel Rate Accel Rate is less than or equal to 0 Parameter Out Of Range 13 8 Decel Rate Decel Rate is less than or equal to 0 Parameter Out Of Range 13 11 Termination Type Termination Type is less than 0 or greater than 3 For the Error Code 54 Maximum Deceleration Value is Zero if the MCLM Changes to Status Bits Extended Error returns a positive number 0 n it is referring to the offending axis in the coordinate system Go to the Coordinate System Properties General Tab and look under the Brackets column of the Axis Grid to determine which axis has a Maximum Deceleration value of 0 Click on the ellipsis button next to the offending axis to access the Axis Properties screen Go to the Dynamics tab and make the appropriate change to the Maximum Deceleration Value If the Extended Error number is 1 this means the Coordinate System has a Maximum Deceleration Value of 0 Go to the Coordinate System Properties Dynamics Tab to correct the Maximum Deceleration value Status Bits provide a means for monitoring the progress of the motion instruction There are three types of Status Bits that provide pertinent information They are Axis Status Bits Coordinate System Status Bits and Coordinate Motion Status Bits When the M
202. ctions M GS M GSD M GSR M GSP Status Bits M GS Changes to Status Bits Bit Name State Definition StoppingStatus TRUE Axis is Stopping Depending on the Programmed Stop M ode for the axis J ogStatus FALSE Axis is no longer J ogging M oveStatus FALSE Axis is no longer M oving GearingStatus FALSE Axis is no longer Gearing HomingStatus FALSE Axis is no longer Homing Example When the input conditions are true the controller stops motion on all axes in group1 After the controller stops all motion the axes are inhibited Relay Ladder MGS Motion Group Stop __ Group Motion Motion Control MGS_1 Stop Mode Programmed MGS Ladder Example Structured Text MGS Motion MSG_1 Programmed Publication 1756 RM 007H EN P December 2006 Motion Group Shutdown MGSD Operands MGS Motion Group Stop Group Motion Motion Control MGS_1 Stop Mode Programmed VYTTY MGSD Group MotionControl Description Motion Group Instructions M GS GSD M GSR MGSP 161 Use the MGSD instruction to force all axes in the designated group into a Shutdown state The Shutdown state of an axis is Servo Off drive output is deactivated and the motion module s OK solid state relay contacts if applicable are opened The group of axes remains in the Shutdown state until either Group Shutdown Reset is executed or each axis is individually reset via the
203. ctual jerk values Profile At 100 of Time the acceleration or deceleration changes the entire time that the axis speeds up or slows down o 2 100 of Time 1 d Ae m Deceleration ttf 1 At 60 of Time the acceleration or deceleration changes 60 of the time that the axis speeds up or slows down The acceleration or deceleration is constant for the other 40 60 of Time Publication 1756 RM 007H EN P December 2006 Motion Concepts 25 Velocity Profile Effects This table summarizes the differences between profiles Profile ACC DEC Motor Priority of Control Type Time Stress Highest to Lowest Trapezoidal Fastest Worst Acc Dec Velocity Position S Curve 2X Slower Best J erk Acc Dec Velocity Position J erk Rate Calculation If the instruction uses or changes an S curve profile the controller calculates acceleration deceleration and jerk when you start the instruction Jerk is calculated as follows e Accel Jerk Max Accel Max Velocity 200 96 of Time 1 e Decel Jerk Max Decel Max Velocity 200 96 of Time 1 Which revision do you have e 15 or earlier of Time is fixed at 100 e 16 or later of Time defaults to 100 but you can change it Publication 1756 RM 007H EN P December 2006 26 Motion Concepts Choose Command Use this table to choose an instruction and see if it is available as a Motion Direct
204. d 5 Follow Contour Velocity Unconstrained See Choose a termination type on page 259 Merge Disabled 0 Coordinatedmotion 1 Allmotion 2 M erge Speed Programmed 0 Current 1 Description The Motion Coordinated Linear Move MCLM instruction performs a linear move using up to three 3 axes statically coupled to the coordinate system as primary axes in a Cartesian coordinate system You specify whether to use absolute or incremental target position and the desired speed The actual speed is a function of both the mode of the move commanded speed or percent of maximum speed and the combination of primary axes that are commanded to move The vector speed of the move is based on the time it takes to complete a vector move using the programmed axes Each axis is commanded to move at a speed that allows all axes to reach the ATTENTION Publication 1756 RM 007H EN P December 2006 endpoint target position at the same time If You Use An S curve Profile Be careful if you change the speed acceleration deceleration or jerk while an axis is accelerating or decelerating along an S curve profile You can cause an axis to overshootits speed or reverse direction For more information see Troubleshoot Axis M otion on page 367 M otion Coordinated Instructions M M CCM M CCD MCS MCSD MCT M CTP M CSR 257 Coordinate System The Coordinate System operand specifies the set of motion axes that define th
205. d Fault Conditions none Error Codes See Error Codes ERR for Motion Instructions Publication 1756 RM 007H EN P December 2006 M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 345 Extended Error Codes Use Extended Error Codes EXERR for more information about an error ERR EXERR _ Corrective Action Notes 61 1 Assign both coordinate systems to the motion group 2 Check that you re using the correct source and target systems You can t use the same coordinate system as source and target 3 Set the transform dimension of the source system to the number of axes in the system up to three 4 Set the transform dimension of the target system to the number of axes in the system to be transformed up to three 5 Use a different source system You can only use one coordinate system as the source for one active transform 6 Use a different target system You can only use one coordinate system as the target for one active transform 7 Look for source or target axes that you re already using in another You can only use an axis in one source system transform Use different axes in the coordinate system and one target system 8 Use a target system that isn t the source for this chain of transforms You can t create a circular chain of transforms that leads back to the original source 9 Check that you ve assigned the correct axes to each coordina
206. d Programmed just jog atthe speed thatthe Merge Enabled axis is already moving at erge Speed Current The instruction ignores the value that you put in the Speed operand Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS M AH MAM MAG MCD MRP MCCP MAPC MATC MCSV 69 Guideline e Be careful if you start another jog while the axis is already jogging Details If you start a new MAJ instruction while one is already in process you can cause e an accelerating axis to overshoot its speed e a decelerating axis to reverse direction revision 15 and earlier This happens if the M AJ instructions use an S curve profile Reason The new MAJ instruction cancels the old M AJ instruction The axis uses the speed acceleration deceleration and jerk of the new instruction For more information see Troubleshoot Axis M otion on page 9 367 e Use an MAS instruction to stop the jog See the examples e Use an MCD instruction to change the speed while jogging See Example 1 on page 3 71 Arithmetic Status Flags not affected Fault Conditions none Error Codes See Error Codes ERR for Motion Instructions on page A 383 Extended Error Codes Use Extended Error Codes EXERR for more information about an error If ERR is And EXERR is Then Cause Corrective Action 13 Varies An operand is outside its The EXERR is the number of the operand that is out of range ran
207. d Cubic Spline Interpolation The resultant calculated cam profiles are fully interpolated This means that if the current master position or time does not correspond exactly with a point in the cam array used to generate the cam profile the slave axis position is determined by linear or cubic interpolation between adjacent points In this way the smoothest possible slave motion is provided The MCCP instruction accomplishes this by calculating coefficients to a polynomial equation that determines slave position as a function of master position or time Calculating the Cam Profile Before calculating a cam profile on a specified axis the MCCP instructions first checks if the cam profile array has been calculated by checking the value of the first cam profile element s Status member If the Status value is either 0 or 2 the MCCP proceeds with the calculation of the cam profile When the cam profile array has been completely calculated the MCCP instruction sets the first cam profile element s Status value to being calculated or 1 and then sets the Publication 1756 RM 007H EN P December 2006 112 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M APC M ATC M CSV Publication 1756 RM 007H EN P December 2006 Status value of all other cam profile elements to being calculated As the calculation proceeds individual cam profile members Status values are set to calculated or 2 When all elements in
208. d bitwise operators For example tag1 5 e Often you nest a numeric expression within a bool expression For example tag145 65 Use the following table to choose operators for your expressions If you want to Then Calculate an arithmetic value Use arithmetic operators and functions on page 403 Compare two values or strings Use relational operators on page 404 Publication 1756 RM 007H EN P December 2006 Structured Text Programming Use arithmetic operators and functions 403 You can combine multiple operators and functions in arithmetic expressions Arithmetic operators calculate new values To Use this operator Optimal data type add DINT REAL subtract negate DINT REAL multiply B DINT REAL exponent x to the power of y X DINT REAL divide DINT REAL modulo divide MOD DINT REAL Arithmetic functions perform math operations Specify a constant a non boolean tag or an expression for the function For Use this function Optimal data type absolute value ABS numeric_expression DINT REAL arc cosine ACOS numeric_expression REAL arc sine ASIN numeric_expression REAL arc tangent ATAN numeric_expression REAL cosine COS numeric_expression REAL radians to degrees DEG numeric expression DINT REAL natural log LN numeric expression REAL log base 10 LOG numeric expression REAL degrees to radians RAD numeric expression DINT REAL sine SIN n
209. d of the second instruction is set to zero The axis continues to speed up and overshoots its initial target speed Eventually it slows to a stop Publication 1756 RM 007H EN P December 2006 372 Troubleshoot Axis M otion Look for Publication 1756 RM 007H EN P December 2006 Jog PB lt Local 4 Data 1 0 gt The MAJ instruction that starts the axis has a higher acceleration than the instruction that stops the axis sLocal 4 Data 1 0 gt My_Axis_OK AJ Motion Axis Jog Axis My_Axis Motion Control Manual_Jog Direction 0 Speed Manual_Jog_Speed 50 0 Speed Units Units per sec Accel Rate Manual_Jog_Accel 20 0 Accel Units Units per sec2 Decel Rate Manual_Jog_Decel 200 Decel Units Units sec2 S curve profile Profile S Curve My Axis OK The MAJ instruction that stops the axis has a lower acceleration than the instruction that starts the axis S curve profile Accel Jerk Manual Jog amp ccel Jerk 100 0 Manual Jog Decel Jerk 100 0 of Time Disabled Programmed Decel Jerk Jerk Units Merge Merge Speed lt lt Less AJ Motion Axis Jog Axis My_Axis Motion Control Jog_2 Direction 0 Speed Jog 2 Speed 00e Speed Units Units per sec Accel Rate Jog_2_ Accel 100 Accel Units Units per sec2 Decel Rate Jog 2 Decel 200 Decel Units Units per sec2 Profile S Curve zd Accel Jerk
210. d text Transition a group of axes from the shutdown MGSR relay ladder operating state to the axis ready operating State structured text Latch the current command and actual position M GSP relay ladder of all axes in a group structured tex Publication 1756 RM 007H EN P December 2006 156 X Motion Group Instructions M GS M GSD M GSR M GSP Motion Group Stop MGS The MGS instruction initiates a stop of all motion in progress on all axes in the specified group by a method configured individually for each axis or as a group via the Stop Mode of the MGS instruction If the MGS Stop Mode is specified as Programmed each axis in the group is stopped according to the configured Programmed Stop Mode axis attribute This is the same stopping mechanism that is employed by the Logix Operating System when there is a Logix controller state change This Programmed Stop Mode attribute currently provides five different methods of stopping an axis Fast Stop Fast Disable Hard Disable Fast Shutdown and Hard Shutdown Alternatively an explicit Stop Mode may be selected by using the MGS instruction If a Stop Mode of Fast Disable is selected all axes in the group stop with Fast Disable behavior When the motion of all the axes in the group has been brought to a stop the Process Complete PC bit is set in the control structure Operands Relay Ladder Operand Type Format Description Group MOTION tag Name of the
211. de MRP instructions have the same effect when the axis is not moving When the axis is moving however absolute mode introduces a position error equal to the motion of the axis during the time it takes to execute the MRP instruction and assign the new position Relative mode does not introduce this error and guarantees an exact correction independent of axis speed or position Relative Mode When Relative is selected or entered as the MRP Type the New Position value is used to offset the current position of the axis No motion occurs the current axis position actual or command is simply redefined to be the current position plus the specified new position In relative mode axis position is redefined in such a way that no position errors are introduced if the axis is moving It is particularly useful for unwinding axis position under program control rather than using the built in rotary axis feature Absolute and relative mode MRP instructions have the same effect when the axis is not moving When the axis is moving however absolute mode introduces a position error equal to the motion of the axis during the time it takes to execute the MRP instruction and assign the new position Relative mode does not introduce this error and guarantees an exact correction independent of axis speed or position Actual Position When Actual is selected or entered as the MRP Position Selection the New Position is directly applied to the actual position
212. decelerating along an S curve profile You can cause an axis to overshoot its speed or reverse direction For more information see Troubleshoot Axis M otion on page 367 Coordinate System The Coordinate System operand specifies the set of motion axes that define the dimensions of a coordinate system For this release the coordinate system supports up to three 3 primary axes M otion Control The following control bits are affected by the MCCD instruction Mnemonic Description EN Enable Bit 31 The Enable Bit is set when the rung transitions from false to true It resets when the rung transitions from true to false DN Done Bit 29 The Done Bit resets when the rung transitions from false to true It sets when target position is calculated successfully ER Error Bit 28 The Error Bit resets when the rung transitions from false to true It sets when target position fails to calculate successfully M otion Type The motion type operand determines which motion profile to change Currently Coordinated Move is the only available option Coordinated M ove When selected the Coordinated Move option changes the motion of the currently active move in the coordinate system Change Speed The Change Speed operand determines whether or not to change the speed of the coordinated motion profile Publication 1756 RM 007H EN P December 2006 322 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD
213. decreased for the individual instruction that it is tied to i e jog move gearing ERR INT The error value contains the error code associated with a motion function See Error Codes ERR for M otion Instructions on page 383 STATUS SINT The status of any message associated with the motion function Message Status Description 0 0 The message was successful 0 1 The module is processing another message 0 2 The module is waiting for a response to a previous message 0x3 The response to a message failed 0 4 The module is not ready for messaging Publication 1756 RM 007H EN P December 2006 Motion related Data Types Structures 393 Mnemonic Data Description STATE SINT The execution status value keeps track of the execution state of a function M any motion functions have several steps and this value tracks these steps The execution status is always set to 0 when the controller sets the EN bit for a motion instruction Other execution states depend on the motion instruction SEGMENT DINT A segment is the distance from one point up to but not including the next point A SEGMENT gives the relative position by segment number as the Cam is executing EXERR SINT Extended error code use it for more information about an error OUTPUT CAM Structure The OUTPUT CAM data type is an array that defines the specifics for each Output Cam element The OUTPUT CAM contains the following
214. dius type circle with a radius of a magnitude less than 0 001 units Motion Coordinated Move W Coordinate System Coordinated_sys L Target Position Entry Coordinated sys MCCM Move position 0 Center 2 x Motion Central MCCM D LS Move Type 0 Position T t 0 gt b M t E x 1 CM Move 0 m pie Axis TergetPostion ActuePostion Center Position Axis 0 00039 20 0 00099 100 0 00039 Cicle Type 1 Axis 0 00093 00 Via Certer Radius Certer 2 Direction 0 Speed 20 Speed Units Urits per sec Accel Rate 50 Accel Units of Manemum Decel Rate 50 Decel Unis of Maxmum Prohle Trepezoidal Set Targets Actuals Teimination Type 1 Merge Disabled DK Cancel Apply H Merge Speed Progiammed em 2708 lt lt Less Ladder Program and Target Entry Screen that Generate Error 49 MCCM Changes to Status Bits Status Bits provide a means for monitoring the progress of the motion instruction There are three types of Status Bits that provide pertinent information They are Axis Status Bits Coordinate System Status Bits and Coordinate Motion Status Bits When the MCCM instruction initiates the status bits undergo the following changes Axis Status Bits Bit Name Meaning CoordinatedM otionStatus Sets when the MCCM instruction executes and is cleared when the instruction completes Publication 1756 RM 007H EN P December 2006 3
215. e ChangeDecel DecelRate DecelUnits ChangeDecelJerk DecelJerk JerkUnits Publication 1756 RM 007H EN P December 2006 Structured Text The structured text operands are the same as the relay ladder operands This operand Stop Type Has these options which you can enter as text all Jog move gear home tune test timecam positioncam masteroffsetmove or enter as a number Change Decel no yes Decel Units Change Decel J erk unitspersec2 ofmaximum no yes J erk Units unitspersec3 96 ofmaximum oftime N e Oje Oje O oco N c Ae CO Motion M ove Instructions M AS M AH MAJ MAG MRP MATC MCSV 53 MOTION INSTRUCTION Data Type To See If Check If This Bitis Data Type Notes Set A false to true transition caused the instruction EN BOOL The EN bit stays set until the process is complete to execute and the rung goes false The stop was successfully initiated DN BOOL An error happened ER BOOL The axis is stopping IP BOOL Any of these actions end the M AS instruction and clear the IP bit e The axis is stopped e Another MAS instruction supersedes this MAS instruction e Shutdown command e Fault Action The axis stopped PC BOOL The PC bit stays set until the rung makes a false to true transition Description Use the Motion Axis Stop MAS instructi
216. e 0 8 Output Cams executed in the Logix controller e 9 31 Reserved for future use Motion MOTION_ tag Structure used to access instruction Control INSTRUCTION status parameters Disarm Type UINT32 immediate Selects one or all Output Cams to be disarmed for a specified axis Select either 0 All Disarms all Output Cams connected to the specified axis 1 Specific Disarms the Output Cam that is connected to the specified axis and defined by the Execution Target Structured Text Sed Qu Nen ANH M DRM ans M The operands are the same as those for the relay ladder MDOC instruction MotionControl DisarmType Publication 1756 RM 007H EN P December 2006 214 Motion Event Instructions MAW M DW MAR M DR M AOC M DOC Description Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes Publication 1756 RM 007H EN P December 2006 For the operands that require you to select from available options enter your selection as This operand Has these options which you enter as text or enter as a number Disarm Type all 0 specific 1 M OTION INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the rung goes false DN Done Bit 29 It is set when the Output Cam s have been successfully disarmed Error Bit 28 It is set to indicate that the ins
217. e D Accel Units of Maximum Decel Rate 100 Decel Units of Maximum Profile 5 Curve Termination Type 3 Merge Disabled Merge Speed Programmed MCLM Ladder Instruction w ith M ove Type of Absolute The resultant plot of the move s path is shown in the following illustration Trend Motion EO o fin Sep te Kv Poem 100532AM 101532AM Moon Monday 05 2003 1015 32 AM Plot of MCLM with One Rotary Axis and Move Type of Absolute The endpoint was a negative value therefore the axis travelled in a negative direction moving from 4 to 2 It did not travel through the unwind For this move the endpoint is required to fit within the M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 263 absolute position defined by the rotary unwind of the axis Therefore an unwind value of 6 or 6 would not be valid M with Two Rotary Axes and M ove Type of Incremental The second MCLM example with rotary axes has two rotary axes and a Move Type of Incremental The plot of the path has the following assumptions e 2 axis Coordinate System named Coordinated sys e Axis0 is Rotary with an unwind of 1 revs e Axis is Rotary with an unwind of 2 revs e Start position is 0 0 e Increment to end position is 5 5 CLM Motion Coordinated Linear Move Coordinate System Coordinated_sys Motion Control MCLM 3 M ove Type is Move Type 1 Incremental
218. e IP2 Windowed Registration Disabled Co Min Position Max Position Input Number Registration Armed Waiting for Sensor My_FReaistration IP Registration Rearmed My Reaistration EN Registration Armed Waiting for Sensor My Registration PC Registration Rearmed Ladder Logic for Continuous Registration Detection To rearm the MAR instruction the rung must change from false to true The rate at which this logic functions depends on the following e program scan time e motion task course update rate In large 1 0 connections force values can slow down the rate at IM PORTANT a i which the controller processes repetitive motion registration To successfully execute a MAR instruction the targeted axis must be configured as either a Servo or Feedback Only axis Otherwise the instruction errs The MAR instruction execution may take multiple scans to IM PORTANT ai execute because it requires transmission of a message to the motion module The Done DN bit is not set immediately but only after this message has been successfully transmitted Publication 1756 RM 007H EN P December 2006 Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes M otion Event Instructions M AW M DW M AR M DR MAOC M DOC 181 This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e n structured text condition
219. e MCT instruction CS2 is the joint coordinate system containing J1 J2 and J3 axes as the target of the MCT instruction CT Motion Coordinated Transform Source System CS2 B Target System CS1 MCT1 OrientDisabled TranslationDisabled Motion Control Orientation Translation Input Data CS2 DATA Data Flow When a Move is Executed with an MCT Instruction Forward Transform SOURCE J oint Positions 1 J 2 3 Link Lengths L1 L2 Base Offsets X1b X2b X3b End Effector Offsets X1e X2e X3e Zero Angle Orientations Z1 Z2 Z3 Orientations Array 3 Translations Array 3 Machine Real Coordinate System Coordinate System dialog Coordinate System dialog Coordinate System dialog Coordinate System dialog Instruction Faceplate Instruction Faceplate Active CS1 Data Computed Output Instruction gt MCT CT Motion Coordinated Transform Source System CS1 P Target System 52 m MCT1 OrientDisabled TranslationDisabled Motion Control Orientation Translation Input Data Cartesian Positions X1 X2 X3 Destination M achine Virtual Coordinate System Data Flow When a Move is Executed with an MCT Instruction Inverse Transform CS1 DATA SOURCE Cartesian Positions X1 X2 X3 Link Lengths L1 L2 Base Offsets X1b X2b X3b End Effector Offsets X1e X2e X3e Zero Angle Orientations Z1 Z2 Z3 Orientations Array 3 T
220. e State Definition ServoActionStatus FALSE Axis is in Axis Ready state with the servo loop inactive DriveEnableStatus FALSE Axis Drive Enable output is inactive Shutdow nStatus FALSE Axis is NOT in Shutdown state When the input conditions are true the controller transitions all axes in group1 from the shutdown operating state to the axis ready operating state Relay Ladder MGSR Motion Group Shutdown Reset Group Motion Motion Control MGSR 3 TY MGSR Ladder Example Structured Text MGSR Motion MGSR 3 Publication 1756 RM 007H EN P December 2006 166 Motion Group Instructions M GS M GSD M GSR M GSP Motion Group Strobe Position M GSP Operands MGS Motion Group Strobe Position Group Motion Control Y MGSP Group MotionControl Description Publication 1756 RM 007H EN P December 2006 Use the MGSP instruction to latch the current Command and Actual Position of all axes in the specified group at a single point in time The latched positions are available in the StrobeActualPosition and StrobeCommandPosition parameters in the Motion Axis Object for each axis configured in the group Relay Ladder Operand Type Format Description Group MOTION_ tag Name of the group of axes to perform GROUP operation on Motion MOTION_ tag Structure used to access instruction control INSTRUCTION status parameters Structured Text The ope
221. e When the two strings are sorted as in a telephone directory the order of the strings determines which one is greater ASCII Characters Hex Codes lab 31 61 62 og Tb 31862 e r 41 5 41 42 AB lt B t il B 42 61 a gt B ab 61 62 e Strings are equal if their characters match e Characters are case sensitive Upper case A 41 is not equal to lower case a 61 Publication 1756 RM 007H EN P December 2006 406 Structured Text Programming Use this format Use logical operators Logical operators let you check if multiple conditions are true or false The result of a logical operation is a BOOL value If the comparison is true false Use these logical operators The result is 1 0 For Use this operator Data Type logical AND amp AND BOOL logical OR OR BOOL logical exclusive OR XOR BOOL logical complement NOT BOOL For example Example For this situation You d write BOOLtag If photoeye is a BOOL tag and your specification IF photoeye THEN says If photoeye_lis then NOT BoOLtag If photoeye is a BOOL tag and your specification IF NOT photoeye THEN says If photoeye is off then expressioni amp expression2 If photoeye is a BOOL tag temp is a DINT tag and your specification says If photoeye is on and temp is less than 100 then IF p
222. e and Time Scaling functionality can be used to scale axis motion based on a standard cam profile without having to create a new cam table and calculate a new cam profile ATTENTION Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Operands Relay Ladder Operand Type Format Description MATC Axis FEEDBACK Jtag Thenameoftheaxstowhichthe Motion Axis Time Cam No cam profile is applied Ellipsis Axis EH AXIS VIRTUAL launches Axis Properties dialog Motion Control M Direction AXIS_GENERIC R gt Cam Profile Bl Distance Scaling IP2 AXIS SERVO 7 Time Scaling o AXIS_SERVO_DRIVE eae ET M otion MOTION _ tag Structure used to access block status Enarari S chadi Control INSTRUCTION parameters lt lt Less Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions MAS MAH MAJ MAG MRP MCCP MAPC MATC MCSV 139 Operand Type Format Description Direction UINT32 immediate ortag Relative direction of the slave axis to the master axis e Same the axis position values in the cam profile are added to the command position of the axis Opposite the axis position values in the cam profile are subtracted from the command position of the axis creating axis motion in the other direction from that implied in th
223. e canceling is completely Transform Is Canceling canceled 72 Check the target positions calculated joint angle is beyond Max J oint Angle Exceeded 360 73 Check that each M CT instruction in this chain is producing valid Coord System Chaining Error positions This M CT instruction is part of a chain of M CT instructions There is a problem with one of the instructions in the chain 74 Change the orientation to angles that are within 360 Invalid Orientation Angle Publication 1756 RM 007H EN P December 2006 388 Error Codes ERR for M otion Instructions Error Corrective Action or Cause Notes 75 Use this instruction only with a 1756 L6x controller Instruction Not Supported You can use an MCT or MCTP instruction only witha 1756 L6x controller 76 1 Open the properties for the axis Zero M ax Decel J erk 2 On the Dynamics tab enter a value for the maximum You can t start motion that uses an S curve profile if the deceleration jerk maximum deceleration jerk for the axis is zero many axes in your coordinate system Transform Direction Not Supported e 2 Usea non mirror transform direction e 3 Usea non inverse transform direction Publication 1756 RM 007H EN P December 2006 1 You re trying to use the mirror directions with a 3 axis coordinate system and a non zero base offset X2b or effector offset X26 2 Mirror directions are not supported for 2 axis Coordinate
224. e dimensions of a Cartesian coordinate system For this release the coordinate system supports up to three 3 primary axes Only those axes configured as primary axes are included in the coordinate velocity calculations M otion Control The following control bits are affected by the MCIM instruction Mnemonic Description EN Enable Bit 31 The Enable Bit is set when the rung transitions from false to true and resets when the rung goes from true to false DN Done Bit 29 The Done Bit sets when the coordinated instruction has been verified and queued successfully Because it is set at the time itis queued it may appear as set when a runtime error is encountered during the verify operation after it comes out of the queue It resets when the rung transitions from false to true ER Error Bit 28 The Error Bit is reset when the rung transitions from false to true It is set when the coordinated move has not successfully initiated It is also set with the Done Bit when a queued instruction encounters a runtime error JP In Process Bit 26 The In Process Bit is set when the coordinated move is successfully initiated It is reset when there is no succeeding move and the coordinated move reaches the new position or when there is a succeeding move and the coordinated move reaches the specifications of the termination type or when the coordinated move is superseded by another M CLM or M CCM instruction with a m
225. e motion module does not generate any axis motion but simply monitors axis encoder feedback The axis can then be moved by hand or by some other independent drive actuator to generate motion When the motion module detects that the axis has moved a distance greater than or equal to the configured Motor Encoder Test Increment the test is complete The motion module then reports the direction of travel as one of the following MRHD output parameters Axis Parameter Data Type Units Definition Test Status Integer Status Report of the Hookup Diagnostic Test Process Test Direction Boolean Direction of axis travel during hookup Forward test as seen by the motion module If due to improper hookup or some other problem with the system the axis feedback fails to detect the axis reaching the configured Motor Encoder Test Increment after moving the axis at least that distance then abort the test using the MAS instruction and check the encoder wiring Motion Configuration Instructions M AAT MRAT MAHD MRHD 237 Marker Hookup Test If the Marker Test is selected the motion module does not generate any axis motion but simply monitors axis encoder feedback The axis can then be moved by hand or by some other independent drive actuator to generate motion When the motion module detects a marker Channel Z pulse the test is then complete The motion module then reports success via the Test Status Axis Parameter D
226. e of the coordinated system into the instruction you must have a valid tag name entered in the position field with sufficient elements to handle the number of axes and you must have selected a valid Move Type To access the MCLM Instruction Target Position Entry Dialog box press the ellipsis after the Position line on the instruction faceplate Valid Coordinate System CLM Motion Coordinated Linear Move Coordinate System Coordinated sys Motion Control MCLM B 1 Valid M ove Type Move Type Press ellipsis to access M CLM Position move position Target Position AxisO 2 5 Entry b Axis 25 Speed 5 MCLM Ladder Valid Values for Accessing Target Position Entry Box Motion Coordinated Instructions M M CCM M CCD MCS MCSD CTP M CSR 27 Pressing the ellipsis button at the Position line of the ladder instruction faceplate calls the following Target Position Entry box for editing the position values Target Position Entry Coordinated sys move position 12 Position Tag Axis Name Target Increment Actual Position Set Targets Actuals OK Cancel Apply Help MCLM Instruction Target Position Entry Dialog Box Position Tab The dialog title indicates the Coordinate System and Tag Names for the instruction Feature Description Axis Name These fields list the names of each axis contained in the Coordinate System You cannot alt
227. e original cam table Or relative to the current or previous camming direction e Reverse the current or previous direction of the position cam is changed either from Same to Opposite or vice versa W hen executed for the first time with Reverse selected the control defaults the direction to Opposite Unchanged this allows other cam parameters to be changed without altering the current or previous camming direction W hen executed for the first time with Unchanged selected the control defaults the direction to Same Cam Profile CAM PROFILE array Tag name of the calculated cam profile array Only the zero array element 0 is allowed for the Cam Profile array Ellipsis launches Cam Profile Editor Distance Scaling REAL immediate ortag Scales the total distance covered by the axis through the cam profile Time Scaling REAL immediate ortag Scales the time interval covered by the cam profile Publication 1756 RM 007H EN P December 2006 140 X Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV Operand Type Format Description Execution UINT32 immediate Determines how the cam motion Mode behaves when the time moves beyond the end point of the cam profile The options are 0 When the time cam execution time exceeds the time range in the cam profile the M ATC instruction completes the axis
228. e results of a previously run Motion Run Hookup Diagnostic g MRHD instruction to generate a new set of encoder and servo polarities based on the Observed Direction of motion during the test As part of the application process the instruction updates the motion module with these new polarity settings After execution of the MAHD instruction and assuming that a stable set of gains has been established the corresponding axis should be ready for servo activation Operands Relay Ladder Operand Type Format Description Axis AXIS SERVO tag Name of the axis to perform operation on MAHD Motion Apply Hookup Diagnostics No Asis EDN AXIS_SERVO_DRIVE iiber R Motion M OTION tag Structure used to access instruction Obeaived Dimclion control INSTRUCTION status parameters Diagnostic UDINT immediate Selects the specific test for the test motion module to run 0 motor encoder hookup test 1 encoder hookup test 2 encoder marker test Observed BOOLEAN immediate Sets the direction of the test direction motion Select either 0 z forward 1 reverse Structured Text MAHD ARI Sr Mor Lon concen el The operands are the same as those for the relay ladder pragnostictesty MAHD instruction ObservedDirection Publication 1756 RM 007H EN P December 2006 230 Motion Configuration Instructions M AAT M RAT M AHD M RHD For the operands that require you to select from available options ent
229. e rung becomes true the controller can execute the instruction again Scan Scan Execution Scan Scan rung rung complete rung rung true false false true Message Type Instructions Rung Conditions Process Type Instructions Process type motion instructions initiate motion processes that can take an indefinite amount of time to complete Examples of process type instructions include the e Motion Arm Watch Position MAW instruction e Motion Axis Move instruction Process type instructions work as follows 1 When the rung that contains the motion instruction becomes true the controller e Sets the enable EN bit e Clears the done DN bit e Clears the error ER bit e Clears the process complete PC bit e Sets the in process IP bit 2 The controller initiates the motion process Publication 1756 RM 007H EN P December 2006 MotionConcepts 21 If Then the controller The controller does not detect an error when the instruction executes e Sets the DN bit e Sets the in process IP bit The controller detects an error when the instruction executes The controller detects another instance of the motion instruction e Sets the ER bit e Stores an error code in the control structure Clears the IP bit for that instance The motion process reaches the point where the instruction can be executed again Sets the DN bit For some process type instructions like
230. e transforms associated with the specified coordinate system All transform related motion stops on all associated target coordinate systems However source coordinate axes will continue to move as instructed Example Suppose four coordinate systems are linked via three transforms And suppose with the first coordinate system CS1 is the source and is processing commanded motion Col ogee CS3 aT cs4 If you execute an M CS instruction on CS2 and use a stop type of coordinated transform then e Transforms T1 and T2 are canceled e Transform T3 stays active e The axes in CS1 stay in motion e The axes in Coordinate Systems CS2 and CS3 stop via the deceleration rate selected in the M CS instruction or the maximum coordinate deceleration rate e The axes in CS4 follow the respective CS3 axes In an M otion Axis Stop M AS instruction a stop type of all also cancels transforms Publication 1756 RM 007H EN P December 2006 330 Motion Coordinated Instructions M CLM M CCM M CCD MCS MCSD M CTP M CSR MOTION INSTRUCTION Data Type To see if Check if this bitis Data type Notes The rung is true EN BOOL Sometimes the EN bit stays on even if the rung goes false This happens if the rung goes false before the instruction is done or errored Rung EN DN or ER The stop was successfully initiated DN BOOL An error happened ER BOO
231. e use of the MCCM with a Circle Type of Center and a Move Type of Absolute first example and Incremental second example to create a full circle The basic assumptions are e The 2 axes Axis0 and Axis1 are both members of the coordinate system Coordinated sys e Axis0 and 1 are orthogonal to each other e Coordinated sys is initially at 10 4 1 3 units Move Coordinated sys along an arc to 10 4 1 3 units with a center at 3 7 6 4 units from the start point at the vector speed of 10 0 units per second with the acceleration and deceleration values of 5 0 units per second The following graph shows the circle generated by the preceding information 1 Clockwise __ Full 104 13 33 4 Contr EN Counte J Clockwise Full m E JEUNE eeraa EES 7 Plot of Path of M CCM Full Circle 25 This path can be achieved by using an MCCM instruction in the Clockwise direction with a Move Type Absolute or with a Move Publication 1756 RM 007H EN P December 2006 294 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Publication 1756 RM 007H EN P December 2006 Type Incremental When a Circle Type of Center is chosen the Via Center Radius position defines the center of the arc MCCM Motion Coordinated Circular Move Coordinate System Coordinated sys Motion Control MCCM Move Type D Position MCCM Move pos
232. e value slope and derivative ofthe Motion Calculate Slave Values M CSV relay ladder slope for a cam profile and master value structured text Publication 1756 RM 007H EN P December 2006 50 Motion Move Instructions MAS M AH MAJ MAM MAG MCD M RP M CCP M APC M ATC M CSV Motion Axis Stop MAS or to stop the axis completely Use the MAS instruction to stop a specific motion process on an axis ATTENTION Operands Relay Ladder motion and injure people AS Motion Axis Stop EN Axis Motion Control DN Stop Type Change Decel Decel Rate IP Decel Units Change Decel Jerk f PC Decel Jerk Jerk Units lt lt Less Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment Operand Type Format Description Axis AXIS_VIRTUAL Tag Name of the axis AXIS_GENERIC AXIS_SERVO AXIS SERVO DRIVE M otion Control MOTION INSTRUCTION Tag Control tag for the instruction Stop Type DINT Immediate stop Choose this Stop Type All motion in process for this axis 0 Publication 1756 RM 007H EN P December 2006 Only a certain type of motion but leave other motion processes running Choose the type of motion that you want to stop e J og 1 e Move 2 Gear 3 e Home 4 e Tune 5 Test e Position Cam 7 e Time Cam 8 e Master Offset M ove 9 The axis could still be movi
233. ecification A Positive radius always creates a shorter lt 180 arc and a negative radius creates a longer gt 180 arc see path graph If it is 180 the sign of the radius is irrelevant A Circle Type of Radius is valid in two dimensional coordinate systems only M Using Center Incremental Circle Type The following examples show the use of the MCCM with a Circle Type of Center Incremental and a Move Type of Absolute first example and Incremental second example to arrive at the same result The basic assumptions are e The 2 axes Axis0 and 1 are both members of the coordinate system Coordinated sys e Axis0 and 1 are orthogonal to each other Coordinated sys is initially at 10 4 1 3 units Move Coordinated sys along an arc to 11 2 6 6 units with a center at an increment of 14 1 5 1 units from the start point at the vector speed of 10 0 units per second with the acceleration and deceleration Publication 1756 RM 007H EN P December 2006 292 Motion Coordinated Instructions M CLM M M CCD M CS MCSD MCT M CTP M CSR values of 5 0 units per second The following graph shows the path generated by the preceding information Dam A 112 End 104 13 Sart 33 4 20 20 2 4 t2 Pi Plot of Path with Circle Type of Center Incremental This path can be achieved by using an MCCM instruction in the Clockwise dire
234. econd or percent of the maximum speed of the coordinate system Likewise the vector acceleration and deceleration is equal to the specified acceleration deceleration in the units per second or percent of maximum acceleration of the coordinate system This path can be achieved by using an MCCM instruction in the Clockwise direction with a Move Type Absolute or with a Move Type Incremental When a Circle Type of Via is chosen the Via Center Radius position defines a point through which the arc must pass otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 287 MCCM Instruction Move Type Absolute Circle Type Via MCCM Motion Coordinated Circular Move Coordinate System Coordinated_sys Motion Control MCCM 2 Move Type 0 Position MCCM Move position 4 Axis 11 2 Axis Circle Type 0 Via Center Radius VIA O Direction n Speed 10 Speed Units Units per sec Accel Rate 5 Accel Units Units per sec2 Decel Rate Decel Units Units per sec2 Profile Trapezoidal Termination Type 0 Disabled Merge Speed Current M ove Type is Absolute Position defined in absolute units Circle Type is Via Via position defined in absolute units as 3 7 8 6 Direction is Clockwise MCCM Ladder Instruction with Operand Values of Via and Absolute Publication 1756 RM 007H EN P December 2006 288 Coordinated Instructions M CLM M CCM M CCD MCS MCSD M
235. ed as a Servo axis and be in the Axis Ready state with servo action off If these conditions are not met the instruction errs The M DO instruction execution may take multiple scans to IMPORTANT An execute because it requires transmission of a message to the motion module and time for the drive output to stabilize The Done DN bit is not set until after the axis is in the Drive Control state Publication 1756 RM 007H EN P December 2006 44 M otion State Instructions M SO M SF MASD MASR M DO M DF M AFR Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes Status Bits Example Publication 1756 RM 007H EN P December 2006 This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The following Extended Error codes help to pinpoint the problem when the MDO instruction receives a Servo Message Failure 12 error message Extended Error Associated Error Code Meaning Code decimal decimal Object Mode conflict SERVO MESSAGE FAILURE Axis is in shutdown 12 12 M DO Changes to Status B
236. ed no 0 yes 1 ChangeAccel no 0 yes 1 ChangeDecel no 0 yes 1 Publication 1756 RM 007H EN P December 2006 100 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M APC M ATC M CSV This operand Has these options which you enter as text or enter as a number SpeedUnits unitspersec 0 ofmaximum 1 AccelUnits unitspersec2 0 ofmaximum 1 DecelUnits unitspersec2 0 ofmaximum 1 MOTION_ INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Blt 29 It is set when axis change dynamics has been successfully initiated The instruction execution completes in a single scan and the DN bit is set immediately ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis Description The MCD instruction changes the speed of trapezoidal profile moves ATTENTION A Publication 1756 RM 007H EN P December 2006 on the fly and the speed acceleration and deceleration of trapezoidal profile jogs on the fly Choose the desired physical axis and type of motion and enter values or tag variables for the Speed Accel and Decel Speed acceleration and deceleration values can be entered as percentages of the current maximum configured value or d
237. ee page conditions occur select what to do based on a numerical value CASE OF structured text 413 do something a specific number of times before FOR DO structured text 416 doing anything else keep doing something as long as certain WHILE DO structured text 419 conditions are true keep doing something until a condition is true REPEAT UNTIL structured text 422 Some key words are reserved for future use These constructs are not available GOTO e REPEAT RSLogix 5000 software will not let you use them Publication 1756 RM 007H EN P December 2006 410 Structured Text Programming IF THEN Use IF THEN to do something if or when specific conditions occur Operands Structured Text IF bool expression THEN _ _ bc Format Enter END_IF bool_ BOOL tag BOOL tag or expression that evaluates to expression expression BOOL value BOOL expression Description The syntax is IF bool expressioni THEN statement statements to execute when bool_expressionl is true ELSIF bool expression2 THEN optional statement lt q statements to execute when bool expression is true ELSE optional statement lt q Statements to execute when both expressions are false END IF To use EISIF or ELSE follow these guidelines 1 To select from several possible groups of stat
238. efine Position M RP 103 Absolute M ode 104 Actual Position 105 Command Position 106 Description 104 Extended Error Codes 107 MOTION INSTRUCTION structure 104 Operands 103 Relay Ladder 103 Structured Text 104 Relative M ode 105 M otion Slave Calculate Values M CSV 151 Arithmetic Status Flags 152 Changes to Status Bits 152 Fault Conditions 152 Operands 151 M otion Control 152 Relay Ladder 151 Structured Text 151 Structured Text 151 Operands Relay Ladder 50 Motion Redefine Position 26 103 Motion Run Axis Tuning 27 223 Motion Run Hookup Diagnostic 27 Motion Run Hookup Diagnostics 234 Motion Servo Off 26 Motion Servo On 26 31 motion state MDO 42 Motion State Instructions 29 Introduction 29 M otion Axis Fault Reset M AFR 47 Description 47 MOTION INSTRUCTION structure 4 Index 433 Operands 47 Relay Ladder 47 Structured Text 47 M otion Axis Shutdown M ASD 37 Description 37 MOTION INSTRUCTION structure 37 Operands 37 Relay Ladder 37 Structured Text 37 M otion Axis Shutdown Reset M ASR 40 Description 40 MOTION INSTRUCTION structure 40 Operands 40 Relay Ladder 40 Structured Text 40 M otion Direct Drive Off M DF 45 Description 45 MOTION INSTRUCTION structure 45 Operands 45 Relay Ladder 45 Structured Text 45 M otion Direct Drive On M DO 42 Changes to Status Bits 44 Description 43 MOTION INSTRUCTION structure 42 Operands 42 Relay Ladder 42 Structured Text 42 M otion Servo Off M SF 34 Description
239. eful to accomplish phase advance retard control The incremental move distance can be used to eliminate any phase error between the master and the slave or to create an exact non zero phase relationship Incremental MAM instruction may also be used in conjunction with electronic gearing to compensate for material slip Normally a gear ratio of 1 is used with phase adjustment A 1 1 ratio ensures that the computed phase error does not change before performing the move to correct it Electronic gearing is not normally used with absolute moves since the ultimate endpoint is not predictable To successfully execute a Motion Axis Gear instruction the targeted axis must be configured as a Servo Axis Type and the axis must be in the Servo On state If any of these conditions are not met than the instruction errs The M AG instruction execution completes in a single scan thus IMPORTANT i the Done DN bit and the In Process IP bit are set and the Process Complete PC bit is cleared immediately The In Process IP bit remains set until the initiated Gear process is Superseded by another MAG instruction or terminated by a Motion Axis Stop command operation or Servo Fault Action This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appe
240. el Units 306 Circle Type 282 Center 282 Center Incremental 282 Radius 282 Via 282 Coordinate System 279 Decel Rate 306 Decel Units 306 Direction 306 M erge 307 All Motion 307 Coordinated M otion 307 M erge Disabled 307 M erge Speed 307 M otion Control 280 M ove Type 281 Absolute 281 Incremental 281 Position 281 Profile 306 Relay Ladder 276 Speed 306 Speed Units 306 Structured Text 277 Termination Type 249 Actual Tolerance 249 Command Tolerance 249 Follow Contour Velocity Constrainted 249 Follow Contour Velocity Un constrainted 249 No Decel 249 No Settle 249 Via Center Radius 304 Target Position Entry Dialog 308 M otion Coordinated Linear M ove 253 M otion Coordinated Linear M ove M CLM Arithmetic Status Flags 272 Changes to Status Bits 273 Axis Status Bits 274 Coordinate Motion Status Bits 274 Coordinate System Status Bits 274 Description 256 Extended Error Codes 272 Fault Conditions 272 Operands Accel Rate 265 Accel Units 265 Coordinate System 257 Decel Rate 265 Decel Units 265 Merge 267 All Motion 268 Coordinated M otion 267 M erge Disabled 267 Merge Speed 268 M otion Control 257 M ove Type 258 Absolute 258 Incremental 258 Position 264 Profile 265 S Curve 266 Trapezoidal 266 Velocity Profile Effects 265 Relay Ladder 253 Speed 264 Speed Units 265 Structured Text 255 Termination Type 243 249 Actual Tolerance 249 Command Tolerance 249 Follow Contour Velocity Constrained 249 Follow Contou
241. elay ladder toggle the rung condition in from cleared to set each time the instruction should execute e n structured text condition the instruction so that it only executes on a transition See Appendix C Arithmetic Status Flags not affected Fault Conditions none Error Codes See Error Codes ERR for Motion Instructions MDF Changes to Status Bits Axis Status Bits Bit Name State Meaning DriveEnableStatus FALSE Axis is in Axis Ready state with the Drive Enable output now active Example When the input conditions are true the controller deactivates the servo drive for axis and sets the servo output voltage of axis to the output offset value Relay Ladder MDF Motion Direct Drive Off N2 Axis AxisO W Motion Control MDF_1 Fo MDF Ladder Example Structured Text MDF Axis0 MDF 1 Publication 1756 RM 007H EN P December 2006 Motion Axis Fault Reset M AFR Operands MAFR Motion Axis Fault Reset Axis Motion Control T MAFR Axis MotionControl Description Motion State Instructions M SO M SF MASD MASR MDO M DF 47 Use the MAFR instruction to clear all motion faults for an axis This is the only method for clearing axis motion faults IM PORTANT The MAFR instruction removes the fault status but does not perform any other recovery such as enabling servo action In addition when the controller removes the fault status the conditi
242. ember 2006 Description ATTENTION A Immediate Which units do you want to use for the Decel Rate e Units per sec 0 e of Maximum 1 Structured Text The structured text operands are the same as the ladder diagram operands Enter the stop type and decel units without spaces Example Enter a stop type of Coordinated Move as CoordinatedMove The Motion Coordinated Stop MCS instruction initiates a controlled stop of coordinated motion Any pending motion profiles are cancelled If You Use An S curve Profile Be careful if you change the speed acceleration deceleration or jerk while an axis is accelerating or decelerating along an S curve profile You can cause an axis to overshootits speed or reverse direction For more information see Troubleshoot Axis M otion Stop type All This stop type M otion Coordinated Instructions MCLM MCCM MCCD MCS MCSD M CTP M CSR 329 How Stop Types Affect Transforms The following table describes how the stop types affect coordinate systems that are a part of a transform Description e Stops the axes in the specified coordinate system It also stops the axes of any coordinate system that shares axes with this coordinate system e Cancels any transforms that the coordinate system is a part of Coordinated M ove This stop type stops only the coordinated moves Any transforms stay active Coordinated Transform This stop type cancels th
243. ements add one or more ELSIF statements e Each ELSIF represents an alternative path e Specify as many ELSIF paths as you need e The controller executes the first true IF or ELSIF and skips the rest of the ELSIFs and the ELSE 2 To do something when all of the IF or ELSIF conditions are false add an ELSE statement Publication 1756 RM 007H EN P December 2006 Structured Text Programming 411 This table summarizes combinations of THEN ELSIF and ELSE If you want to And Then use this construct do something if or when conditions nothing if conditions are false IF THEN are true do something else if conditions are false IF THEN ESLE choose from alternative statements nothing if conditions are false IF THEN ELSIF basedon Gssign default statements if all THEN ELSIF ELSE conditions are false Example 1 IF THEN If you want this Enter this structured text IF rejects gt 3 then IF rejects gt 3 THEN conveyor off 0 conveyor 0 alarm on 1 alarm 1 END_IF Example 2 IF THEN ELSE If you want this Enter this structured text If conveyor direction contact forward 1 then IF conveyor direction THEN light off light 0 Otherwise light on ELSE light 1 END_IF The tells the controller to clear light whenever the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic rese
244. ending can thus be used to seamlessly blend two time cam profiles together without stopping motion The Pending execution feature is particularly useful in applications when the axis must be accelerated up to speed using a specific velocity profile When this acceleration profile is done it must be smoothly blended into a cam profile which is typically executed continuously To stop the axis the operating profile can be smoothly Motion ove Instructions MAS MAH MAJ M AG MCD M CCP M APC M ATC M CSV 147 blended into a deceleration profile such that the axis stops at a known location as shown below Accel Profile Operating Profile Axis Position Decel Profile N Pending Cam Execution By executing the time cam profile as a Pending cam profile while the current profile is still executing the appropriate cam profile parameters are set up ahead of time This makes the transition from the current profile to the pending profile seamless synchronization between the master time and slave axes position is maintained To ensure smooth motion across the transition however the profiles must be designed such that no position velocity or acceleration discontinuities exist between the end of the current profile and the start of the new one This is done using the RSLogix 5000 Cam Profile Editor Once a pending time cam instruction has been executed the new cam
245. ent motion and injure people Relay Ladder Operand Type Format Description Slave axis AXIS VIRTUAL tag Name of the axis to perform operation on AXIS_GENERIC AXIS_SERVO AXIS SERVO DRIVE Masteraxis AXIS FEEDBACK tag The axis that the slave axis follows AXIS CONSUMED AXIS VIRTUAL AXIS GENERIC AXIS SERVO AXIS SERVO DRIVE Motion M OTION _ tag Structure used to access instruction control INSTRUCTION status parameters Publication 1756 RM 007H EN P December 2006 88 Motion M ove Instructions M AS M AH MAJ MAG MCD M RP M CCP M APC M ATC M CSV Operand Type Format Description Direction UINT32 immediate or tag The relative direction that the Slave axis tracks the M aster Axis Select one of following 0 slave axis moves in the same direction as the master axis 1 slave axis moves in the opposite direction of its current direction 2 slave axis reverses from current or previous 3 slave axis to continue its current or previous direction Ratio Slave counts REAL UINT32 immediate or tag immediate or tag Signed Real value establishing the gear ratio in Slave User Units per M aster User Unit Integer value representing slave counts used in specifying a Fractional gear ratio Master counts Master reference UINT32 BOOLEAN immediate or tag immediate Integer value representing master counts used in
246. ental Absolute When the Move Type is Absolute the axes move via a linear path to the position defined by the position array at the Speed Accel Rate and Decel Rate as specified by the operands When the axis is configured for rotary operation an Absolute Move type behaves in the same manner as for a linear axis When the axis position exceeds the Unwind Parameter it is unwound In this way axis position is never greater than the Unwind value nor less than zero The sign of the specified position is interpreted by the interpolator and can be either positive or negative Negative position values instruct the interpolator to move the rotary axis in a negative direction to obtain the desired absolute position while positive values indicate that positive motion is desired to reach the target position When the position value is greater than the unwind value an error is generated The axis never moves through more than one unwind cycle before stopping at an absolute position Incremental When the Move Type is Incremental the coordinate system moves the distance as defined by the position array at the specified Speed using the Accel and Decel rates determined by the respective operands via a linear path The specified distance is interpreted by the interpolator and can be positive or negative Negative position values instruct the interpolator to move the axis in a negative direction while positive values indicate positive motion i
247. ental position Circle Type The Circle Type operand specifies how the array labeled via center radius is interpreted The options are Via Circle Radius Center Incremental Via Via indicates that the via center radius array members specify a via point between the start and end points Center Center indicates that the via center radius array members contain the circle center Radius Radius indicates that the first via center radius array member contains the radius Other members are ignored Center Incremental Center Incremental indicates that the via center radius array members define a position that always incrementally defines the center of the circle regardless of Move Type operand Sign of the incremental value is measured from the start point to the center Two Dimensional Arc Examples The following examples show the use of Absolute and Incremental Publication 1756 RM 007H EN P December 2006 Move Types with the various Circle Types M Using Center Circle Type The following examples show the use of the MCCM with a Circle Type of Center and a Move Type of Absolute first example and Incremental second example to arrive at the same result The basic assumptions are e The 2 axes Axis0 and 1 are both members of the coordinate system Coordinated sys e Axis0 and Axis1 are orthogonal to each other Coordinated sys is initially at 10 4 1 3 units Move Coordinated sys along an arc
248. equal the end point e Direction must be either Clockwise Full or Counter Clockwise Full e Sign of Radius is irrelevant MCCM with Rotary Axes The following examples show the use of the MCCM instruction with Examples Rotary axes and Move Types of Absolute and Incremental M with Three Axes One Rotary Axis and M ove Type of Absolute The first example uses a coordinate system of three axes with one Rotary axis and a Move type of Absolute The plot of the path is based on the following assumptions e 3 axis Coordinate System named coord syst2 Axis2 the Z axis is ignored in plots to reduce the confusion and to better illustrate the actions of the rotary axis Axis e Axis0 is Rotary with an unwind of 5 revs e Start position is 0 0 0 Publication 1756 RM 007H EN P December 2006 296 Motion Coordinated Instructions M CLM M CCM M CCD MCS MCSD M CTP M CSR Publication 1756 RM 007H EN P December 2006 e End position is 5 5 5 e Via position is 5 3 5 3 5 MCCM Motion Coordinated Circular Move Coordinate System Motion Control MCCM Move Type 0 Position MCCM Move position 14 5 0 Axis Axis2 Circle Type Via Center R adius VIA 1 Direction 0 Speed 1 Units per sec Speed Units Accel Rate Accel Units of Maximum Decel Rate 100 Decel Units of Maximum Profile Trapezoidal Termination Type Merge Disabled Merge Speed Programmed coord syst2 M
249. equence is not immediate 42 The M ASD or M GSD instruction has timed out because Shutdown Status Timeout not receive the shutdown status bit Usually a programmatic problem caused when either M ASD or M GSD is followed by a reset instruction which is initiated before the shutdown bit has been received by the shutdown instruction 43 You have tried to activate more motion instructions than the Coordinate System Queue Full instruction queue can hold 44 You have drawn a line with three 3 points and centerpoint Circular Collinearity Error viapoint or plane centerpoint can be determined 45 You have specified one 1 point radius or drawn a line Circular Start End Error centerpoint viapoint and no centerpoint radius or plane centerpoint viapoint can be determined 46 The programmed centerpoint is not equidistant from start and Circular R1 R2 Mismatch Error end point 4 Contact Rockw ell Automation Support Circular Infinite Solution Error 48 Contact Rockw ell Automation Support Circular No Solutions Error 49 R 0 01 R is basically too small to be used in computations Circular Small Error 50 The coordinate system tag is not associated with a motion Coordinate System Not in Group group 51 You have set your Termination Type to Actual Position with a Invalid Actual Tolerance value of 0 This value is not supported 52 At least one axis is currently undergoing coordinated motion Coordination M otion In Process Error a
250. er Stop when you reach the carriage return Initialize Element_number to 0 N Count the number of elements in SINT_array array that contains the ASCII characters and store the result in SINT_array_size DINT tag If the character at SINT array element number 13 decimal value of the carriage return then stop gt Set String_tag element_number the character at SINT array element number Add 1 to element_number This lets the controller check the next character in SINT array c Set the Length member of String tag element number This records the number of characters in String tag so far If element_number SINT_array_size then stop You at the end of the array and it does not contain a carriage return oo Goto 3 Structured Text Programming 421 Enter this structured text element number 0 SIZE SINT array 0 SINT array size While SINT array element number 13 do String tag DATA element number SINT array element number element number element number 1 String tag LEN element number If element number SINT array size then exit end if end while Publication 1756 RM 007H EN P December 2006 422 Structured Text Programming REPEAT UNTIL Use the REPEAT UNTIL loop to keep doing something until conditions are true Operands Structured Text REPEAT lt statement gt
251. er It is also possible to manually abort a test process using a MAS instruction which results in a test Publication 1756 RM 007H EN P December 2006 238 Motion Configuration Instructions M AAT M RAT M AHD M RHD fault reported by the Test Status parameter Possible values for Test Status are shown in the table below Error Message Code Definition Test Success 0 Test process has been successful Test In Process 1 Test is in progress Test Aborted 2 Test Process was aborted by user Test Time out 3 Test Process has exceeded timed out 2 Seconds Test Servo Fault 4 Test Process Failed due to Servo Fault Test Increment Fault 5 Test Process Failed due to insufficient test increment distance to make a reliable measurement To successfully execute a MRHD instruction running the Motor Encoder Test the targeted axis must be configured as a Servo Axis Type and the axis must be in the Axis Ready state For other tests this instruction executes properly on either a Servo or Feedback Only axis type If any of these conditions are not met than the instruction ers When the M RHD instruction is initially executed the In process IP bit is set and the Process Complete PC bit is cleared The M RHD instruction execution can take multiple scans to execute because it requires transmission of multiple messages to the motion module The Done DN bit is not set immediately but after these messages are success
252. er the axis names in this dialog Target Position Target This field contains the endpoint or increment of the Increment coordinated move as specified in the instruction faceplate It is numeric Actual Position These are the current actual positions of the axes in the coordinate system These positions are updated dynamically when on line and Coordinate System Auto Tag Update is enabled Set Targets Actuals This button automatically copies the actual position Button values to the Target Position Column The selected Move type governs the appearance and the availability of the Set Targets Actuals button When the Move Type is Absolute the target column is entitled Target Position and when the Move Type is Incremental the target column is Publication 1756 RM 007H EN P December 2006 272 Motion Coordinated Instructions M M CCM M CCD M CS MCSD MCT M CTP M CSR Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes entitled Target Increment and the Set Targets Actuals button is disabled Grayed out MCLM is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Extended Error codes help to further define the error mess
253. er your selection as This operand Has these options which you enter as text or enter as a number DiagnosticTest motor encoder 0 encoder 1 2 ObservedDirection forward 0 reverse 1 MOTION_INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 is set after the hookup test apply process has been successfully executed Error Bit 28 is set to indicate that the instruction detected an error such as if you specified an unconfigured axis Description The Motion Apply Hookup Diagnostics MAHD instruction is used to Publication 1756 RM 007H EN P December 2006 execute a series of computations resulting in values for the Encoder Polarity and Servo Polarity configuration bit parameters of the specified axis As part of work performed by MAHD these resultant configuration bit parameters are applied to the motion module so that the axis is ready for full servo operation This instruction is designed to follow execution of the MRHD instruction which generates axis input configuration values for the MAHD instruction See the MRHD instruction description for more information MAHD requires specification of the Diagnostic Test to apply and the Observed Direction of motion during the previous MRHD test process Enter or
254. erge type of Coordinated M ove or when terminated by an M CS instruction AC Active Bit 23 W hen you have a coordinated move instruction queued the Active Bit lets you know which instruction is controlling the motion It sets when the coordinated move becomes active It is reset when the Process Complete bit is set or when the instruction is stopped Process Complete Bit 27 The Process Complete Bit is reset when the rung transitions from false to true It is set when there is no succeeding move and the coordinated move reaches the new position or when there is a succeeding move and the coordinated move reaches the specified Termination Type ACCEL Acceleration The Acceleration Bit sets while the coordinated move is in the Bit Bit 01 acceleration phase It resets while the coordinated move is in the constant velocity or deceleration phase or when coordinated motion concludes DECEL Deceleration The Deceleration bit sets while the coordinated move is in the Bit Bit 02 deceleration phase It resets while the coordinated move is in the constant velocity or acceleration phase or when coordinated motion concludes Publication 1756 RM 007H EN P December 2006 258 Motion Coordinated Instructions M CLM M M CCD M CS MCSD MCT M CTP M CSR M ove Type The Move Type operand specifies the method used to indicate the coordinated move path The Move Type can be either Absolute or Increm
255. ervo drive and activates the axis servo loop configured by axis Relay Ladder MSO Motion Servo On Axis Axis E vvY Motion Control MSO 1 MSO Ladder Example Structured Text MSO Axis0 MSO 1 Publication 1756 RM 007H EN P December 2006 34 M otion State Instructions M SO M SF MASD MASR M DO M DF M AFR Motion Servo Off MSF Operands MSF Motion Servo Off Axis v9 Motion Control MSF Axis MotionControl Description Publication 1756 RM 007H EN P December 2006 Use the MSF instruction to deactivate the drive output for the specified axis and to deactivate the axis servo loop IMPORTANT you execute an M SF instruction while the axis is moving the axis coasts to an uncontrolled stop Relay Ladder Operand Type Format Description Axis AXIS GENERIC tag Name of the axis to perform action upon AXIS SERVO AXIS SERVO DRIVE Motion MOTION _ tag Structure used to access control INSTRUCTION instruction status parameters Structured Text The operands are the same as those for the relay ladder MSF instruction MOTION_INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when the axis servo action been successfully disabled and the drive enable and servo active
256. es Master SINT INT DINT or REAL immediate The exact value along the master Value or tag axis of the cam profile that is used in calculating the slave values Slave Value REAL tag The value along the slave axis of the cam profile with the master at the specified master value Slope Value REAL tag The first derivative of the value along the slave axis of the cam profile with the master at the specified master value Slope REAL tag The second derivative of the value Derivative along the slave axis of the cam profile with the master at the specified master value Structured Text The operands are the same as those for the relay ladder MCSV instruction The Motion Calculate Slave Values MCSV instruction determines the slave value the slope value and the derivative of the slope fora given cam profile and master value As an extension to the position and time camming functionality it supplies the values essential for the recovery from faults during camming operations Publication 1756 RM 007H EN P December 2006 152 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes MCSV Changes to Status Bits Publication 1756 RM 007H EN P December 2006 M otion Control The following control bits are affected by the MCSV instruction Mnemonic Description EN Enable Bit 31 The Enable Bit
257. ey are listed in the faceplate from top to bottom with the first operand being counted as zero Therefore for the MDR instruction an extended error code of 2 would refer to the Input Number operand s value You would then have to check your value with the accepted range of values for the instruction Status Bits Example M otion Event Instructions MAW MDW MAR MDR MAOC M DOC 185 M DR Changes to Status Bits Bit Name State Meaning RegEventArmedStatus FALSE The axis is not looking for a registration event RegEventStatus FALSE The previous registration event is cleared When the input conditions are true the controller disarms registration event checking for axis 0 Relay Ladder MDR Motion Disarm Registration Axis Axis2 E Motion Control MDR 1 Input Number 2 vvv MDR Ladder Example Structured Text MRD Axis2 MDR 1 2 Publication 1756 RM 007H EN P December 2006 186 Motion Event Instructions MAW M DW MAR M DR M AOC M DOC Motion Arm Output Cam MAOC Publication 1756 RM 007H EN P December 2006 The Motion Planner Output Cam functionality provides setting and resetting of output bits based on an axis position Output Bit Axis Position Motion Planner Functionality Internally Output Cam objects handle the Motion Planner Output Cam functionality Each Output Cam object is responsible for one output which consists of 32 output bits Each single output bit c
258. f Range 13 6 Direction Direction is either less than 0 or greater than 3 Parameter Out Of Range 13 7 Speed Speed is less than 0 Parameter Out Of Range 13 9 Accel Rate Accel Rate is less than or equal to 0 Parameter Out Of Range 13 11 Decel Rate Decel Rate is less than or equal to 0 Parameter Out Of Range 13 14 Termination Type Termination Type is less than 0 or greater than 3 For the Error Code 54 Maximum Deceleration Value is Zero if the Extended Error returns a positive number 0 n it is referring to the offending axis in the coordinate system Go to the Coordinate System Properties General Tab and look under the Brackets column of the Publication 1756 RM 007H EN P December 2006 312 Circular Error Examples MCCM Moton Coordinated Creu Move Coordinate System Coordinated_sys Motion Control MCCM 0 Move Type 0 Pasilion MCCM_Move_position 0 Axis 20 0 Axis 0 0 Circle Type 0 Via Certer Radius viajo Direction 0 Speed 20 Speed Units Units per sec Accel Rate 50 Accel Units of Maximum Decel Rate 50 of Maxmum Trapezexdal 1 Dece Unis Profile Termination Type Disabled Programmed Merge Merge Speed lt lt Less Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions CLM CCD M CS MCSD MCT M CTP M CSR Axis Grid to determine which axis has a Maximum Deceleration value of 0 Click on
259. f the Velocity Servo Loop to the DAC Position Error Rea pos units Maximum Servo Loop Position Error Tolerance allowed without Fault The above output parameters generated by the MAAT instruction are immediately applied to the specified axis so that subsequent motion can be performed For more information about tuning configuration parameters refer to the Motion Axis Object Specification To successfully execute a MAAT instruction the targeted axis must be configured as a Servo axis and be in the Axis Ready state with servo action off If these conditions are not met the instruction errs The M AAT instruction execution may take multiple scans to IMPORTANT E execute because it requires transmission of a message to the motion module The Done DN bit not set immediately but only after this message has been successfully transmitted This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The following Extended Error codes help to pinpoint the problem Publication 1756 RM 007H EN P December 2006 222 Motion Configuration I
260. false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when the axis is successfully reset from Shutdown state ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis Description The Motion Axis Shutdown Reset MASR instruction clears all axis Publication 1756 RM 007H EN P December 2006 faults and takes the specified axis out of the Shutdown state If the motion module supports an OK contact and no other module axis is in the Shutdown state the MASR instruction results in closure of the module s OK solid state relay contact Regardless of the OK contact condition execution of the MASR places the axis into the Axis Ready state Just as the MASD instruction forces the targeted axis into the Shutdown state the MASR instruction takes the axis out of the Shutdown state into the Axis Ready state One of the unique characteristics of the Shutdown state is that any associated OK solid state relay contact for the motion module is Open If as a result of an Arithmetic Status Flags Fault Conditions Error Codes Status Bits Example Motion State Instructions M SO MSF MASD MASR MDO MDF MAFR 41 MASR instruction there are no axes associated with a given motion module in the Shutdown state the OK relay contacts close as a result of the MASR This feature can be used to close
261. fully transmitted The In process IP bit is cleared and the Process Complete PC bit is set at the same time that the Done DN bit is set This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C Arithmetic Status Flags not affected Fault Conditions none Error Codes See Error Codes ERR for Motion Instructions Extended Error Codes Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The following Extended Error codes help to pinpoint the problem Publication 1756 RM 007H EN P December 2006 Motion Configuration Instructions MRAT MAHD MRHD 239 when the MRHD instruction receives a Servo Message Failure 12 error message Associated Error Code Extended Error Meaning decimal Code decimal SERVO MESSAGE FAILURE Process terminated on Test execution followed by 12 request 1 an instruction to shutdow n disable drive or a motion stop instruction or a Processor change requests a cancel of the Test SERVO MESSAGE FAILURE Object M ode conflict Axis is in shutdown 12 12 SERVO MESSAGE FAILURE Device in wrong state Incorrect Tune Process 12 16 order SERCOS Status Bits MRHD Changes to Status Bits
262. function in the same fashion A number between 0 and n is displayed for the Extended Error Code This number is the index to the Coordinate System indicating the axis that is in the error condition For the MCCD instruction Error Code 13 Parameter Out of Range Extended Errors return a number that indicates the offending parameter as listed on the faceplate in numerical order from top to bottom beginning with zero For example 2 indicates the parameter value for Move Type is in error Referenced Error Code and Extended Error Instruction Description Number Numeric Parameter Indicator Parameter Out Of Range 13 2 M ove Type M ove Type is either less than 0 or greater than 1 Parameter Out Of Range 13 4 Speed Speed is less than 0 Parameter Out Of Range 13 7 Accel Rate Accel Rate is less than or equal to 0 Parameter Out Of Range 13 10 Decel Rate Decel Rate is less than or equal to 0 For the Error Code 54 Maximum Deceleration Value is Zero if the Extended Error returns a positive number 0 n it is referring to the offending axis in the coordinate system Go to the Coordinate System Publication 1756 RM 007H EN P December 2006 326 MCCD Changes to Status Bits Example Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions CLM M M CCD M CS MCSD MCT M CTP M CSR Properties General Tab and look under the Brackets column of the Axis Grid to determine whic
263. g These diagrams show how a WHILE DO loop executes and how an EXIT statement leaves the loop early lad BOOL expression fae true Statement 1 statement 2 statement 3 Statement 4 v rest of the routine While the boo1 expression istrue the controller executes only the statements within the WHILE DO loop Example 1 If you wantthis The W HILE DO loop evaluates its conditions first If the conditions are true the controller then executes the statements within the loop This differs from the REPEAT UNTIL loop because the REPEAT UNTIL loop executes the statements the construct and then determines if the conditions are true before executing the statements again The statements in a REPEAT UNTIL loop are always executed at least once The statements in a WHILE DO loop might never be executed Publication 1756 RM 007H EN P December 2006 false BOOL expression true statement 1 statement 2 statement 3 Statement 4 S es Exit a 0079 V m To stop the loop before the conditions are true use an EXIT statement v rest of the routine Enter this structured text pos 0 While pos 100 targetvalue do amp structarray pos value pos pos 2 String tag DATA pos SINT array pos end while 2 If you want this M ove ASCII characters from a SINT array into a string tag In SINT array each element holds one charact
264. g the configured Home Sequence which may be Immediate Switch Marker or Switch Marker The later three Home Sequences result in the axis being jogged in the configured Home Direction and then after the position is re defined based on detection of the home event the axis is automatically moved to the configured Home Position W Hen unidirectional active homing is performed on a rotary IMPORTANT Y axis and the Home Offset value is less than the deceleration distance when the home event is detected the control moves the axis to the unwind position of zero this ensures that the resulting move to the Home Position is unidirectional Passive Homing When the axis Homing Mode is configured as Passive the MAH instruction re defines the actual position of a physical axis on the next occurrence of the encoder marker Passive homing is most commonly used to calibrate Feedback Only axes to their markers but can also be used on Servo axes Passive homing is identical to active homing to an encoder marker except that the motion controller does not command any axis motion After initiating passive homing the axis must be moved past the encoder marker for the homing sequence to complete propery For closed loop Servo axes this may be accomplished with a MAM or MAJ instruction For physical Feedback Only axes motion cannot be commanded directly by the motion controller and must be accomplished via other means Absolute Homing If the motion
265. g the stop and then off when the PC bit turns on M oveStatus gt Off M oveTransitionStatus Off M ovePendingStatus Off TransformS ourceStatus Coordinated M ove Unchanged e All Off e Coordinated Transform TransformTargetStatus Coordinated M ove Unchanged e All Off e Coordinated Transform Example 1 Ladder Diagram MCS Motion Coordinated Stop i N gt Coordinate System Coordinated sys Motion Control MCS 4 R gt Stop Type Coordinated Move IP2 Change Decel Yes to Decel Rate 25 Decel Units Units per sec2 lt Less Structured Text MCS Coordinated_sys MCS 4 CoordinatedMove Yes 25 Unitspersec Publication 1756 RM 007H EN P December 2006 332 Motion Coordinated Instructions M CLM M M CCD M CS MCSD MCT M CTP M CSR Example 2 How Stop Types Affect Transforms and Axis otion Suppose you have this situation Where e Coordinate system 1 CS1 contains the X Y and Z axes e Coordinate system 2 CS2 contains the Y Z and S axes e Coordinate system 3 CS3 contains the A B and C axes e Transform T1 links source coordinate CS2 to target CS3 e CS2 XYS axes are mapped to CS3 ABC axes e MAM instructions executed on the Y Z and S axes e MCIM instruction executed on CS2 e MCT instruction executed with CS2 as the source and CS3 as the target e No coordinate instructions were executed on CS2 or CS3 This table shows the results of execu
266. ge The first operand is 0 For example if EXERR 3 then check the Speed EXERR Operand 0 Axis 1 M otion Control 2 Direction 3 Speed 54 1 The coordinate system hasa Go to the Properties for the coordinate system and set a Maximum Deceleration of 0 Maximum Deceleration 0 or more An axis in the coordinate 1 Open the Properties for the coordinate system system has a M aximum Deceleration of 0 2 Use the EXERR value to see which axis has the M aximum Deceleration of 0 3 Set the M aximum Deceleration for the axis Publication 1756 RM 007H EN P December 2006 70 Motion Move Instructions MAS M AH MAJ MAM MAG MCD M RP M CCP M M CSV Changes to Status Bits Motion Status Bits Meaning The axis is J ogging The axis is J ogging The axis is no longer M oving If Merge is Then the instruction changes these bits BitName State Disabled J ogStatus TRUE Enabled J ogStatus TRUE M oveStatus FALSE GearingStatus FALSE Publication 1756 RM 007H EN P December 2006 The axis is no longer Gearing Motion M ove Instructions M AS M AH MAJ MAM MAG MCD MRP M CCP M ATC M CSV 7 Example 1 J og with Speed Change Relay Ladder When Servo Axis Vars AutoRun turns on Run Servo Axis at Auto Speed If Auto Speed changes then change the speed of the jog to the new value of Auto Speed When Servo Axis Vars I Stop turns on stop Servo Axis
267. ght arm If it starts as a left arm it moves as a left arm If it starts as a right arm it moves as a right arm You can always flip it from a left arm to a right arm or vice versa To do that move the joints directly Toggle the rung from false to true to execute the instruction This is a transitional instruction In a ladder diagram toggle the rung condition in from false to true each time you want to execute the instruction When you execute the instruction the transform starts and the IP bit turns on Motion Coordinated Transts Source System Carte Target System i Ari Motion Control Joint MI Run Transform C Orientation Arm Orientation Translation Arm Translation You can let the rung go false once you execute the instruction The transform stays active In structured text condition the instruction so that it only executes on a transition Start the transform before you start any motion In structured text instructions execute each time they are scanned Condition the instruction so that it only executes on a transition Use either of these methods e Qualifier of an SFC action e Structured text construct You can t start a transform if any motion process is controlling an axis of the source or target coordinate systems Example Start the transform before you start gearing or camming Publication 1756 RM 007H EN P December 2006 344 Motion Coordinated Instructions CLM M CCM M CCD MCS
268. gistration 27 176 Motion Arm Watch 170 Motion Arm Watch Position 27 Motion Axis Fault Reset 26 Motion Axis Gear 26 87 Motion Axis Home 26 60 Motion Axis J og 26 65 338 Motion Axis Move 26 75 Motion Axis Position Cam 26 115 Motion Axis Shutdown 26 Motion Axis Shutdown Reset 26 Motion Axis Stop 26 50 Motion Axis Time Cam 26 138 Motion Calculate Cam Profile 26 109 Motion Calculate Slave Values 26 Motion Calculate Slave Values MCSV 151 Motion Change Dynamics 26 98 motion change dynamics 98 Motion Configuration Instructions 217 Introduction 217 M otion Apply Axis Tuning M AAT 218 Description 218 MOTION INSTRUCTION structure 218 Operands 218 Relay Ladder 218 Structured Text 218 Status Bits 222 M otion Apply Hookup Diagnostics M AHD 229 Description 230 Encoder Hookup Test 231 MOTION INSTRUCTION structure 230 M otor Encoder Hookup Test 231 Operands 229 Relay Ladder 229 Structured Text 229 Status Bits 232 M otion Run Axis Tuning M RAT 223 Changes to Status Bits 228 Description 223 Extended Error Codes 227 MOTION INSTRUCTION structure 223 Operands 223 Relay Ladder 223 Structured Text 223 Index 429 Tune Status Parameter 226 M otion Run Hookup Diagnostics M RHD 234 Changes to Status Bits 239 Description 235 Encoder Hookup Test 236 Extended Error Codes 238 M arker Hookup Test 237 MOTION INSTRUCTION structure 235 M otor Encoder Hookup Test 236 Operands 234 Relay Ladder 234 Structured Text 234 Test Stat
269. gle scan IMPORTANT i This instructions should therefore be placed in a separate task to avoid impacting user program scan time Motion M ove Instructions M AS MAJ M AG MCD M CCP M M CSV 113 This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e n structured text condition the instruction so that it only executes on a transition See Appendix C Tag Editor a 1 I Ladder MCCP Cam Motion Routine ub Planner Cam Tag Creation Profile Editor Data Modification Error Codes Extended Error Codes MCCP Changes to Status Bits Cam Operation Diagram See Error Codes ERR for Motion Instructions on page A 383 Extended Error Codes provide additional instruction specific information for the Error Codes that are not specific enough to help pinpoint the problem When the MCCP instruction receives an Illegal Cam Length 26 error message to let it know that the length input parameter does not correspond to what the instruction expects the corresponding Extended Error code provides the number of cams in the Cam Tag provided to the instruction When the MCCP instruction receives an Illegal Cam Profile Length 27 error message to let it know that the length input parameter does not correspond to what the instruction expects the corresponding E
270. goes to the next step Move To Rest Step MAM Motion Axis Move HEN Axis J2 Motion Control J2 Ml Move To Reset HCDN gt Move Type 0 XER Position 90 HUP3 Speed J2 Vars C Manual Jog Speed 100 KPC Speed Units Units per sec More gt J2 Ml Move To Reset PC UL Multiply Source A 2 Source B Move_To_Rest_Step 0 Move_To_Rest_Step 0 Dest 2 Start transform routine 3 Pick and place routine When Arm Commands Start Transform turns on the transform starts The IP bit signals that the transform is running Arm Commands Start Transform JE er Motion Coordinated Transform Source System Arm X1 X2 X3 Target System Arm 41 J2 J3 Motion Control Arm MI Transform Orientation Arm Orientation Translation Arm Translation Arm MI Transform IP Arm Status Transform Active BR HA This routine is one in a sequence of M CLM instructions that move the Cartesian system The joints of the robot follow the moves When Step 1 turns on the coordinate system moves to 0 6 2 When the move is in process IP the sequence queues the next move Step 1 MCLM Motion Coordinated Linear Move Coordinate System Arm X1 X2 X3 Motion Control Arm MI Move 0 DN2 Move Type 0 5 Position Arm_Positions 0 0 1 0 0 IP2 x2 6 0 20 gt gt Poe Arm Ml Move O P amp rm X1 X2 X3 MovePendingGueueFu
271. h axis has a Maximum Deceleration value of 0 Click on the ellipsis button next to the offending axis to access the Axis Properties screen Go to the Dynamics tab and make the appropriate change to the Maximum Deceleration Value If the Extended Error number is 1 this means the Coordinate System has a Maximum Deceleration Value of 0 Go to the Coordinate System Properties Dynamics Tab to correct the Maximum Deceleration value No effect Relay Ladder CCD Motion Coordinated Change Dynamics Coordinate System Coordinated sys Motion Control MMCM O Motion Type Coordinated Move Change Speed Yes Speed 25 Speed Units of Maximum Change Accel Yes Accel Rate 20 of Maximum Yes Accel Units Change Decel Decel Rate 10 of Maximum Active Motion lt lt Less MCCD Ladder Instruction Decel Units Scope Structured Text MCCD Coordinated sys MCCM 0 CoordinatedMove Yes 25 Sofmaximum Yes 20 amp 0fmaximum Yes 10 0fmaximum 0 Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 327 Motion Coordinated Stop Use the MCS instruction to stop the axes of a coordinate system or MCS cancel a transform ATTENTION Use a motion control tag only once Do not reuse it in another instruction Otherwise you can cause unexpected equipment motion and injure people Operands Ladder Diagram MCS Motion Coordinated Stop Coordinate System N A
272. he shutdown operating state to the axis ready operating state As a result of this command all faults associated with the axes in the group are cleared and any OK relay contacts of motion modules associated with the specified group are closed Relay Ladder Operand Type Format Description Group MOTION tag Name of the group of axes to perform GROUP operation on Motion MOTION_ tag Structure used to access instruction control INSTRUCTION status parameters Structured Text The operands are the same as those for the relay ladder MGSR instruction INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 The enable bit indicates when the instruction is enabled It remains set until servo messaging completes and the rung condition in goes false DN Done Bit 29 The done bit indicates when the instruction resets the group of axes from the shutdown operating state ER Error Bit 28 The error bit indicates when the instruction detects an error such as if messaging to the servo module failed The Motion Group Shutdown Reset MGSR instruction takes all the axes in the specified group out of the Shutdown state by clearing all axis faults and closing any associated OK solid state relay contacts for the motion modules within the group This action places all axes within the motion group in the Axis Ready state Just as MGSD instruction forces all the axes in the targeted gro
273. he boundary condition for the or tag initial slope of the profile It is valid only for a cubic first segment and is used to specify a slope through the first point End Slope REAL immediate This is the boundary condition for the or tag ending slope of the profile It is valid only for a cubic last segment and is used to specify a slope through the last point Cam Profile CAM PROFILE Tag name of the calculated cam profile array used as input to MAPC and MATC instructions Only the zero array element 0 is allowed for the Cam Profile array Ellipsis launches Cam Profile Editor Structured Text MCCP MotionControl Cam The operands are the same as those for the relay ladder cpm eS MCCP instruction For the array operands you do not have to include amProfile Publication 1756 RM 007H EN P December 2006 110 Motion Move Instructions M AS MAH MAJ MAM MAG MCD M CCP M ATC M CSV the array index If you do not include the index the instruction starts with the first element in the array 0 MOTION_ INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 The enable bit is set when the rung transitions from false to true and stays set until the done bit is set and the rung goes false DN Done Bit 29 The done bit is set when the calculate cam instruction has been successfully executed and the Cam Profile array calculated ER Error Bit 28 The error bit indicate
274. he jog The axis continues to slow down before it speeds up You use a Motion Axis Stop MAS instruction to stop jog While the axis is slowing down you use a Motion Axis Jog MAJ instruction to start the axis again The axis doesn t respond right away It continues to slow down Eventually it speeds back up to the target speed Jog_PB sLocal 4 Data 1 0 My Axis OK AJ Motion Axis Jog EN Axis My Axis Motion Control Manual Jog Direction 0 ER Speed Manual_Jog_Speed 50 0 IP5 Speed Units Accel Rate Units per sec Manual Jog Accel 200 Units per sec2 Manual Jog Decel 200 Units per sec2 S Curve Manual amp ccel Jerk 100 0 Manual Jog Decel Jerk 100 0 of Time Disabled Programmed Accel Units Decel Rate Decel Units Profile Accel Jerk The instruction that starts the axis uses an S curve profile Decel Jerk Jerk Units Merge Merge Speed lt lt Less Jog_PB Local 4 l Data 1 07 AS i Motion Axis Stop EN Axis My_Axis Motion Control Stop Jog ER2 Stop Type Jog IP5 M gt gt The instruction that stops the axis keeps a the S curve profile Suppose you use an M AS instruction with the Stop Type set to og In that case the axis keeps the profile of the MAJ instruction that started the axis Publication 1756 RM 007H EN P December 2006 376 Troublesho
275. he list of available axes the axis has not been configured for operation Use the Tag Editor to create and configure a new axis Arithmetic Status Flags Fault Conditions Error Codes Status Bits Example M otion Event Instructions MAW MDW MAR MDR MAOC M DOC 175 To successfully execute a MDW instruction the targeted axis must be configured as either a Servo or Feedback Only axis Otherwise the instruction errs The M DW instruction execution may take multiple scans to IMPORTANT ae execute because it requires transmission of a message to the motion module The Done DN bit is not set immediately but only after this message has been successfully transmitted This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions M DW Changes to Status Bits BitName State Meaning WatchEventArmedStatus FALSE The axis is not looking for a watch position event WatchEventStatus FALSE The previous watch event is cleared When the input conditions are true the controller disarms watch position event checking for axis1 Relay Ladder MDW Motion Disarm Watch Axis Axisl Motion Control MDW Ladder Example Structured Text MD
276. he move 0 Speed DaxisO TotalDist 5 15 811388 3162 31 62 Axis1 Speed Daxis1 TotalDist 15 15 811388 9487 94 87 For the example Publication 1756 RM 007H EN P December 2006 260 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD MCT M CTP M CSR Publication 1756 RM 007H EN P December 2006 Axis0 Speed 3162 10 0 3 162 units sec Axis Speed 9487 10 0 9 487 units sec The acceleration and deceleration for each axis is the same percentage as speed The following ladder instructions show the ladder logic necessary to achieve this path using Move Type Absolute and Move Type Incremental respectively CLM Motion Coordinated Linear Move Coordinate System Coordinated sys Motion Control MCLM U Move Type 0 Move Type is Absolute R gt Position move position 0 Axis 10 0 IP gt position defined in Axis 10 0 Speed 10 gt absolute units Speed Units Units per sec co Accel Rate 5 Accel Units Units per sec2 Decel Rate Decel Units Units per sec2 Profile Trapezoidal Termination Type 0 Disabled Merge Speed Current MCLM Ladder Instruction with M ove Type of Absolute Instruction With Rotary Axes Examples Motion Coordinated Instructions M CLM M CCM M CCD MCS MCSD M CTP M CSR CLM Motion Coordinated Linear Move Coordinate System Coordina
277. hod addresses cases where immediate cams would finish before the pending cam could be reliably loaded After a Pending time cam has been configured the Time Cam Pending Status bit of the Motion Status word for the specified axis is set to 1 true When the pending new profile is initiated and becomes the current profile Time Cam Pending Status bit is immediately cleared as shown below New Profile Current Profile Axis Position ON Pending Status OFF Pending New Time Cam Configured Time Cam Pending Stopping a Cam Like other motion generators jog move gear etc active cams must be stopped by the various stop instructions MAS or MGS Cam motion must also stop when the ControlLogix processor changes OS modes The MAS instruction in particular must be able to specifically stop the camming process This behavior should be identical to the MAS functionality that specifically stops a gearing process M erging from a Cam Like other motion generators jog move gear etc active cams must also be compliant with motion merge functionality Moves and Jogs in particular must be able to merge from active camming This behavior Motion M ove Instructions M AS MAH MAJ MAG MCD MRP MAPC MATC MCSV 149 Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes should be identical to the merge functionality applied to a geari
278. hotoeye amp THEN temp 100 1 ORexpression2 If photoeye is a BOOL tag temp is a DINT tag and your specification says If photoeye is on or temp is less than 100 then IF photoeye OR THEN temp 100 1 XORexpression2 If photoeye1 and photoeye2 are BOOL tags and your specification says If e photoeyel is on while photoeye2 is off or e photoeyel is off while photoeye2 is on then IF photoeyel XOR photoeye2 THEN BOOLtag expression2 expressionl amp Publication 1756 RM 007H EN P December 2006 If photoeyel and photoeye2 are BOOL tags open is a BOOL tag and your specification says If photoeyel and photoeye2 are both on set open to true open photoeyel amp photoeye2 Use this format valuel operator value2 Structured Text Programming 407 Use bitwise operators Bitwise operators manipulate the bits within a value based on two values Fo _Usethis operator Optimal Data Type bitwise AND amp AND DINT bitwise OR OR DINT bitwise exclusive OR XOR DINT bitwise complement NOT DINT For example Example For this situation You d write If input1 input2 and resultl are DINT tags and your specification says Calculate the bitwise result of inputl and input2 Store the result in result1 resulti inputi AND input2 Determine the order of execution The operations
279. i directional the cam profile starts when the master position crosses the M aster Lock Position in either direction Master Lock Position REAL immediate ortag The M aster axis absolute position where the slave axis locks to the master axis If Pending is selected as the Execution Schedule value then M aster Lock Position is ignored Motion M ove Instructions M AS MAJ MAG MCD MRP MCCP MAPC MATC MCSV 119 Operand Type Format Description Cam Lock REAL immediate This determines the starting location Position or tag in the cam profile M aster UINT32 immediate Sets the master position reference to Reference either Command position or Actual position If Pending is selected for the Execution Schedule value then M aster Reference is ignored 0 2 Actual slave axis motion is generated from the current position of the master axis as measured by its encoder or other feedback device 1 Command slave axis motion is generated from the desired or commanded position of the master axis M aster UINT32 immediate This determines the direction of the Direction master axis that generates slave motion according to the cam profile Options are 0 Bi directional slave axis can track the master axis in either direction 1 Forward only slave axis tracks the master axis in the forward direction of the master axis 2 Reverse only slave axis tracks the master
280. ime Cam N gt Axis AxisO Motion Control MATC_1 ND Direction 1 R gt Cam Profile Cam pro3 2 Distance Scaling 35 IP2 Time Scaling 2 Cc Execution Mode Continuous Execution Schedule Pending KK Less MATC Ladder Example Structured Text MATC Axis0 MATC 1 1 Cam pro3 2135 2 Continuous Pending Calculate Slave Values MCSV Operands MCSV Motion Control Master Value Slave Value N Slope Value Slope Derivative 2 MCSV MotionControl CamProfile MasterValue SlaveValue SlopeValue SlopeD erivative Description Motion Calculate Slave Values EN Cam Profile 7 HER Motion M ove Instructions MAS MAJ MAG MCD MRP MCCP MAPC MATC MCSV 151 Use the Motion Calculate Slave Values MCSV instruction to calculate the slave value the slope value and the derivative of the slope fora given cam profile and master value ATTENTION Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Relay Ladder Operand Type Format Description Motion MOTION INSTRUCTION tag Structure used to access instruction Control status parameters Cam Profile CAM PROFILE array An array of elements with the array index set to 0 It defines the cam profile used in calculating the slave valu
281. inated move reaches the new position or when there is a succeeding move and the coordinated move reaches the Termination Type specification ACCEL Acceleration The Acceleration Bit sets while the coordinated move is in Bit 01 acceleration phase It resets while the coordinated move is in the constant velocity or deceleration phase or when coordinated motion concludes DECEL Deceleration The Deceleration Bit sets while the coordinated move is in Bit 02 deceleration phase It resets while the coordinated move is in the constant velocity or acceleration phase or when coordinated motion concludes M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 281 M ove Type The Move Type operand determines the method used by the position array to indicate the path of the coordinated move and the method the via center radius parameter uses to indicate the via and center circle positions The options are Absolute or Incremental Absolute When the Move Type is Absolute the coordinate system moves to the specified Position at the defined Speed using the Accel and Decel Rates as designated by their respective operands along a circular path When an axis is configured for rotary operation absolute moves are handled in the same manner as with linear axes When the axis position exceeds the Unwind parameter an error is generated The sign of the specified position array is interpreted by
282. ing Extended Error codes help to pinpoint the problem when the MRP instruction receives a Servo Message Failure 12 error message Associated Error Code Extended Error Meaning decimal Code decimal SERVO MESSAGE FAILURE Device in wrong state Redefine Position Home 12 16 and Registration 2 are mutually exclusive SERCOS Extended Error codes for the Parameter Out of Range 13 error code work a little differently Rather than having a standard enumeration the number that appears for the Extended Error code refers to the number of the operand as they are listed in the faceplate from top to bottom with the first operand being counted as zero Therefore for the instruction an extended error code of 4 would refer to the Position operand s value You would then have to check your value with the accepted range of values for the instruction None When the input conditions are true the controller changes the position of axis Publication 1756 RM 007H EN P December 2006 108 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M APC ATC M CSV Relay Ladder MR Motion Redefine Position Axis Axis Motion Control MRP 1 Absolute rrr Position Select Actual Position 75 MRP Ladder Example Structured Text MRP Axis1 MRP_1 Absolute Actual 75 Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions MAS MAH MAJ MAG MCD MRP M
283. initiate a change in the path dynamics for the motion active on the specified coordinate system ATTENTION motion and injure people Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment Relay Ladder Operand Type Format Description Coordinate COORDINATE SYSTEM tag Coordinated group of axes System Motion MOTION_ tag Structure used to access Control INSTRUCTION instruction status parameters Motion Type SINT INT or DINT immediate 1 Coordinated Move Change SINT INT or DINT immediate 0 No Speed 1 Yes Speed SINT INT DINT or REAL immediate Coordination Units ortag Speed Units SINT INT or DINT immediate 0 Units per Sec 1 296 of Maximum Change SINT INT or DINT immediate 0 No Accel 1 Yes Accel Rate SINT INT DINT or REAL immediate Coordination Units ortag Accel Units SINT INT or DINT immediate 0 Units per Sec 1 296 of Maximum Change SINT INT or DINT immediate 0 No Decel 1 Yes Decel Rate SINT INT DINT or REAL immediate Coordination Units or tag Decel Units SINT INT or DINT immediate Units per Sec 1 of Maximum Scope SINT INT or DINT immediate 0 Active Motion Publication 1756 RM 007H EN P December 2006 320 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Structured Text MCCD
284. instruction with the exception that the drive is disabled when the axis comes to a stop Use MGS when a fast decelerated stop the axis is desired before the drive is disabled The MGS instruction uses the configured Maximum Deceleration for the axis in this stop mode as the basis for the deceleration ramp applied to the axis Hard Disable For an axis configured for a Hard Disable the MGS instruction initiates the equivalent of an MSF instruction to the axis This action immediately turns the appropriate axis drive output off and disables the servo loop Depending on the drive configuration this may result in the axis coasting to a stop but offers the quickest disconnect of drive output power Fast Shutdown For an axis configured for a Fast Shutdown the MGS instruction initiates a Fast Stop and then applies the equivalent of a Motion Axis Shutdown MASD instruction to the axis This action turns the appropriate axis driver output OFF disables the servo loop opens any associated motion module s OK contacts and places the axis into the Shutdown state Arithmetic Status Flags Fault Conditions Error Codes Motion Group Instructions MGS MGSD MGSR MGSP 159 Hard Shutdown For an axis configured for a Hard Shutdown the MGS instruction initiates the equivalent of an Motion Axis Shutdown MASD instruction to the axis This action turns the appropriate axis drive output OFF disables the servo loop opens any associated motion m
285. ion Operand Type MDR Axis AXIS FEEDBACK tag Disarm Registration a va AXIS_GENERIC Motion Control Fo Input Number AXIS SERVO AXIS SERVO DRIVE Motion MOTION _ tag control INSTRUCTION Input UINT32 Number Structured Text MDR Axis MotionControl InputNumber MDR instruction MOTION_ INSTRUCTION Structure The operands are the same as those for the relay ladder Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when axis watch event checking has been successfully disarmed ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis Description The Motion Disarm Registration MDR instruction cancels registration event checking established by a previous Motion Arm Registration instruction Only the registration checking associated with the specified registration input is disabled Publication 1756 RM 007H EN P December 2006 184 Motion Event Instructions M AW M DW MAR M DR M AOC M DOC Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes Publication 1756 RM 007H EN P December 2006 If the targeted axis does not appear in the list of available axes the axis has not been configured for operation Use
286. ion an Execution Schedule setting and an associated Master Lock Position can be specified for the master axis When the master axis travels past the Master Lock Position in the direction specified by the Execution Schedule parameter the slave axis is locked to the master axis position according to the specified Cam Profile beginning at the Cam Lock Position The cam profile can also be configured via the Execution Schedule parameter to execute Immediately or Pending completion of a currently executing position cam profile The cam profile can also be executed Once or Continuously by specifying the desired Execution Mode The Master Reference selection allows camming input from the master to be derived from either the Actual or Command position of the Master Axis To support applications which require unidirectional motion a slip clutch feature is available which prevents the slave from backing up when the master axis reverses direction This feature is controlled by the Master Direction parameter Master and Slave Scaling functionality can be used to scale slave motion based on a standard cam profile without having to create a new cam table and calculate a new cam profile ATTENTION Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Publication 1756 RM 007H EN P December 2006 116 Motion Move Instructions MAS MAH MAJ
287. ion Group Stop 5 156 Motion Group Shutdown 161 Motion Group Shutdown Reset MGSR 164 Motion Group Strobe Position MGSP 166 Publication 1756 RM 007H EN P December 2006 10 Table of Contents Motion Event Instructions MAW MDW MAR MAOC MDOC Motion Configuration Instructions MAAT MRAT MAHD MRHD Motion Coordinated Instructions MCLM MCCM MCCD MCS MCSD MCT MCTP MCSR Tune an S curve Profile Troubleshoot Axis Motion Publication 1756 RM 007H EN P December 2006 Chapter 5 IpntOdu Cun os aseo bordo Esc ee eet 169 Motion Arm Watch 170 Motion Disarm Watch 174 Motion Arm Registration 176 Motion Disarm Registration MDR 183 Motion Arm Output Cam 186 Scheduled Output 206 Motion Disarm Output Cam 213 Chapter 6 Ino CHO E ach ae e bra Ro 217 Motion Apply Axis Tuning MAAT 218 Motion Run Axis Tuning 223 Motion Apply Hookup Diagnostics MAHD 229 Motion Run Hookup Diagnostics MRHD 234 Chapter 7 Modun oa ete steve a d eto eo po rer e ees 241 Using Different Termination Types When Blending Instrucs
288. ion values applied based on the Reference and Output parameters of the MAOC instruction No side affects occur if the MAOC instruction is configured with an Execution mode of Continuous or Persistent and a pending MAOC instruction does not exist when the Output Cam is armed and the axis moves The following side affects may occur of the MAOC instruction is configured with an Execution Mode of Once Only and a pending MAOC exists when the Output Cam is armed and the axis moves e One or more outputs may never change state e The MAOC instruction may complete immediately One possible side affect of a pending MAOC instruction existing when the Output Cam is armed and the axis moves is that one or more Publication 1756 RM 007H EN P December 2006 192 M otion Event Instructions M AW M DW MAR M DR MAOC M DOC outputs could begin executing based on the configuration of the pending MAOC instruction MOTION_ INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and emains set until the rung goes false DN Done Bit 29 Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis tis set when Output Cam has been successfully initiated IP In Process Bit26 It is set when the Output Cam has been initiated successfully and cleared if either superseded by another M o
289. ions are e The axes Axis0 and Axis1 Axis2 are all members of the coordinate system Coordinated 51 e Coordinated sys1 is a three dimensional coordinate system e Axis0 1 and 2 are orthogonal to each other e Coordinated_sys1 is initially set at 0 0 0 0 0 0 units Move Coordinated sys1 along an arc to 1 0 1 0 1 414 units with center at 1 0 1 0 1 0 units at the vector speed of 10 0 units per second with the acceleration and deceleration values of 5 0 units per Publication 1756 RM 007H EN P December 2006 302 Motion Coordinated Instructions M CLM M M CCD M CS MCSD MCT M CTP M CSR second The following graph shows the 3D arc generated by the preceding information Z axis X axis 2 0 3D Path Using Shortest Full for Direction Operand Y axis This path is achieved by using an MCCM instruction with a Move Type of Absolute and a Circle Type of Center When Via is selected the Via Center Radius position defines a point through which the arc must pass MCCM Motion Coordinated Circular Move Coordinate System Coordinated_sys1 Motion Control Move Type MCCM 10 0 Position MCCM Move position 20 1 0 AxisO Axis Axis2 Circle Type Via Center R adius Direction Speed Speed Units Accel Rate Accel Units Decel Rate Decel Units Profile Termination Type Merge Merge Speed MCCM Ladder Instruction for 3D Arc Using Circle Type of Center Pu
290. irectly in the configured speed or acceleration units of the axis If the targeted axis does not appear in the list of available axes the axis has not been configured for servo operation Use the Tag Editor to create and configure a new axis If You Use An S curve Profile Be careful if you change the speed acceleration deceleration or jerk while an axis is accelerating or decelerating along an S curve profile You can cause an axis to overshoot its speed or reverse direction For more information see Troubleshoot Axis M otion on page 9 367 Motion M ove Instructions MAS MAH MAJ MAG MCD MRP MAPC MATC MCSV 101 Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C Changing M ove Dynamics When a Motion type of Move is entered or chosen the speed acceleration and or deceleration of a Move in progress may be changed to the specified value The speed change occurs at the specified acceleration rate if the new speed is higher than the current speed or at the specified deceleration rate if the new speed is lower than the current speed Pausing M oves The MCD instruction may be used to temporarily pause a move in progress by
291. ition 14 10 4 Axis Axis 1 3 Circle Type 1 Via Center R adius Center 8 Direction 2 Speed 10 Speed Units Units per sec Accel Rate Accel Units Units per sec2 Decel Rate Decel Units Units per sec2 Profile Trapezoidal Termination Type Merge Disabled Merge Speed Current MCCM Instruction Move Type Absolute Circle Type Center M ove Type is Absolute Position defined in absolute units Circle Type is Center Center position defined in absolute units as 3 7 6 4 Direction is Clockwise Full M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 295 MCCM Motion Coordinated Circular Move Coordinate System Motion Control Move Type Position MCCM Move position 16 0 0 AxisO Axis Circle Type Via Center Radius Direction Speed Speed Units Accel Rate Accel Units Decel Rate Decel Units Profile Termination Type Merge Merge Speed Coordinated_sys MCCM 8 1 Units per sec 5 Units per sec2 5 Units per sec2 Trapezoidal Disabled Current N2 M ove Type is Incremental fp F gt P gt Circle Type is Center oO Center defined as an incremental distance of 14 1 5 1 from start point of 10 4 1 3 Direction is Clockwise Full MCCM with Move Type as Incremental and Center Type as Center To draw a full circle using Radius as the Circle Type e Start point must not
292. itive or negative It can also be greater than the Position Unwind value W hen the distance is greater than the Position Unwind value the axis moves through more than one revolution before stopping Rotary Shortest Path Rotary Shortest Path move from 30 Important Only use a Rotary Shortest Path move if to 225 the Positioning M ode of the axis is Rotary Rotary axis A Rotary Shortest Path move is a special type of absolute move for a Rotary axes The axis e moves to the specified Position in the shortest direction regardless of its current position e moves through 0 if needed With a Rotary Shortest Path move you e can start the move while the axis is moving or standing still e can t move the axis more than one revolution with a single move Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS M AH MAJ MAG MATC MCSV 83 Move Type Example Description Rotary Positive Rotary Positive move from 315 to Important Only use a Rotary Positive move while the axis is standing still and not moving Otherwise the axis could move in the wrong direction A Rotary Positive move is a special type of absolute move for a Rotary axes The axis e moves to the specified Position in the positive direction regardless of its current position e moves through 0 if needed You can t move the axis more than one revolution with a single Rotary Shortest
293. its Bit Name State Meaning DriveEnableStatus TRUE Axis is in Drive Control state with the Drive Enable output active When the input conditions are true the controller activates the servo drive for axis and sets the servo output voltage of axis1 In this example the output is 2 of the output value Relay Ladder MDO Motion Direct Drive On No Axis Axis E Motion Control MDO_3 R gt Drive Output 50 Drive Units Percent MDO Ladder Example Structured Text MDO Axis0 MDO 1 4 percent Motion Direct Drive Off M DF Operands MDF Motion Direct Drive Off Axis vv Motion Control MDF Axis MotionControl Description Motion State Instructions M SO M SF MASD MASR MDO MDF 45 Use the MDF instruction to deactivate the servo drive and to set the servo output voltage to the output offset voltage The output offset voltage is the output voltage that generates zero or minimal drive motion You can specify this value during axis configuration Relay Ladder Operand Data Type Description Axis Tag Name of the axis to perform operation on Motion MOTION_ Structure used to access instruction status control INSTRUCTION Tag parameters Structured Text The operands are the same as those for the relay ladder MDF instruction MOTION_INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a f
294. k Cycle Time To use this procedure your application must meet these requirements e The controller is at revision 16 or later e One of these instructions produce the motion Motion Axis Move MAM Motion Axis Jog Motion Axis Stop MAS e The instruction uses an S curve profile Publication 1756 RM 007H EN P December 2006 364 Tune an S curve Profile Before You Begin IM PORTANT Procedure If the J erk Units are of Time of Time Merge Disabled Programmed e Jerk Units Merge Speed lt lt Less In this procedure you increase the jerk This increases the Stress on the equipment and load M ake sure you can identify when the equipment or load has reached its jerk limit 1 Are the Jerk Units set to of Time Then Continue with step 2 of Maximum of Maximum Merge Disabled p Jerk Units Merge Speed Programmed lt lt Less A Change the J erk Units to of Time of Time Merge Disabled d Jerk Units Merge Speed Programmed lt lt Less Units per sec3 Jerk Units Units per sec3 Merge Disabled Merge Speed Programmed lt lt Less B Continue with step 2 2 Set the Jerk values to 50 of Time Example Publication 1756 RM 007H EN P December 2006 Accel Jerk Servo_Axis_Vars C Auto_Accel_Jerk e Decel Jerk Servo Axis Vars C amp uto Decel Jerk 500 Jerk Units 36
295. k Units of Time Merge Disabled Merge Speed Programmed lt lt Less Fwd PB Jog Rev PB Servo Axis Ml Manual Jodg IP AS mmm Motion Axis Stop EN Axis Servo Axis Motion Control Servo Axis MI Stop Manual DN5 Stop Type Jog Change Decel Yes ER Change Decel and Change Decel J erk are set Decel Rate Servo Axis Vars C is oe to Yes This lets the axis use the Decel Rate eee persat and Decel J of the instruction Change Decel Jerk Yes PC Decel Jerk Servo Axis Vars C Manual Jog Decel Jerk 100 0 Jerk Units 36 of Time lt lt Less Publication 1756 RM 007H EN P December 2006 74 Motion Move Instructions MAS M AH MAJ MAM MAG MCD M RP M CCP M ATC M CSV Forward and Reverse with S curve Structured Text When the servo loop is enabled And Jog Fwd PB orJog Rev PB tum on Set Jog Direction Run Servo Axis at Servo Axis Vars C Manual Jog Speed When Jog Fwd PB and Jog Rev PB are off stop Servo Axis The SFC starts the M anual J og step when either Fwd or J Rev turn on m 9 Q nev Wait Fot Manual Jog Input A P1 qualifier limits the action to the first scan of the step Tran 004 Servo Axis Servo ctionStatus amp Fwd PB OR Jog Rev PE m 1 Set Jog Direction Set the If Jog Fwd PB Then direction Jog Direction 0 Elsif Jog Rev PB Then Jog Direction
296. l Direction Ratio Slave Counts Master Counts Master Reference Ratio Format Clutch Accel Rate Accel Units Operands FITT The Motion Axis Gear MAG instruction provides electronic gearing between any two axes in a specified direction and at a specified ratio When called the specified Slave Axis is geared to the Master Axis at the specified Ratio e g 1 345 or Slave Counts to Master Counts e g 1 3 The MAG instruction supports specification of the gear ratio in one of two different formats Real or Fractional as determined by the Ratio Format input selection The direction of Slave Axis motion relative to the Master Axis is defined by a very flexible Direction input parameter The gearing direction may be explicitly set as the Same or Opposite or set relative to the current gearing direction as Reverse or Unchanged Note also that the value for Ratio is sign sensitive The Master Reference selection allows gearing input to be derived from either the Actual or Command position of the Master Axis When the instruction s Clutch capability is activated the gearing instruction commands the slave axis to accelerate or decelerate at a controlled rate before Locking on to the master axis using the instructions Acceleration value much like the clutch of a car ATTENTION Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipm
297. l tag for each motion instruction that you use The tag uses the MOTION INSTRUCTION data type and Data Type stores status information about the instruction Mnemonic Data Type Description FLAGS DINT Use this DINT to access all the status bits for the instruction in one 32 bit value For this status bit Use this bit number I EN 31 I DN 29 I ER 28 I PC 27 I IP 26 AC 23 DECEL 1 ACCEL 0 EN BOOL The enable bit indicates that the instruction is enabled the rung in and rung out condition is true DN BOOL The done bit indicates that all calculations and messaging if any are complete ER BOOL The error bit indicates when the instruction is used illegally PC BOOL The process complete bit indicates that the operation is complete The DN bit sets after an instruction has completed execution The PC bit sets when the initiated process has completed IP BOOL The in process bit indicates that a process is being executed AC BOOL The Active Bit lets you know which instruction is controlling the motion when you have instructions queued It sets when the instruction becomes active It is reset when the Process Complete bit is set or when the instruction is stopped ACCEL BOOL The ACCEL bit indicates that the velocity has increased for the individual instruction that it is tied to i e jog move gearing DECEL BOOL The DECEL bit indicates that the velocity has
298. late Slave Values EN Motion Control Mtn Ctrl Cam Profile Pcam Profile 0 Master Value Themstrval ER 25 Slave Value Theslveval 3 79 Slope Value Theslopeval 0 5 Slope Derivative Theslopederiv 1 6 gt MCSV Ladder Instruction Structured Text MCSV Mtn Ctrl Pcam_Profile 0 Thestrval Theslveval Theslopeval Theslopederiv Publication 1756 RM 007H EN P December 2006 154 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV Notes Publication 1756 RM 007H EN P December 2006 Introduction Chapter 4 Motion Group Instructions MGS MGSD MGSR MGSP Tags used for the motion control attribute of instructions should only be used once Reuse of the motion control tag in other instructions can cause unintended operation This may result in damage to equipment or personal injury Group Control Instructions include all motion instructions that operate on all the axes in the specified group Instructions that can be applied to groups include position strobe shutdown control and stopping instructions Note that at present only one group is supported per Logix controller The motion group instructions are If you want to Use this instruction Available in these languages Initiate a stop of motion on a group of axes MGS relay ladder structured text Force all axes in a group into the shutdown MGSD relay ladder operating state structure
299. lculated elements in a cam profile the instruction errors The type parameter determines the type of interpolation applied between this cam array element and the next cam element i e linear or cubic Cam Profile Array Checks The Status member of the first element in the cam profile array is special and used for data integrity checks For this reason the MAPC must always specify the cam profile with the starting index set to 0 This first cam profile element Status member can have the following values Status Value Description 0 Cam profile element has not been calculated 1 Cam profile element is being calculated 2 Cam profile element has been calculated n Cam profile element has been calculated and is currently being used by n 2 or M ATC instructions Motion ove Instructions M AS MAJ MAG MRP MCCP MAPC MATC MCSV 123 Before starting a cam on a specified axis the MAPC instructions checks if the cam profile array has been calculated by checking the value of the first cam profile element s Status member If Status is 0 or 1 then the cam profile has not been calculated yet and the MAPC instruction errors If the cam profile array has been completely calculated Status gt 1 the instruction then increments the Status member indicating that it is in use by this axis When the cam completes or terminates the Status member of the first cam profile array element is decremented
300. le 122 Stopping a Cam 133 M otion Axis Stop M AS 50 Description 53 Extended Error Codes 55 69 345 352 M OTION INSTRUCTION structure 53 330 Operands 50 Relay Ladder 50 Structured Text 52 M otion Axis Time Cam M ATC 138 Cam Profile Array Checks 143 Cam Profile Execution M odes 145 Camming Direction 141 Camming in the Opposite Direction 142 Camming in the Same Direction 141 Changing the Cam Profile 142 Changing the Camming Direction 142 Description 141 Execution Schedule 145 Extended Error Codes 149 152 Immediate Execution 145 Linear and Cubic Interpolation 143 M erging from a Cam 148 MOTION INSTRUCTION structure 141 Operands 138 Relay Ladder 138 Structured Text 140 Scaling Time Cams 144 Specifying the Cam Profile 142 Stopping a Cam 148 M otion Calculate Cam Profile M CCP 109 Calculating the Cam Profile 111 Cam Profile Array Status M ember 111 Description 110 Extended Error Codes 113 Linear and Cubic Spline Interpolation 111 MOTION_ INSTRUCTION structure 110 Operands 109 Relay Ladder 109 Structured Text 109 Specifying a Cam Array 110 Specifying the Cam Profile Tag 110 Start Slope and End Slope 112 M otion Change Dynamics M CD 98 Changing J og Dynamics 101 Changing M ove Dynamics 101 Description 100 Extended Error Codes 101 MOTION INSTRUCTION structure 100 Operands 98 Relay Ladder 98 Structured Text 99 Pausing M oves 101 M otion Group Strobe Position M GSP Status Bits 167 M otion Red
301. le input switch error SERCOS SERVO MESSAGE FAILURE Device in wrong state Redefine Position Home and 12 16 Registration 2 are mutually exclusive S ERCOS device state not correct for action SERCOS ILLEGAL HOM ING CONFIG Home sequence 4 You have an absolute homing 41 instruction when the Homing Sequence is not immediate ILLEGAL HOM ING CONFIG Home speed of zero 6 Home speed cannot be zero 41 ILLEGAL_HOMING_CONFIG Home return speed of The Home Return Speed cannot 41 zero 7 be zero For the Error Code 54 Maximum Deceleration Value is Zero if the Extended Error returns a positive number 0 n it is referring to the offending axis in the coordinate system Go to the Coordinate System Properties General Tab and look under the Brackets column of the Axis Grid to determine which axis has a Maximum Deceleration value of 0 Click on the ellipsis button next to the offending axis to access the Axis Properties screen Go to the Dynamics tab and make the appropriate change to the Maximum Deceleration Value If the Extended Error number is 1 this means the Coordinate System has a Maximum Deceleration Value of 0 Go to the Coordinate System Properties Dynamics Tab to correct the Maximum Deceleration value Publication 1756 RM 007H EN P December 2006 64 Status Bits Example Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions MAS MAH MA MAM MAG MCD
302. ler check the next character in SINT_array Set the Length member of String tag element_number This records the number of characters in String_tag so far If element number SINT_array_size then stop You at the end of the array and it does not contain a carriage return T If the character at SINT array element number 213 decimal value of the carriage return then stop Otherwise go to 3 Publication 1756 RM 007H EN P December 2006 Enter this structured text element number SIZE 0 SINT array 0 SINT array size Repeat Until SINT array element number String tag DATA element number SINT array element number element number element number 1 String tag LEN element number If element number SINT array size then exit end if 13 end repeat Structured Text Programming 425 Comments Format comment To make your structured text easier to interpret add comments to it e Comments let you use plain language to describe how your structured text works e Comments do not affect the execution of the structured text Structured text comments are downloaded into controller memory and are available for upload To add comments to your structured text To add a comment Use one of these formats on a single line comment at the end of a line of structured text comment comment within a line of str
303. llStatus UL Multiply Source Source B Dest Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 347 Pick and Place Structured Text 1 Move to rest routine This routine is a sequence of moves that put the robot in an at rest position at the desired left or right arm angles W hen the SFC leaves this step it turns off the Move To Reset Done bit The SFC goes to the next step when the M ove To Rest bit turns on 1206 AM JZ JZ MI Move Reset 0 90 J2 Vars C Manual Speed Unitspersec 2 Vars C Marual Jog Accel Unitspersec2 J2 Vars C Manual Jog Decel Unitspersec2 rapezoidal 100 100 o0fTime Disabled Programmed This step moves axis J 2 to 90 The P1 qualifier limits this to the first scan of the step The SFC goes to the next step when the Move To Rest bit turns on nu This step starts the transform The P1 qualifier limits this to the first scan of the step CT Arm Xl X2 Arm Jl J2 J3 Arm MI Transform drm Orientation Arm Translation 3 Pick and place routine This routine is one in a sequence of MCLM instructions that move the Cartesian system The joints of the robot follow the moves The SFC starts the pick and place moves when the Run bit turns on This step moves the coordinate system to 0 6 2 The P1 qualifier limits this to the first scan of the step
304. llows Accel Jerk Max Accel Max Velocity Decel Jerk Max Decel Max Velocity M otion Coordinated Instructions M M CCM M CCD MCS MCSD MCT M CTP M CSR 267 Coordinate motion acceleration and deceleration jerk rate calculations are performed when an MCLM MCCM MCCD or MCS instruction is started The calculated Jerk Rate produces triangular acceleration and deceleration profiles as shown in the following diagram Velocity S Curve Accel Decel Time See the MCCD instruction for more details about the impact changes made by an MCCD instruction M erge The Merge operand determines whether or not to turn the motion of all specified axes into a pure coordinated move The Merge options include Merge Disabled Coordinated Motion or All Motion Merge Disabled Any currently executing single axis motion instructions involving any axes defined in the specified coordinate system are not affected by the activation of this instruction and results in superimposed motion on the affected axes Also any coordinated motion instructions involving the same specified coordinate system runs to completion based on its termination type Coordinated M otion Any currently executing coordinated motion instructions involving the same specified coordinate system are terminated The active motion is blended into the current move at the speed defined in the merge speed parameter Any pending coordinated motion instructi
305. m arm position outside of Output Cam range See Extended Error section for more information on the cause of the error Homing in Process Error 16 Attempted execution with a homing process in progress Axis Group Not Synchronized 19 Attempted execution on an axis whose associated axis group is not currently synchronized Axis in Faulted State 20 Attempted execution on an axis which is in the Faulted state Group in Faulted State 21 Attempted execution on an axis which is in a group which is in the Faulted state Publication 1756 RM 007H EN P December 2006 204 M otion Event Instructions M AW M DW MAR M DR MAOC M DOC Error Message Code Description Illegal Dynamic Change 23 Attempted an illegal change of dynamics such as merge on an S curve change profile from trap to S curve on the fly change S curve to non zero speed or changing accel of an S curve Illegal Controller Mode Operation 24 Attempted execution when the processor is in test mode Illegal Execution Target 35 Attempted execution with a specified Output Cam not supported by the Logix controller Illegal Output Cam 36 Attempted execution with an Output Cam array containing at least one member out of range 1 OutputBit less than 0 or greater than 31 2 Invalid LatchType value 3 Invalid UnlatchType value 4 Left gt Right while LatchType is set to position or position and enable 5 Left lt Cam Start Position while LatchTy
306. mand position or Actual position of the axis If Pending is selected as the Execution Schedule then Reference is ignored 0 Actual the current position of the axis as measured by its encoder or other feedback device 1 the desired or commanded position of the master axis Structured Text The operands are the same as those for the relay ladder MAOC instruction For the array operands you do not have to include the array index If you do not include the index the instruction starts with the first element in the array 0 M otion Event Instructions M AW M DW M AR M DR M DOC 191 For the operands that require you to select from available options enter your selection as This operand Has these options which you enter as text or enter as a number ExecutionM ode once 0 continuous 1 persistent 2 ExecutionS chedule immediate 0 pending 1 forwardonly 2 reverseonly 3 bidirectional 4 Reference actual 0 command 1 MAOC Instruction A valid Cam Arm position is any position between and including the Cam Start and Cam End positions If the Cam Arm position is set to a value equal to or very close to the Cam Start or Cam End position compensation may put a cam position out of range of the Cam Start and Cam End position Compensation is affected by Output Compensation values specified for Position Offset Latch Delay and Unlatch Delay as well as internal compensat
307. mber 2006 Master Axis Position Position Cam Lock Status Position Cam Status Position Cam Initiated Immediate Execution Changing the Cam Lock Position The Cam Lock Position parameter of the MAPC instruction determines the starting location within the cam profile when the slave locks to the master Typically the Cam Lock Position is set to the beginning of the cam profile as shown in the above illustration Since the starting point of most cam tables is 0 the Cam Lock Position is typically set to 0 Alternatively the Cam Lock Position can be set to any position within the master range of the cam profile If a Cam Lock Position is specified that is out of this range the MAPC instruction errors The diagram below shows the effect of specifying a Cam Lock Position value other than the starting point of the cam table in this case a position within the cam profile itself Care must be taken not to Motion ove Instructions M AS MAH MAJ M AG MCD M CCP M ATC M CSV 127 define a Cam Start Point that results in a velocity or acceleration discontinuity to the slave axis if the master axis is currently moving Cam Profile Slave Axis Start Position Position Master Axis Position 1 0 Position Cam Lock Status 1 Position Cam Status Position Cam Initiated Changing the Cam Lock Position Forward Only Reverse Only or Bi directional
308. ment 4 M es Exit EN S n v rest of the routine To stop the loop before the count reaches the last value use an EXIT statement Enter this structured text For subscript 0 to 31 by 1 do array subscript 0 End for Publication 1756 RM 007H EN P December 2006 418 Structured Text Programming Example 2 If you wantthis A user defined data type structure stores this information about an item in your inventory e Barcode ID of the item string data type e Quantity in stock of the item DINT data type An array of the above structure contains an element for each different item in your inventory You want to search the array for a specific product use its bar code and determine the quantity that is in stock 1 Get the size number of items of the Inventory array and store the result in Inventory Items DINT tag 2 Initialize the position tag to 0 3 If Barcode matches the ID of an item in the array then a Set the Quantity tag Inventory position Qty This produces the quantity in stock of the item b Stop Barcode is a string tag that stores the bar code of the item for which you are searching For example when position 5 compare Barcode to Inventory 5 ID 4 Add 1 to position _ If position is to Inventory Items 1 repeat 3 and 4 Since element numbers start at 0 the last element is 1 less than the number of elements in the array Otherwise stop Publica
309. motion stops and the Time Cam Status bit is cleared 1 Continuous The cam profile motion is executed indefinitely Execution UINT32 immediate Selects the method used to execute Schedule the cam profile Options are 0 Immediate instruction is Scheduled to execute immediately with no delay enabling the time camming process 1 Pending Defers execution of the time cam until the completion of the currently or next immediate executing time cam This is useful in blending a new time cam profile with an on going process to achieve a seamless transition Structured Text MATC Axis MotionControl The operands are the same as those for the relay ladder Direction CamProfile MATC instruction For the array operands you do not have to include DistanceScaling Time Scaling the array index If you do not include the index the instruction starts ExecutionMode with the first element in the array 0 For the operands that require you to select from available options enter your selection as This operand Has these options which you enter as text or enter as a number ExecutionM ode once 0 continuous 1 ExecutionS chedule immediate 0 pending 1 Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS MAH MAJ MAM M AG M CD M CCP M M CSV 141 M INSTRUCTION Structure Mnemonic Description EN Enable Bit 31
310. n Control Arm Ml Calculate Transform Orientation MCTP Orientation O ER Translation MCTP_Translation 0 Transform Direction Forward Reference Position Arm_J1_J2_J3 ActualPosition 0 Transform Position Arm End Position 0 Arm MI Calculate Transform DN MUL Multiply Source amp Recovery Step 2 Source B 2 Dest Recovery Step 2 Calculate Position Structured Text This step calculates the X1 X2 and X3 positions of the robot based on its current joint angles The P1 qualifier limits this to the first scan of the step amp Get Position CTP Arm X2 Arm Jl J2 J3 MI Calculate Transform Orientation 0 MCTP Translation 0 Forward Arm Jl J2 J3 ctualPosition 0 rm End Position 0 Tran 007 MI Calculate Transform DN 4 The SFC goes to the next step when the M CTP instruction is done Publication 1756 RM 007H EN P December 2006 354 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD MCT M CTP M CSR Example 2 x3 X1 Example 3 X3 Publication 1756 RM 007H EN P December 2006 Change Orientation Suppose you enter orientation values of 20 0 0 into example 1 In that example the MCTP instruction does a forward transform 6 0 5 0 If the reference position is here in 40 pex Cartesian space 3 0 2 0 e 0 0 1 0 20 3 0 40 50 60 7 0 8 0 x2 AE the M CTP calculates a
311. n cam profile in progress the MAPC instruction executes but no camming motion occurs until another MAPC instruction with a non pending Execution Schedule is initiated This allows pending cam profiles to be preloaded prior to executing the initial cam This method addresses cases where immediate cams would finish before the pending cam could be reliably loaded After a Pending position cam has been configured the Position Cam Pending Status bit of the Motion Status word for the specified slave axis is set to 1 true When the pending new profile is initiated and becomes the current profile Position Cam Pending Status bit is immediately cleared as shown below Current New Profile Profile Slave Position Master Position Position Cam Pending Status Pending New Position Cam Configured Pending Position Cam Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions MAS MAJ MAG MCD MRP MCCP MAPC MATC MCSV 131 M aster Reference The Master Reference parameter determines the master position source to link to the cam generator This source can be actual position or command position of the master axis Smoother motion is derived from command position but in some cases e g when a physical axis is not controlled by a ControlLogix motion module actual position is the only practical option Slaving to the Actual Position When Actual Position is entered or selected as the Ma
312. n for this is if the Execution Schedule is specified as pending Pending Cam Execution Alternatively the MAPC instruction s execution can be deferred pending completion of a currently executing position cam An Execution Schedule selection of Pending can thus be used to seamlessly blend two position cam profiles together without stopping motion The Pending execution feature is particularly useful in applications like high speed packaging when a slave axis must be locked onto a moving master axis and accelerate using a specific profile to the proper speed When this acceleration profile is done it must be smoothly blended into the operating profile which is typically executed continuously To stop the slave axis the operating profile is smoothly blended into a deceleration profile such that the axis stops at a known location as shown below Accel Profile Operating Profile Decel Profile 4 M x M aster Axis Profile Pending Cam Execution By executing the position cam profile as a Pending cam profile while the current profile is still executing the appropriate cam profile parameters are set up ahead of time This makes the transition from the current profile to the pending profile seamless synchronization between the master and slave axes is maintained To ensure smooth motion across the transition however the profiles must be designed such that no position velocity or acceleration di
313. n in the Shutdown state until either an Axis or Group Shutdown Reset is executed Relay Ladder Operand Type Format Description Axis AXIS FEEDBACK tag The name of the axis to perform operation on AXIS VIRTUAL AXIS GENERIC AXIS SERVO AXIS SERVO DRIVE Motion MOTION_ tag Structure used to access control INSTRUCTION instruction status parameters Structured Text The operands are the same as those for the relay ladder MASD instruction MOTION_ INSTRUCTION Structure Mnemonic EN Enable Bit 31 Description It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when the axis have been successfully set to Shutdown State ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis The Motion Axis Shutdown MASD instruction directly and immediately disables drive output disables the servo loop and opens any associated OK contacts This action places the axis into the Shutdown state Another action initiated by the MASD instruction is the clearing of all motion processes in progress and the clearing of all the motion status bits Associated with this action the command also clears all motion instruction IP bits that are currently set for the targeted axis Publication 1756 RM 007H EN P December 2
314. n or not important For first time execution of a cam with Unchanged selected the control defaults the direction to Same Changing the Camming Direction When Reverse is selected the current or previous direction of the time cam is changed from Same to Opposite or from Opposite to Same For first time execution of a cam with Reverse selected the control defaults the direction to Opposite Specifying the Cam Profile To execute a MATC instruction a calculated Cam Profile data array tag must be specified Cam Profile array tags may be created by the RSLogix 5000 tag editor or the MATC instruction using the built in Cam Profile Editor or by executing an Motion Calculate Cam Profile MCCP instruction on an existing Cam array See the following figure Tag Edito Ladder Cam Routine Profile gt Motion Planner Cam Tag Creation Editor Data Modification e MATC Process Motion M ove Instructions M AS MAH MAJ MAG MRP MAPC MATC MCSV 143 The data within the Cam Profile array can be modified at compile time using the Cam Profile Editor or at run time with the Motion Calculate Cam Profile MCCP instruction In the case of run time changes a Cam array must be created in order to use the instruction Refer to the MCCP instruction specification for more detail on converting Cam arrays All but the status and type elements of the Cam Profile array eleme
315. n the cam position exceeds the output cam range and rearmed when cam position returns to within range Output Cam range is defined by input parameters CamStartPosition and CamEndPosition The Master Reference selection allows axis input to be derived from either the Actual or Commanded position of the designated axis Output cams increase the potential for exceeding coarse update rate This can cause misbehavior if the motion task execution time exceeds the configured group coarse update period The only way to check on this condition is to monitor the max execution time from the M otion Group Properties page Operands Relay Ladder M otion Event Instructions MAW MDW MAR MDR MAOC M DOC 187 Operand Type Format Description MADC Axis AXIS FEEDBACK tag Name of the axis that provides the position input to the Output a d AXIS CONSUM ED Cam Ellipsis launches Axis Execution T arget M Properties dialog AXIS VIRTUAL Motion Control R gt Output AXIS GENERIC IP gt Input AXIS SERVO C A utput Lam Cam Start Position AXIS_SERVO_ DRIVE Cam End Positi Execution Target UINT32 immediate The execution target defines the m or tag specific Output Cam from the set Output Compensation connected to the named axis Execution Mode Behavior is determined by the Execution Schedule following Axis Arm Position E e 0 8 Output Cams Cam Arm Position executed in the Logix Position Reference controller
316. n the same time slot they cancel each other out The minimum width of a cam element corresponds to the width of a time slot or 1 16 the coarse update period The user can specify the Output parameter of an MAOC instruction as either a memory tag or an Output Module s data tag A pointer to the tag is passed into the MAOC instruction Also passed into the MAOC is an internal parameter of type IO MAP If the Output parameter M otion Event Instructions M AW M DW MAR M DR M AOC M DOC 211 references controller memory the IO MAP parameter is NULL If the Output parameter references an output module the IO MAP parameter points to the map structure for the module The MAOC instruction can then determine if the Output parameter is associated with a 1756 O B16IS module by checking the module type stored in the driver table Output Data Structure Field Size Description Value 4 bytes Data values for un scheduled output bits 0 Off 1 0 4 bytes Selects which output bits to be scheduled Only the first eight bits 0 7 can be scheduled 0 Not scheduled 1 Scheduled Array of 16 Schedule Structures Field Size Description Schedule ID 1 byte Valid ID s are 1 16 Any other value indicates that the schedule is not to be considered Sequence Number 1 byte The OB16IS will maintain a copy of the schedule A change in sequence number will tell the OB16IS to process the data in this schedule
317. n the specified axis that consists of a single triangular velocity profile or a series of three such profiles Tune Velocity must be within the maximum speed capability of the drive and motor The configured value for Tune Velocity should be set to the desired maximum operating speed of the axis so that the resulting tuning parameters are based on the dynamics of the system at that speed If the External Vel Servo Drive configuration bit parameter is TRUE indicating interface to an external velocity servo drive three pulses are applied to the axis The tuning velocity profile for this case is shown in the diagram below Tune Velocity Time Tuning Velocity Profile w hen True Publication 1756 RM 007H EN P December 2006 Motion Configuration Instructions M AAT MRAT MAHD MRHD 225 If the External Vel Servo Drive configuration bit parameter is FALSE indicating interface to an external torque servo drive only one pulse is applied to the axis The tuning velocity profile is shown below Tune Velocity T Tuning Velocity Profile when False ime The axis configuration parameters that MRAT generates as output depend on the External Drive configuration If the External Vel Servo Drive configuration bit parameter is TRUE indicating interface to an external velocity servo drive the following output parameters are generated Axis Parameter Data Type Units Meaning Tune Status Rea Status Repo
318. nactive Grayed Out Incremental Radius Target column is entitled Target Increment Radius Column is entitled Radius Set Targets Actuals button is inactive Grayed Out Set Vias Actuals button is inactive Grayed Out Absolute Center Incremental Target column is entitled Target Position Center Incremental column is entitled Center Incremental Set Targets Actuals button is active Set Vias Actuals button is inactive Grayed Out Incremental Center Incremental Target column is entitled Target Increment Center Incremental column is entitled Center Incremental Set Targets Actuals button is inactive Grayed Out Set Vias Actuals button is inactive Grayed Out MCCM is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e n structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Extended Error Codes M otion Coordinated Instructions MCLM MCCM MCCD MCS MCSD M CTP M CSR 311 Extended Error codes help to further define the error message given for this particular instruction Their behavior is dependent upon the Error Code with which they are associated The Extended Error Codes for Servo Off State 5 Shutdown State 7 Axis Type Not Servo 8 Axis Not Configured 11
319. nded speed or percent of maximum speed The speed of the move is based on the time it takes to complete the circular move using the programmed axes Each axis is commanded to move at a speed that allows for all axes to reach the endpoint target position at the same time If You Use An S curve Profile Be careful if you change the speed acceleration deceleration or jerk while an axis A is accelerating or decelerating along an S curve profile You can cause an axis to overshoot its speed or reverse direction For more information see Troubleshoot Axis M otion on page 367 Coordinate System The Coordinate System operand specifies the system of motion axes that define the dimensions of a Cartesian coordinate system For this release the coordinate system supports up to three 3 primary axes Publication 1756 RM 007H EN P December 2006 280 Motion Coordinated Instructions CLM M CCM M CCD MCS MCSD M CTP M CSR Publication 1756 RM 007H EN P December 2006 Only the axes configured as primary axes up to 3 are included in speed calculations Only primary axes participate in the actual circular move M otion Control The following control bits are affected by the MCCM instruction Mnemonic Description EN Enable Bit 31 The Enable Bit is set when the rung transitions from false to true It resets the rung transitions from true to false DN Done Bit 29 The Done Bit sets when the coordina
320. ndix C not affected none See Error Codes ERR for Motion Instructions on page A 383 Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions Publication 1756 RM 007H EN P December 2006 96 Motion Move Instructions M AS MAJ MAM MAG MCD M RP M CCP M APC M ATC M CSV Status Bits Extended Error Codes for Axis Not Configured 11 error code are as follows e Extended Error Code 1 signifies that the Slave Axis is not configured e Extended Error Code 2 signifies that the Master Axis is not configured Extended Error codes for the Parameter Out of Range 13 error code lists a number that refers to the number of the operand as they are listed in the faceplate from top to bottom with the first operand being counted as zero Therefore for the MAG instruction an extended error code of 4 would refer to the Ratio operand s value You would then have to check your value with the accepted range of values for the instruction For the Error Code 54 Maximum Deceleration Value is Zero if the Extended Error returns a positive number 0 n it is referring to the offending axis in the coordinate system Go to the Coordinate System Properties General Tab and look under the Brackets column of the Axis Grid to determine which axis has a Maximum Deceleration value of 0 Click on the ellipsis button next to the offending axis to access the Axis Proper
321. ne or more messages to the servo module Examples of message type instructions include the e Motion Direct Drive On MDO instruction e Motion Redefine Position MRP instruction Message type instructions work as follows 1 N When the rung that contains the motion instruction becomes true the controller e Sets the enable EN bit e Clears the done DN bit e Clears the error ER bit The controller begins to execute the instruction by setting up a message request to the servo module The remainder of the instruction executes in parallel to the program scan The controller checks if the servo module is ready to receive a new message The controller places the results of the check in the message status word of the control structure When the module is ready the controller constructs and transmits the message to the module This process may repeat several times if the instruction requires multiple messages If the controller Then Does not detect an error when the The controller sets the DN bit if all instruction executes messaging to the module is completed Detects an error when the The controller sets the ER bit and stores an instruction executes error code in the control structure The next time the rung becomes false after either the DN or ER bit sets the controller clears the EN bit Publication 1756 RM 007H EN P December 2006 20 Motion Concepts 8 When th
322. nemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when axis home has been successfully completed or is aborted ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis IP In Process Bit27 It is set on positive rung transition and cleared after the M otion Home Axis is complete or terminated by a stop command shutdown or a servo fault PC Process Complete Bit 26 tis set when axis home is successfully completed Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS M AH MAM MAG MCD MRP MCCP MAPC MATC MCSV 61 Description The Motion Axis Home MAH instruction is used to calibrate the absolute position of the specified axis For axes that are configured as type Servo the axis can be homed using Active Passive or Absolute Homing Mode configuration For Feedback Only axes only Passive and Absolute homing modes are available Absolute Homing Mode requires the axis to be equipped with absolute feedback device Active Homing When the axis Homing Mode is configured as Active the physical axis is first activated for servo operation As part of this process all other motion in process is canceled and appropriate status bits cleared The axis is then homed usin
323. ng process The MATC instruction execution completes in a single scan thus the Done DN bit and the In Process IP bit are set immediately The In Process bit remains set until the initiated Time Camming process is superseded by another M ATC instruction or terminated by a M otion Axis Stop command M erge operation or Servo Fault Action This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions on page A 383 Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions Extended Error codes for the Parameter Out of Range 13 error code lists a number that refers to the number of the operand as they are listed in the faceplate from top to bottom with the first operand being counted as zero Therefore for the MATC instruction an extended error code of 5 would refer to the Time Scaling operand s value You would then have to check your value with the accepted range of values for the instruction For the Error Code 54 Maximum Deceleration Value is Zero if the Extended Error returns a positive number 0 n it is referring to the offending axis in the coordinate system Go to the Coordinate System P
324. ng when the MAS instruction is complete Motion M ove Instructions M AS M AH MAJ MAM MAG MCD MRP MCCP M APC MATC MCSV 51 Operand Type Format Description Change Decel DINT Immediate If you want to Then choose Use the M aximum Deceleration No 0 rate of the axis Specify the deceleration rate Yes 1 Decel Rate REAL Immediate Important The axis could overshoot its target position if you reduce the ortag deceleration while a move is in process Deceleration rate of the axis The instruction uses this value only if Change Decel is Yes Decel Units DINT Immediate Which units do you want to use for the Decel Rate e Units per sec 0 e 96 of M aximum 1 Change Decel J erk DINT Immediate If you want to Then choose Use the M aximum Deceleration No 0 J erk rate of the axis Program the deceleration jerk rate Yes 1 Decel J erk REAL Immediate Important The axis could overshoot its target position if you reduce the or tag deceleration jerk while a move is in process J erk Units DINT Immediate Deceleration jerk rate of the axis Use these values to get started e Decel erk 100 e J erk Units of Time 2 You can also enter the jerk rates in these J erk Units e Units per sec 0 e of Maximum 1 Publication 1756 RM 007H EN P December 2006 52 Motion Move Instructions MAS M AH MAJ MAM MAG MCD M RP M CCP M M CSV MAS Axis MotionControl StopTyp
325. nits unitspersec2 ofmaximum DecelUnits unitspersec2 ofmaximum Profile J erkUnits Merge trapezoidal scurve unitspersec3 ofmaximum oftime disabled enabled M ergeS peed programmed current e e OF NF Oje oO Motion M ove Instructions M AS M AH MAJ MAG MCCP M APC MATC MCSV 79 MOTION INSTRUCTION Data Type To See If Check If This Bitis Data Type Notes Set A false to true transition caused the instruction EN BOOL The EN bit stays set until the process is complete to execute and the rung goes false The move was successfully initiated DN BOOL An error happened ER BOOL The axis is moving to the end Position IP BOOL these actions stop this move and clear the it e The axis gets to the end Position e Another MAM instruction supersedes this MAM instruction e MAS instruction e Merge from another instruction e Shutdown command e Fault Action The axis is at the end Position PC BOOL e The PC bit stays set until the rung makes a false to true transition e The PC bit stays cleared if some other action stops the move before the axis gets to the end Positon Description The Motion Axis Move MAM instruction moves an axis to either a specified absolute position or by a specified incremental distance The MAM instruction can also produce other special types of moves Example Trapezoidal move st
326. nother coordinate system 53 Uninhibit the axis Axis Is Inhibited 54 1 Open the properties for the axis Zero M ax Decel 2 On the Dynamics tab enter a value for the M aximum You can t start motion if the maximum deceleration for the Deceleration axis is zero 61 See the extended error code EXERR for the instruction Connection Conflict Publication 1756 RM 007H EN P December 2006 386 Error Error Codes ERR for M otion Instructions Corrective Action or Cause Cancel the transform that controls this axis or don t use this instruction while the transform is active Notes Transform In Progress You can t execute this instruction if the axis is part of a active transform Cancel the transform that controls this axis or wait until the transform is done moving the axis Axis In Transform M otion You can t execute this instruction if a transform is moving the axis 64 Use a Cartesian coordinate system Ancillary Not Supported You can t use a non Cartesian coordinate system with this instruction 65 The axis moved too far and the controller can t store the Axis Position Overflow position To prevent this error Set up soft travel limits that keep the axis within the position range One way to get more travel is to use the max negative or max positive position as your home position Example Max 0 Max 0 is in the middle of the travel This gives you twice the travel that homing t
327. ns that define the position window within which the selected trip state of the M otion Event Instructions M AW M DW M AR M DR M DOC 179 Registration input is valid Windowed registration is useful in providing a mechanism to ignore spurious or random transitions of the registration sensor thus improving the noise immunity of high speed registration inputs For linear axes the values can be positive negative or a combination However the Minimum Position value must be less than the Maximum Position value for the registration event to occur For rotary axes both values must be less than the unwind value set in the motion controller s machine setup menu The Minimum Position value can be greater than the Maximum Position value for registration windows that cross the unwind point of the axis as shown below Minimum Maximum Position Position Axis Position Position Window for Rotary Axis Publication 1756 RM 007H EN P December 2006 180 Motion Event Instructions M AW M DW MAR M DR M AOC M DOC Rearming an MAR Instruction If your application requires rapid and continuous detection of a registration sensor we recommend that you use the following logic Condition Registration Armed to start registration Waiting for Sensor EnableRegistration Registration Rearmed MAR Motion Arm Registration Axis Axis 0 EJ Motion Control My Registration R gt Trigger Condition Positive_Edg
328. nstructions M AAT M RAT M AHD M RHD Status Bits Example Publication 1756 RM 007H EN P December 2006 when the MAAT instruction receives a Servo Message Failure 12 error message Associated Error Code Extended Error Meaning decimal Code decimal SERVO MESSAGE FAILURE No Resource 2 Not enough memory resources 12 to complete request SERCOS SERVO MESSAGE FAILURE Object M ode conflict Axis is in shutdown 12 12 SERVO MESSAGE FAILURE Permission denied 15 Enable input switch error 12 SERCOS SERVO_M ESSAGE_FAILURE Device in wrong state Redefine Position Home and 12 16 Registration 2 are mutually exclusive SERCOS device state not correct for action SERCOS M AAT Changes to Status Bits None When the input conditions are true the controller computes a complete set of servo gains and dynamic limits for 1 based on the results of the previously executed Motion Run Axis Tuning MRAT instruction Relay Ladder MAAT Motion Apply Axis Tuning Axis Axis E YYY Motion Control _2 AAT Ladder Example Structured Text MAAT Axisl MAAT_2 Motion Axis Tuning M RAT MRAT Motion Run Axis Tuning Axis Motion Control MRAT Axis MotionControl Operands TYYYT Motion Configuration Instructions M AAT MAHD MRHD 223 Use the MRAT to command the motion module to run a tuning motion profile forthe spe
329. nt 3D only shortest longest be generated paths referred to by Error 46 Start End direction parameter a By setting Endpoint radius mismatch R1 Startpoint in which case all R2 gt 15 R1 direction types produce full circles b By setting Endpoint not Startpoint and using Full direction type 5 For 3D Full Circles set Position to be any point on the circle except Startpoint and use one of the Full direction types Position defines both arc and Shortest direction types Via Point Both Error 44 Collinearity Via point always Via point always 1 Full Circles can be programmed Error 45 Endpoint Startpoint Publication 1756 RM 007H EN P December 2006 determines direction determines direction Direction operand is only used to determine if circle is partial or full For full circles set Position to be any point on circle except Startpoint and use one of the Full direction types otion Coordinated Change Dynamics MCCD Motion Coordinated Change Dynamics ___ CC Coordinate System Motion Control Motion Type Change Speed Speed Speed Units Change Accel Accel Rate Accel Units Change Decel Decel Rate Decel Units Scope J J AJ X oO E 9 S VN o VV Operands Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 319 Use the MCCD instruction to
330. nt information They are Axis Status Bits Coordinate System Status Bits and Coordinate Motion Status Bits When the MCS instruction initiates the status bits undergo the following changes Axis Status Bits Bit Name Effect CoordinatedM oveStatus No effect Coordinate System Status Bits Bit Name Effect Shutdow nStatus Clears the Shutdown status bit M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 361 Coordinate M otion Status Bits BitName Effect M ovePendingStatus Flushes instruction queue and clears status bit M ovePendingQueueFullStatus Flushes instruction queue and clears status bit Relay Ladder CSR Motion Coordinated Shutdown Reset N gt Coordinate System Coordinated sys Motion Control MCSR 3 R gt MCSR Ladder Instruction Structured Text MCSR Coordinated sys MCSR 3 Publication 1756 RM 007H EN P December 2006 362 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD MCT M CTP M CSR Publication 1756 RM 007H EN P December 2006 Chapter 8 Tune an S curve Profile Introduction Use this procedure to balance the smoothness and cycle time of motion that uses an S curve profile Do This When Do this procedure when you want to decrease the cycle time of an S curve motion profile but keep some of the profile s smoothness Acceleration Jer
331. nt structure are hidden from the RSLogix 5000 tag editor These hidden elements are of no value The status parameter is used to indicate that the Cam Profile array element has been calculated If execution of a camming instruction is attempted with any uncalculated elements in a cam profile the instruction errors The type parameter determines the type of interpolation applied between this cam array element and the next cam element Cam Profile Array Checks The Status member of the first element in the cam profile array is special and used for data integrity checks For this reason the MATC must always specify the cam profile with the starting index set to 0 This first cam profile element Status member can have the following values Status Value Description 0 Cam profile element has not been calculated 1 Cam profile element is being calculated 2 Cam profile element has been calculated n Cam profile element has been calculated and is currently being used by 2 or M instructions Before starting a cam on a specified axis the MATC instructions checks if the cam profile array has been calculated by checking the value of the first cam profile element s Status member If Status is 0 or 1 then the cam profile has not been calculated yet and the MATC instruction errors If the cam profile array has been completely calculated Status gt 1 the instruction then increments the Status member indicating that
332. nt defined by the Position operand in the MCCM instruction See the following diagram for an example of the longest path Z axis 2 0 Y axis X axis 3D Path Using Longest for Direction Operand Via Center Radius Depending on the selected Move Type and Circle Type the via center radius position parameter defines the absolute or incremental value of a position along the circle the center of the circle or the radius of the circle as defined in the following table If the Circle Type is via or center the via center radius position parameter is a one dimensional array whose dimension is defined to be at least the equivalent of the number of axes specified in the otion Coordinated Instructions M M CCM M CCD MCS MCSD MCT M CTP M CSR 305 coordinate system If the Circle Type is radius the via center radius position parameter is a single value Move Type Circle Type Behavior Absolute Incremental Via Via The via center radius position array defines a position along the circle For a non full circle case the Position parameter array defines the endpoint of the arc For a full circle case the Position parameter array defines any Second point along the circle except the endpoint The sum of the via center radius position array and the old position defines the position along the circle For a non full circle case the sum of the Position parameter array and the old position defines the endp
333. o 0 would give you If you set the home position here The range for position depends on the conversion constant of the axis e Axis Properties My Axis Homing Hookup Tune Dynamics Gains Output Limits General Motion Planner Units Drive Motor Motor Feedback Linear 3 20971520 Drive Counts 1 0 Position Units Conversion Constant 2097152 0 Based on 200000 Counts Motor Rey Positioning Mode e Maximum positive position 2 147 483 647 conversion constant of the axis e Maximum negative position 2 147 483 648 conversion constant of the axis Suppose you have a conversion constant of 2 097 152 counts inch In that case e Maximum positive position 2 147 483 647 2 097 152 counts inch 1023 inches e Maximum negative position 2 147 483 648 2 097 152 counts inch 1023 inches For a motion coordinated instruction look at the extended error code EXERR It identifies which axis caused the error Example If EXERR is zero check the axis for dimension zero Be sure to keep the robot in the arm solution that you configured it in You can configure the robot in either a left arm or right arm solution Publication 1756 RM 007H EN P December 2006 You are attempting to fold back an articulated independent or dependent two axis robot on itself at the quadrant boundaries Error Codes ERR for M otion Instructions 387 Error
334. o that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Motion Group Instructions MGS MGSD MGSR MGSP 163 Status Bits MGSD Changes to Status Bits Bit Name State Definition ServoActionStatus FALSE Axis is in Axis Ready state with the servo loop inactive DriveEnableStatus FALSE Axis Drive Enable output is inactive Shutdow nStatus TRUE Axis is in Shutdown state AccelStatus FALSE Axis is not Accelerating DecelStatus FALSE Axis is not Decelerating GearingLockStatus FALSE Axis is not locked J ogStatus FALSE Axis is not J ogging M oveStatus FALSE Axis is not M oving GearingStatus FALSE Axis is not Gearing HomingStatus FALSE Axis is not Homing Example When the input conditions are true the controller forces all axes in group into a shutdown operating state Relay Ladder MGSD Motion Group Shutdown Group Motion L Motion Control MGSD 2 MGSD Ladder Example Structured Text MGSD Motion MGSD 2 Publication 1756 RM 007H EN P December 2006 164 Motion Group Instructions M GS M GSD M GSR M GSP Motion Group Shutdown Reset MGSR Operands MGSR Motion Group Shutdown Reset Group Motion Control i di MGSR Group MotionControl Description Publication 1756 RM 007H EN P December 2006 Use the MGSR instruction to transition a group of axes from t
335. odule OK contacts and places the axis into the Shutdown state Depending on the drive configuration this may result in the axis coasting to a stop but offers the quickest disconnect of Drive power via the OK contacts To successfully execute a MGS instruction the targeted group must be configured The M GS instruction execution may take multiple scans to IMPORTANT complete because the messages may require one or more axis motion modules in the group Thus the Done DN bit may not be set immediately However the In Process IP bit is set and the Process Complete PC bit is cleared immediately The In Process IP bit remains set until the initiated Programmed Stop process is completed for all axes in the specified group or the stop instructions superseded by another M GS instruction or terminated by a Servo Fault Action The Process Complete PC bit is only set if the initiated deceleration profile for each of the group s axes has completed prior to any other of the above events terminating the stop process and clearing the In Process P bit This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e n structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Publication 1756 RM 007H EN P December 2006 160 Group Instru
336. of the physical axis The command position of the axis is also adjusted along with the new actual position to preserve any position error which exists This Publication 1756 RM 007H EN P December 2006 106 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV Publication 1756 RM 007H EN P December 2006 ensures that there is no unexpected motion of the axis when the positions are redefined See the Motion Axis Object Specification for more discussion of command position actual position and position error Command Position When Command is selected or entered as the MRP Position Selection the New Position is directly applied to the command position of the servo or imaginary axis Since Feedback Only axes do not have a command position always choose Actual from the Position menu for Master Only axes The actual position of servo axes is also adjusted along with the new command position to preserve any position error which exists This ensures that there is no unexpected motion of the axis when the positions are redefined Command position is the desired or commanded position of a servo as generated by any previous motion instructions Actual position is the current position of a physical or virtual axis as measured by the encoder or other feedback device Position error is the difference between these two and is used to drive the motor to make the actual position equal to the command posi
337. oint of the arc For a full circle case the sum of the Position parameter array and the old position defines any second point along the circle except the endpoint Absolute Incremental Center Center The via center radius position array defines the center of the circle For a non full circle case the Position parameter array defines the endpoint of the arc For a full circle case the Position parameter array defines any second point along the circle except the endpoint The sum of the via center radius position array and the old position defines the center of the circle For a non full circle case the sum of the Position parameter array and the old position defines the endpoint of the arc For a full circle case the sum of the Position parameter array and the old position defines any second point along the circle except the endpoint Absolute or Incremental Radius The via center radius position single value defines the arc radius The sign of the value is used to determine the center point to distinguish between the two possible arcs A positive value indicates a center point that generates an arc less than 180 degrees A negative value indicates a center point that generates an arc greater than 180 degrees This Circle Type is only valid for two dimensional circles The position parameter array follows the M ove Type to define the endpoint of the arc Absolute Center Incremental The sum of the via center
338. on e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C Arithmetic Status Flags not affected Fault Conditions none Error Codes See Error Codes ERR for Motion Instructions MCSD Changes to Status Bits Status Bits provide a means for monitoring the progress of the motion instruction There are three types of Status Bits that provide pertinent information They are Axis Status Bits Coordinate System Status Bits and Coordinate Motion Status Bits When the MCS instruction initiates the status bits undergo the following changes Axis Status Bits BitName Effect CoordinatedM oveStatus Cleared Coordinate System Status Bits BitName Effect Shutdow nStatus Sets when M CSD is executed and all associated axes are shutdown ReadyStatus Cleared after M CSD executes Publication 1756 RM 007H EN P December 2006 Example M otion Coordinated Instructions M M CCM M CCD MCS MCSD CTP M CSR Coordinate M otion Status Bits 337 BitName Effect AccelStatus eared after M CSD executes DecelStatus eared after M CSD executes ActualPosToleranceStatus eared after M CSD executes CommandPosToleranceStatus eared after M CSD executes StoppingStatus eared after M CSD executes
339. on cam endl Dutput Compensation output comp1 1 Execution Mode Continuous Execution Schedule Immediate Axis Arm Position arm posl Arm Position cam arm posl Position Reference Actual MAOC Ladder Example Structured Text MAOC Axis3 exec trgt1 MAOC 3 outputl inputl outputcaml 1 cam strtl cam endl output compl 1 continuous immediate arm posl cam arm posl actual Publication 1756 RM 007H EN P December 2006 Motion Disarm Output Cam M DOC M otion Event Instructions M AW M DW M AR M DR MAOC M DOC 213 The Motion Disarm Output Cam instruction initiates the disarming of one or more Output Cams connected to the specified axis Based on the disarm type the MDOC disarms either all Output Cams or only a specific Output Cam The corresponding outputs maintain the last state after the disarming Operands Relay Ladder Operand Type Format Description MDOC Axis AXIS FEEDBACK tag Name of the axis which provides the Motion Disarm Output Cam ND position input to the Output Cam Axis e AXIS_ CONSUMED Ellipsis launches Axis Properties Execution Target R dialog Motion Control AXIS_VIRTUAL Disarm Type AXIS_ GENERIC AXIS SERVO AXIS SERVO DRIV E Execution SINT INT orDINT immediate The execution target defines the Target or tag specific Output Cam from the set connected to the named axis Behavior is determined by the following
340. on ignores the value that you put in the Speed operand Is This an Absolute or Incremental Master Offset M ove If this is an Absolute or Incremental M aster Offset move and M is Enabled then e The move only ends an Absolute or Incremental M aster Offset move that s already in process The move doesn t affect any other motion that s already in process e Use a second MAM instruction to change one that s already in process e Combine a move with gearing for complex profiles and synchronization You can change the position speed acceleration or deceleration The change immediately takes effect To change the Set up a second MAM instruction like this position of an Absolute move Either e Set the Move Type to Absolute and the Position to the new position e Set the M ove Type to Incremental and set the Position to the distance to change the end position The new end position is the old end position plus the new incremental distance In either case the axis moves to the new position without stopping at the old position including any required change of direction Either e Set the M ove Type to Absolute and the Position to the new position The axis goes directly to the new position without completing the incremental move e Set the M ove Type to Incremental and set the Position to the additional distance The axis moves the total of both incremental moves Incremental move You can use a
341. on is not met the instruction errs IF you have an Axis Type of Virtual the instructions errors because with a Virtual Axis the servo action and drive enable status are forced to always be true A Consumed axis data type also errors because only the producing controller can change the state of a consumed axis instruction execution may take multiple scans to execute because it requires transmission of a message to the motion module and time for the drive output and servo loop to be fully deactivated The Done DN bit is not set until this message has been successfully transmitted and the axis transitions to the Axis Ready state This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Publication 1756 RM 007H EN P December 2006 36 M otion State Instructions M SO M SF MASD MASR M DO M DF M AFR MSF Changes to Status Bits Axis Status Bits Bit Name State Meaning ServoActionStatus FALSE Axis is in Servo On state with the servo loop active DecelStatus FALSE Axis Drive Enable output is active M otion Status Bits Bit Name State Meaning AccelStatus FALSE Axis is not Accelerating Decel
342. on of one coordinate system with MCTP No respect to another coordinate system Motion Calculate Transform Position Transition the axes of a coordinate system to the MCSR No ready state and clear the axis faults You can only use this instruction with 1756 L6x controllers Publication 1756 RM 007H EN P December 2006 Motion Coordinated Shutdown Reset Chapter 2 Motion State Instructions MSO MSF MASD MASR MDO M DF MAFR ATTENTION A Tags used for the motion control attribute of instructions should only be used once Re use of the motion control tag in other instructions can cause unintended operation This may result in damage to equipment or personal injury Introduction Motion state control instructions directly control or change the operating states of an axis The motion state instructions are If you want to Enable the servo drive and activate the axis servo loop Use this instruction MSO Available in these languages relay ladder structured text Disable the servo drive and deactivate the axis servo MSF relay ladder loop structured text Force an axis into the shutdown operating state Once MASD relay ladder the axis is in the shutdown operating state the controller will block any instructions that initiate axis structured text motion Change an axis from an existing shutdown operating MASR relay ladder state to an axis ready operating state If all of the axes of a servo mod
343. on that generated the fault s may still exist If the condition is not corrected before using the M AFR instruction the axis immediately faults again Relay Ladder Operand Type Format Description Axis AXIS FEEDBACK tag Name of the axis to perform operation on AXIS VIRTUAL AXIS GENERIC AXIS SERVO AXIS SERVO DRIVE Motion MOTION _ tag Structure used to access control INSTRUCTION instruction status parameters Structured Text The operands are the same as those for the relay ladder instruction M OTION INSTRUCTION Structure Mnemonic EN Enable Bit 31 Description It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 ER Error Bit 28 It is set when the axis faults have been successfully cleared It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis The Motion Axis Fault Reset MAFR instruction directly clears the specified fault status on the specified axis It does not correct the condition that caused the error If the condition is not corrected prior to executing the MAFR instruction the axis could immediately fault again giving the appearance that the fault status was not reset Publication 1756 RM 007H EN P December 2006 48 Motion State Instructions M SO M SF M ASD M ASR M DO M DF M AFR
344. on when you want a decelerated stop for any controlled motion in process for the axis The instruction stops the motion without disabling the servo loop Use the instruction to e stop a specific motion process such as jogging moving or gearing e stop the axis completely e abort a test or tune process initiated by an MRHD or MRAT instruction Which type of profile does the MAS instruction use If the Stop Type is Then the MAS instruction use this profile Jog Same type of profile as the M otion Axis J og instruction that started the jog Move Same type of profile as the M otion Axis M ove MAM instruction that started the move None of the above Trapezoidal Example Suppose you use an MAJ instruction with an S curve profile to start a jog Then you use an MAS instruction with a Stop Type of Jog to stop the jog In that case the MAS instruction uses an S curve profile to stop the jog Publication 1756 RM 007H EN P December 2006 54 Motion Move Instructions MAS M AH MAJ MAM MAG MCD M RP M CCP M APC M ATC M CSV Programming Guidelines If You Use An S curve Profile Be careful if you change the speed acceleration deceleration or jerk while an axis is accelerating or decelerating along an S curve profile You can cause an axis to overshoot its speed or reverse direction For more information see Troubleshoot Axis M otion on page 9 367 Guideline Details e In relay ladder toggle the rung Thi
345. onal instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C Arithmetic Status Flags not affected Fault Conditions none Error Codes See Error Codes ERR for Motion Instructions Extended Error Codes Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The following Extended Error codes help to pinpoint the problem when the MSO instruction receives a Servo Message Failure 12 error message Extended Error Associated Error Code Meaning Code decimal decimal Object Mode conflict SERVO MESSAGE FAILURE Axis is in shutdown 12 12 Permission Denied SERVO MESSAGE FAILURE Enable input switch error 15 12 SERCOS Device in wrong state SERVO MESSAGE FAILURE Device state not correct for 16 12 action SERCOS Publication 1756 RM 007H EN P December 2006 Motion State Instructions M SO M SF M ASD M ASR MDO M DF M AFR 33 MSO Changes to Status Bits Axis Status Bits Example BitName State Meaning ServoActStatus TRUE Axis is in Servo Control state with the servo loop active DriveEnableStatus TRUE The axis drive enable output is active M otion Status Bits None When the input conditions are true the controller enables the s
346. ons are cancelled Any currently Publication 1756 RM 007H EN P December 2006 268 Motion Coordinated Instructions M CLM M CCM M CCD MCS MCSD MCT M CTP M CSR executing system single axis motion instructions involving any axes defined in the specified coordinate system will not be affected by the activation of this instruction and will result in superimposed motion on the affected axes All Motion Any currently executing single axis motion instructions involving Merge Example any axes defined in the specified coordinate system and any currently executing coordinated motion instructions are terminated The prior motion is merged into the current move at the speed defined in Merge Speed parameter Any pending coordinated move instructions are cancelled M erge Speed The Merge Speed operand is always set to Programmed in current version Programmed speed is used as the maximum speed along the path of the coordinated move The MCLM ladder diagram uses Coordinate System cs2 to merge an mclm10 instruction with a target absolute position of 5 0 into an mclm11 instruction with the target position of 10 5 51 MFPDN 52 MRP DN memi x Coordinate Spaen Motion Corissi Move Type Porter Speed Speed Unit Arce Rae Aron nis Doca Rate Decal Unde Type Merge Merge Speed Motion Cocmdnated Linos Move 2 MCLM10 0 50 00 Spd 20 Unit
347. onsibility or liability for actual use based on the examples and diagrams No patent liability is assumed by Rockwell Automation Inc with respect to use of information circuits equipment or software described in this manual Reproduction of the contents of this manual in whole or in part without written permission of Rockwell Automation Inc is prohibited Throughout this manual when necessary we use notes to make you aware of safety considerations Identifies information about practices or circumstances that can cause an explosion in a hazardous environment which may lead to personal injury or death property damage or economic loss Identifies information that is critical for successful application and IMPORTANT understanding of the product Identifies information about practices or circumstances that can lead to personal injury or death property damage or economic loss Attentions help you identify a hazard avoid a hazard and recognize the consequence ATTENTION Labels may be on or inside the equipment for example a drive or motor to alert people that dangerous voltage may be present ATV way Labels may be on or inside the equipment for example a drive or motor to alert people that surfaces may reach dangerous temperatures Allen Bradley CompactLogix ControlLogix Logix5000 Logix Rockwell Automation TechConnect PLC 5 SLC 500 Logix5550 PowerFlex 700S RSLogix
348. oop update rate until it Publication 1756 RM 007H EN P December 2006 172 M otion Event Instructions M AW M DW MAR M DR MAOC M DOC Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes Publication 1756 RM 007H EN P December 2006 reaches the specified Watch Position After the watch position event occurs the WatchEventStatus bit for the axis is set to 1 TRUE Multiple watch position events may be active at a given time however only one may be active at a time for any given physical axis Fach event is monitored independently and may be checked using the appropriate WatchEventStatus bit In large 1 0 connections force values can slow down the rate at IMPORTANT Vu which the controller processes repetitive watch positions To successfully execute a MAW instruction the targeted axis must be configured as either a Servo or Feedback Only axis Otherwise the instruction errs The MAW instruction execution may take multiple scans to IM PORTANT ae execute because it requires transmission of a message to the motion module The Done DN bit is not set immediately but only after this message has been successfully transmitted This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e n structured text condition the instruction so that it only executes on a transition See Appendix C not
349. op Servo Axis The PO qualifier Tran_003 limits this to the last scan of the step 5 Axis Vars I St DUUM STE CEU The SFC leaves the step when Servo Axis Vars l Stop turns on Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS M AH MAJ MAM MAG MCD MRP MCCP M APC MATC MCSV 73 Example 2 J og Forward and Reverse with S curve Relay Ladder When the servo loop is enabled And Jog Fwd orJog Rev PB turn on Set Jog Direction Run Servo Axis at Servo Axis Vars C Manual Jog Speed When Jog Fwd PB and Jog Rev PB are off stop Servo Axis Ov Move Servo_Axis ServoActionStatus Jog Fwd PB Jog Fwd PB Source Jog Rev PB Dest Jog Direction 0 Jog_Rev_PB lov Move Source 1 Dest Jog_Direction 0 AJ Motion Axis Jog Axis Servo_Axis Motion Control Servo_Axis_Ml Manual_Jog DN5 Direction Jog Direction oe ER2 Speed Servo Axis Vars C Manual Jog Speed 50 0 IP5 Speed Units Units per sec 7 Accel Rate Servo_Axis_Yars C Manual_Jog_Accel Both instructions use the same deceleration 200 and jerk rates This avoids overshoots or Accel Units Units sec2 reversals W hen you quickly toggle back and Decel Rate ee forth between instructions Units Units per sec2 Profile S Curve Accel Jerk Servo Axis Vars C Manual Jog amp ccel Jerk 100 0 Decel Jerk Servo Axis Vars C Manual Jog Decel Jerk 100 0 Jer
350. operand of a function Even though their syntax is similar functions differ from instructions in that functions can only be used in expressions Instructions cannot be used in expressions instruction An instruction is a standalone statement instruction see page 408 instruction uses parenthesis to contain its operands instruction operand Depending on the instruction there can be zero one or multiple instruction operandl operands operand2 operand3 W hen executed an instruction yields one or more values that are part of a data structure Terminate the instruction with a semi colon Even though their syntax is similar instructions differ from functions in that instructions cannot be used in expressions Functions can only be used in expressions construct A conditional statement used to trigger structured text code i e other IF THEN statements see page 409 CASE Terminate the construct with a semi colon FOR DO WHILE DO REPEAT UNTIL EXIT comment Text that explains or clarifies what a section of structured text does comment see page 425 e Use comments to make it easier to interpret the structured text start of comment e Comments do not affect the execution of the structured text e Comments can appear anywhere in structured text Publication 1756 RM 007H EN P December 2006 end of comment start of comment end of comment Assignments TIP Structured Text Prog
351. orth between jog Units Units perse A rofile Curve and Stop Axis reversals can happen in revision 15 and Accel Jerk Servo Axis Vars C Manual Jog Accel Jerk earlier when the jog and stop use an S curve profile 1000 Decel Jerk Servo Axis Vars C Manual Jog Decel Jerk 100 0 Jerk Units of Time Merge Disabled Merge Speed Programmed Fwd PB Servo_Axis_MI Manual_Jog IP MAS Motion Axis Stop Axis Servo Axis Motion Control Servo_Axis_MI Stop_Manual Jod Change Decel Yes Decel Rate Servo Axis Vars C Manual Jog Decel 200 Units Units per sec2 Yes Decel Jerk Servo Axis Vars C Manual Jog Decel Jerk 100 0 Jerk Units of Time lt lt Less Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS M AH MAJ MAG MCCP M APC MATC MCSV 59 Structured Text ze Wa it_For_Jog_ Pushbutton AJ Servo Axis Servo Axis MI Manual Jog 0 Jog_with_SC Servo xis Vars C Manual Jog Speed Unitspersec Servo_Axis Vars C Manual Jog Accel Unitspersec2 Servo Axis Vars C Manual Jog Decel Unitspersec2 SCurve Servo Axis Vars C Manual Jog Accel Jerk Servo xis Vars C Manual Jog Decel Jerk ofTime Disabled Programmed Stop Servo Axis MI Stop Manual Jog Yes Servo xis Vars C Manual Jog Decel Unitspersec2 Yes Servo xis Vars C Manual Jog Decel Jerk ofTime Tran 007 Not Jog Fwd PB Befo
352. osition cam without actually changing the position of the master axis This shifts the position cam profile along the master axis e For Axis enter the slave axis e For Position enter the absolute offset position or incremental offset distance e For Speed Acceleration Deceleration and J erk enter them for the master axis The instruction adds in the offset at the Speed Acceleration Deceleration and J erk values e Use of Time for the easiest programming and tuning of jerk Publication 1756 RM 007H EN P December 2006 For an easy way to program and tune jerk enter it as a of the acceleration or deceleration time For more information see e Program a Velocity Profile on page 1 22 e Tune an S curve Profile on page 8 363 Guideline Motion M ove Instructions M AS M AH MAM MAG MCD MRP MCCP MAPC MATC MCSV 81 Details e Use Merge to cancel the motion of How you want to handle any motion that s already in process other instructions If you wantto And you wantto Then set Add the move to any p Merge Disabled motion already in M erge Speed Programmed process The instruction ignores M Speed but you must fill it in anyway End the motion from Move atthe Speed that Merge Enabled other instructions and you set in this instruction M erge Speed Programmed just move M ove at the speed that M erge Enabled the axis is already moving erge Speed Current at The instructi
353. ot Axis M otion Cause When you use Scurve profile jerk determines how fast an axis Start while decelerating change its acceleration and deceleration e An S curve profile has to get acceleration to zero before the axis can speed up again e The axis continues to slow down until the S curve profile brings the acceleration to zero The following trends show how the axis stops and starts with a trapezoidal profile and an S curve profile Trapezoidal S curve 100 80 60 40 The axis speeds back up as soon as you start the jog The axis continues to slow down until the S curve profile again Corrective action brings the acceleration rate to zero Ifyour controller is this revision Then Result 15 or earlier Increase the deceleration rate of the This increases the deceleration jerk The axis stops MAJ instruction that starts the jog the deceleration sooner at the higher deceleration jerk 16 or later Increase the deceleration jerk of the MAJ axis stops the deceleration sooner at the higher instruction that starts the jog deceleration jerk Publication 1756 RM 007H EN P December 2006 Why does my axis reverse direction when stop and start it Troubleshoot Axis M otion 377 While an axis is jogging at its target speed you stop the axis Before the axis stops completely you restart the jog The axis continues to slow down and then reverse direction Eventually the axis change
354. pe is set to position or position and enable 6 Right gt Cam End Position while UnlatchType is set to position or position and enable 7 Duration lt 0 while UnlatchType is set to duration or duration and enable 8 Invalid EnableType value while LatchType or UnlatchType is set to enable or duration and enable 9 Invalid EnableBit value while LatchType or UnlatchType is set to enable or position and enable or duration and enable Illegal Output Compensation 37 Attempted execution with an Output Cam array containing at least one member out of range 1 Invalid M ode value 2 CycleTime lt 0 while M ode is set to pulsed or inverted and pulsed 3 DutyCycle less than 0 or greater than 100 while M ode is set to pulsed or inverted and pulsed Extended Error Codes Extended Error Codes provide additional instruction specific Publication 1756 RM 007H EN P December 2006 information for the Error Codes that are generic to many instructions Extended Error codes for the Parameter Out of Range 13 error code lists a number that refers to the number of the operand as they are listed in the faceplate from top to bottom with the first operand being counted as zero Therefore for the MAOC instruction an extended error code of 4 would refer to the Output operand s value You would then have to check your value with the accepted range of values for
355. per sec2 Decel Rate My Axis Vars C A amp uto Decel 200 p Decel Units Units per sec2 Profile Trapezoidal Accel Jerk My Axis Vars C amp uto Accel Jerk 100 0 Decel Jerk My Axis Vars C amp uto Decel Jerk 100 0 Jerk Units of Time Merge Disabled Merge Speed Programmed lt lt Less CD Motion Change Dynamics EN Axis My Axis Motion Control My Axis Ml Change Move DN Motion Type Move Change Speed No ER Speed 0 Change Accel No Accel Rate 0 Change Decel Yes Decel Rate 8 Speed Units Units per sec Accel Units Units per sec2 Decel Units Units per sec2 lt lt Less Publication 1756 RM 007H EN P December 2006 382 Troubleshoot Axis M otion Cause The axis doesn t have enough time at the new lower deceleration to stop at the target position It stops past the target position Then it corrects to get back to the target position axis overshoots axis reverses and target position returns to target position position MCD instruction changes deceleration is speed m T move starts acceleration Corrective action To avoid overshooting position either e Avoid decreasing the deceleration or deceleration jerk while an axis is decelerating along an S curve profile e Avoid increasing the programmed speed while an axis is decelerating along an S curve profile This has the same effect as decreasing the deceleration jerk e Test
356. profile takes effect automatically and becomes the current profile when cam time passes through the end of the current profile If the current cam is configured to execute once the new profile is initiated at the completion of the pass through the current cam profile and the PC bit of the currently active MATC instruction is set If the current cam is configured to execute continuously the new profile is initiated at the completion of the current pass through the current cam profile and the IP bit of the currently active MATC instruction is cleared The motion controller keeps track of time and the axis positions relative to the first profile at the time of the change and uses this information to maintain synchronization between the profiles If the Execution Schedule of an MATC instruction is set to Immediate and a time cam profile is currently in process the MATC instruction generates an Illegal Dynamic Change error If an Execution Schedule of Pending is selected without a corresponding time cam profile in progress the MATC instruction executes but no camming motion occurs until another MATC instruction with a non pending Execution Schedule is initiated This Publication 1756 RM 007H EN P December 2006 148 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M APC M M CSV Publication 1756 RM 007H EN P December 2006 allows pending cam profiles to be preloaded prior to executing the initial cam This met
357. programming example Includes a description explaining each example Publication 1756 RM 007H EN P December 2006 Sequential Function Chart SFC Preface 15 A Sequential Function Chart is a flowchart that controls your machine or process SFC uses steps and transitions to perform specific operations or actions You can use SFC to e Organize the functional specification of your system e Program and control your system as a series of steps and transitions You gain the following advantages by using Sequential Function Chart SFC e Graphical division of processes into major logic pieces e Faster repeated execution of individual pieces of your logic e A more simple screen display e Time to design and debug your program is reduced e Troubleshooting is faster and easier e Direct access to the point in the logic where the machine faulted e Easier to enhance and update For more detailed information about how to program and use SFC see Logix5000 Controllers Common Procedures Manual publication 1756 PMO001 Publication 1756 RM 007H EN P December 2006 16 Preface Conventions and Related Terms Publication 1756 RM 007H EN P December 2006 Set and clear This manual uses set and clear to define the status of bits booleans and values non booleans This term Means set the bit is set to 1 ON a value is set to any non zero number clear the bit is cleared to 0 OFF all the bits in
358. put points 0 and 7 The 1756 OB16IS supports up to 16 schedules with two schedules per output Outputs that are not scheduled are used as normal output points A mask is used to indicate which points are scheduled and which points are unscheduled Jitter and latency performance is less than 100 microseconds All of the scheduling configuration is done through the MAOC instruction If a new schedule as indicated by a change in the sequence count is received by the I O module before the current schedule has expired the current schedule is overwritten This mechanism can be used to cancel currently active schedule Status bits returned in the output echo connection may be used to determine the current state of each schedule and to trigger corresponding event tasks If a new schedule is sent by the controller and the CST timestamp has already past the output is asserted until the CST time has completely wrapped around The module does not check for an expired CST timestamp WARNING If the time between two schedules is less than the minimum schedule interval e g 100 us then jitter occurs This means that even though two outputs are scheduled at different times e g time 90 and time 110 they both activate at the same time e g time 90 The minimum schedule interval should not be set to faster than 100 us Scheduled outputs using the 1756 OB16IS module do not work with a remote chassis When used with motion and the MAOC ins
359. r Actual Tolerance or No Settle P2 m3 M ove1 DN T T T M ovel IP T F F M ovel AC T F F M ovel PC F T T M ove2 DN T T T M ove2 IP T T F M 2 F T F M ove2 PC F F T CS1 M oveTransitionStatus F F F CS1 M ovePendingStatus T F F CS1 M ovePendingQueueFullStatus T F F Publication 1756 RM 007H EN P December 2006 246 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Bit States at Transition Points of Blended M ove Using No Decel linear linear move 0 2 4 6 B 10 X Avia The following table shows the Bit Status at the various transition points shown in the preceding graph with Termination Type of No Decel For No Decel Termination Type distance to go for transition point TP2 is equal to deceleration distance for the Movel instruction Bit TP1 TP2 TP3 TP4 M ovel DN T T T T M ovel IP T F F F Movel AC T F F F ovel PC F T T T M ove2 DN T T T T M ove2 P T T T F Move2 AC F T T F M ove2 PC F F F T 1 oveTransitionStatus F T F F cs1 M ovePendingStatus T F F F cs1 M ovePendingQueueFullStatus T F F F Publication 1756 RM 007H EN P December 2006 linear linear move M otion Coordinated Instructions M M CCM M CCD M CS MCSD M CTP M CSR 247 Bit States at Transition Points of Blended M ove Using Command Tolerance The following table shows the
360. r Move Coordinated_sys MCCHM O 0 5 0 VIA O 0 0 007779 10 of Maximum 50 of Maximum 50 of Maximum Trapezoidal Disabled Programmed MCCM Coordinated sys MCCM 0 0 MCCM Move position 0 0 5 0 via 0 0 10 tofmaximum 50 tofmaximum 50 tofmaximum Trapezoidal 0 Disabled programmed Publication 1756 RM 007H EN P December 2006 318 Circular Programming Reference Motion Coordinated Instructions CLM M M CS MCSD MCT M CTP M CSR Guide Circle Type Used in Validation Errors Direction 2D Direction 3D Comments 2D 3D Both Radius 2D Error 25 Illegal CW CCW as viewed N A A radius forces arc length to be lt Instruction from the 180 Shortest arc perpendicular to the Error 45 Endpoint circular plane A radius forces arc length to be gt Startpoint 180 Longest arc Error 49 R too small Full Circles can be programmed R lt 001 or R too short to span For full circles set Position to be programmed points any point on circle except Startpoint and use one of the Full direction types Center Point Both Error 44 Collinearity CW CCW as viewed Shortest Longest 3 Full Circles can be programmed 3D only from the arc In Full circles perpendicular to the placement of 4 In 2D only Endpoint Startpoint Error 45 Endpoint circular plane endpoint defines is legal Therefore full circles may Startpoi
361. r Velocity Un constrained 249 No Decel 249 No Settle 249 Target Position Entry Dialog 270 Motion Coordinated Shutdown M CSD Arithmetic Status Flags 336 Changes to Status Bits 336 Axis Status Bits 336 Coordinate M otion Status Bits 337 Index 435 Coordinate System Status Bits 336 Description 335 Error Codes 336 Fault Conditions 336 Operands 335 Coordinate System 335 M otion Control 335 Relay Ladder 335 Structured Text 335 M otion Coordinated Shutdown Reset 359 M otion Coordinated Shutdown Reset M CSR Arithmetic Status Flags 360 Changes to Status Bits 360 Axis Status Bits 360 Coordinate Motion Status Bits 361 Coordinate System Status Bits 360 Description 151 359 Error Codes 360 Fault Conditions 360 Operands 359 Coordinate System 359 M otion Control 360 Relay Ladder 359 Structured Text 359 M otion Coordinated Stop 327 M CS Arithmetic Status Flags 330 Changes to Status Bits 331 Axis Status Bits 331 Description 328 Extended Error Codes 330 Fault Conditions 330 Operands 327 Decel Rate 330 Error Codes 330 M otion Control 330 Relay Ladder 327 Structured Text 328 M otion Coordinated Transform M CT 338 numeric expression 401 0 operators Publication 1756 RM 007H EN P December 2006 436 Index order of execution structured text 407 order of execution Structured text expression 407 OUTPUT_CAM data type 393 OUTPUT COMPENSATION data type 394 P postscan structured text 400 process motion ins
362. radius position array and the old position defines the center position of the circle For a non full circle case the Position parameter array defines the endpoint of the arc For a full circle case the Position parameter array defines any second point along the circle except the endpoint Incremental Center Incremental The sum of the via center radius position array and the old position defines the center position of the circle For a non full circle case the sum of the Position parameter array and the old position defines the endpoint of the arc For a full circle case the sum of the Position parameter array and the old position defines any second point along the circle except the endpoint Publication 1756 RM 007H EN P December 2006 306 Motion Coordinated Instructions CLM M CCM M CCD M CS MCSD M CTP M CSR Publication 1756 RM 007H EN P December 2006 Direction The Direction operand defines the rotational direction of a 2D circular move as either clockwise or counterclockwise according to the right hand screw rule For a 3D circular move the direction is either Shortest or Longest In both 2D and 3D it can also indicate if the circular move is to be a full circle Speed The Speed operand defines the maximum vector speed along the path of the coordinated move Speed Units The Speed Units operand defines the units applied to the Speed operand either directly in coordination units or as a
363. ramming 399 Use an assignment to change the value stored within a tag An assignment has this syntax tag expression where Component Description tag represents the tag that is getting the new value the tag must be a BOOL SINT INT DINT or REAL is the assignment symbol expression represents the new value to assign to the tag If tag is this data type Use this type of expression BOOL BOOL expression SINT numeric expression INT DINT REAL ends the assignment The tag retains the assigned value until another assignment changes the value The expression can be simple such as an immediate value or another tag name or the expression can be complex and include several operators and or functions See the Expressions on page 401 for details 1 0 module data updates asynchronously to the execution of logic If you reference an input multiple times in your logic the input could change state between separate references If you need the input to have the same state for each reference buffer the input value and reference that buffer tag For more information see Logix5000 Controllers Common Procedures publication 1756 PM 001 Publication 1756 RM 007H EN P December 2006 400 X Structured Text Programming Specify a non retentive assignment The non retentive assignment is different from the regular assignment described above in that the tag in a non retentive assignment is reset to zero each
364. rands are the same as those for the relay ladder MGSP instruction M OTION INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and emains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when the group of axes have been successfully set to Shutdown state ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured group The Motion Group Strobe Position MGSP instruction synchronously latches all command and actual position values of all axes in the specified group at the time of execution The MGSP instruction takes only one parameter simply select or enter the desired axis to strobe If the targeted group does not appear in the list of available groups the group has not been configured for operation Use the Tag Editor to create and configure a new groups The MGSP instruction may be used at any time to capture a complete set of command and actual position information for all axes in the specified group This operation is often required as a precursor to computations involving position values of different axes within the group Arithmetic Status Flags Fault Conditions Error Codes Status Bits Example Motion Group Instructions M GS MGSD M GSR MGSP 167 To successfully execute a MGSP instruction the t
365. ranslations Array 3 M achine Virtual Coordinate System Coordinate System dialog Coordinate System dialog Coordinate System dialog Coordinate System dialog Instruction Faceplate Instruction Faceplate Publication 1756 RM 007H EN P December 2006 Computed Output Active CS2 Data Destination Instruction J oint Positions 1 J 2 J 3 Machine Real e Coordinate System MCT Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 341 Programming Guidelines Follow these guidelines to use an MCT instruction Don t let the robot get fully stretched or fold back on itself Otherwise it can start to move at a very high speed In those positions it loses its configuration as a left or right arm When that happens it can start to move at a very high speed Determine the working limits of the robot and keep it within those limits Publication 1756 RM 007H EN P December 2006 342 Motion Coordinated Instructions M CLM M M M CS MCSD MCT M CTP M CSR Guideline Examples and notes Set up a coordinate system of axes for the Cartesian positions of the robot These axes are typically virtual Number of axes in the coordinate system Coordinate System Properties Arm_X1_XZ_X3 Motion Group Type Dimension Coordinate 0 1 x1 1 2 2 2 x3 x3 Axis Name Number of axes to tran
366. rdinate system has a M aximum Deceleration of 0 Changes to Status Bits Motion Status Bits 1 Open the Properties for the coordinate system 2 Use the EXERR value to see which axis has the M aximum Deceleration of 0 3 Set the M aximum Deceleration for the axis If the Move Type is And Merge is Then the instruction changes these bits Bit Name State Meaning NOT Absolute M aster Disabled M oveStatus TRUE Axis is M oving Enabled M oveStatus TRUE Axis is M oving J ogStatus FALSE Axis is no longer J ogging GearingStatus FALSE Axis is no longer Gearing Absolute M aster Offset or Incremental M aster Offset Publication 1756 RM 007H EN P December 2006 p gt MasterOffsetMoveStatus TRUE Axis is Offset Motion M ove Instructions M AS M AH MAJ MAM MAG MCD MRP MCCP M APC MATC MCSV 85 Example Move Relay Ladder This example uses the bit pattern of Reg Sequence to step through the logic When Reg Sequence 3 turns on Move Servo Axis the distance of Reg Error When the move is complete multiply Reg Sequence by 2 This turns off bit 3 of Reg Sequence and turns on bit 4 Reg Sequence 3 AM Motion Axis Move EN Axis Servo Axis Motion Control Servo Axis MI Reg Correction Move DN5 A Move Type of 1 zIncremental move The Move Type 1 instruction moves the axis by the Position value each time it executes Position Reg Error 02 IP5 Speed 1 Speed
367. re can also be used to merge gear ratio changes on the fly even changes in direction The motion controller automatically ramps the slave axis to the speed implied by the master axis at the new ratio and or direction The operation of the clutch ramp generator has no affect on jog or move processes that might be in progress on the slave axis Changing Master Axes The master axis for electronic gearing can be changed at any time even while gearing is currently enabled However since it is possible to have electronic gearing enabled on more than one axis at a time if a Servo master axis and slave axis are reversed the axes become cross coupled and unexpected motion may result For example if you are gearing Axis 0 to Axis 1 defined as a Servo axis and then want to change to gearing Axis 1 to Axis 0 you must first disable gearing on Axis 0 see Disable Gearing later in this section This is because specifying Axis 1 as the slave axis with Axis 0 Motion M ove Instructions M AS M AH MAJ MAM MAG MCD MRP MCCP M APC MATC MCSV 95 Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes as the master axis does not automatically disable Axis 0 from being a slave axis with Axis 1 as the master axis Moving While Gearing An incremental MAM instruction may be used for the slave axis or master axis if the Axis Type is configured as Servo while the electronic gearing is enabled This is particularly us
368. re the SFC leaves the step stop Servo Axis The PO qualifier lu limits this to the last scan of the step The SFC leaves the step when og Fwd PB turns off Publication 1756 RM 007H EN P December 2006 60 Motion Move Instructions MAS M AH MAM MAG MCD M RP M CCP M ATC M CSV Motion Axis Home MAH Use the MAH instruction to home an axis Two different homing modes can be selected during axis configuration Active or Passive If an Active homing sequence is selected the axis executes the configured Home Sequence Type and establishes an absolute axis position If Passive homing is selected however no specific homing sequence is executed and the axis is left waiting for the next marker pulse to establish the home position ATTENTION Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Operands Relay Ladder Operand Type Format Description Axis AXIS FEEDBACK tag Name of the axis to perform operation on Motion Axis Home i AXIS VIRTUAL 2 RDS Motion Control f PS AXIS GENERIC Co AXIS SERVO AXIS SERVO DRIVE Motion MOTION_ tag Structure used to access control INSTRUCTION instruction status parameters Structured Text MAH Axis MotionControl The operands are the same as those for the relay ladder MAH instruction MOTION_INSTRUCTION Data Type M
369. rection Cams can be configured to add or subtract their incremental contribution to the axis command position Control over this behavior is via the Direction parameter Camming in the Same Direction When Same is selected or entered as the Direction for the MATC instruction the axis position values computed from the cam profile are added to the command position of the axis This is the most common operation as the profile position values are used just as entered in the original cam table That is consecutive increasing profile values result in axis motion in the positive direction and vice versa Publication 1756 RM 007H EN P December 2006 142 Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions MAS MAH MAJ MAM MAG MCD MRP M CCP M ATC M CSV Camming in the Opposite Direction When Opposite is selected or entered as the Direction the axis position values computed from the cam profile are subtracted from the command position of the axis Thus axis motion is in the opposite direction from that implied by the original cam table That is consecutive increasing profile values result in axis motion in the negative direction and vice versa Changing the Cam Profile When Unchanged is selected or entered as the Direction other time cam parameters may be changed while preserving the current or previous camming direction same or opposite This is useful when the current direction is not know
370. red to add or subtract their incremental contribution to the slave axis command position Control over this behavior is via the Direction parameter Camming in the Same Direction When Same is selected or entered as the Direction for the MAPC instruction the slave axis position values computed from the cam profile are added to the command position of the slave axis This is the most common operation as the profile position values are used just as entered in the original cam table That is consecutive increasing profile values result in axis motion in the positive direction and vice versa Camming in the Opposite Direction When Opposite is selected or entered as the Direction the slave axis position values computed from the cam profile are subtracted from the command position of the slave axis Thus axis motion is in the opposite direction from that implied by the original cam table That is consecutive increasing profile values result in axis motion in the negative direction and vice versa Preserving the Current Camming Direction When Unchanged is selected or entered as the Direction other position cam parameters may be changed while preserving the current or previous camming direction same or opposite This is useful when the current direction is not known or not important For first time execution of a cam with Unchanged selected the control defaults the direction to Same Publication 1756 RM 007H EN P December 2006 122
371. rget endpoints The new deceleration Jerk Rate becomes smaller The time required to decelerate to zero causes velocity to undershoot passing through zero and becoming negative Axis motion also reverses direction until velocity returns to zero An additional profile is generated to bring position back to the programmed target Point where deceleration was decreased Velocity Position Affect of Change to Deceleration Publication 1756 RM 007H EN P December 2006 Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes M otion Coordinated Instructions MCLM MCCM MCCD MCS MCSD MCT M CTP M CSR 325 Scope The Scope operand lets you determine whether the changes are to affect the current active instruction MCCD is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Extended Error codes help to further define the error message given for this particular instruction Their behavior is dependent upon the Error Code with which they are associated The Extended Error Codes for Servo Off State 5 Shutdown State 7 Axis Type Not Servo 8 Axis Not Configured 11 Homing In Process Error 16 and Illegal Axis Data type 38 errors all
372. rk Yes Servo Axis Vars C Auto Decel Jerk 100 0 of Time lt lt Less Publication 1756 RM 007H EN P December 2006 72 Motion Move Instructions MAS M AH MAJ MAM MAG MCD M RP M CCP M M CSV J og with Speed Change Structured Text When Servo Axis Vars LAutoRun turns on Run Servo Axis at Auto Speed If Auto Speed changes then change the speed of the jog to the new value of Auto Speed When Servo Axis Vars I Stop turns on stop Servo Axis The SFC starts Step 001 when Servo_Axis_Vars AutoRun turns on Step_000 When the SFC starts the step jog Servo Axis The P1 qualifier limits this to the first scan of the step The construct and assignment limit the M CD instruction to just one scan when Auto Speed changes AJ Servo Axis Servo Axis MI Run_Jog 0 Auto Speed Unitspersec Step 001 Servo Vars C uto Accel UnitspersecZ Servo xis Vars C Auto Decel Unitspersec2 Trapezoidal 100 100 tofTime Disabled Programmed Change Auto Speed If Auto Speed lt gt Auto Speed Last Then MCD Servo Axis Servo Axis MI Change Jog Jog Yes Auto Speed No 0 No 0 Unitspersec UnitspersecZ UnitspersecZ Auto Speed Last Auto Speed Stop Auto Run Jog Stop AS Servo_ xis Servo Axis MI Stop Auto All Yes Servo_Axis_Vars C Auto Decel ofMaximum Yes Servo_Axis_Vars C Auto Decel Jerk ofTime Before the SFC leaves the step st
373. rk operands if the Profile is S curve You or tag must always fill them in how ever Decel J erk REAL Immediate Accel J erk is the acceleration jerk rate for the axis or tag e Decel J erk is the deceleration jerk rate for the axis J erk Units DINT Immediate Use these values to get started e Accel J erk 2 100 e Decel erk 2 100 e j erk Units of Time 2 You can also enter the jerk rates in these J erk Units e Units per sec 0 e of Maximum 1 Merge DINT Immediate Do you want to turn all current axis motion into a pure jog governed by this instruction regardless of the motion instructions currently in process e NO Choose Disabled 0 e YES Choose Enabled 1 Merge Speed DINT Immediate If Merge is Enabled which speed do you want to jog at Publication 1756 RM 007H EN P December 2006 e Speed of this instruction Choose Programmed 0 e Current speed of the axis Choose Current 1 Motion M ove Instructions M AS M AH MAJ MAG MCSV 67 Structured Text AJ Axis MotionControl The structured text operands are the same as the relay ladder Direction Speed operands SpeedUnits AccelRate p AccelUnits DecelRate DecelUnits Profile This operand Has these options w hich you eee ate nter as text renter number JerkUnits Merge enter as te are ergeSpeed SpeedUnits unitspersec
374. rom the manufacturing facility However if your product is not functioning it may need to be returned United States Contact your distributor You must provide a Customer Support case number see phone number above to obtain one to your distributor in order to complete the return process Outside United Please contact your local Rockwell Automation representative for States return procedure www rockwellautomation com Power Control and Information Solutions Headquarters Americas Rockwell Automation 1201 South Second Street Milwaukee WI 53204 2496 USA Tel 1 414 382 2000 Fax 1 414 382 4444 Europe Middle East Africa Rockwell Automation Vorstlaan Boulevard du Souverain 36 1170 Brussels Belgium Tel 32 2 663 0600 Fax 32 2 663 0640 Asia Pacific Rockwell Automation Level 14 Core F Cyberport 3 100 Cyberport Road Hong Kong Tel 852 2887 4788 Fax 852 2508 1846 Publication 1756 RM 007H EN P December 2006 PN 953030 45 Supersedes Publication 1756 RM 007G EN P May 2005 Copyright 2006 Rockwell Automation Inc All rights reserved Printed in the U S A AB Allen Bradley fog mee eee ens
375. roperties General Tab and look under the Brackets column of the Axis Grid to determine which axis has a Maximum Deceleration value of 0 Click on the ellipsis button next to the offending axis to access the Axis Properties screen Go to the Dynamics tab and make the appropriate change to the Maximum Deceleration Value If the Extended Error number is 1 this means the Coordinate System has a Maximum Deceleration Value of 0 Go to the Coordinate System Properties Dynamics Tab to correct the Maximum Deceleration value Publication 1756 RM 007H EN P December 2006 150 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M APC M ATC M CSV ATC Changes to Status Bits Example Publication 1756 RM 007H EN P December 2006 Status Bits If the Execution Schedule is set to Immediate execution of the MATC instruction simply sets the Time Cam Status bit to True Bit Name State Meaning TimeCamStatus TRUE Time Camming is Enabled TimeCamPendingStatus FALSE No pending Time Cam If the Execution Schedule is set to Pending execution of the MATC instruction does not affect the current state of the Time Cam Status bits Time Cam Pending Status bit is set to True immediately and transitions to False when the pending cam becomes the active cam Bit Name State Meaning TimeCamStatus N A Time Camming is Enabled TimeCamPendingStatus TRUE Pending Time Cam Relay Ladder MATC Motion Axis T
376. rovides a programmer with details about the motion M instructions that are available for a Logix5000 controller You should anua already be familiar with how the Logix5000 controller stores and processes data Novice programmers should read all the details about an instruction before using the instruction Experienced programmers can refer to the instruction information to verify details Purpose of This Manual This manual provides information about each motion instruction This section Provides this type of information Instruction name Identifies the instruction Defines whether the instruction is an input or an output instruction Operands Lists all the operands of the instruction Structured Text Describes the use of operands in Structured Text format M otion Instruction structure Lists control status bits and values if any of the instruction Description Arithmetic status flags Fault conditions Describes the instruction s use Defines any differences when the instruction is enabled and disabled if appropriate Defines whether or not the instruction affects arithmetic status flags Defines whether or not the instruction generates minor or major faults if so defines the fault type and code Error Codes Lists and defines the applicable error codes Status Bits Lists affected status bits their states and definitions Example Provides at least one
377. rovides time compensation for the unlatch operation Mode DINT The M ode determines the behavior of the output bit The following four mode options are available A value of less than 0 or greater than 3 results in an Illegal Output Compensation error Value Description 0 Normal The output bit is set for the latch operation and is reset for the unlatch operation 1 Inverted The output bit is reset for the latch operation and is set for the unlatch the operation 2 Pulsed The output bit is set for the latch operation and for the on duty state of pulse and is reset for the unlatch operation and for the off duty state of the pulse 3 Inverted and Pulsed The output bit is reset for the latch operation and for the on duty state of the pulse and is set for the unlatch operation and for the off duty state of the pulse CycleTime REAL Pulse time in seconds If mode is Pulsed or Inverted and Pulsed and CycleTime is less than or equal to 0 an Illegal Output Compensation error results DutyCycle REAL The percent of CycleTime in which the pulse is to be turned on on duty A value of 50 represents 50 on duty A value of less than 0 or greater than 100 returns an Illegal Output Compensation error Publication 1756 RM 007H EN P December 2006 396 Data Types Structures Notes Publication 1756 RM 007H EN P December 2006 Appendix C Structured Text Programming Introduction This appendix describes issues tha
378. rrational gear ratio of 3 can be equivalently specified as 1 slave count to 3 master counts 10 slave counts to 30 master counts 3 slave counts to 9 master counts etc Clutch When the Clutch check box is checked the slave axis accelerates or decelerates to the speed that it would be moving if it were currently geared to the selected master axis at the specified gear ratio and direction using a trapezoidal velocity profile linear acceleration or deceleration Once the slave axis has reached the gearing speed electronic gearing is automatically activated according to the other selections Enter the desired Accel Rate as a percentage of the current configured maximum acceleration value or directly in the configured user units for acceleration Publication 1756 RM 007H EN P December 2006 94 Motion Move Instructions MAS M AH MAJ Publication 1756 RM 007H EN P December 2006 MAG M CD M RP M CCP M ATC M CSV This clutch function works much like the clutch in a car allowing the slave axis to be smoothly engaged to the master axis as shown below Master Velocity Time Slave Velocity Time Jog status Gearing_status Ramped Gearing Jog Stopped Initiated Gearing Turned Clutch Function Using the clutch feature avoids the uncontrolled acceleration or deceleration that results when electronic gearing is enabled while the master axis is moving The clutch featu
379. rror returns a positive number 0 n it is referring to the offending axis in the coordinate system Go to the Coordinate System Properties General Tab and look under the Brackets column of the Axis Grid to determine which axis has a Maximum Deceleration value of 0 Click on the ellipsis button next to the offending axis to access the Axis Properties screen Go to the Dynamics tab and make the appropriate change to the Maximum Deceleration Value If the Extended Error number is 1 this means the Coordinate System has a Maximum Deceleration Value of 0 Go to the Coordinate System Properties Dynamics Tab to correct the Maximum Deceleration value None When the input conditions are true the controller changes the speed acceleration or deceleration rate of a move profile or jog profile in progress for axis1 Relay Ladder MCD Motion Change Dynamics Axis Axisl E Motion Control MCD 1 Motion Type Move Change Speed Yes Speed 75 TTTY Change Accel Yes Accel Rate 50 Change Decel No Decel Rate 0 Speed Units of Maximum Accel Units of Maximum Decel Units of Maximum lt lt Less MCD Ladder Example Structured Text MCD Axis1 MCD 1 Move Yes 75 Yes 50 No 0 960fmaximum 96ofmaximum 96ofmaximum Motion M ove Instructions MAS MAH MAJ MAG MCD MRP MCCP MAPC MATC MCSV 103 Motion Redefine Position Use the MRP instruction to change the command or actual position of M RP an axis The value specified by
380. rt of the Tuning Process Tune Accel Time Rea Seconds M easured Acceleration Time of Tuning Profile Tune Decel Time Rea Seconds M easured Deceleration Time of Tuning Profile Tune Acce Rea pos units sec Calculated Acceleration Time of Tuning Profile Tune Dece Rea pos units sec Calculated Deceleration Time of Tuning Profile Tune Velocity Rea mV KCPS M easured Velocity Scaling factor of Scaling axis Drive M otor Encoder system Tune Rise Time Rea mV KCPS M easured Rise Time of Tuning Step Response Profile Tune Velocity Rea Hertz Computed Bandwidth of External Bandwidth Velocity Servo Drive Publication 1756 RM 007H EN P December 2006 226 Motion Configuration Instructions M AAT M RAT M AHD M RHD If the External Vel Servo Drive configuration bit parameter is FALSE indicating interface to an external torque servo drive the following output parameters are generated Axis Parameter Data Type Units Meaning Tune Status Rea Status Report of the Tuning Process Tune Accel Time Rea Seconds M easured Acceleration Time of Tuning Profile Tune Decel Time Rea Seconds M easured Deceleration Time of Tuning Profile Tune Acce Rea pos units sec Calculated Acceleration Time of Tuning Profile Tune Dece Rea pos units sec Calculated Deceleration Time of Tuning Profile Effective Inertia Rea mV KCPS Computed Effective Inertia of Drive M otor system Position Servo Rea He
381. rt point and the end point The program is trying to generate a two dimensional arc going from 0 0 current position to 20 0 However the user tried to program a radius type circle with a radius that is too short to span the distance between the startpoint and endpoint Motion Coordinated Circular Move ND Coordinate System Cocecinated_sys 21 Target Position Entry Coordinated_sys MCCM_Move_position 0 Radius 1 x Motion Control MCCM 0 0 Move Type Postion i R gt Tes per MOCM Move posiion O gt Axis Name Target Position Actual Postion Radius Avis Axis 1200 00 99 Circle Type Axis 00 Vie Center Fladus Direction Speed Speed Urils Units per sec Accel Rate 50 Accel Units Z of Maximum Decal Rate 50 Decel Units of Maximum Piotle Trapezodel Termination Type 1 Set Targets Actuals Merge Disabled Meigs Speed Programmed lt lt Less Ladder Program and Target Entry Screen that Generate Error 49 Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 315 CIRCULAR SMALL R ERROR 49 Example This second example of error 19 shows a situation where the radius type circle uses a radius of magnitude of less than 0 001 The program is trying to generate a two dimensional arc going from 0 0 current position to 0 00099 0 00099 This error occurs because the user tried to program a ra
382. rtz Calculated M aximum Position Servo Bandwidth Loop Bandwidth The above output parameters generated by the MRAT instruction serve as inputs to a subsequent MAAT instruction which performs further tuning calculations and applies the results to various axis servo and dynamic configuration parameters Tune Status Parameter Conditions may occur that make it impossible for the controller to properly perform the tuning operation When this is the case the tuning process is automatically aborted and a tuning fault reported that is stored in the Tune Status output parameter GSVable It is also possible to manually abort a tuning process using a MAS instruction which results in a tuning fault reported by the Tune Status parameter Possible values for Tuning Status are shown in the table below Status Code Code Meaning Tune Success 0 Tune process has been successful Tune In Process 1 Tuning is in progress Tune Aborted 2 Tuning Process was aborted by user Tune Time out 3 Tuning Process has timed out Tune Servo Fault 4 Tuning Process Failed due to Servo Fault Tune Travel Fault 5 Axis reached Tuning Travel Limit Tune Polarity Fault 6 Axis motion heading in wrong direction due to incorrect motor encoder polarity configuration Tune Speed Fault 7 Axis tuning speed too low to achieve minimum measurement accuracy Publication 1756 RM 007H EN P December 2006 Arithmetic Status Flags
383. run a tuning M RAT Relay Ladder motion profile for an axis Structured Text Apply the results of a previously executed MAHD Relay Ladder M RHD instruction Structured Text The MAHD instruction generates a new set of encoder and servo polarities based on the observed direction of motion during the M RHD instruction Command the servo module to run one of three M RHD Relay Ladder diagnostic tests on an axis Structured Text Publication 1756 RM 007H EN P December 2006 218 Motion Configuration Instructions M AAT M RAT M AHD M RHD Motion Apply Axis Tuning MAAT Operands MAAT Motion Apply Axis Tuning Axis imi Motion Control vvv MAAT Axis MotionControl Description Publication 1756 RM 007H EN P December 2006 The Motion Apply Axis Tuning MAAT instruction is used compute a complete set of servo gains and dynamic limits based on the results of a previously run Motion Run Axis Tuning MRAT instruction and update the motion module with these new gain parameters While this instruction takes no explicit parameters input is derived from the Axis Tuning Configuration parameters as described in the Motion Axis Object specification After execution of the MAAT instruction the corresponding axis should be ready for servo activation Relay Ladder Operand Type Format Description Axis AXIS SERVO tag Name of the axis to perform operation on AXIS SERVO DRIVE Motion MOTION _ tag
384. rvo fault Description The Motion Axis Gear MAG instruction enables electronic gearing Publication 1756 RM 007H EN P December 2006 between two axes at a specified ratio Electronic gearing allows any physical axis to be synchronized to the actual or command position of another physical axis at a precise ratio It provides a direct edge to edge lock between the two axes no maximum velocity acceleration or deceleration limits are used The speed acceleration and deceleration of the slave axis is completely determined by the motion of the master axis and the specified gear ratio The maximum velocity acceleration or deceleration limits established during axis configuration do not apply to electronic gearing Select or enter the desired Master Axis Slave Axis and Direction and enter a value or tag variable for the desired ratio If an axis is dimmed gray or not shown in the Slave Axis pop up menu the physical axis is not defined for Servo operation If the targeted axis does not appear in the list of available axes the axis has not been configured for servo operation Use the Tag Editor to create and configure a new axis Electronic gearing remains active through any subsequent execution of jog or move processes for the slave axis This allows electronic gearing motions to be superimposed with jog or move profiles to create complex motion and synchronization Motion M ove Instructions M AS M AH MAJ
385. s direction again and moves in the programmed direction IM PORTANT You shouldn t see this situation in revision 16 and later See Corrective action for Revision 16 or Later on page 380 Example You use a Motion Axis Stop MAS instruction to stop a jog While the axis is slowing down you use a Motion Axis Jog MAJ instruction to start the axis again The axis continues to slow down and then moves in the opposite direction Eventually goes back to its programmed direction Look for Jog_PB sLocal 4 Data 1 0 My Axis OK Lower deceleration than the stopping instruction S curve profile in the instruction that starts the motion Jog PB Local 4 l Data 1 0 Stop Type is J og or M ove Higher deceleration than the jogging instruction For example Change Decel is set to No This means the axis uses its M aximum Deceleration AJ Motion Axis Jog EN Axis My Axis Motion Control Manual Jog Direction 0 ER Speed Manual_Jog_Speed 60 0 IP Speed Units Accel Rate Units per sec Manual_Jog_Accel 200 Accel Units Units per sec2 Decel Rate Manual_Jog_Decel 20 0 Decel Units Units per sec2 Profile S Curve Accel Jerk Manual_Jog_Accel_Jerk 100 0 Manual Jog Decel Jerk 100 0 Jerk Units of Time Merge Disabled Merge Speed Programmed Decel Jerk lt lt Less AS Motion amp xis Stop EN Axis My Axis Motion Control Stop Jog DN
386. s S curve You Tag must always fill them in how ever Decel J erk REAL Immediate Accel J erk is the acceleration jerk rate for the axis Tag e Decel J erk is the deceleration jerk rate for the axis J erk Units DINT Immediate Use these values to get started e Accel J erk 2 100 e Decel J erk 2100 e J erk Units of Time 2 You can also enter the jerk rates in these J erk Units e Units per sec 0 e of Maximum 1 Merge DINT Immediate Do you want to turn all current axis motion into a pure move governed by this instruction regardless of the motion instructions currently in process e NO Choose Disabled 0 e YES Choose Enabled 1 M erge Speed DINT Immediate If M erge is Enabled which speed do you want to move at e Speed of this instruction Choose Programmed 0 e Current speed of the axis Choose Current 1 Publication 1756 RM 007H EN P December 2006 78 Motion Move Instructions M AS M AH MAJ MAM MAG MCD M RP M CCP M M CSV SpeedUnits AccelUnits DecelUnits AccelJerk AM Axis MotionControl oveType Position Speed AccelRate DecelRate Profile JerkUnits ergeSpeed Publication 1756 RM 007H EN P December 2006 DecelJerk Merge Structured Text The operands are the same as the relay ladder instruction This operand Has these options which you enter as text or enter as a number SpeedUnits unitspersec ofmaximum AccelU
387. s desired to reach the target position Motion greater than one unwind cycle is allowed in Incremental mode MCLM Move Type Examples The following examples show the use of the MCLM with Move Type Publication 1756 RM 007H EN P December 2006 of Absolute first example and Incremental second example to arrive at the same result The basic assumptions are e The 2 axes Axis0 and Axis1 are both members of the coordinate system Coordinated sys e Axis0 and Axis1 are orthogonal to each other M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 259 e Coordinated sys is initially at 5 5 units Move the Coordinated sys linearly to 10 10 units at the vector speed of 10 0 units per second with the acceleration and deceleration values of 5 0 units per second The following graph is the path generated by the above assumptions 0 US F 12 4 12 3 n Resulting Plot of Path The total distance travelled along the path of the vector is DAxis0 210 525 DAxis1 10 5 2 15 TotalDist J DAxis0 DAxisl 15 811388 The vector speed of the selected axes is equal to the specified speed in the position units per second The speed of each axis is proportional to the distance traveled by the axis divided by the square root of the sum of the squares of the distance moved by all axes The actual speed of Axis0 is the following percent of the vector speed of t
388. s false before the instruction is done or errored Rung EN DN or ER The instruction is done DN BOOL The transform process keeps running after the instruction is done An error happened ER BOOL Identify the error number listed in the error code field of the M otion control tag then refer to Error Codes ERR for M otion Instructions on page 383 of this manual The transform process is IP BOOL Any of these actions cancels the transform and turns off the IP running bit e Applicable stop instruction e Shutdown instruction e Fault action Description Use the MCT instruction to start a transform that links two coordinate systems together This is like bi directional gearing One way to use the transform is to move a non Cartesian robot to Cartesian positions X3 MCT Motion Coordinated Transform Instruction X2 x1 E xl J1 Z1 You move a system of virtual axes to The transform converts the motion to joint Cartesian positions X1 X2 X3 angles and moves the robot The transform controls up to three joints of the robot J1 J2 and J3 Publication 1756 RM 007H EN P December 2006 340 Motion Coordinated Instructions M CLM M M M CS MCSD MCT M CTP M CSR Data Flow of MCT Instruction The following illustrations show the flow of data when an MCT Between Two Coordinate Instruction is active CS1 is a Cartesian Coordinate system containing Systems X1 X2 and axes as the source of th
389. s is a transitional instruction Meu Lin de time you wantto n relay ladder toggle the rung condition in from cleared to set each time you want to execute the instruction execute the instruction e n structured text condition the In structured text instructions execute each time they are scanned instruction so thatitonly executes Condition the instruction so that it only executes on a transition Use either of these on a transition methods e qualifier of an SFC action e Structured text construct For more information see Appendix C e Choose whether to stop all motion If you want to stop Then choose this Stop Type or only Specine type otmotnan All motion in process for this axis All The instruction uses a trapezoidal profile and stops the axis Stop only a certain type of motion but The type of motion that you want to stop leave other motion processes running The axis could still be moving when the MAS instruction is complete The instruction uses an S curve profile to stop the axis only if e The Stop Type is J og or M ove and e The jog or move used an S curve profile Example Suppose your axis is executing both a jog and a move at the same time And Suppose you want to stop only the jog but leave the move running In that case choose a Stop Type of J og e To stop gearing or camming To stop a gearing or position camming process enter the slave axis to turn off the specific select the
390. s per sec AccD ec 50e Progismmed lt lt Lon WCLMIOP JE Publication 1756 RM 007H EN P December 2006 f Timer Delay lt EN gt TON DN Motion Cocedinated Move Accel Rate Acoel Units Dec Rate r Ladder Diagram Showing M erge Coondrate on Motion Conil Hove Type 0 Porto Merge set to Speed Coordinated Speed Uri Motion for the instruction to be merged Merge Speed is Programmed Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 269 If the axes are orthogonal to each other and the coordinate system cs2 is initially at 0 0 units then the motion caused by this diagram depends on the time at which the second instruction is executed The blending begins as soon as the second move is initiated and the first move is terminated immediately In the ladder diagram for this example transition begins when the timer Tdelay expires Profile After Meige ke Original Profile X axis Graph Show ing Result of Merge The bit states at various transition points for the merge move Bit TP1 TP2 TP3 TP4 M ovel DN T T T T M ovel IP T F F F Movel AC T F F F mcclm10 PC F T T T M ove2 DN T T T T M ove2 IP T T T F Move2 AC F T T F M ove2 PC F F F T cs2 M oveTransitionStatus F T F F cs2 M ovePending
391. s sec Calculated Acceleration Time of Tuning Profile Tune Decel Rea pos units sec Calculated Deceleration Time of Tuning Profile Effective Inertia Rea mV KCPS Computed Effective Inertia of Drive M otor system Position Servo Rea Hertz M aximum Position Servo Loop Bandwidth The axis configuration parameters that MAAT generates as output depend on the External Drive configuration If the External Vel Servo Drive configuration bit parameter is TRUE indicating interface to an Publication 1756 RM 007H EN P December 2006 220 Motion Configuration Instructions M AAT M RAT M AHD M RHD external velocity servo drive the following output parameters are generated Axis Parameter Data Type Units Meaning Pos Proportional Rea 1 msec Position Servo Loop Proportional Gain Gain Pos Integral Gain Rea 1 msec2 Position Servo Loop Integral Gain Set to Zero Position Servo Loop Proportional Gain Velocity Command Feedforward Set to Zero Velocity Rea Feedforward Acceleration Rea Feedforward M ax Speed Rea M ax Acceleration Rea pos units sec pos units sec M aximum Speed for M otion Profiles Setto Tuning Velocity M aximum Acceleration for M otion Profiles M ax Deceleration Rea pos units sec M aximum Acceleration for M otion Profiles Output Filter Rea Hertz Bandwidth of Low Pass Servo Output Bandwidth Filter Output Scaling Rea mV KCPS Scale Factor applied to ou
392. s several moves This reduces jerk e You must calculate the acceleration for the triangular velocity profile e You must also calculate the starting speed for each move in the deceleration half of the profile 0 00 1 00 200 3 00 4 00 5 00 6 00 Suppose you want to program a pick and place action in 4 moves And to keep jerk low you want to use a triangular velocity profile For this situation use termination type 5 The other termination types may not let you get to the speed you want Termination type 5 Termination types 2 3 or 4 You want to get to this but the axes have to decelerate before they get there The axes won t go any faster than a speed that lets them decelerate to 0 without overshooting the target position The shorter the move You calculate the acceleration and you must also calculate the starting speed for each move The axes accelerate to the speed that you want You must calculate the starting speed for each move in the deceleration half of the the lower the maximum speed profile Publication 1756 RM 007H EN P December 2006 252 Motion Coordinated Instructions M CLM M M CCD M CS MCSD MCT M CTP M CSR Blending M oves at Different Speeds Ifthe next moveis the termination type of the first You can blend MCLM and MCCM instructions where the vector speed of the second instruction is different from the vector speed of the first instru
393. s to master axis position units A gear ratio expressed this way is easy to interpret since it is defined in the axes configured position units Fraction Gear Ratios When Ratio Format is selected or entered as Fraction the gear ratio is specified as a pair of integer numbers or tag variables representing the ratio between the number of slave axis feedback counts and the number of master axis feedback counts Up to five digits 99999 can be used for the slave counts and up to nine digits 999999999 for the Motion M ove Instructions M AS M AH MAJ MAG MATC MCSV 93 master counts See The Tag variable Builder earlier in this manual for information on tag variables TETEE The Conversion Constant entered as part of the axis configuration procedure is not used when the Ratio Format for the MAG instruction is specified as a Fraction If your gear ratio cannot be exactly expressed as a real number with a maximum of five digits to the right of the decimal point use Fraction as the Ratio Format Specifying the gear ratio as a fraction allows the direct implementation of irrational gear ratios such as 1 with no accumulated positioning errors or round off Since the master and slave count values do not use the axis conversion constants and because they are integers the actual gear ratio relationship between the slave and master axes exactly match the specified ratio For example the i
394. s when the instruction detects an error such as if the cam array is of an illegal length Description The Motion Calculate Cam Profile MCCP instruction computes a cam Publication 1756 RM 007H EN P December 2006 profile based on a given set of points in a specified cam array The resultant cam profiles generated by this instruction may be used by subsequent MAPC or MATC camming instructions to provide complex motion of a slave axis with respect to either a master axis position or with respect to time Since cam profiles can be directly calculated by the RSLogix 5000 Cam Profile Editor the main purpose of the MCCP instruction is to provide a method for calculating cam profiles in real time based on programmatic changes to the corresponding cam arrays Specifying a Cam Array In order to execute an MCCP instruction a Cam array tag must be created using the RSLogix Tag Editor or the Cam Profile Editor The figure below illustrates how the Cam array tags are established and used as input to the MCCP instruction The Cam array elements consist of slave yp and master xp point pairs as well as an interpolation type Since there is no association with a specific axis position or time the x and y point values are unitless The interpolation type may be specified for each point as either linear or cubic Specifying the Cam Profile Tag To execute a MAPC instruction a Cam Profile array tag must also be created Cam Profile arra
395. sable 158 Hard Shutdown 159 MOTION INSTRUCTION structure 157 Operands 156 Relay Ladder 156 Structured Text 156 M otion Group Strobe Position M GSP 166 Description 166 MOTION_ INSTRUCTION structure 166 Operands 166 Relay Ladder 166 Structured Text 166 Motion Group Shutdown 27 161 Motion Group Shutdown Reset 27 164 motion group shutdown reset 164 Motion Group Stop 27 156 Motion Group Strobe Position 27 166 Motion Instructions Coordinated M otion Instructions M otion Coordinated Change Dynam ics M CCD 28 M otion Coordinated Circular M ove M CCM 28 M otion Coordinated Linear M ove M CLM 28 M otion Coordinated Shutdown MCSD 28 Motion Coordinated Shutdown Re set M CSR 28 M otion Coordinated Stop M CS 28 M otion Configuration Instructions M otion Apply Axis Tuning M AAT 2 M otion Apply Hookup Diagnostic MAHD 27 M otion Run Axis Tuning M RAT 27 M otion Run Hookup Diagnostic M RHD 27 M otion Event Instructions M otion Arm Output Cam M AOC 27 M otion Arm Registration M AR 27 Motion Arm Watch Position M AW 2 M otion Disarm Output Cam M DOC 2 M otion Disarm Registration M DR 2 M otion Disarm W atch Position MDW 27 M otion Group Instructions M otion Group Shutdown M GSD 27 M otion Group Shutdown Reset M G SR 27 Motion Group Stop M GS 27 M otion Group Strobe Position M G SP 27 M otion M ove Instructions M otion Axis Gear M AG 26
396. scontinuities exist between the end of the current profile and the start of the new one This is done using the RSLogix 5000 Cam Profile Editor Once a pending position cam instruction has been executed the new cam profile takes effect automatically and becomes the current profile when the master axis passes through either the start or end Publication 1756 RM 007H EN P December 2006 130 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV point of the current profile If the current cam is configured to execute once the new profile is initiated at the completion of the pass through the current cam profile and the PC bit of the currently active MAPC instruction is set If the current cam is configured to execute continuously the new profile is initiated at the completion of the current pass through the current cam profile and the IP bit of the currently active MAPC instruction is cleared The motion controller keeps track of the master axis and slave axis positions relative to the first profile at the time of the change and uses this information to maintain synchronization between the profiles If the Execution Schedule of an MAPC instruction is set to Immediate and a position cam profile is currently in process the MAPC instruction errs This is true even when the axis is waiting to lock onto the master axis If an Execution Schedule of Pending is selected without a corresponding positio
397. scription The Motion Run Hookup Diagnostics MRHD instruction is used to execute various test diagnostics on the specified axis to test the integrity and in some cases the polarity of servo field connections There are currently test diagnostics supporting drive hookup encoder hookup marker hookup and motion module OK contact hookup During some of these test processes the motion module generates output to the external drive to produce a small amount of motion Measurements made during some of these hookup diagnostic tests are saved as output configuration parameters that also serve as input data for a subsequent MAHD Motion Apply Hookup Diagnostic instruction MRHD requires only one explicit input parameter Diagnostic Test Enter or select the Diagnostic Test to run and the axis to test If the targeted axis does not appear in the list of available axes the axis has not been configured for operation Use the Tag Editor to create and configure a new axis The MRHD instruction uses axis configuration parameters as input and output The input configuration parameters that MRHD uses are shown in the table below Axis Parameter Data Type Units Definition Motor Encoder Test Real Distance that the Axis must travel to Increment satisfy the Hookup Diagnostic Test The axis configuration parameters that MRHD generates as output depend on the specified Hookup Diagnostic Publication 1756 RM 007H EN P December 2006 236
398. se Left Arm as InverseleftArm M OTION INSTRUCTION Data Type To see if Check if this bitis on Data type Notes The rung is true BOOL Sometimes the EN bit stays on even if the rung goes false This happens if the rung goes false before the instruction is done or errored Rung EN DN or ER The instruction is done BOOL An error happened BOOL Identify the error number listed in the error code field of the M otion control tag then refer to Error Codes ERR for M otion Instructions on page 383 of this manual Publication 1756 RM 007H EN P December 2006 352 Motion Coordinated Instructions M CLM M M CCD M CS MCSD MCT M CTP M CSR Description Use the MCTP instruction to calculate the position of a point in one coordinate system to the equivalent point in a second coordinate system You can give the instruction the X1 X2 and X3 positions and get the corresponding J 1 J 2 and J 3 angles Or you can give the instruction the J 1 J 2 and J 3 angles and get the corresponding X1 X2 and X3 positions The MCTP instruction is similar to the MCT instruction except the MCTP instruction doesn t start a transform It calculates a position once each time you execute it I Programming Guidelines Follow these guidelines to use an MCTP instruction Guideline Examples and notes Toggle the rung from false to true to This is a transitional instruction In a l
399. set until after this message is successfully transmitted and the axis is in the Shutdown state This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Motion State Instructions M SO M SF M ASD M ASR MDO M DF M AFR 39 MASD Changes to Status Bits Axis Status Bits BitName State Meaning ServoActStatus FALSE e The axis is in the axis ready state e The servo loop is inactive DriveEnableStatus FALSE The drive enable output is inactive Shutdow nStatus TRUE The axis is in the shutdown state M otion Status Bits BitName State Meaning AccelStatus FALSE Axis is not Accelerating DecelStatus FALSE Axis is not Decelerating M oveStatus FALSE Axis is not M oving J ogStatus FALSE Axis is not J ogging GearingStatus FALSE Axis is not Gearing HomingStatus FALSE Axis is not Homing StoppingStatus FALSE Axis is not Stopping PositionCamStatus FALSE Axis is not Position Camming TimeCamStatus FALSE Axis is not Time Camming PositionCamPendingStatus FALSE Axis does not have a Position Cam Pending TimeCamPendingStatus FALSE Axis does not have a Time Cam Pending GearingLockStatus FALSE Axis is not in a Gear Locked condition Po
400. sets when the rung transitions from false to true It resets when the rung goes from true to false DN Done Bit 29 The Done Bit sets when the slave values have been calculated successfully It resets when the rung transitions from false to true ER Error Bit 28 The Error Bit sets when the slave values have not been calculated successfully It resets when the rung transitions from false to true This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions on page A 383 Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions Extended Error codes for the Parameter Out of Range 13 error code lists a number that refers to the number of the operand as they are listed in the faceplate from top to bottom with the first operand being counted as zero Therefore for the MCSV instruction an extended error code of 2 would refer to the Master Value operand s value You would then have to check your value with the accepted range of values for the instruction None Motion M ove Instructions MAS MAH MAJ MAG MCD MRP MCCP MAPC MATC MCSV 153 Example Relay Ladder MCSV Motion Calcu
401. sform Important You may see truncation error in the precision of computations This happens when both of these conditions are true e The conversion constants of the virtual Cartesian axes in a transformation are small such as 8000 counts position unit e The link lengths of the non Cartesian coordinate system are small such as 0 5 inches It s best to give large conversion constants to the virtual Cartesian axes in a transform such as 100 000 or 1 000 000 counts position unit The maximum travel limit of the robot is 31 2 Coordination Units Conversion Constant Set up another coordinate system for the actual joints of the robot Type of robot geometry Number of axes in the coordinate system Coordinate System Properties Arm_J1_J7Z_J3 Motion Group Type Dimension Number of axes to transform Publication 1756 RM 007H EN P December 2006 Guideline M ove the robot to a left or right arm starting position Motion Coordinated Instructions MCLM MCCM MCCD MCS MCSD CTP M CSR 343 Examples and notes Do you want the robot to move like a left arm or a right arm Left arms Right arms Before you start the transform move the robot to a resting position that gives it the arm side that you want left or right Once you start the transform and initiate a Cartesian move in the Source coordinate system the robot stays as a left arm or a ri
402. sition Camming TimeCamStatus FALSE Axis is not Time Camming PositionCamPendingStatus FALSE Axis does not have a Position Cam Pending TimeCamPendingStatus FALSE Axis does not have a Time Cam Pending GearingLockStatus FALSE Axis is notin a Gear Locked condition PositionCamLockStatus FALSE Axis is not in a Cam Locked condition Motion M ove Instructions M AS M AH MAJ MAG MCSV 57 Example 1 When Servo Axis Vars LStop turns on Stop all motion on Servo Axis Decelerate at 20 0 units per sec2 The instruction doesn t use the Decel Jerk value Since the Stop Type is all the instruction uses a trapezoidal profile to stop the axis Relay Ladder Servo Axis Vars Stop AS F Motion Axis Stop EN Axis Servo Axis Motion Control Servo Axis MI Stop Auto DN5 Stop Type All Change Decel Yes ER Decel Rate Servo Axis Vars C amp uto Decel 200 IP5 Decel Units Units per sec2 Change Decel Jerk Yes Decel Jerk Servo Axis Vars C A amp uto Decel Jerk 1000 Jerk Units of Time lt lt Less Structured Text L PA _ Start Auto Run Jog AJ Servo Axis Servo Axis MI Run Jog 0 Auto Speed Unitspersec Step 001 Servo Axis Vars C Auto Accel Unitspersec2 Servo Axis Vars C A uto Decel Unitspersecz Trapezoidal 100 100 ofTime Disabled Programmed Change Auto Speed MCD Servo Axis Servo Axis MI Change Jog Jog Yes Auto Speed
403. sitionCamLockStatus FALSE Axis is not in a Cam Locked condition Example When the input conditions are true the controller forces axis into the shutdown operating state Relay Ladder MASD Motion Axis Shutdown Axis Motion Control MASD Ladder Example Structured Text MASD Axis0 MASD 1 AxisO E MASD_2 Publication 1756 RM 007H EN P December 2006 40 M otion State Instructions M SO M SF MASD MASR M DO M DF M AFR Motion Axis Shutdown Reset M ASR Operands MASR Motion Axis Shutdown Reset Axis Motion Control 299 Use the MASR instruction to transition an axis from an existing Shutdown state to an Axis Ready state All faults associated with the specified axis are automatically cleared If as a result of this instruction all axes of the associated motion module are no longer in the Shutdown condition the OK relay contacts for the module close Relay Ladder Operand Type Format Description Axis AXIS FEEDBACK tag Name of the axis to perform operation on AXIS VIRTUAL AXIS_ GENERIC AXIS SERVO AXIS SERVO DRIVE Motion MOTION _ tag Structure used to access control INSTRUCTION instruction status parameters Structured Text MASR Axis MotionControl The operands are the same as those for the relay ladder MASR instruction MOTION_INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a
404. slave axis process and stop the axis If the master axis is a servo axis you can stop the master axis which in turn stops the slave without disabling the gearing or position camming e To stop a Master Offset move To stop an Absolute or Incremental M aster Offset move enter the slave axis but use For Axis enter the slave axis master units e For Deceleration and J enter the values and units for the master axis Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS M AH MAJ MAM MAG MCD MRP MCCP MAPC MATC MCSV 55 Guideline Details Be careful if the instruction W hen you execute an M AS instruction the axis uses the new deceleration and jerk rates for changes motion parameters the motion that s already in process This can cause an axis to overshoot its speed overshoot its end position or reverse direction S curve profiles are more sensitive to parameter changes For more information see Troubleshoot Axis M otion on page 9 367 e Use the jerk operands for S curve Use the jerk operands when profiles e The Stop Type is J og or Move e The jog or move uses an S curve profile Under those conditions the instruction uses an S curve profile to stop the axis The instruction uses a constant deceleration rate for all other types of stops You must fill in the jerk operands regardless of the type of stop e Use of Time for the easiest For an easy way to program and tune jerk enter it as a
405. ster Reference source the slave axis motion is generated from the actual position of the master axis as shown below Slave Axis Command Position Position Cam Profile l Master Axis j Actual Position Master Position Slaving to the Actual Position Actual position is the current position of the master axis as measured by its encoder or other feedback device This is the default selection and the only selection when the master Axis Type is configured as Feedback Only since it is often necessary to synchronize the actual positions of two axes Slaving to the Command Position When Command Position is entered or selected as the Master Reference source the slave axis motion is generated from the command position of the master axis as shown below Position Lock Cam Slave Axis 7 Master Axis Command Position Command Position i Master Position Slaving to the Command Position Command position only available when the master axis Axis Type is a Servo or Virtual axis is the desired or commanded position of the master axis Since the command position does not incorporate any associated following error or external position disturbances it is a more accurate Publication 1756 RM 007H EN P December 2006 132 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M M CSV Publication 1756 RM 007H EN P December 2006 and stable reference for camming When camming
406. ster axis must be commanded to move to cause any motion on the slave axis Refer to the Motion Axis Object Specification for more information on Command Position and Actual Position axis parameters Gearing in the Same Direction When Same is selected or entered as the Direction the slave axis moves in its positive direction at the specified gear ratio when the master axis moves in its positive direction and vice versa Gearing in the Opposite Direction When Opposite is selected or entered as the Direction the slave axis moves in its negative direction at the specified gear ratio when the master axis moves in its positive direction and vice versa Changing the Gear Ratio When Unchanged is selected or entered as the Direction the gear ratio may be changed while preserving the current gearing direction same or opposite This is useful when the current direction is not known or not important Reversing the Gearing Direction When Reverse is selected or entered as the Direction the current direction of the electronic gearing is changed from same to opposite or from opposite to same This is very useful for winding applications where the gear ratio must be reversed at each end of the wind Real Number Gear Ratios When Ratio Format is selected or entered as Real the gear ratio is specified as a real number or tag variable with a value between 0 00001 and 9 99999 inclusive representing the desired ratio of slave axis position unit
407. stored in the output image table for the module and sent over the backplane to the Scheduled Output module The schedule specifies a sequence count the output point to be associated with the schedule the time at which an output value should be applied to the physical output point and the value to be applied at the scheduled time The I O module receives and stores the schedule The CST timestamp of each schedule is monitored by the module When a schedule has expired that is the current time matches the scheduled timestamp the output value is then applied to the comesponding output bit Timer hardware in the ASIC is used to optimize the scheduling algorithm This hardware also reduces the latency and jitter performance Status of each schedule is reported in the output echo connection and reflected in the input image for the module The scheduled output functionality relies on CST Coordinated System Time timestamp At least one controller in the chassis must be a CST time master Unused outputs may be used as normal outputs and are applied immediately rather than waiting for the CST timestamp to expire A mask is sent to the module to indicate which outputs are to function as normal outputs The scheduled output module supports up to 8 outputs that can be individually scheduled The scheduled outputs must be between Remote Operation Usage with MAOC Instruction M otion Event Instructions MAW MDW MAR MDR MAOC M DOC 207 out
408. structions are If you want to Use this instruction Available in these languages Arm watch position event checking for an axis MAW relay ladder structured text Disarm watch position event checking for an MDW relay ladder axis structured text Arm servo module registration event checking MAR relay ladder for an axis structured text Disarm servo module registration event M DR relay ladder checking for an axis structured text Arm an Output Cam MAOC relay ladder structured text Disarm an Output Cam M DOC relay ladder structured text Publication 1756 RM 007H EN P December 2006 170 Motion Event Instructions MAW M DW MAR M DR MAOC M DOC Motion Arm Watch MAW Use the MAW instruction to arm motion module watch position event checking for the specified axis When this instruction is called a watch position event is enabled using the watch Position for the Axis and specified Forward or Reverse event condition After the arming is complete the Actual Position for the Axis is monitored against the Watch Position and when the specified watch event condition is met the Event PC bit is set and the Watch Event Status bit in the Axis data structure is set Operands Relay Ladder MAW Motion Arm Watch Axis Motion Control Trigger Condition Position MAW Axis MotionControl TriggerCondition Position Publication 1756 RM 007H EN P
409. t This applies only if you embed the assignment in the action of the step or use the action to call a structured text routine via a JSR instruction Publication 1756 RM 007H EN P December 2006 412 Structured Text Programming Example 3 If you want this If sugar low limit switch low on and sugar high limit IF Sugar Low amp Sugar High THEN switch not high on then IF THEN ELSIF Enter this structured text inlet valve open on Sugar Inlet 1 Until sugar high limit switch high off ELSIF NOT Sugar High THEN Sugar Inlet 0 END_IF Example 4 If you want this If tank temperature gt 100 then pump slow If tank temperature gt 200 then pump fast otherwise pump off Publication 1756 RM 007H EN P December 2006 The tells the controller to clear SugarInlet whenever the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This applies only if you embed the assignment in the action of the step or use the action to call a structured text routine via a JSR instruction IF THEN ELSIF ELSE Enter this structured text IF tank temp gt 200 THE pump fast 1 pump slow 0 pump off 0 ELSIF tank temp gt 100 THE pump fast 0 pump slow 1 pump off 0 ELSE pump fast 0 pump slow 0 pump off 1 END_IF Structured Text Programming 413
410. t Compensation Refer to the description of the OUTPUT COMPENSATION structure for more information on data types and programming units Offset and Delay Compensation The offset provides position compensation while the latch and unlatch delay provides time delay compensation for the latch and Publication 1756 RM 007H EN P December 2006 198 Motion Event Instructions M AW M DW MAR M DR M AOC M DOC unlatch operation The following diagram shows the effect of the compensation values on an Output Cam element Cam Position L Offset 14 Position Latch Offset Unlatch Offset 3 5 Compensated Cam Position Offset and Delay Compensation The cam range is defined by the left and right cam positions of the Output Cam element The compensated cam range is defined by the cam range offset and latch and unlatch offsets The latch and unlatch offsets are defined by the current speed v Latch Offset v latch Delay Unlatch Offset v Unlatch Delay The resulting compensation offset can actually be larger than the difference between cam start and cam end position The following equation illustrates the effect of the compensation values on the duration of an Output Cam element Compensated Duration Duration Latch Delay Unlatch Delay Publication 1756 RM 007H EN P December 2006 M otion Event Instructions M AW M DW MAR M DR M D
411. t are unique with structured text programming Review the information in this appendix to make sure you understand how your structured text programming will execute For information about See page Structured Text Syntax 397 Assignments 399 Expressions 401 Instructions 408 Constructs 409 Comments 425 Structured Text Syntax Structured text is a textual programming language that uses statements to define what to execute Structured text is not case sensitive Structured text can contain these components Term Definition Examples assignment Use an assignment statement to assign values to tags tag expression see page 399 operator is the assignment operator Terminate the assignment with a semi colon Publication 1756 RM 007H EN P December 2006 398 Structured Text Programming Term Definition Examples expression An expression is part of a complete assignment or construct statement An expression evaluates to a number numerical expression or to a true see page 401 or false state BOOL expression An expression contains tags A named area of the memory where data is stored valuel BOOL SINT INT DINT REAL string immediates A constant value 4 operators A symbol or mnemonic that specifies an operation tagl tag2 within an expression tagl gt valuel functions When executed a function yields one value Use function tagl parentheses to contain the
412. t of the number of axes specified in the coordinate system The Position array defines either the new absolute or incremental position Speed The Speed operand defines the maximum vector speed along the path of the coordinated move M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 265 Speed Units The Speed Units operand defines the units applied to the Speed operand either directly in coordination units of the specified coordinate system or as a percentage of the maximum values defined in the coordinate system Accel Rate The Accel Rate operand defines the maximum acceleration along the path of the coordinated move Accel Units The Accel Units operand defines the units applied to the Accel Rate operand either directly in coordination units of the specified coordinate system or as a percentage of the maximum values defined in the coordinate system Decel Rate The Decel Rate operand defines the maximum deceleration along the path of the coordinated move Decel Units The Decel Units operand defines the units applied to the Decel Rate operand either directly in coordination units of the specified coordinate system or as a percentage of the maximum values defined in the coordinate system Profile The Profile operand determines whether the coordinated move uses a trapezoidal or S Curve velocity profile The ControlLogix motion controller provides trapezoidal linear acceleration
413. t position along the X1 X2 or X3 axis If Then No Leave the array values at zero Yes Enter the offset distances into the array Enter the offset distances in coordination units Put the offset distance for X1 the first element of the array and so Use an array of three REALs even if a coordinate system has only one or two axes Publication 1756 RM 007H EN P December 2006 Motion Coordinated Instructions M M CCM M CCD MCS MCSD MCT M CTP M CSR 351 Operand Type Format Description Transform Direction DINT Immediate To With the base Choose calculate turned to the robotas a id Forward J oint angles Same X1 X2 Right arm Inverse Right Arm ae s Left arm Inverse Left Arm Opposite X1 X2 Right arm Inverse Right Arm M irror Left arm Inverse Left Arm M irror point Reference Position REAL 3 Array If the transform direction is Then enter an array that has the Forward J oint angles Inverse Cartesian positions Transform Position REAL 3 Array Array that stores the calculated position MCTP Source System Target System Orientation Motion Control Translation Transform Direction Reference Position Transform Position Structured Text The structured text operands are the same as the ladder diagram operands Enter the transform direction without spaces Example Enter a transform direction of Inver
414. tag Speed Units SINT INT or DINT immediate 0 Units per Sec 1 296 of Maximum Accel Rate SINT INT DINT or REAL immediate coordination units ortag Accel Units SINT INT or DINT immediate 0 2 Units per Sec 1 of Maximum Decel Rate SINT INT DINT or REAL immediate coordination units or tag Decel Units SINT INT or DINT immediate Units per Sec 1 of Maximum Profile SINT INT or DINT immediate 0 Trapezoidal 1 S Curve Termination SINT INT or DINT immediate 0 Actual Tolerance Type or tag 1 Settle 2 Command Tolerance 3 No Decel 4 Follow Contour Velocity Constrained 5 Follow Contour Velocity Unconstrained See Choose a termination type on page 259 Merge SINT INT or DINT immediate 0 Disabled 1 Coordinated M otion 2 All Motion Merge SINT INT or DINT immediate 0 Programmed Speed 1 Current Structured Text The operands are the same as those for the relay ladder MCCM instruction When entering enumerations for the operand value in Structured Text multiple word enumerations must be entered without spaces For Publication 1756 RM 007H EN P December 2006 278 Motion Coordinated Instructions M CLM M M CCD M CS MCSD MCT M CTP M CSR example when entering Decel Units the value should be entered as unitspersec rather than Units per Sec as displayed in the ladder logic For the operands that have enumerated options enter your selection
415. tar arr tet AE hs 383 Appendix B Introd aC BOT ous oaks diua ha ees Pa Se 389 CAM 5 389 CAM PROFILE 5 390 MOTION GROUP 5 391 MOTION INSTRUCTION Data Type 392 OUTPUT CAM 5 393 OUTPUT COMPENSATION Structure 394 Appendix C TREO CUCBOTO s ics dete e ERR 397 Structured Text 5 397 4 xw ves hc e Cb ete es Sane fe OA R c 399 EXDIBSSIODS vu eather are a ees NE PIX RES 401 Ake oink ERO b vds 408 CO TISIFHCIS doe ts BRE Uaec dor uv Portae oer 409 IB ST EIBINS Ra X So ESOS DE SER et 410 CASE O Fora uris e aoa RO EE AE 413 FORS DO GAG a Rn ben OC UA 416 WHILE DO S s rho acne od Eo wx ace RAO Ba ys 419 REPEAT SUNT SEO ate para to rats QURE ORT 422 Comment ep Ii bb e EIS I 425 dat Tavra qM ed SV TUS E es 440 Publication 1756 RM 007H EN P December 2006 12 Table of Contents Publication 1756 RM 007H EN P December 2006 Preface Introduction This manual is one of several Logix5000 based instruction manuals Task Goal Documents Program the controller for sequential Logix5000 Controllers General Instructions Reference M anual publication applications 1756 RM 003 Program the
416. tart position is 0 0 e Increment to end position is 0 5 0 5 e Increment to Center position is 0 5 0 Publication 1756 RM 007H EN P December 2006 298 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD MCT M CTP M CSR Publication 1756 RM 007H EN P December 2006 MCCM Motion Coordinated Circular Move Coordinate System Motion Control MCCM 8 Move Type 1 Position AxisO Axis1 0 5 Circle Type 1 Via Center Radius Center 4 Direction 0 Speed 1 Speed Units Accel Rate Units per sec Accel Units of Maximum Decel Rate 100 Decel Units of Maximum Profile S Curve Termination Type 1 Merge Disabled Merge Speed Programmed Coordinated_sys MCCM Move position 15 0 5 FR gt MCCM Ladder Instruction with Move Type of Absolute Move Type is Incremental Circle Type is Center Direction is Clockwise Three Dimensional Arcs Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 299 The preceding MCCM instruction produces the following plot Trend Motion 0 0_ 0 0 0_ 1 Plot of MCCM with Two Rotary Axes and Move Type of Incremental The axis travels clockwise in a circle from 0 0 to 0 5 1 5 The move stops after generating a 270 degree arc There was one travel through the unwind for Axis1 It should be noted that the path of the coordinated motion is determined in linear space but the position of
417. te system You can t use the same axes in the source and target systems 10 Stop all motion processes for all the axes in both systems jog move You can t start the transform if any motion gear etc process is controlling a source or target axis 11 Insufficient resources available to initiate the transform connection 12 Set the link lengths You can t use a link length of zero 13 Look for source or target axes that are in the shutdown state Use a M otion Axis Shutdown Reset M ASR instruction or direct command to reset the axes 14 Uninhibit all the source or target axes Changes to Status Bits To see if Check the tag for the And this bit For A coordinate system is the source of an active transform Coordinate system TransformS ourceStatus On A coordinate system is the target of an active transform Coordinate system TransformTargetStatus On An axis is part of an active transform Axis TransformStateStatus On An axis is moving because of a transform Axis ControlledByTransformStatus On Publication 1756 RM 007H EN P December 2006 346 Motion Coordinated Instructions M CLM M M CCD M CS MCSD MCT M CTP M CSR Example 1 Pick and Place Ladder Diagram 1 Move to restroutine This routine is a sequence of moves that put an articulated independent robot in an at rest position at the desired left or right arm angles When Move To Rest Step 0 turns on axis J 2 moves to 90 Then the sequence
418. ted an error such as if you specified an unconfigured axis IP In Process Bit 26 It is set on positive rung transition and cleared if either Superseded by another M otion Axis Position Cam command or te fa rminated by a stop command merge shutdown or servo ult PC Process Complete Bit 27 It is cleared on positive rung transition and set in once Execution M ode when the position of the master axis leaves th pr e master position range defined by the currently active cam ofile Description The Motion Axis Position Cam MAPC instruction executes a position cam profile set up by a previous Motion Calculate Cam Profile MCCP instruction or alternatively by the RSLogix 5000 Cam Profile Editor Position cams in effect provide the capability of implementing Publication 1756 RM 007H EN P December 2006 Motion M ove Instructions M AS MAH MAJ M AG MCD M CCP M APC M ATC M CSV 121 non linear electronic gearing relationships between two axes No maximum velocity acceleration or deceleration limits are used The speed acceleration and deceleration of the slave axis are completely determined by the motion of the master axis and the designated cam profile derived from the associated cam table The maximum velocity acceleration or deceleration limits established during axis configuration do not apply to electronic camming Camming Direction Cams can be configu
419. ted govern the appearance of this dialog box The following table illustrates how the screen is affected by the combinations of Move Type and Circle Type selected Move Type Absolute Circle Type Via Behavior Target column is entitled Target Position Via column is entitled Via Position Set Targets Actuals button is active Set Vias Actuals button is active Incremental Target column is entitled Target Increment Via Column is entitled Via Increment Set Targets Actuals button is inactive Grayed Out Set Vias Actuals button is inactive Grayed Out Absolute Center Target column is entitled Target Position Center column is entitled Center Position Set Targets Actuals button is active Set Vias Actuals button is active Publication 1756 RM 007H EN P December 2006 310 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Arithmetic Status Flags Fault Conditions Error Codes Publication 1756 RM 007H EN P December 2006 Move Type Incremental Circle Type Center Behavior Target column is entitled Target Increment Center Column is entitled Center Increment Set Targets Actuals button is inactive Grayed Out Set Vias Actuals button is inactive Grayed Out Absolute Radius Target column is entitled Target Position Radius column is entitled Radius Set Targets Actuals button is active Set Vias Actuals button is i
420. ted instruction has been verified and queued successfully Because it is set at the time it is queued it may appear as set when a runtime error is encountered during the verify operation after it comes out of the queue It resets when the rung transitions from false to true ER Error Bit 28 The Error Bit resets when the rung transitions from false to true It sets when the coordinated move fails to initiate successfully It can also be set with the Done bit when a queued instruction encounters a runtime error JP In Process Bit 26 The In Process Bit sets when the coordinated move is successfully initiated It resets when there is a succeeding move and the coordinated move reaches the new position or when there is no succeeding move and the coordinated move reaches the termination type specifications or when the coordinated move is superseded by another M CCM or M CLM instruction with a M erge Type of Coordinated M ove or when terminated by an M CS or an M CSD instruction AC Active Bit 23 W hen you have a coordinated move instruction queued the Active Bit lets you know which instruction is controlling the motion It sets when the coordinated move becomes active It is reset when the Process Complete bit is set or when the instruction is stopped PC Process The Process Complete Bit resets when the rung transitions Complete Bit 27 from false to true It sets when there is no succeeding move and the coord
421. ted_sys Motion Control MCLM 1 Move Type 1 Position AxisO Axis 15 0 Speed 10 move position 2 5 0 Speed Units Units per sec Accel Rate 5 Accel Units Decel Rate Units per sec2 5 Units per sec2 Trapezoidal 0 Decel Units Profile Termination Type Disabled Current Merge Merge Speed 261 ove Type is Incremental p Position defined as an incremental distance from C gt start point of 5 5 Cc MCLM Ladder Instruction with Move Type of Incremental The following examples show the plot of the paths for MCLM instructions that have axes defined as Rotary with One Rotary Axis and M ove Type of Absolute The first example uses a coordinate system of one axis and a Move type of Absolute The plot of the path is based on the following assumptions e 1 axis Coordinate System named coord systl e Axis0 is Rotary with an unwind of 5 revs e Start position is 4 Publication 1756 RM 007H EN P December 2006 262 Motion Coordinated Instructions M CLM M CCM M M CS MCSD MCT M CTP M CSR Publication 1756 RM 007H EN P December 2006 e End position is 2 MCLM Motion Coordinated Linear Move N 5 Coordinate System coord syst Motion Control MCLM 1 ND M ove Type is Move Type 0 F Absolute Position move position 4 AxisO 2 0 IP gt Speed 1 End point is defined A co as negative Speed Units Units per sec Accel Rat
422. the controller as the direction for the move Negative position values instruct the interpolator to move the rotary axis in a negative direction to obtain the desired absolute position A positive value indicates that positive motion is desired to reach the target position To move to the unwind position in the negative direction a negative unwind position value must be used as 0 and 0 are treated as 0 When the position is greater than the unwind value an error is generated The axis can move through the unwind position but never incrementally more than one unwind value Incremental When the Move Type is Incremental the coordinate system moves the distance as defined by the position array at the specified Speed using the Accel and Decel rates determined by the respective operands along a circular path The specified distance is interpreted by the interpolator and can be positive or negative Negative position values instruct the interpolator to move the rotary axis in a negative direction while positive values indicate positive motion is desired to reach the target position Position The Position operand is a one dimensional array whose dimension is at least equivalent to the number of axes specified in the coordinate Publication 1756 RM 007H EN P December 2006 282 Motion Coordinated Instructions M CLM M CCM M M CS MCSD MCT M CTP M CSR system It is the position array that defines the new absolute or increm
423. the E Stop string that controls main power to the drive system and thus permit the customer to reapply power to the drive Note that there is typically only one OK contact per motion module which means that execution of the MASR instruction may be required for all axes associated with a given module for the OK contact to close To successfully execute a MASR instruction the targeted axis must be configured as either a Servo or Feedback Only axis Otherwise the instruction errs The MASR instruction execution may take multiple scans to IMPORTANT UR execute because it requires transmission of a message to the motion module Thus the Done DN bit is not set until after the message has been successfully transmitted This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Bit Name State Meaning Shutdow nStatus FALSE The axis is not in the shutdown state When the input conditions are true the controller resets from a previous shutdown operating state into an axis ready operating state Relay Ladder MASR Motion Axis Shutdown Reset No Axis Axis2 x Motion Control MASR 1 Fo Structured Text MASR Axis0 MASR 1 Publi
424. the Tag Editor to create and configure a new axis To successfully execute a MDR instruction the targeted axis must be configured as either a Servo or Feedback Only axis Otherwise the instruction errs The M DR instruction execution may take multiple scans to IM PORTANT execute because it requires transmission of a message to the motion module The Done DN bit is not set immediately but only after this message has been successfully transmitted This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e n structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The following Extended Error codes help to pinpoint the problem when the MDR instruction receives a Servo Message Failure 12 error message Associated Error Code Extended Error Meaning decimal Code decimal SERVO MESSAGE FAILURE Invalid value 3 Registration input provided 12 is out of range Extended Error codes for the Parameter Out of Range 13 error code work a little differently Rather than having a standard enumeration the number that appears for the Extended Error code refers to the number of the operand as th
425. the axes is limited by the rotary configuration The endpoint was 0 5 0 5 for the circle calculations but the actual endpoint for the move was 0 5 1 5 The instruction specified and we obtained a clockwise move even though one axis had a negative incremental target position The endpoint is not required to fit within the absolute position defined by the rotary unwind of the axes For Coordinate Systems that have three primary axes associated to them it is possible to create three dimensional arcs Publication 1756 RM 007H EN P December 2006 300 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR 3D Arc Using M CCM with Circle Type Via The following example shows the use of the MCCM with a Circle Type of Via and a Move Type of Absolute to create a three dimensional arc The basic assumptions are e The axes 0 and Axis1 Axis2 are all members of the coordinate system Coordinated sys1 e Coordinated_sys1 is a three dimensional coordinate system e Axis0 1 and Axis2 are orthogonal to each other e Coordinated_sys1 is initially at 0 0 0 0 0 0 units Move Coordinated_sys1 along an arc to 2 0 2 0 0 0 units passing through 1 0 1 0 1 414 units at the vector speed of 10 0 units per second with the acceleration and deceleration values of 5 0 units per second The following graph shows the 3D arc generated by the preceding information oes ae sar ayes
426. the cam profile array have been calculated the first cam profile element s Status value is also set to calculated However if an MCCP instruction is executed with an initial cam profile Status value of 1 then the cam profile is currently being calculated by another MCCP instruction and the MCCP instruction errors If the Status value is gt 2 then the cam profile is being actively used by an MAPC or MATC instruction process and the MCCP instruction errs Start Slope and End Slope To facilitate a smooth entry into and exit from a cubic cam profile slope control is provided The Start Slope and End Slope parameters determine the initial rate of change of the slave relative to the master These values are used in the cubic spline calculations performed on the cam array The diagram below the master slave slope relationship Cam Profile Slave Axis Position Master Axis Position Start Slope End Slope Start and End Slope The default values for Start Slope and End Slope are 0 to facilitate a smooth start and end to the cam profile from rest However if the axis is already camming an appropriate non zero Start Slope can be specified to match the End Slope of the currently executing cam to seamlessly blend the two cam profiles together The Start Slope and End Slope values are not applicable when starting or ending the cam profile with linear interpolation The M CCP instruction execution completes in a sin
427. the instruction M otion Event Instructions M AW M DW MAR M DR MAOC M DOC 205 Status Bits M AOC Effects on Status Bits Status bits may be used to determine if an MAOC instruction can be initiated The MAOC instruction affects the following status words in the Motion Axis Structure e OutputCamStatus e OutputCamPendingStatus e OutputCamLockStatus e OutputCamTransitionStatus If the Execution Schedule is set to Forward Only Reverse Only or Bi Directional an MAOC instruction can be initiated when either of the following two conditions exist e OutputCamStatus bit FALSE or e OutputCamStatus bit TRUE OutputCamLockStatus bit FALSE OutputCamTransitionStatus bit FALSE If the Execution Schedule is Pending the MAOC instruction is initiated if either of the following two conditions exist e OutputCamStatus bit FALSE or e OutputCamStatus bit TRUE OutputCamTransitionStatus bit FALSE Axis and Module Fault Conditions Disarm Output Cams When the controller detects one of the following faults it disarms output cams e For Axis Servo and Axis Servo_Drive axis feedback loss fault e For Axis Servo and Axis Servo_Drive module fault e For Axis Consumed physical axis fault Those faults produce unreliable feedback data Also if an axis fault exists when an MAOC instruction is initiated the instruction errs Publication 1756 RM 007H EN P December 2006 206 Motion Event Instructions MAW M DW MAR M DR
428. ties screen Go to the Dynamics tab and make the appropriate change to the Maximum Deceleration Value If the Extended Error number is 1 this means the Coordinate System has a Maximum Deceleration Value of 0 Go to the Coordinate System Properties Dynamics Tab to correct the Maximum Deceleration value MAG Changes to Status Bits If the Clutch check box is NOT checked execution of the MAG instruction simply sets the Gear Status bit to True Bit Name State Meaning GearingStatus TRUE Axis is Gearing If the Clutch check box is checked execution of the MAG instruction sets the Gearing Lock Status bit to True when the clutching process completes Bit Name State Meaning Gearing Lock Status TRUE Axis has finished Clutch and locked in GearingStatus TRUE Axis is Gearing Example When the input conditions are true the controller provides electronic Publication 1756 RM 007H EN P December 2006 gearing between axis2 and axis1 Motion M ove Instructions M AS M AH MAJ MAM MAG MCD MRP MCCP MAPC MATC MCSV 97 Relay Ladder MAG Motion Axis Gear N gt Slave Axis Master Axis i ND R gt Motion Control Direction Ratio io IP gt Slave Counts Master Counts Master Reference Ratio Format Clutch Enabled Accel Rate 50 Accel Units Units per sec2 MAG Ladder Example Structured Text MAG Axis0 Axis1 MAG 3 3 Ratio 3 0 100 100 Actual Real Enabled 50 Unitspersec2 Pu
429. time the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This applies only if you embed the assignment in the action of the step or use the action to call a structured text routine via a JSR instruction A non retentive assignment has this syntax tag expression where Component tag Description represents the tag that is getting the new value the tag must be a BOOL SINT INT DINT or REAL is the non retentive assignment symbol expression Publication 1756 RM 007H EN P December 2006 represents the new value to assign to the tag If tag is this data type Use this type of expression BOOL BOOL expression SINT numeric expression INT DINT REAL ends the assignment Structured Text Programming 401 Assign an ASCII character to a string Use the assignment operator to assign an ASCII character to an element of the DATA member of a string tag To assign a character specify the value of the character or specify the tag name DATA member and element of the character For example This is OK This is not OK stringl DATA 0 65 stringl DATA 0 A stringl DATA 0 string2 DATA 0 stringl string2 Expressions To add or insert a string of characters to a string tag use either of these ASCII string instructions To Use this instruction add characters to the end of a string CONCAT insert characters into a string I
430. ting various MCS and MAS instructions with different stop types Instruction Stop Type Result 5 51 All The MCLM instruction on CS2 will stop The MAM on Y will stop The MAM on Z will stop The MAM on S will continue T1 is canceled Axes ABC will stop due to canceling the transform Publication 1756 RM 007H EN P December 2006 Instruction MCS on CS2 M otion Coordinated Instructions M CLM M CCM M CCD MCS MCSD M CTP M CSR Stop Type All Result The MCLM instruction on CS2 will stop 333 The MAM on Y w ill stop The MAM onS w ill stop The MAM on Z will continue T1 is canceled Axes ABC will stop due to canceling the transform MCS on CS3 All The MCLM instruction on CS2 will continue The MAM onYw The MAM onS w ill continue ill continue The MAM on Z will continue T1 is canceled Axes ABC will stop due to canceling the transform MCS on CS1 Coordinated M ove The M CLM instruction on CS2 will continue The MAM onYw The MAM onS w ill continue ill continue The MAM onZw ill continue T1 stays active Axes ABC will fol ow the respective CS2 axes MCS on CS2 Coordinated M ove The M CLM instruction on CS2 will stop The MAM on Y w The MAM on S ill continue ill continue The onZw ill continue T1 stays active
431. tion The Figure below shows the relationship of these three positions Position Error gt Position Actual Position Position Relationship See the Motion Axis Object specification for a more detailed overview of the Nested Digital Servo Loop used by the ControlLogix motion controllers To successfully execute a MRP instruction the targeted axis must be configured as either a Servo or Feedback Only axis Otherwise the instruction errs The MRP instruction execution may take multiple scans to IMPORTANT Lig execute due to the fact that it requires transmission of multiple messages to the motion module Thus the Done DN bit is not set immediately but only after these messages have been successfully transmitted Motion M ove Instructions M AS MAH MAJ MAG MCD MRP MCCP MAPC MATC MCSV 107 Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes MRP Changes to Status Bits Example This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e n structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions on page A 383 Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The follow
432. tion 1756 RM 007H EN P December 2006 Enter this structured text SIZE Inventory O Inventory Items For position 0 to Inventory Items 1 do If Barcode Inventory position ID then Quantity Inventory position Oty Exit End if End for Structured Text Programming 419 WHILE DO Use the WHILE DO loop to keep doing something as long as certain conditions are true Operands Structured Text WHILE bool expression DO muc toin Operand Format Enter END WHILE bool BOOL tg BOOL tag or expression that evaluates to expression expression BOOL value IM PORTANT Make sure that you do not iterate within the loop too many times in a single scan e The controller does not execute any other statements in the routine until it completes the loop e f the time that it takes to complete the loop is greater than the watchdog timer for the task a major fault occurs e Consider using a different construct such as IE THEN Description The syntax is WHILE bool 1 DO statement statements to execute while bool expressionl is true IF bool expression2 THEN lt q If there are conditions when you want to optional X exit the loop early use other statements END_IF such as an IF THEN construct to condition an EXIT statement END_WHILE Publication 1756 RM 007H EN P December 2006 420 Structured Text Programmin
433. tion Arm Output Cam command terminated by a M otion Disarm Output Cam command or cam position moves beyond defined Output Cam range while execution mode is set to once Process It is cleared on positive rung transition and set in once Complete Bit 27 Execution M ode when cam position moves beyond defined Output Cam range SEGM ENT It is set to the array index associated with error 36 Illegal Output Cam or error 37 Illegal Output Compensation Only the first of multiple errors is stored Description The Motion Arm Output Cam MAOC instruction executes an output Publication 1756 RM 007H EN P December 2006 cam profile set up manually programmatically or by the RSLogix 5000 Output Cam Editor Internally Output Cam objects handle Motion Planner Cam functionality Each Output Cam object is responsible for one output which consists of 32 output bits Each single output bit can be programmed separately Currently Output Cam functionality is executed in the Logix controller every course update period cumently configurable between 1 and 32 ms Axis The axis provides the position input to the Output Cam The axis can be a virtual physical or consumed one Execution Target The execution target defines a specific Output Cam from the set that is connected to the specified axis Currently only eight Output Cams can be specified Specifying the Output Cam Profile To execute a MAOC instruction a calculated
434. tional instruction time you wantto In relay ladder toggle the rung condition in from cleared to set each time you want to execute the instruction execute the instruction e In structured text condition the In structured text instructions execute each time they are scanned instruction 30 thatitonly executes Condition the instruction so that it only executes on a transition Use either of these on a transition methods e qualifier of an SFC action e Structured text construct For more information see Appendix C e Use the jerk operands for S curve Use the jerk operands when the instruction uses an S curve profile profiles You must fill in the jerk operands regardless of the profile e Use of Time for the easiest Foran easy way to program and tune jerk enter it as a 96 of the acceleration or deceleration programming and tuning of jerk time For more information see e Program a Velocity Profile on page 1 22 e Tune an S curve Profile on page 8 363 e Use Merge to cancel the motion of How you want to handle any motion that s already in process other instructions If you wantto And you wantto Then set Add the jog to any p Merge Disabled motion already in M Speed Programmed process The instruction ignores M Speed but you must fill it in anyway End the motion from at the Speed that you Merge Enabled other instructions and setin this instruction M erge Spee
435. tions only execute when rung condition in toggles from false to true These are transitional relay ladder instructions In structured text instructions will execute each time they are scanned unless you pre condition the execution of the structured text instruction For example the ABL instruction is a transitional instruction in relay ladder In this example the ABL instruction only executes on a scan when tag xic transitions from cleared to set The ABL instruction does not execute when tag xic stays set or when tag xic is cleared lag xic ASCII Test For Ber Line ND Channel 0 SerialPort Control serial control lt ER gt Character Count 0 Publication 1756 RM 007H EN P December 2006 In structured text if you write this example as IF tag xic THEN ABL 0 serial control END IF the ABL instruction will execute every scan that tag xic is set not just when tag xic transitions from cleared to set Structured Text Programming 409 If you want the ABL instruction to execute only when tag xic transitions from cleared to set you have to condition the structured text instruction Use a one shot to trigger execution osri l InputBit tag xic OSRI osri 1 IF osri l OutputBit THEN ABL 0 1 control END_IF Constructs Constructs can be programmed singly or nested within other constructs If you want to Use this construct Available in these languages S
436. to maintain track of the number of cams actively using the associated cam profile Linear and Cubic Interpolation Position cams are fully interpolated This means that if the cument Master Axis position does not correspond exactly with a point in the cam table associated with the cam profile the slave axis position is determined by linear or cubic interpolation between the adjacent points In this way the smoothest possible slave motion is provided Each point in the Cam array that was used to generate the Cam Profile can be configured for linear or cubic interpolation Electronic camming remains active through any subsequent execution of jog or move processes for the slave axis This allows electronic camming motions to be superimposed with jog or move profiles to create complex motion and synchronization Scaling Position Cams A position cam profile can be scaled in both the master dimension and slave dimension when it is executed This scaling feature is useful to allow the stored cam profile to be used to determine the general form of the motion profile The scaling parameters are then used to define the total master or slave travel over which the profile is executed as shown in the illustration below In this way one standard cam profile can be used to generate a whole family of specific cam profiles When cam profile array is specified by an instruction the master and slave values defined by the cam profile
437. tput of the Position Servo Loop to the DAC Position Error Rea pos units M aximum Servo Loop Position Error Tolerance allowed without Fault Publication 1756 RM 007H EN P December 2006 If the External Vel Servo Drive configuration bit parameter is FALSE indicating interface to an external torque servo drive the following output parameters are generated Axis Parameter Data Type Units Meaning Pos Proportional Rea 1 msec Position Servo Loop Proportional Gain Gain Pos Integral Gain Rea 1 msec2 Position Servo Loop Integral Gain Vel Proportional Rea 1 msec Velocity Servo Loop Proportional Gain Gain Vel Integral Gain Rea 1 msec2 Velocity Servo Loop Integral Gain Velocity Rea Position Servo Loop Proportional Gain Feedforward Acceleration Rea Velocity Command Feedforward Feedforward M ax Speed Rea pos M aximum Speed for M otion Profiles units sec Setto Tuning Velocity M ax Acceleration Rea pos M aximum Acceleration for M otion units sec Profiles Arithmetic Status Flags Fault Conditions Error Codes Extended Error Codes Motion Configuration Instructions M AAT M RAT M AHD M RHD 221 Axis Parameter Data Type Units Meaning M ax Deceleration Rea pos M aximum Acceleration for M otion units sec Profiles Output Filter Rea Hertz Bandwidth of Low Pass Servo Output Bandwidth Filter Output Scaling Rea mV KCPS Scale Factor applied to output o
438. transmitted The In process IP bit is cleared and the Process Complete PC bit is set at the same time that the Done DN bit is set This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions on page A 383 Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions The following Extended Error codes help to pinpoint the problem Motion M ove Instructions M AS M AH MAJ MAG MCSV 63 when the MAH instruction receives a Servo Message Failure 12 error message or Illegal Homing Configuration 41 Associated Error Code decimal SERVO MESSAGE FAILURE 12 Extended Error Code decimal Process terminated on request 1 Meaning Home execution followed by an instruction to shutdown disable drive or a motion stop instruction or a Processor change requests a cancel of Home SERVO_MESSAGE_FAILURE 12 No Resource 2 Not enough memory resources to complete request SERCOS SERVO_MESSAGE_FAILURE 12 Object M ode conflict 12 Axis is in shutdown SERVO MESSAGE FAILURE 12 Permission denied 15 Enab
439. truction detected an error The Motion Disarm Output Cam instruction disarms a specific or all output cams for a specified axis depending on the selected disarm type The axis provides the position input to the Output Cam The execution target defines a specific Output Cam from the set that is connected to the specified axis This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions Extended Error codes for the Parameter Out of Range 13 error code lists a number that refers to the number of the operand as they are listed in the faceplate from top to bottom with the first operand being counted as zero Therefore for the MDOC instruction an extended error code of 4 would refer to the Disarm Type operand s value You would then have to check your value with the accepted range of values for the instruction Status Bits Example otion Event Instructions MAW MDW MAR MDR MAOC 215 M DOC Changes to Status Bits None Relay Ladder MDOC Motion Disarm Output Cam Axis Axis3 Execution
440. truction values in the output image are controlled by the Motion Planner firmware in the controller The Motion Planner triggers the data to be sent to the module Although the normal program task scan also triggers data to be sent to the module Data integrity is maintained by the firmware always setting the sequence count for a given schedule last The Output Cam instruction processes cam events for scheduled outputs one coarse update period sooner than unscheduled outputs When a programmed on or off event is detected a schedule is sent to the output module to tum the output on off at the appropriate time within the next coarse update period The Output Cam instruction divides the coarse update period into sixteen time slots Each cam on off event is assigned to a time slot The accuracy of the scheduled time for the output therefore is 1 16 the coarse update period A Publication 1756 RM 007H EN P December 2006 208 M otion Event Instructions M AW M DW MAR M DR MAOC M DOC Publication 1756 RM 007H EN P December 2006 coarse update period of 1 millisecond yields a schedule accuracy of 62 5 microseconds The 1756 OB16lS Scheduled Output M odule can be associated with one 1 M AOC axis execution target only The MAOC detects latch and unlatch events one coarse update ahead and schedules the event to occur within the next coarse update This is accomplished by applying a one coarse update internal delay to each scheduled output
441. tructions 20 R relational operators structured text 404 REPEAT UNTIL 422 Scheduled Output Array of 16 Schedule Structures 211 1 0 Subsytem 210 Operation 206 Output Data Structure 211 Remote Operation 207 Schedule Processing 211 Usage with M AOC Instruction 207 Scheduled Output Module 206 S curve profile troubleshoot 367 tune 363 string evaluation in structured text 405 structured text arithmetic operators 403 Publication 1756 RM 007H EN P December 2006 assign ASCII character 401 assignment 399 bitwise operators 407 CASE 413 comments 425 components 397 contructs 409 evaluation of strings 405 expression 401 FOR DO 416 functions 403 IF THEN 410 logical operators 406 non retentive assignment 400 numeric expression 401 relational operators 404 REPEAT UNTIL 422 WHILE DO 419 structures See data type T transform start a transform 338 troubleshoot instruction errors 383 jerk 367 S curve profile 367 tune jerk 363 S curve profile 363 W WHILE DO 419 How Are We Doing Your comments on our technical publications will help us serve you better in the future Thank you for taking the time to provide us feedback Ty You can complete this form and mail or fax it back to us or email us at RADocumentCommentsQ ra rockw ell com Pub Title Type Logix5000 Controllers M otion Instructions Cat No Pub No 1756 RM 007H EN P Pub Date December 2006 PartNo
442. ts It is applied when the Clutch feature is enabled Accel units DINT immediate The units used to display the Acceleration value Select either 0 units per sec 1 296 of maximum acceleration Structured Text The operands are the same as those for the relay ladder MAG instruction For the operands that require you to select from available options enter your selection as This operand Has these options which you enter as text or enter as a number M asterReference actual 0 command 1 RatioFormat real 0 fraction slave master counts 1 Clutch enabled 0 disabled 1 AccelUnits unitspersec2 0 ofmaximum 1 Publication 1756 RM 007H EN P December 2006 90 Motion Move Instructions M AS MAJ MAG MCD M RP M CCP M ATC M CSV M INSTRUCTION Structure Mnemonic Description EN Enable Bit 31 It is set when the rung makes a false to true transition and remains set until the servo message transaction is completed and the rung goes false DN Done Bit 29 It is set when axis gear has been successfully initiated ER Error Bit 28 It is set to indicate that the instruction detected an error such as if you specified an unconfigured axis IP In Process Bit26 It is set on positive rung transition and cleared if either superseded by another M otion Gear Axes command or terminated by a stop command merge shutdown or se
443. ts up to three 3 primary axes Only the axes configured as primary axes up to 3 are included in the coordinate velocity calculations Publication 1756 RM 007H EN P December 2006 360 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Arithmetic Status Flags Fault Conditions Error Codes M CSR Changes to Status Bits Publication 1756 RM 007H EN P December 2006 M otion Control The following control bits are affected by the MCSR instruction Mnemonic Description EN Enable Bit 31 The Enable Bit sets when the rung transitions from false to true It resets when the rung goes from true to false DN Done Bit 29 The Done Bit sets when the coordinated shutdown reset is successfully initiated It resets when the rung transitions from true to false Error Bit 28 The Error Bit sets when the reset of the coordinated shutdown fails to initiate It resets when the rung transitions from false to true This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions Status Bits provide a means for monitoring the progress of the motion instruction There are three types of Status Bits that provide pertine
444. uals OK Cancel Apply Hep Ladder Program and Target Entry Screen that Generate Error 44 CIRCULAR_START_END_ERROR 45 Example The following example for error 15 depicts a situation where the startpoint and via point are the same The program is trying to MCC Motion Coocdinated Circular Move Coordinate System Motion Cariiol Move Type Position Axis Axis Type Vie Cenkei Radius Direction Speed Speed Units Accel Rate Accel Unis Aate Decel Unis Profile Temmeatan Merge Merge Speed Coordneled sys MCCM 0 0 MCCM Move posiioro Unils per sec 50 of M imum 50 of Maximum Trapezoidal 1 Disabled Programmed e lt Less Motion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 313 generate a two dimensional full circle from 0 0 current position back to 0 0 through the location 10 10 Because the startpoint and the via point are the same no circular centerpoint can be found for this circle Target Position Entry Coordinated sys MCCM Move position 0 VIA 0 s R gt Axis Target Postion Actuel Position Vie Position Axis0 00 00 on oS Axist 00 00 100 o Set Targets Actuals Set Vias Actuals LOK cme o Amb _ Ladder Program and Target Entry Screen that Generate Error 45 CIRCULAR R1 R2 MISMATCH ERROR 46 Example The following example for
445. uction Faceplate Executed Instruction E d MCTP Computed Output CS1 Data Destination Cartesian Positions X1 X2 X3 Instruction Faceplate Typically Cartesian Transform Position Publication 1756 RM 007H EN P December 2006 358 Motion Coordinated Instructions M CLM M CCM M CCD MCS MCSD MCT M CTP M CSR Motion Calculate Transform Position Source System Target System Motion Control Orientation Translation Transform Direction Reference Position Transform Position Input Data OrientDisabled TranslationDisabled Inverse Right amp rm Data Flow When a Move is Executed with an MCTP Instruction Inverse Transform EN cst CS2 MCT1 ER Ref1 Trans1 CS1 DATA Link Lengths L1 L2 Base Offsets X1b X2b X3b End Effector Offsets X1e X2e X3e Zero Angle Orientations Z1 Z2 Z3 Orientation Array 3 Translations Array 3 Transform Direction Reference Position Typically Cartesian Source SOURCE Coordinate System dialog Executed Coordinate System dialog Instruction Coordinate System dialog e Coordinate System dialog MC TP Instruction Faceplate Instruction Faceplate Instruction Faceplate Instruction Faceplate Publication 1756 RM 007H EN P December 2006 Computed Output CS2 Data Destination J oint Positions 1 J 2 J 3 Typically J oint Instruction Faceplate Transform Position
446. uctions M AW M DW MAR M DR MAOC M DOC 197 is not considered and the user is warned with an instruction error Illegal Output Cam If you select an enable type less than 0 or greater than 3 and the latch or unlatch type is set to Enable Position and Enable or Duration and Enable the Output Cam element is not considered and the user is warned with an instruction error Illegal Output Cam If you select an enable bit less than 0 or greater than 31 and the latch or unlatch type is set to Enable Position and Enable or Duration and Enable the Output Cam element is not considered and the user is warned with an instruction error Illegal Output Cam Specifying Output Compensation An Output Compensation data array tag may be specified via the RSLogix 5000 tag editor The data type defines the specifics for each output bit by specifying the characteristics of each actuator The array indices correspond to the output bit numbers The number of the highest compensated output bit defines the minimum size of this array Changes to the output compensation take effect immediately The following diagram shows the effect of the output compensation on the relationships between the axis input and output Position Offset amp Delay Latch amp Unlatch Mode Output Bit Compensation Operation Compensation Enable Bit Enable Selection amp Inwersion Input Bit D 31 Output Bit 0 31 Outpu
447. uctured text comment comment that spans more than one line start of comment end of comment start of comment end of comment For example Example Atthe beginning of a line Check conveyor belt direction IF conveyor direction THEN Atthe end of a line ELSE If conveyor isn t moving set alarm light light 1 END IF comment Sugar Inlet 1 open the inlet comment IF Sugar Low low level LS amp Sugar High high level LS THEN Controls the speed of the recirculation pump The Speed depends on the temperature in the tank IF tank temp 200 THEN Sugar Inlet 0 close the inlet IF bar code 65 A THI Gets the number of elements in the Inventory array and stores the value in the Inventory_Items tag SIZE Inventory O Inventory Items Publication 1756 RM 007H EN P December 2006 426 X Structured Text Programming Publication 1756 RM 007H EN P December 2006 Numerics 1756 1615 206 arithmetic operators structured text 403 ASCII structured text assignment 401 assignment ASCII character 401 non retentive 400 retentive 399 bitwise operators structured text 407 BOOL expression structured text 401 CAM data type 389 CAM_PROFILE data type 390 CASE 413 comments structured text 425 construct structured text 409 D data type CAM 38
448. ule Control over the MATC instruction s execution schedule is via the Execution Schedule parameter Immediate Execution By default the MATC instruction is scheduled to execute immediately by virtue of the fact that the default setting of the Execution Schedule parameter is Immediate In this case there is no delay to the enabling of the time camming process As illustrated in the diagram below when the MATC instruction is executed the camming process is initiated on the specified axis and Publication 1756 RM 007H EN P December 2006 146 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M APC M M CSV Publication 1756 RM 007H EN P December 2006 the Time Cam Status bit in the axis Motion Status word is set If the Execution Schedule parameter is set to Immediate the axis is immediately locked to the time master coordinate according to the specified Cam Profile Gam Profile Axis Position Time 1 0 Time cam Status Time Gam Initiated Immediate Execution If an MATC instruction is executed on an axis that is already actively time camming an Illegal Dynamic Change error is generated error code 23 The only exception for this is if the Execution Schedule is specified as pending Pending Cam Execution Alternatively the MATC instruction s execution can in effect be deferred pending completion of a currently executing time cam An Execution Schedule selection of P
449. ule are removed from the shutdown state structured text as a result of this instruction the OK relay contacts for the module will close Enable the servo drive and set the servo output voltage MDO relay ladder of an axis structured text Deactivate the servo drive and set the servo output MDF relay ladder voltage to the output offset voltage structured text Clear all motion faults for an axis M AFR relay ladder structured text Publication 1756 RM 007H EN P December 2006 30 M otion State Instructions M SO M SF MASD MASR M DO M DF M AFR Publication 1756 RM 007H EN P December 2006 The five operating states of an axis are Operating State Description Axis ready This is the normal power up state of the axis In this state e the servo module drive enable output is inactive e servo action is disabled e no servo faults are present Direct drive control This operating state allows the servo module DAC to directly control an external drive In this state e the servo module drive enable output is active e position servo action is disabled Servo control This operating state allows the servo module to perform closed loop motion In this state e the servo module drive enable output is active e servo action is enabled e the axis is forced to maintain the commanded servo position Axis faulted Shutdown In this operating state a servo fault is present and the st
450. umeric expression REAL square root SQRT numeric expression DINT REAL tangent TAN numeric expression REAL truncate TRUNC numeric expression DINT REAL Publication 1756 RM 007H EN P December 2006 404 Structured Text Programming For example Use this format valuel operator value2 operator valuel Example For this situation If gain 4 and gain 4 adj are DINT tags and your specification says Add 15 to gain 4 and store the result in gain 4 adj If alarm and high alarm are DINT tags and your specification says Negate high alarm and store the result in alarm You d w rite gain 4 adj gain 4 15 alarm high alarm function numeric expression If overtravel and overtravel POS are DINT tags and your specification says Calculate the absolute value of overtravel and store the result in overtravel POS overtravel POS ABS overtravel valuel operator function value2 value3 2 Publication 1756 RM 007H EN P December 2006 If adjustment and position are DINT tags and sensorl and sensor2 are REAL tags and your specification says Find the absolute value of the average of sensorl and sensor2 add the position adjustment ABS sensorl sensor2 2 adjustment and store the result in position Use relational operators Relational operators compare two values or strings to provide a true or false result The result of a relational operation is a BOOL value
451. unt of time to complete Immediate Type Instructions Immediate type motion instructions execute to completion in one scan If the controller detects an error during the execution of these instructions the error status bit sets and the operation ends Examples of immediate type instructions include the e Motion Change Dynamics MCD instruction e Motion Group Strobe Position MGSP instruction Publication 1756 RM 007H EN P December 2006 18 Motion Concepts Immediate instructions work as follows 1 When the rung that contains the motion instruction becomes true the controller e Sets the enable EN bit e Clears the done DN bit e Clears the error ER bit The controller executes the instruction completely If the controller Then Does not detect an error when the The controller sets the DN bit instruction executes Detects an error when the instruction The controller sets the ER bit and stores executes an error code in the control structure 3 The next time the rung becomes false after either the DN or ER bit sets the controller clears the EN bit 4 The controller can execute the instruction again when the rung becomes true EN opo Scan Scan Scan Scan rung rung rung rung true true false true Immediate Type Instructions Rung Conditions Publication 1756 RM 007H EN P December 2006 Motion Concepts 19 Message Type Instructions Message type motion instructions send o
452. up into the Shutdown state The MGSR instruction takes all the axis in the specified group out of the Shutdown state and into the Axis Ready state One of the unique characteristics of the Shutdown state is that if supported the OK solid state relay contact for each of the group s motion modules is Open Hence the result of an MGSR instruction applied to a group of motion modules is that all motion module OK relay contacts close This feature can be used to close the E Stop strings that control main power to the various drive systems and permits the customer to reapply power to the drives Arithmetic Status Flags Fault Conditions Error Codes Status Bits Example Motion Group Instructions M GS MGSD M GSR MGSP 165 To successfully execute a MGSR instruction the targeted group must be configured The M GSR instruction execution may take multiple scans to IMPORTANT zip execute because it requires transmission of a message to one or more motion modules The Done DN bit is not set immediately but only after this message has been successfully transmitted This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction so that it only executes on a transition See Appendix C not affected none See Error Codes ERR for Motion Instructions M GSR Changes to Status Bits BitNam
453. urce Continued on next page Publication 1756 RM 007H EN P December 2006 244 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR If Step 2 then M ovel is already happening M ove2 goes into the queue and waits for ovel to complete When M ovel is complete M ove2 moves the axes to a position of 10 5 And once M ove2 is in process And M ove2 comes off the queue and starts Step 3 QU MCCM Equal Motion Coordinated Circular Move EN5 Source Step Coordinate System 51 fe DN 0 Motion Control Move2 ER gt Source B 2 Move Type 0 IP5 AC2 Position Path 2 E C X Axis 10 0 Y Axis 50 More gt 21 cs1 MovePendingGueueFullStatus e a Move Source Dest Publication 1756 RM 007H EN P December 2006 M otion Coordinated Instructions M M CCM M CCD MCS MCSD CTP M CSR 245 The Termination Type operand for the MCLM or MCCM instruction specifies how the currently executing move gets terminated The following illustrations show the states of instruction bits and coordinate system bits that get affected at various transition points Bit States at Transition Points of Blended M ove Using Actual Tolerance or No Settle linear linear move The following table shows the Bit Status at the various transition points shown in the preceding graph with Termination Type of eithe
454. ured text MGS 156 relay ladder Motion Group Stop structured text GSP 166 relay ladder Motion Group Strobe structured text Position MGSR 164 relay ladder Motion Group Shutdown structured text Reset M RAT 223 relay ladder Motion Run Axis Tuning structured text MRHD 234 relay ladder M otion Run Hookup structured text Diagnostics MRP 103 relay ladder M otion Redefine Position structured text MSF 34 relay ladder M otion Servo Off structured text MSO Motion Servo On 3l relay ladder structured text Publication 1756 RM 007H EN P December 2006 Instruction Location Languages Instruction Locator 7 Instruction Languages Instruction Languages Publication 1756 RM 007H EN P December 2006 Instruction Locator 8 Instruction Location Languages Publication 1756 RM 007H EN P December 2006 Preface Motion Concepts Motion State Instructions MSO MSF MASD MASR MDO MDF MAFR Motion Move Instructions MAS MAH MAJ MAM MAG MCD MATC MCSV Motion Group Instructions MGS MGSD M GSR MGSP Table of Contents Introd do HOTE GUERRE 13 Who Should Use This 1 14 Purpose of This 14 Sequential Function Chart SFC 15 Conventions and Related 16 Chapter 1
455. us 237 Watchdog OK Test 237 Motion Coordinated Change Dynamics 28 Motion Coordinated Circular M ove 28 motion coordinated instructions See multi axis coordinated motion instructoins Motion Coordinated Linear M ove 28 Motion Coordinated Shutdow n 28 Motion Coordinated Shutdow n Reset 28 Motion Coordinated Stop 28 Motion Coordinated Transform 338 Motion Direct Drive Off 26 Motion Direct Drive On 26 motion direct drive on 42 Motion Disarm Output Cam 27 213 Motion Disarm Registration 27 183 Motion Disarm Watch 174 Motion Disarm Watch Position 27 Motion Event Instructions 169 Introduction 169 M otion Arm Output Cam M AOC 186 Axis 192 Axis Arm and Cam Arm Positions 202 Cam Start and Cam End Positions 201 Description 192 Duration 196 Effects on Status Bits 205 Enable Type 196 Error Codes 203 Execution M ode 201 Execution Schedule 202 Execution Target 192 Extended Error Codes 204 Input 201 Latch Type 193 Publication 1756 RM 007H EN P December 2006 430 Index Left and Right Cam Positions 196 M ode Compensation 199 MOTION_ INSTRUCTION structure 192 Offset and Delay Compensation 197 Operands 187 Relay Ladder 187 Structured Text 190 Output 201 Output Cam Array Checks 196 Output Compensation Array Checks 200 Reference 203 Specifying Output Compensation 197 Specifying the Output Cam Profile 192 Unlatch Type 194 M otion Arm Registration M AR 176 Changes to Status Bits 182 Description 178 Extended Error Codes 18
456. ut before setting the servo module s analog output to the specified voltage value There is typically a 500 msec delay between the activation of the drive enable output and the setting of the analog output to the specified level to allow the drive s power structure to stabilize To minimize drift during this drive enabling delay the output voltage to the drive is set to the Output Offset attribute value default is zero Thereafter the output voltage is given by the specified Drive Output value of the MDO instruction and indicated by the Servo Output status attribute value The 16 bit DAC hardware associated with various Logix servo modules limits the effective resolution of the Direct Drive Motion Control to 305 uV or 0 003 In the case of Direct Drive operation the module s servo loop is inactive and bypassed The Motion Direct Drive On instruction is only affected by the Servo Output Polarity configuration bit the Output Offset and Output Limit attributes for the axis In the case where Output Limit configuration value is reduced below the current output voltage value the Servo Output value is automatically clamped to the Output Limit value The most common use of this instruction is to provide an independent programmable analog output as an open loop speed reference for an external drive or for testing an external servo drive for closed loop operation To successfully execute a MDO instruction the targeted axis must be configur
457. ut cams connected to anaxis MDOC No Motion Disarm Output Cam Tune an axis and run diagnostic Use the results of an M AAT instruction to calculate M AAT No tests for your control system update the servo gains and dynamic limits of an Motion Apply Axis Tuning These tests include axis Run a tuning motion profile for an axis M RAT No Motion Run Axis Tuning e Encoder hookup test Use the results of an M RHD instruction to set MAHD No encoder and servo polarities M otion Apply Hookup Diagnostic e Marker test Run one of the diagnostic tests on an axis MRHD No Motion Run Hookup Diagnostic Publication 1756 RM 007H EN P December 2006 28 Motion Concepts If You Want To And Control multi axis coordinated Start a linear coordinated move for the axes of motion Coordinate system Use This Instruction Motion Direct Command M CLM No Motion Coordinated Linear M ove Start a circular move for the for the axes of M CCM No coordinate system M otion Coordinated Circular M ove Change in path dynamics for the active motionona M CCD No coordinate system Motion Coordinated Change Dynamics Stop the axes of a coordinate system or cancel a MCS No transform Motion Coordinated Stop Shutdown the axes of a coordinate system MCSD No Motion Coordinated Shutdown Start a transform that links two coordinate systems MCT No together This is like bi directional gearing Motion Coordinated Transform 0 Calculate the positi
458. ution When executed for the first time with Reverse selected the control defaults the direction to Opposite Unchanged this allows other cam parameters to be changed without altering the current or previous camming direction When executed for the first time with Unchanged selected the control defaults the direction to Same Motion ove Instructions M AS MAJ M AG MCD M CCP M ATC M CSV 117 Operand Type Format Description Cam Profile CAM PROFILE array Tag name of the calculated cam profile array used to establish the master slave position relationship Only the zero array element 0 is allowed for the Cam Profile array Ellipsis launches Cam Profile Editor Slave REAL immediate Scales the total distance covered by Scaling or tag the slave axis through the cam profile M aster REAL immediate Scales the total distance covered by Scaling or tag the master axis through the cam profile Execution UINT32 immediate Determines if the cam profile is M ode executed only one time or repeatedly 0 cam motion of slave axis starts only when the master axis moves into the range defined by the start and end points of the cam profile W hen the master axis moves beyond the defined range cam motion on the slave axis stops and the Process Complete bit is set Slave motion does not resume if the master axis moves back into the cam profile range 1
459. utlet 1 1 Ingredient B Outlet 4 1 LSE Ingredient A Outlet 1 0 Ingredient A Outlet 4 0 Ingredient B Outlet 2 0 Ingredient B Outlet 4 END CASE The tells the controller to also clear the outlet tags whenever the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This applies only if you embed the assignment in the action of the step or use the action to call a structured text routine via a JSR instruction Publication 1756 RM 007H EN P December 2006 416 Structured Text Programming FOR DO Use the FOR DO loop to do something a specific number of times before doing anything else Operands Structured Text FOR count initial_value TO final value BY increment DO Operand Type Format Description statement count SINT tag tag to store count position as the END FOR INT FOR DO executes DINT initial SINT tag must evaluate to a number value INT expression DINT immediate specifies initial value for count final SINT tag specifies final value for count which value INT expression determines when to exit the loop DINT immediate increment SINT tag optional amount to increment count INT expression each time through the loop DINT immediate If you don t specify an increment the count increments by 1 IMPORTANT Make sure that you do not iterate within the loop too many times in a single scan e The
460. ves Stopping a Cam Like other motion generators jog move gear etc active cams must be stopped by the various stop instructions MAS or MGS Cam motion must also stop when the ControlLogix processor changes OS modes The MAS instruction in particular must be able to specifically stop the camming process This behavior should be identical to the MAS functionality that specifically stops a gearing process M erging from a Cam Like other motion generators jog move gear etc active cams must also be compliant with motion merge functionality Moves and Jogs in particular must be able to merge from active camming This behavior should be identical to the merge functionality applied to a gearing process Fault Recovery Sometimes it is necessary to respond to an axis fault condition without loosing synchronization between a master and slave axis that are locked in a cam relationship With an active cam there are a couple ways to handle axis faults Publication 1756 RM 007H EN P December 2006 134 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M APC M ATC M CSV Publication 1756 RM 007H EN P December 2006 Create a virtual axis and cam everything to it and if necessary gear this virtual master axis to actual master axis of the machine Set the various fault actions for all axes to Status Only When an axis fault occurs e g a drive fault an application program monitoring the axes fault status
461. xtended Error code provides the number of cam points the instruction is attempting to generate None Publication 1756 RM 007H EN P December 2006 114 Motion Move Instructions MAS MAH MAJ MAM MAG MCD M CCP M ATC M CSV Example Relay Ladder MCC Motion Calculate Cam Profile N 5 Motion Control MCCP 1 Cam Cam 1 0 L 30 FR gt Lenath Start Slope 1 0 End Slope 1 0 Cam Profile _ 1 1 MCCP Ladder Example Structured Text MCCP MCCP _1 Cam_1 0 30 1 0 1 0 cam_pro1 1 Publication 1756 RM 007H EN P December 2006 Motion Axis Position M APC Motion ove Instructions MAS MAJ MAM MAG MCD MRP MCCP MAPC MATC MCSV 115 The Motion Axis Position Cam MAPC instruction provides electronic camming between any two axes according to the specified Cam Profile When executed the specified Slave Axis is synchronized to the designated Master Axis using a position Cam Profile established by the RSLogix 5000 Cam Profile Editor or by a previously executed Motion Calculate Cam Profile MCCP instruction The direction of Slave Axis motion relative to the Master Axis is defined by a flexible Direction input parameter The camming Direction as applied to the slave may be explicitly set as the Same or Opposite or set relative to the current camming direction as Reverse or Unchanged To accurately synchronize the slave axis position to master axis posit
462. y a stop command shutdown ora servo fault Process It is set after the tuning process has been successfully Complete Bit 27 completed Description The Motion Run Axis Tuning MRAT instruction is used to execute a tuning motion profile on the specified axis During this brief tuning motion profile the motion module makes timing and velocity measurements that serve as input data for a subsequent MAAT Publication 1756 RM 007H EN P December 2006 224 Motion Configuration Instructions M AAT M RAT M AHD M RHD Motion Apply Axis Tuning instruction MRAT requires no explicit input parameters simply enter or select the desired physical axis If the targeted axis does not appear in the list of available axes the axis has not been configured for operation Use the Tag Editor to create and configure a new axis The MRAT instruction uses axis configuration parameters as input and output The input configuration parameters that MRAT uses are shown in the table below Axis Parameter Data Type Units Meaning Tuning Direction Boolean Direction of Tuning M otion 0 Fwd 1 Rev Tuning Travel Limit Real pos units M aximum allowed excursion of Axis Tuning Velocity Real pos units sec Top Speed of Tuning Profile Damping Factor Real Damping Factor used to calculate the maximum Position Servo Bandwidth Based on the above configuration parameters MRAT execution generates a motion event o
463. y be set for each axis in the group The MGSD instruction forces the targeted group of axes into the Shutdown state One of the unique characteristics of the Shutdown state is that the OK solid state relay contact for all of the group s Publication 1756 RM 007H EN P December 2006 162 Motion Group Instructions M GS M GSD M GSR M GSP Arithmetic Status Flags Fault Conditions Error Codes Publication 1756 RM 007H EN P December 2006 motion modules Open This feature can be used to open up the E Stop string s that control main power to the various drive systems Another characteristic of the Shutdown state is that any instruction that initiates axis motion for an axis within the group is blocked from execution Attempts to do so results in an execution error Only by executing one of the Shutdown Reset instructions can motion then be successfully initiated To successfully execute a MGSD instruction the targeted group must be created and configured be MGSD instruction execution may take multiple scans to execute due to the fact that it requires transmission of a message to one or more motion modules Thus the Done DN bit is not set immediately but only after this message has been successfully transmitted This is a transitional instruction e In relay ladder toggle the rung condition in from cleared to set each time the instruction should execute e In structured text condition the instruction s
464. y tags may be created by the RSLogix 5000 tag editor or the MAPC MATC instructions using the built in Cam Profile Editor Motion M ove Instructions MAS MAH MAJ M AG MCD M CCP M ATC M CSV 111 The data within the Cam Profile array can be modified at compile time using the Cam Profile Editor or at run time with the Motion Calculate Cam Profile MCCP instruction In the case of run time changes a Cam array must be created in order to use the MCCP instruction The status parameter is used to indicate that the Cam Profile array element has been calculated If execution of a camming instruction is attempted using any uncalculated elements in a cam profile the MAPC or MATC instructions error The type parameter determines the type of interpolation applied between this cam array element and the next cam element Cam Profile Array Status M ember The Status member of the first element in the cam profile array is special and used for data integrity checks For this reason the MCCP must always specify the cam profile with the starting index set to 0 This first cam profile element Status member can have the following values Status Variables Description 0 Cam profile element has not been calculated 1 Cam profile element is being calculated 2 Cam profile element has been calculated n Cam profile element has been calculated and is currently being used by n 2 M APC or M ATC instructions Linear an
465. ype If you want the axes to vector speeds stop between moves M otion Coordinated Instructions M M CCM M CCD MCS MCSD M CTP M CSR 249 The termination type determines when the instruction is complete It also determines how the instruction blends its path into the queued MCLM or MCCM instruction if there is one 1 Choose a termination type And you wantthe instruction to complete when the both of these happen e Command position equals target position The vector distance between the target and actual positions is less than or equal to the Actual Position Tolerance of the coordinate System Then use this termination type 0 Actual Tolerance command position equals the target position 1 No Settle keep the speed constant except between moves command position gets within the Command Position Tolerance of the coordinate system 2 Command Tolerance axes get to the point at which they must decelerate at the deceleration rate 3 No Decel transition into or out of a circle without S55 4 Follow Contour Velocity stopping Constrained 1 2 V X t accelerate or decelerate across multiple EX 5 Follow Contour Velocity moves Unconstrained Publication 1756 RM 007H EN P December 2006 250 Motion Coordinated Instructions M CLM M CCM M CCD M CS MCSD M CTP M CSR Termination type 0 Actual
466. ype D Position move position B AxisO 5 0 Axis 0 0 Speed 20 PORE FY Speed Units of Maximum Accel Rate 30 Accel Units of Maximum Decel Rate 30 Decel Units of Maximum Profile S Curve Termination Type D Merge Disabled Merge Speed Programmed MCLM Ladder Instruction Structured Text MCLM Coordinated sys MCLM 3 0 move position 6 5 0 0 0 20 Sofmaximum 30 tofmaximum 30 tofmaximum scurve 0 disabled programmed Publication 1756 RM 007H EN P December 2006 276 Motion Coordinated Instructions M CLM M CCM M CCD MCS MCSD M CTP M CSR Motion Coordinated Use the MCCM instruction to initiate a two or three dimensional circular coordinated move for specified axes within the Cartesian Circular Move M CCM coordinate system New position is defined as either an absolute or incremental position The dimension of the circle is defined by the number of axes contained within the coordinate system For example if you have a coordinate system that contained three axes with an MCCM instruction that has motion in only two dimensions the resultant move is still considered a three dimensional arc or circle ATTENTION Use a motion control tag only once Do not re use it in another instruction Otherwise you can cause unexpected equipment motion and injure people Operands Relay Ladder Operand Type Format Description MCCM Coordinate COORDINATE
Download Pdf Manuals
Related Search
Related Contents
PS 5000 A Serie - Produkte - EA User manual - AutoTool.fr PT-Series - Installation Manual Launch X431 iDiag for IPAD IPhone IOS V8.0 user manual HP L2401x Purestream CWM User and Maintenance Manual Samsung RS552NRUASK 用户手册 Paper Chart Maker - Symbol for Windows 取扱説明書 P700i 日本語 Ninja - Sega Master System - Manual Copyright © All rights reserved.
Failed to retrieve file