Home
NJ-series CPU Unit Motion Control User`s Manual
Contents
1. 6 27 MC AX 0 63 Obsr Active MC GHPIO0 31 Kinematics Axis 3 Axis Observation Occurrence 6 22 Composition Axis for Axis AS 6 27 MC AX 0 63 Obsr Code Axis Observation Code 6 22 MC AX 0 63 Scale Den MC GHP 0 31 Kinematics GrpType Composition 6 27 MC GHRP O0 31 MFaultLvl Active Work Travel Distance Per Motor Rotation 6 22 Axes Group Minor Fault Occurrence 6 26 MC AX 0 63 Scale Num MC GRP 0 31 MFaultLvl Code Command Pulse Count Per Motor Rotation 6 22 Axes Group Minor Fault Code 6 26 MC AX 0 63 Scale Units Unit of Display 6 22 MC GRP 0 31 Obsr Active MC AX 0 63 Status Continuous Axes Group Observation Occurrence 6 26 Continuous Motion cccceeeeeeeeeeeeeeeeeeeeeeeeeeaeeeeees 6 19 MC GRP 0 31 Obsr Code MC AX 0 63 Status Coordinated Axes Group Observation Code 6 26 Coordinated Motion ccccccssseeeeeeeeseeeeeeeeeeeeeees 6 19 _MC_GRP 0 31 Status Disabled _MC_AX 0 63 Status Disabled Axis Disabled 6 19 Axes Group Disabled ccccssseeeeeseeeeeeeeeeeeeeeees 6 25 _MC_AX 0 63 Status Discrete Discrete Motion 6 19 _MC_GRP 0 31 Status ErrorStop MC AX 0 63 Status ErrorStop Error Deceleration S
2. 3 21 3 4 Setting Procedures for Axes Groups 3 22 3 4 1 Setting Procedure for an Axes Group 3 22 3 4 2 Setting Procedure 3 22 NJ series CPU Unit Motion Control User s Manual W507 3 1 3 Configuring Axes and Axes Groups 3 1 Axes 3 1 1 3 2 This section describes the axes that are used in a MC Function Module Introduction to Axes In a motion control system the targets of motion control are called axes An axis can be an actual Servo Drive or encoder connected using EtherCAT or it can be a virtual Servo Drive or encoder within the MC Function Module The MC Function Module supports the axis types that are given in the following table Axis type Servo axis Virtual servo axis Encoder axis Virtual encoder axis Description These are the axes used by the EtherCAT slave Servo Drives 1 They are assigned to actual Servo Drives One Servomotor is used as one axis These are virtual axes that exist only inside the MC Function Module They are not used by actual Servo Drives For example they are used as master axes for synchronizing control An encoder axis uses an EtherCAT slave encoder input terminal 2 Encoder axes are assigned to actual encoder input terminals If one encoder input terminal contains two encoder inputs the individual encoder inputs will act as one axis These axes are used virtually for encoder operation A virtual encoder axis is us
3. A 11 A 2 1 Wiring to Encoder Input Terminals lille A 11 A 2 2 Settings for Encoder Input Terminals lll llle A 11 Terminology 652 2933 enne ed o REIN DEP ERE d bes eS baw x A 15 A 3 1 NJ series CGontroller llle A 15 A 3 2 Motion Control 0 0 eee eee ees A 16 A 3 3 EtherCAT Communications A 17 NJ series CPU Unit Motion Control User s Manual W507 A 1 Appendices A 1 Connecting the Servo Drive This appendix describes connections to an OMRON G5 series Servo Drive with Built in EtherCAT Communications A 1 1 Wiring the Servo Drive Servo Drives are connected using EtherCAT communications Refer to the NJ series CPU Unit Built in EtherCAT Port User s Manual Cat No W505 for information on the connection methods A 1 2 Servo Drive Settings A 2 This section outlines the Servo Drive settings that are used when connected to OMRON G5 series Servo Drives with Built in EtherCAT Communications i e the applicable Servo Drives for the MC Func tion Module Refer to the G5 series AC Servomotors Servo Drives with Built in EtherCAT Communica tions User s Manual Cat No 1576 for details on the Servo Drives i Recommended Servo Drives All of the functions of the MC Function Module can be used for Servo Drives with the unit versions that are given in the following table Manufacturer Compatible models Applicable unit versions OMRON R88D KN ULI ECT Unit version 2 1 o
4. 6 26 command position ceeceesseeeeeeeeeeeeeeeeeeeeeeeees 6 14 9 26 Command Pulse Count Per Motor Rotation 5 8 6 22 command velocity RENE 9 28 Command Velocity Saturation 6 20 COMPOSINON BEE 5 21 6 27 COMPOSITION AXES carin dicte eoo pers aeta ie en costae oe nenas 5 21 Composition Axis for Axis AO eeessssesssss 6 27 Composition Axis for Axis A1 seeeeessssssss 6 27 Composition Axis for Axis A2 eeeeeessseesss 6 27 Composition Axis for Axis AS eeseessseessss 6 27 connecting acceleration 9 15 connecting velocity EE 9 15 Continuous Motion cccccceseeeeeeeeeeeeeceneeeeeeseeeeeeeaes 6 19 Coordinated Motion cccccsseccccessseeeeceeeseeeseeeseeeeess 6 19 Correction Allowance Ratio ccccceesseeeeeeeeeeeeeeeees 5 23 COUNT ee 5 13 current position CHANGING ete e e SERES 9 65 Cyclic Synchronous Position CSP Control Mode 6 20 Cyclic Synchronous Torque CST Control Mode 6 20 Cyclic Synchronous Velocity CSV Control Mode 6 20 cyclic synchronous velocity control 9 24 D AE 6 16 deceleration rate IESELEN eebe 9 38 deceleration stop of command value 9 8 Deceleration Stopping 6 19 6 25 Deceleration Warning Value sssssssesssesree
5. 6 20 MC AX 0 63 Dir Nega Negative Direction 6 20 MC AX 0 63 Dir Posi Positive Direction 6 20 MC AX 0 63 DrvStatus CSP Cyclic Synchronous Position CSP Control Mode 6 20 MC AX 0 63 DrvStatus CST Cyclic Synchronous Torque CST Control Mode 6 20 MC AX 0 63 DrvStatus CSV Cyclic Synchronous Velocity CSV Control Mode 6 20 NJ series CPU Unit Motion Control User s Manual W507 Index MC AX 0 63 DrvStatus DrvAlarm MC COM PFaultLvl Active Drive Error Input ccccsseeeeeeceesseeeceeeseeeeseeseeess 6 20 MC Common Partial Fault Occurrence 6 18 MC AX 0 63 DrvStatus DrvWarning MC COM PFaultLvl Code Drive Warning Input ccccecssseeeeeeeeeeeeeseseeess 6 20 MC Common Partial Fault Code 6 18 MC AX 0 63 DrvStatus Home Home Input 6 20 MC COM Status CamTableBusy Cam Table Busy 6 18 MC AX 0 63 DrvStatus HomeSw MC COM Status RunMode MC Run 6 18 Home Proximity Input cccccssseseeeeeeeeeeeeseeeeees 6 20 MC COM Status TestMode MC Test Run 6 18 MC AX 0 63 DrvStatus ILA MC ComErrSta MC Common Error Status 11 4 Drive Internal Limiting esses 6 20 MC ErrSta Axis Error Status sssusss 11 4 MC AX 0 63 DrvStatus ImdStop MC GHP 0 31 Axes Gr
6. I N zi Oo c za 0 gt O Oo m 5 suonduoseq 1043 Z Z 11 Troubleshooting Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks 11 32 Home Undefined during Coordinated Motion 64590000 hex Home of the logical axis became undefined during axes group motion or while decelerating to a stop timing tion execution The axes group decelerates to a stop Axes Group Minor Fault Occurrence The command position or actual posi tion overflowed or underflowed for a logical axis in an axes group motion or a logical axis that was decelerating to a stop and the home definition was lost A slave communications error occurred for a logical axis and home became undefined during axes group motion or while decelerating to a stop A slave for a logical axis left the net work and home became undefined during axes group motion or while decelerating to a stop Correct the program so that the axis operates within ranges that do not cause overflows or underflows in the command position or actual position Correct the slave communications error and define home Connect the disconnected Slave to the network again and define home Write the pro
7. Lot number and serial number MAC address The following information is provided on the ID information label Item Description Unit model Gives the model of the Unit Unit version Gives the unit version of the Unit Lot number and Gives the lot number and serial number of the Unit serial number DDMY Y Lot number LJ For use by OMRON xxxx Serial number M gives the month 1 to 9 January to September X October Y November Z December MAC address Gives the MAC address of the built in port on the Unit i Confirming Unit Versions with Sysmac Studio You can use the Unit Production Information on the Sysmac Studio to check the unit version of the CPU Unit CJ series Special I O Units CJ series CPU Bus Units and EtherCAT slaves The unit versions of CJ series Basic I O Units cannot be checked from the Sysmac Studio e CPU Unit and CJ series Units 1 Double click CPU Expansion Racks under Configurations and Setup in the Multiview Explorer Or right click CPU Expansion Racks under Configurations and Setup and select Edit from the menu The Unit Editor is displayed for the Controller Configurations and Setup layer 26 NJ series CPU Unit Motion Control User s Manual W507 Unit Versions 2 Right click any open space in the Unit Editor and select Production Information The Production Information Dialog Box is displayed 3 Production information E Model information Lot number NJ501 1500 Ver 1 0 31810 Hardware
8. This is the Axis Variable for axis 0 MC Axis000 MFaultL vl Active BOOL FALSE TRUE when there is a minor fault level error for axis O Pwr Status BOOL FALSE This variable is assigned to the Status output variable from the PWR instance of the MC Power instruction It is TRUE when the Servo is ON StartSetPos BOOL FALSE This variable gives the status of the external button that is used to change the actual posi tion StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communications are active and normal Vel_Ex BOOL FALSE This variable is used to execute the MC_MoveVelocity Velocity Control instruc tion It is used in ST programming SetPos_Ex BOOL FALSE This variable is used to execute the MC_SetPosition instruction It is used in ST programming 10 72 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o D m m D I Timing Chart j Oo 2 Ladder Diagram E Q s MC Power E 3 2a Pwr Status MC MoveVelocity VEL Execute Ve InVel Vel Bsy MC SetPosition SET POS Execute i Set Pos D Set Pos Bsy MC Axis000 Command current velocity ch EN is ch Cc 2 Q 2 e 2 e r 2 D 2 O m C U O o o 2 Q c E 2 e a o O m lt O 2 r Command current position Actual current position Time NJ series CPU Unit Motion Control User s Manual W507 1
9. MC Axis000 0 W MC Axis001 1 AN Group Settings Select the axes composing an interpolation axes group amp Cam Data Settings bi Copying an Axes Group You can also create an axes group by copying an axes group from a project NJ series CPU Unit Motion Control User s Manual W507 3 23 3 Configuring Axes and Axes Groups I Setting Axes Group Parameters 1 Right click an axes group in the Multiview Explorer and select Edit from the menu A Configurations and Setup cs tens new NJ501 0 Y SL v Configurations and Setup Lei Axes group number fa N Axes group use Unused axes group e ww lt Motion Control Setup V 15 Axis Settings i MC Axis000 0 l Select the axes composing an interpolation axes group i MC_Axis001 1 Y Axes Group Settings F Data Trace Settings Rename b Programming A Configurations and Setup jQ Qc tenus J HH xt gt 73 EtherCAT Axes group number gt Axes group use Unused axes group e W i Motion Control Setup w i Axis Settings 3z MC Axis000 0 Select the axes composing an interpolation axes group i MC_Axis001 1 Y 5 Axes Group Settings 3 24 NJ series CPU Unit Motion Control User s Manual W507 3 Configuring Axes and Axes Groups 2 Select Used axes group in the Axes group use Box Fas ysmac Studio k IC Pe Edit View Insert Project Controller Simulation Tools Help 1 F a a Kate A Configurations and
10. Replace the CPU Unit NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Problem Cause Itemtocheck Countermeasure Homing cannot be per Error Check the nature of the If there is an error follow formed error troubleshooting proce dures for it Check the axis input infor Wire all connections cor mation in the Axis Vari rectly ables to see if the home proximity input sensor turns ON OFF Incorrect wiring of the Check the wiring of the Wire all connections cor home input home input rectly The rotation direction and If the axis moves to the Wire the limit inputs cor limit input direction are mechanical limit without rectly inconsistent reversing at the limit check the axis input infor mation in the Axis Vari ables to see if the limit input turns ON and OFF Incorrect wiring of the limit Check the wiring of the Wire all connections cor input limit inputs rectly InPosWaiting does not Check to see if the Servo Increase the Servo Drive change to FALSE Drive gain is too low gain Check to see if the in posi Increase the in position tion range is too narrow range Incorrect wiring of the home proximity input mmh I N Oo c 0 gt O Oo Gei 5 SOIPAWOY pue sesne 10113 Z L 1h Homing approach velocity Check the homing Lower the homing is too high approach velocity approach velocity of the MC Function Module Axis pa
11. StartPg is TRUE the setting of the In position Check Time is changed IF StartPg TRUE THEN Write1_Ex TRUE END_IF f changing the setting of the In Position Check Time is completed the setting of the Positive Software Limit is changed IF Write1_D TRUE THEN Write2_Ex TRUE END_IF f changing the setting of the Positive Software Limit is completed the setting of the Negative Software Limit is changed IF Write2_D TRUE THEN Write3_Ex TRUE END_IF MC_Write WRITE1 Target MC Axis000 SettingValue Write1 Sv Execute Write1 Ex ParameterNumber Write1 Pn Done gt Write1 D Busy Write1 Bsy CommandAborted gt Write1 Ca Error gt Write1 Er ErrorlD gt Write1_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming 2 N D T WRITE2 o Target MC Axis000 3 SettingValue Write2 Sv ns Execute Write2 Ex 53 ParameterNumber Write2 Pn E Done gt Write2_D ne Busy gt Write2_Bsy CommandAborted gt Write2_Ca Error gt Write2 Err ErrorlD gt Write2 ErrIlD zi e N WRITE3 T Target MC Axis000 D SettingValue Write3 Sv E Execute Write3 Ex S ParameterNumber Write3 Pn Done gt Write3 D O Busy gt Write3 Bsy D CommandAborted gt Write3 Ca EI Error gt Write3 Er ra ErrorlD gt Write3 ErrID x z se o 3 D D o NJ series CPU Unit Motion Control User s Manu
12. When the Count Mode of the axis is set to Rotary Mode positioning is performed toward the target position in the positive direction For details refer to the MC_MoveAbsolute Absolute Positioning instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 I Tl c gt O Oo gt o Oo mp gt o o lt o 3 D OH o mp c Q Oo uogoun ung 1S9 OIN LF LE v Note This MC Test Run is used for an OMRON G5 series Servo Drive with built in EtherCAT communications Do not use it with servo drives from any other manufacturer NJ series CPU Unit Motion Control User s Manual W507 4 3 4 Checking Wiring from the Sysmac Studio 4 1 2 Application Procedure Before you perform an MC Test Run check the following two items e Are the Sysmac Studio and Controller connected and are they online e Is the MC Test Run Mode currently in use from any other copy of the Sysmac Studio After you have confirmed these two items perform the following operations as instructed Setup Starting the MC test run function Checking wiring Checking motor operation Checking electronic gear settings Confirming homing START Create the EtherCAT slave configuration add axes assign the axes and set the axis parameters Start the MC test run function la Precautions for Correct Use e When one of the following operations is performed for a command from the Sysmac Stu
13. Direction BufferMode Lei be N O O O o Q gt x D o ok Cc 2 Q LD 2 e 9 D x o O O D D Lag O p If StopOn is TRUE the MC Stop instruction is executed MC Stop StopOn MC Axis000 Axis Axis Execute Done LREAL 5000 0 Deceleration Busy Stp Bsy Jerk Active Stp Act BufferMode CommandAborted Stp Ca Error Gm Em ErrorlD Gm ErrlD d If the Error or CommandAborted output variable from the MC Stop instruction changes to TRUE the MC ImmediateStop instruction is executed to stop immediately IMD STP MC ImmediateStop Stp Err MC Axis000 Axis Axis Imd Stp D Execute Done eMC STOP MODES mcFreeRunStop StopMode Busy Imd Gm Bsy CommandAborted Imd Stp Ca Error Imd Stp Err ErrorlD Imd_Stp_ErrlD Stp_Ca kk NJ series CPU Unit Motion Control User s Manual W507 10 21 10 Sample Programming 10 22 i ST Programming f the input parameters for absolute positioning and stopping are not set the target values and other parameters are set IF InitFlag FALSE THEN The input parameters for the MC MoveAbsolute Absolute Positioning instruction are set Mv Abs Pos LREAL 10000 0 Mv Abs Vel LREAL 500 0 Mv Abs Acc LREAL 500 0 Mv Abs Dec LREAL 500 0 Mv Abs Dir eMC DIRECTION mcPositiveDirection The input parameters for the MC Stop in
14. E g 5 1 Axis 1 Servo in E Bon dior Axis 1 Servo axis Drive x o UU LI eK Encoder o I jab li LLL OH 5 D S Axis 2 A Servo Servo IT Axis 2 Servo axis 3 Drive motor e H 3 Et Encoder S Settings Parameter name Axis Variable Names Axis2 Enabled Axes Used axis Axis Type Servo axis Node Address input device 2 Command Pulse Count Per Motor 1 048 576 Rotation Work Travel Distance Per Motor Rota 10 000 tion Maximum Velocity 500 000 2 Maximum Jog Velocity 50 0003 Maximum Acceleration 5 000 000 4 Maximum Deceleration 5 000 000 4 NJ series CPU Unit Motion Control User s Manual W507 5 17 5 Motion Control Parameters Settings Parameter name Software Limits Immediate stop for command posi Immediate stop for command posi tion tion Positive Software Limit 500 000 Negative Software Limit 0 Count Mode Linear Mode 1 The position command unit will be 1 um 2 The maximum velocity will be 3 000 r min 30 m min 0 5 m s 500 000 um s 8 The maximum jog velocity will be 10 of the maximum velocity i e 0 05 m s 50 000 um s 4 The maximum acceleration and the maximum deceleration are 5 m s2 The acceleration time to the maximum velocity 3 000 r min is 0 1 s 5 Set a positioning that is within the movable range of the device The positive software limit is set to 50 cm 500 000 um I Synchronized Control with Encoder as Master Axis The follo
15. LREAL 0 0 Camin_Ms LREAL 1 0 Camin_Ss LREAL 1 0 Camin_Mo LREAL 0 0 Camin_So LREAL 0 0 Camin_Rt eMC_REFERENCE_TYPE _mcCommand Camin_Dir eMC_DIRECTION _mcNoDirection The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag TRUE END_IF When StartPg is TRUE the Servo is turned ON for axis O if process data communications for axis O are active and normal f process data communications are not active the Servo is turned OFF IF StartPg TRUE AND EC PDSIavTbI MC Axis000 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwri_En TRUE Se NO O O 2 Di 2 a 2 Di Di 3 J Di mE Di S Di o D Di 2 Q LD Di 2 mE 2 D eO Di 3 m o D ELSE Pwr1 En FALSE END JE When StartPg is TRUE the Servo is turned ON for axis 1 if process data communications for axis 1 are active and normal f process data communications are not active the Servo is turned OFF IF StartPg TRUE AND EC PDSIavTbI MC Axis001 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis001 Cfg NodeAddress FALSE THEN Pwr2_En TRUE ELSE Pwr2_En FALSE END_IF If a minor fault level error occurs in the MC Common Error Status Variable or for any of the axes the error handler for the device FaultHandler is executed Program the FaultHandler according to the device IF MC Axis000 MFaultLvl A
16. LREAL 0 0 Camin_Rt eMC_REFERENCE_TYPE _mcCommanad Camin_Dir eMC DIRECTIONZ mocNobDirection The input parameters for the MC Gearln Start Gear Operation instruction are set Gearin RatN UINT 10 1 Gearin_RatD UINT 10 1 Gearin_Reflyp _eMC_REFERENCE_TYPE _mcCommand Gearin_Acc LREAL 0 0 Gearin_Dec LREAL 0 0 The input parameters for the MC_CombineAxes Combine Axes instruction are set Combine_Cm _eMC_COMBINE_MODE _mcAddAxes Combine_RefMas eMC REFERENCE TYPE 2 mcLatestCommand Combine HefAux eMC REFERENCE TYPE amp mcLatestCommand The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag TRUE When StartPg is TRUE the Servo is turned ON for axis O if process data communications are active and normal IF StartPg TRUE AND _EC_PDSlavTbl MC_AxisO00 Cfg NodeAddress T RUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN ELSE END IF 10 60 Pwr1 En zTRUE Pwr1 En FALSE NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming e N When StartPg is TRUE the Servo is turned ON for axis 3 if process data communications are active and normal D IF StartPg TRUE o AND EC PDSIavTbI MC Axis003 Cfg NodeAddress TRUE 3 AND EC CommErrTbI MC AxisO03 Cfg NodeAddress FALSE THEN ns Pwr4_En TRUE SE ELSE sz Pwr4_En FALSE He END_IF f a minor fault level error occurs for axis O to ax
17. MC_MoveJog_instance MC_MoveJog A Axis1 Axis Axis PositiveEnable Busy B NegativeEnable CommandAborted Velo1 Velocity Error Acce1 Acceleration ErrorlD Dece1 Deceleration In this example Velocity Target Velocity is Velo1 Acceleration is Acce1 and Deceleration is Decet Set the values for each variable in the user program in advance to operate the axis with the example input variable settings e Velo 30 000 e Accel1 3 000 000 e Dece1 3 000 000 For details on the MC MoveJog Jog instruction refer to the NJ series Motion Control Instructions Ref erence Manual Cat No W508 buibbof E Z 7 ejdurex3 Bulwwesbold v 7 NJ series CPU Unit Motion Control User s Manual W507 7 7 7 Manual Operation NJ series CPU Unit Motion Control User s Manual W507 Homing e This section describes homing Mei rm 8 2 9 2 Homing PIOCGUUIG eek Exe be 4G KEEPER Gu ga etna sis 8 5 8 2 1 Setting Homing Parameter 8 5 8 2 2 Monitoring the Homing Operation 8 10 8 3 Homing Operation Sg dE we ee ew eee ea Rem Ry Ne a 8 11 8 4 Homing with an Absolute Encoder 8 12 8 4 1 EIER acolo ces eee ee Reb ae doe Dos a ee keh 8 13 8 4 2 Selling Procedure ons sa eens bi Ue une AEN awe EUER UR E ee ee ee 8 13 8 5 Highspeed nomifig EE EE 8 15 NJ series CPU Unit Motion Control User s Manual W507 8 1 8 Homing 6 1 Outline This section d
18. Master Sync Direction Error Slave Dis connection during Servo ON Feed Dis tance Over flow An alarm was detected for the EtherCAT slave that is allocated to an axis An error occurred for an axis in an axes group An MC common error occurred An overflow occurred for the latched position for the MC TouchProbe Enable External Latch instruction An underflow occurred for the latched position for the MC TouchProbe Enable External Latch instruction The master axis continued to move in the direction opposite to the sync direction An EtherCAT slave that is allocated to an axis was discon nected while the servo was ON The target position after the interrupt input was received for the MC MoveFeed Interrupt Feeding instruction over flowed or under flowed e An error was detected for the EtherCAT slave that is allocated to the axis An error occurred for an axis in an axes group that was in motion Partial fault level MC common error occurred An overflow occurred for the latched position for the MC TouchProbe Enable Exter nal Latch instruction An underflow occurred for the latched position for the MC TouchProbe Enable Exter nal Latch instruction The master axis continued to move in the direction opposite to the sync direction of the mas ter and slave axes resulting in an overflow An EtherCAT slave that is allo cated to an axis was disco
19. Maximum number of cam tables 640 tables 2 Switching cam operation You can switch to a different cam operation by executing a motion control instruction Overwriting cam data Cam data can be overwritten from the user program Saving cam data Cam data can be saved to non volatile memory by using the Save Cam Table instruction Information attached to the cam data Information can be downloaded or uploaded for display in the Cam Edi tor 9 Timing to load cam data to main e When the data is downloaded from the Sysmac Studio memory e When power is turned ON 1 If 65 535 points are used for each cam table there will be a maximum of 16 cams A resolution of 0 1 allows for a maximum of 3 600 points per cam table for a maximum of 291 cams 2 The total size is 10 MB max 8 Use the Synchronization menu command of the Sysmac Studio to upload and download the project 9 16 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions I Data Type of Cam Tables A cam table is declared as an array of cam data structures The type declaration for the cam data struc ture is shown below TYPE Cam data structure SMC CAM REF STRUCT Phase REAL Phase Distance REAL Displacement END STRUCT END TYPE You must create the cam data with the Cam Editor in the Sysmac Studio and then specify the name of the cam table and the number of cam data i e the size of the array For example to make a cam table
20. Production information SYSTEM 1 00 00 22519 Model information Lot number BOOT 20110627 IOPFP B 3 0 Rack 0 Slot 1 Unit 0 CH1W V680CI2 Ver 1 2 16Y10V IOPPW 0 73 Runtime 155 Rack 0 Slot 1 Unit 0 CHW V68O0CcI2 Ver 1 2 16Y10V Unit revision 1 PCB revision 100 Software revision 12 0 Output file Simple Display Detailed Display In this example Ver 1 0 is displayed next to the unit model The following items are displayed CPU Unit CJ series Units Unit model Unit model Unit version Unit version Lot number Lot number Rack number slot number and unit number EtherCAT Slaves 1 Double click EtherCAT under Configurations and Setup in the Multiview Explorer Or right click EtherCAT under Configurations and Setup and select Edit from the menu The EtherCAT Configuration Tab Page is displayed for the Controller Configurations and Setup layer 2 Right click the master in the EtherCAT Configurations Editing Pane and select Display Produc tion Information The Production Information Dialog Box is displayed 3 Production Information E Type information Serial number Mode R88D KNO1L ECT Rev 2 1 OMRON Corporation 0x00000000 The following items are displayed Node address Type information Serial number f the model number cannot be determined such as when there is no ESI file the vendor ID product code and revision number are displayed NJ series CPU Unit Motion Control U
21. The input signal sensor wiring is incorrect or the sensor is faulty None To prevent errors at the limit inputs set the Operation Selection at Nega tive Limit Input and Operation Selec tion at Positive Limit Input parameters to Reverse turn Correct the location of the input signal sensors homing settings and homing start position so that a limit input is not reached Correct the wiring of the input signal sensor or replace the sensor NJ series CPU Unit Motion Control User s Manual W507 The axis stops with the stop method for the homing execu Name Check to see if any of the conditions that are given as causes exist in advance 11 33 I N zi Oo c za 0 gt O Oo m 5 suonduoseq 1043 Z Z 11 Troubleshooting Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks 11 34 Homing Direction Limit Input Detected 74250000 hex The limit signal in the homing direction was detected during a homing operation Motion Control Function Module Source details Axis Detection During instruc timing tion execution The axis stops with the stop method for the homing execu tion status MC AX MFaultLvl Active
22. 5 21 6 27 Axes Group Command Values 6 26 Axes Group Control Status eeeeeeeesss 6 25 Axes Group Disabled cccccseseeeccesseeeeceneeeeeeeeeees 6 25 Axes Group Error Status eeeeeeeeeeeeess 11 4 AXES GIOUD EMMONS EE 11 6 axes group errors FOSCUING eege EE 9 47 Axes Group Minor Fault cccccsecceecessseeeeeeeeeeeeeseaees 6 26 Axes Group Minor Fault Code 6 26 Axes Group Minor Fault Occurrence 6 26 Axes Group CIE ne 6 27 Axes Group Observation eeeeeeseeeeess 6 26 Axes Group Observation Code 6 26 Axes Group Observation Occurrence 6 26 Axes Group Operation Settings 5 22 axes group parameters sese 3 18 5 20 I ge EM 5 20 axes droup E E 6 6 Deceleration Stopping 6 7 Error Deceleration Stopping 6 6 6 7 Igel enee 6 7 Ville VT e 6 7 AXES Group EE EE 6 25 Axes Group Stop Method 5 23 Axes Group USE oc a 5 21 6 27 Axes Group Variables ccccccesceceeeeeeeeeeeeeees 3 17 6 25 Idee Ee de a E 3 19 AL E re 3 19 Index 2 SS OS oe C 3 17 enabling and disabling 9 47
23. Busy Pwr4 Bsy Error Pwr4 Err ErrorlD Pwr4_ErrlD Lock3 If a minor fault level error occurs for any of the composition axes in the axes group the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler MC Axis000 MFaultL vl Active MC AxisO01 MFaultL vl Active MC Axis002 MFaultL vl Active 4 MC Axis0OO3 MFaultL vl Active If the Servo is ON for axis O and home is not defined the MC Home instruction is executed HM1 Pwri Status MC Axis000 Details Homed MC Axis000 i Axis Hm1_D Done Busy Hm1 Bsy CommandAborted Hm1 Ca Error Hm Er ErrorlD Hm1 ErrlD 10 58 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o If the Servo is ON for axis 3 and home is not defined the MC Home instruction is executed m HM4 0 Oo H e Pwr4 Status MC Axis003 Details Homed MC Axis003 Axis Hm4 D ns Done 5 3 Busy Hm4 Bsy CommandAborted Hm4_Ca aS Error Hm4_Err ErrorlD Hm4_ErrlD If homing is completed for axis O velocity control is executed MC MovevVelocity Hm1 D MC Axis000 Axis Execute LREAL 100 0 Velocity LREAL 0 0 Acceleration LREAL 0 0 Deceleration eMC DIRECTION mcPositiveDirection Jerk Direction Continuous BufferMode If homing is completed for axis 0 gear operation is e
24. Error ErrorlD 16 0000 Main axis position Actual master as viewed from the SES axis position slave axis Main axis velocity as viewed from the slave axis Time Lu Slave axis Use position when phase offset is O Slave axis position an n oe I e em e ki em aan o anr Time For details on the shift master axis phase function and the synchronized control instructions for which a master axis phase shift can be applied refer to the MC_Phasing Shift Master Axis Phase instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 3 Single axis Velocity Control This section describes the operation of velocity control for single axes 9 3 1 Velocity Control Velocity control is used to constantly move an axis at the specified velocity You can also specify the acceleration rate deceleration rate and jerk To stop an axis use the MC Stop instruction or execute another motion instruction If you specify a target velocity of 0 the axis will not move but the axis status will indicate that it is moving If any other motion control instruction is executed with multi execution of instructions during velocity control the operation will switch only after reaching the target velocity Execute Busy 3 Active InVelocity E
25. I N zi Oo c 0 gt O Oo m 5 suonduoseq 1043 Z Z 11 Troubleshooting Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks 11 40 Latch Position Overflow 74340000 hex An overflow occurred for the latched position for the MC TouchProbe Enable External Latch instruction Motion Control Function Module Source details Axis Detection During instruc timing tion execution User program Continues Operation The relevant axis decelerates to a stop The Enable Exter nal Latch instruction cannot retrieve the latch position MC AX MFaultLvl Active BOOL Axis Minor Fault Occurrence An overflow occurred for the latched Correct the program so that the axis Write the program so that the axis position does not overflow position does not overflow position for the MC TouchProbe Enable External Latch instruction None None Latch Position Underflow 74350000 hex An underflow occurred for the latched position for the MC TouchProbe Enable External Latch instruction Mo
26. cam start point cam end point cam block start point cam block end point original cam data program modified cam data master axis slave axis phase displacement valid cam data invalid cam data number of valid cam data maximum number of cam data cam data index Description An operation that takes one master axis and one slave axis and follows the cam profile curve to derive the displacement of the slave axis from the phase of the master axis A curve that shows the relationship between phases and displacements in a cam operation Cam profile curves are used in the Cam Editor The cam profile curve is created on the Sysmac Studio You can use the cam profile curve with a cam data variable after the cam profile curve is downloaded to the CPU Unit Use the Synchronization menu command of the Sysmac Studio to download the project to the CPU Unit You can select a cam curve in this block It represents the area between the end point of the previous cam block and the end point of the current cam block A curve that represents the cam characteristics You can select a cam curve for each cam block The Sysmac Studio calculates the phase widths and displacement widths from the specified points and creates the actual cam profile curve You can choose from different curves such as straight line parabolic and trapecloid Data made up of phases master axis and displacements slave axis for cam opera tion A vari
27. e Blending Previous Previous Velocity Operation is performed with the target velocity of the current instruction until the target position of the current instruction is reached Operation is performed after acceleration deceleration to the tar get velocity of the buffered instruction once the target position is reached Cases Resulting in Acceleration The transit velocity is the command velocity of the current instruction Multi execution of instruction Velocity Current instruction Buffered instruction Time Cases Resulting in Deceleration Multi execution of instruction Velocity Current instruction Buffered instruction e A O E 3 3 o 5 Tl c 5 o o 5 D h o c E zt o Se D o O o Time a S D geb a O o 5 o O1JUOD pejeuipJoo sexe n n N 10 suononJisu O4JUOD UOROWN Jo OPON Jong uonnoexe ninIWw S 7 6 NJ series CPU Unit Motion Control User s Manual W507 9 59 9 Motion Control Functions 9 60 e Blending Next Next Velocity Operation is performed using the target position of the current instruction and the target velocity of the buffered instruction Cases Resulting in Acceleration The transit velocity is the command velocity of the buffered command Multi execution of instruction Velocity Current instruction Buffered instruction Time Cases Resulting in Deceleration Multi
28. 10 92 NJ series CPU Unit Motion Control User s Manual W507 Troubleshooting pO This section describes the items to check when problems occur in the MC Function Module It includes error diagnosis and countermeasures for error indications and error diagnosis and countermeasures for operating conditions 11 1 Overview of Errors 2 35 63 ketal ochre ee ee ek Ee eue x 11 2 11 1 1 e to Check for ErrorS x oe ane Wee doe had ele e eee GE euet e o 11 3 11 1 2 Errors Related to the Motion Control Function Module 11 5 11 2 OUDIESNOOUNG va xum und ere x ee cicero 6 Dn ero 11 10 T1 T5221 Emor Table o utis conca rosca ee natora uoa ti ase eat Er eee 11 10 l1e2 2 Eror DESCHDUONS 43 3 2 x cR ER ER re e edP 11 19 11 2 3 Error Causes and Remedies 11 53 NJ series CPU Unit Motion Control User s Manual W507 11 1 11 Troubleshooting 11 1 Overview of Errors You manage all of the errors that occur on the NJ series Controller as events The same methods are used for all events This allows you to see what errors have occurred and find corrections for them with the same methods for the entire range of errors that is managed ue CPU Unit EtherCAT slaves and CJ series Units The EtherCAT slaves must support NJ series error management Host computer l NS series PT EtherNet IP Troubleshooter Built in EtherNet IP NJ series part Troubleshooting functions CPU Unit CJ series Units Sysmac Stud
29. 9 50 MC ImmediateStop instruction 9 7 MC Stop instruction NEEN 9 7 Servo Drive input signals ssseessssss 9 6 SIODTHOLTOGI DEE 9 8 stopping under multi axes coordinated control 9 50 dere ENER EE 6 17 superimpose corners seeeseeeseeeeeneenenmnee 9 60 Synchronized Motion ccseccecceeeeeeeeceeeeeeeseeaeseeseees 6 19 synchronous positioning eeeeeeeeeeeereeeeee 9 19 system configuration eseseseesseeeeeeeeeeeere 1 3 system defined variables ssss 6 15 11 4 motion control eee 6 15 11 5 nidi e Vj cT E 6 17 NJ series CPU Unit Motion Control User s Manual W507 Kiel 6 18 T target position ee Le Le 9 35 excessive deceleration patterns 9 36 triangular control patterns 9 36 when a reverse turn occurs for the new command value 9 36 target velocity candi EE 9 38 TASK DOFIOQ zn inc oa ODE Ric Ri Oa Ru ce REIS Md ud 2 5 STEE 2 4 torque command e tele e 9 39 torgue d agr e 9 66 transition disabled A 9 60 Transition Modes eeeeeeeeereeennennen n 9 60 travel distance Chang een re ITI 9 38 EISE e et Re E E 4 2 Troubleshooter MEET D TT 11 4 TFOUDICSMOOUING onee S 11 4 U Unit Conversion Settings sssussss 5
30. Axis001 Cfg NodeAddress Lock The Servo for axis 0 is turned ON if process data communications for axis O are active and normal MC Power Pwr1 Status Pwr1_Bsy Pwr1 Err Pwri_ErrlD s is ch N 2 pe 2 Q 2 e 2 D pe 3 m D oO lt JU P D X D Q c o 2 o scha 0 2 3 o e x c O o 2 Pwr2 Status Pwr2 Bsy Pwra Err Pwr2_ErrlD If a minor fault level error occurs for axis O or axis 1 the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler MC Axis000 MFaultLvl Active MC Axis001 MFaultLvl Active NJ series CPU Unit Motion Control User s Manual W507 10 47 10 Sample Programming If the Servo is ON for axis 0 and home is not defined the MC Home instruction is executed HM1 Pwri Status MC Axis000 Details Homed MC Axis000 i Axis Hm1_D Done Busy Hm1_Bsy CommandAborted Hm1 Ca Error Hm1 Err ErrorlD Hm1 ErrlD If the Servo is ON for axis 1 and home is not defined the MC Home instruction is executed HM2 Pwr2_Status MC Axis001 Details Homed MC Axis001 i Axis Hm2_D Done Busy Hm2_Bsy CommandAborted Hm2_Ca Error Hm2_ Err ErrorlD Hm2 ErrlD If homing is completed for axis 0 absolute positioning is executed MV ABS MC MoveAbsolute Hm D MC Axis000 Axis Axis Mv Abs D Execute Done LREAL 10000 0 Position Busy Mv_Abs_Bsy LREAL 2
31. COM PFaultLvl Active BOOL MC Common Partial Fault Occur rence Hardware has failed Replace the CPU Unit None Attached information 1 Controller information None Motion Control Period Exceeded 74200000 hex Processing for the primary periodic task was not finished within two control periods Motion Control Function Module Source details Continuously rto Log category System User program Continues Operation Operation is not possible for all axes Axes in motion stop immediately MC COM PFaultLvl Active BOOL MC Common Partial Fault Occur rence Assumed cause Correction Prevention The processing load in the primary periodic task is too heavy None None Reduce the amount of processing in the primary periodic task or set the control period to a value that is long Write the programs for the primary periodic task so that they perform only the processes required in the speci fied period Or set the period of the primary periodic task to be long enough to complete all required pro cessing enough not to cause operation prob lems Check the task period in the Task Period Monitor of the Sysmac Studio NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Event name Cam Table Save Error 14630000 hex Meaning Saving a cam table to a file failed Source Motion Control Function Module Source details MC Common Detection During instruc timing tion execution Level Minor fault Heco
32. Camin_Incam gt Camin_Insync gt Camin_Eop gt Camin Index gt Camin Bsy Camin Act gt Camin Ca gt Camin Err gt Camin_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 71 Duuuugiboid d1Seg Z OL so duieg sch Ge NO a gt CD y 2 mE 2 D U 2 Di o D O cb Di lt Di o mE D em 2 x o 5 Di 3 lt O umm o 2 10 Sample Programming 10 2 15 Changing the Actual Position during Velocity Control This sample changes the absolute values of the command current position and the actual current posi tion for an axis in velocity control i Precautions for Correct Use e When you use the MC_SetPosition instruction for an axis in motion the travel distance between execution of the instruction and changing the actual position will remain as error e Home will become undefined when the MC Set Position instruction is executed I Axis Parameter Settings Parameter name Setting X Description Count Mode Rotary Mode Rotary Mode is set as the count mode for the position Modulo Maximum Position 360 The Modulo Maximum Position is set to 360 Setting Value Modulo Minimum Position The Modulo Minimum Position is set to O Setting Value Homing Method Zero position preset A zero position preset is performed to define home Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 _sAXIS_REF
33. D E O 10 Sample Programming 10 2 8 Stopping an Axes Group in Coordinated Motion 10 24 In this sample the MC GroupStop instruction is executed to decelerate to a stop if an external button turns ON during execution of the MC MoveLinearAbsolute Absolute Linear Interpolation instruction If there is a minor fault level error the CommandAborted output variable from the MC GroupStop instruc tion changes to TRUE In that case the MC GrouplmmediateStop instruction is executed to stop imme diately If for any reason the Error output variable from the MC GroupStop instruction changes to TRUE the MC GrouplmmediateStop instruction is executed to stop immediately If the MC GrouplmmediateStop instruction is executed the axes group status is Error Deceleration Stop ping fi Main Variables Used in the Programming Samples Variable name Data type Default Comment MC Group000 sGROUP REF This is the Axes Group Variable for axes group 0 MC_Group000 Status Disabled BOOL FALSE TRUE when axes group 0 is disabled MC_Group000 MFaultLvl Active BOOL FALSE TRUE when there is a minor fault level error for axes group 0 MC Axis000 sAXIS REF This is the Axis Variable for axis O MC Axis000 MFaultL vl Active FALSE TRUE when there is a minor fault level error for axis O MC Axis000 Details Homed FALSE TRUE when home is defined for axis 0 MC Axis001 SAXIS REF This is the Axis Variable for axis 1 MC Axis00
34. Digital Shows the status of the signal that is used for inputs external latch input 2 Set Bit 18 External Latch Input 2 of 60FD hex 00 Digital inputs for an OMRON G5 series Servo Drive T OH fe 2 D O 2 e mp gt o Qo D lt o g lt o l Precautions for Correct Use e Some functions may not be supported if you a connect unit versions of the G5 series Servo Drives with Built in EtherCAT Communications other than the recommended unit versions Refer to the manual for the connected servo drive for details e f you change the settings make sure that the desired operations are performed for the MC Function Module and process data settings sBumeg eAug oAJegS z L V Ei Object Settings The Servo Drive settings required to use the control functions of the MC Function Module are listed in the following table Consult the manual for your Servo Drive and set all related objects for the Servo Drive functions that you are going to use Recom mended Description setting Operation Switch 0002 hex Use absolute values and ignore multi rotation for Using Absolute counter overflow Encoder Speed Limit Selec 0001 hex The velocity limit method used during torque tion control is either 607F Max profile velocity or 332 1h Velocity limit value setting whichever value is smaller External Feedback 00000000 Set the encoder resolution per motor rotation Pulse Dividing hex pulses Set to
35. Function MC AX 0 63 Cmd Jerk LREAL Command Current This is the current value of the com Jerk mand jerk 9 5 5 Specifying the Operation Direction If you want to specify a rotation direction such as shortest way using an index table set the Count Mode to Rotary Mode Next set the operation direction with the Direction input variable to the motion control instruction for an absolute position You can specify any target position that is within one ring counter cycle and that is within the upper and lower limits of the ring counter The Direction input vari able will be ignored when the Count Mode is set to Linear Mode Positioning will be performed to the target position The following table lists the different directions you can specify in the MC Function Module Direction Operation Shortest way Motion starts in the direction where the command current position and the target posi tion are closer to each other Positive direction Motion starts in the positive direction Negative direction Motion starts in the negative direction Current direction Motion starts in the same direction as the previous operation No direction specified Motion starts in the direction that does not pass through the upper and lower limits of the ring counter With this direction specification you can specify a target position that exceeds the upper or lower limits of the ring counter If that occurs relative positioning is performed using the difference bet
36. Hma2 ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N AMC GroupEnable D GRP_EN o AxesGroup MC GroupO000 3 Execute Grp En Ex E D Done gt Grp En D 53 Busy gt Grp_En_Bsy 3 CommandAborted gt Grp_En_Ca Wes Error Grp En Err ErrorlD gt Grp_En_ErrlD MC MoveLinearAbsolute MV LIN ABS iS AxesGroup MC GroupO000 e Execute Mv Lin Abs Ex S Position Mv Lin Abs Pos Velocity Mv Lin Abs Vel Acceleration Mv Lin Abs Acc S Deceleration Mv Lin Abs Dec A Jerk Mv Lin Abs Jrk amp Done gt Mv Lin Abs D 9 Busy gt Mv_Lin_Abs_Bsy 5 Active gt Mv Lin Abs Act 2 CommandAborted gt Mv Lin Abs Ca 9 Error gt Mv Lin Abs Err d ErrorlD gt Mv_Lin_Abs_ErrlD m S AMC GroupStop si GRP_STP AxesGroup MC_Group0oo Execute Grp Stp Ex Deceleration Grp Stp Dec Done gt Grp Stp D Busy gt Grp Dip Bsy Active gt Grp Stp Act CommandAborted gt Grp Stp Ca Error gt Grp Stp Er ErrorlD gt Grp_Stp_ErrlD MC GrouplmmediateStop GRP_IMD_STP AxesGroup MC_Group000o Execute Grp_Imd_Stp_Ex Done gt Grp Imd Stp D Busy gt Grp Imd Stp Bsy CommandAborted gt Grp Imd Stp Ca Error gt Grp Imd Stp Em ErrorlD gt Grp Imd Stp ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 29 10 Sample Programming 10 2 9 Homing and Absolu
37. Interpolation Acceleration Decelera tion Over Interpolation Velocity Warning Value SOK fm Interpolation Acceleration Warning OK Value Interpolation Deceleration Warning OK Value Correction Allowance Ratio le 1 Indicates whether you can use the MC Write Write MC Setting instruction to temporarily change a parame ter 2 This column indicates whether you can access the parameter with a variable in the user program Hefer to 3 4 Setting Procedures for Axes Groups for details on how to set axes group parameters For details on the MC Write Write MC Setting instruction refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 Refer to 6 6 System defined Variables for Motion Control for information on system defined variables for motion control 5 20 NJ series CPU Unit Motion Control User s Manual W507 5 Motion Control Parameters 5 3 2 Axes Group Basic Settings Set whether to use the axes group If you are going to use the axes group set the axis configuration and the axes to use Axes Group Use Set whether to enable or disable the axes group An 0 to 2 0 error occurs if you execute a motion control instruction for an undefined or unused axes group 0 Undefined axes group 1 Unused axes group 2 Used axes group Composition Set the axis composition of the axes group 0 to 2 0 0 2 axes 1 3 axes 2 4 axes 0 Composition Axes Sets the axis number to assign to the axes group Set 2 to 4
38. MC AX O to MC AX 63 The numbers are assigned in the order that the axes are added You can change each of these Axis Variables as required from the Sysmac Studio You can use either the Axis Variables for the system defined variables or the Axis Variables that are added on the Sys mac Studio to specify the Axis Variables in the user program Axis Variable name in the system defined variables AT specification in global variable table MC AX O MC Axis000 Axis 0 MC AXT 1 MC Axis001 Axis 1 MC AX 63 MC Axis063 Axis 63 An error will occur if you change the names in the AT column in the global variable table on the Sysmac Studio Default Axis Variable name when Axis number example axis is added on the Sysmac Studio NJ series CPU Unit Motion Control User s Manual W507 3 5 3 Configuring Axes and Axes Groups e Examples of Axis Variable Levels and Changing Axis Variable Names MC AX 0 MC AX 0 Status MC AX 0 Status Ready MC AX 0 Status Disabled MC AX 0 Details MC AX 0 Details ldle MC AX 0 Details InPosWaiting MC AX 0 Cmd MC AX 0 Cmd Pos MC AX 0 Cmd Vel MC AX 0 Cmd AccDec _MC_AX 0 Act _MC_AX 0 Act Pos _MC_AX 0 Act Vel _MC_AX 0 Act Trq _MC_AX 0 Cfg _MC_AX 0 Cfg AxNo _MC_AX 0 Cfg AxEnable _MC_AX 0 Cfg AxType _MC_AX 0 Scale Units _MC_AX 1 Example If MC_AxisO00 is changed Axis Variable Level that indicates the axis status Variable that in
39. Minor fault stop Acceleration Warning Set the percentage of the maximum accelera O to 100 0 Value tion rate at which to output an acceleration warning for the axis No acceleration warning is output if O is set Unit 96 Deceleration Warning Set the percentage of the maximum decelera 0 to 100 0 Value tion rate at which to output a deceleration warn ing for the axis No deceleration warning is output if O is set Unit 96 NJ series CPU Unit Motion Control User s Manual W507 9 29 Wu O Oo 3 3 Oo 3 Tl c 3 O Oo 3 o Oo o gt e o 1 fo 23 o O Oo 3 mp Q uoneJoj eoe pue uoneJ9g o299V C G p 9 Motion Control Functions 9 30 Specifying Acceleration and Deceleration Rates for Axis Operation The acceleration and deceleration rates used in an actual positioning motions are specified by the Acceleration Acceleration Rate and Deceleration Deceleration Rate input variables to the motion control instruction Monitoring Acceleration and Deceleration Rates You can read Axis Variables in the user program to monitor acceleration and deceleration rates Variable name Data type Meaning Function MC AX 0 63 Cmd AccDec LREAL Command Current This is the current value of the com Accelera mand acceleration deceleration rate tion Deceleration A plus sign is added for acceleration and a minus sign is added for decel eration Example of Acceleration
40. Positive This is the torque limit value in the positive direc value torque limit value tion This object is necessary to control the output torque of the Servo Drive by the MC SetTorqueLimit and other instructions Normally set 60E0 hex Positive torque limit value Negative torque limit 60E1 hex 00 0 Negative This is the torque limit value in the negative direc value torque limit value tion This object is necessary to control the output torque of the Servo Drive by the MC SetTorqueLimit and other instructions Normally set 60E1 hex Negative torque limit value Touch probe function 60B8 hex 00 0 Touch probe This data is used to control the touch probe func function tion It is required for the touch probe function for the MC Home MC MoveFeed Interrupt Feeding MC TouchProbe Enable External Latch MC MoveLink Synchronous Positioning and other instructions Normally set 60B8 hex Touch probe function la Precautions for Correct Use e Some functions may not be supported if you a connect unit versions of the OMRON G5 series Servo Drives with Built in EtherCAT Communications other than the recommended unit ver sions Refer to the manual for the connected servo drive for details e f you change the settings make sure that the desired operations are performed for the MC Function Module and process data settings A 6 NJ series CPU Unit Motion Control User s Manual W507 e Input Settings Servo Dri
41. Pwr_Status MC_Axis000 Details Homed MC_Axis000 i Axis Hm D j Done amp Busy Hm_Bsy CommandAborted Hm Ca Error Hm Err ErrorlD Hm_ErrlD After home is defined for axis 0 absolute positioning is executed if it is not already in progress MC Axis000 Details Homed Mv Abs Act 4 When ReExeSw changes to TRUE the absolute positioning instruction is re executed to change the target position to 2000 ReExeSw 1 Mv_Abs_Pos LREAL 2000 0 Absolute positioning is executed according to the status of Mv_Abs_Ex MV_ABS MC_MoveAbsolute Mv_Abs_Ex MC Axis000 4 Axis Axis Mv Abs D Execute Done Mv Abs Pos Position Busy Mv Abs Bsy LREAL 500 0 Velocity Active Mv_Abs_ Act LREAL 500 0 Acceleration CommandAborted Mv Abs Ca LREAL 500 0 Deceleration Error Mv_Abs_Err Jerk ErrorlD Mv_Abs_ErrlD eMC_DIRECTION _mcPositiveDirection Direction BufferMode 10 38 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming N D H ST Programming B Oo f the input parameters for absolute positioning are not set the target values and other parameters are set 3 IF InitFlag FALSE THEN ns Parameters for MC_MoveAbsolute S 3 Mv Abs Pos LREAL 1000 0 sz Mv Abs Vel LREAL 500 0 oS Mv_Abs_Acc LREAL 500 0 Mv_Abs_Dec LREAL 500 0 Mv Abs Dir eMC DIRECTIONZ mcPositiveDirection The Input Parameter Initialization Completed Flag is changed to TRUE InitFl
42. R88D KNO1H ECT Product name R88D KNO1H EC Vendor Corporation 1 Comment 200V 100W ServoDri URL Device name Set a name for the master 192 168 250 1 PROGRAM mode When obtaining the information is completed the physical slave configuration of the EtherCAT slaves is displayed Right click the displayed physical configuration and select Apply actual network configuration NJ series CPU Unit Motion Control User s Manual W507 3 9 3 10 Configuring Axes and Axes Groups e Offline Method 1 Double click EtherCAT in the Multiview Explorer The EtherCAT Edit Tab Page is displayed Sysmac Stu All vendors A Configurations and Setup 1 Q Groups Servo Drives Frequency Inverter te ELT CPU Expansion Racks Model cL UO HU Product name PI Vision Sensor D gt EX Controller Setup Number of Slaves gt 4 Motion Control Setup PDO Communications Cycle Time amp Cam Data Settings Total Cable Length gt Event Settings Fail soft Operation Setting P Task Settings Wait Time for Slave Startup F Data Trace Settings PDO communications timeout detection c E eege Programmin Revision Check Method g g Serial Number Check Method 1 RB8D KNO1H ECT G5 Series ServoDri R88D KNO1L ECT Rev 2 1 RB8D KNO1L ECT G5 Series ServoDri R88D KNO2H ECT Rev 2 1 RB8D KN Series ServoDri R88D KNO2L ECT Rev 2 1 R88D KNO2L ECT G5 Series ServoDrih R88D KNO4H ECT Rev 2 1 RB88D KNO4H ECT G5 Series ServoDri R88D
43. Relative positioning will start Check to see if the travel distance agrees with the settings NJ series CPU Unit Motion Control User s Manual W507 Enter the target travel distance target velocity acceleration rate deceleration rate and jerk and then click the Apply Button 4 11 gt do O S D O L3 3 e Oo Oo oO o D D et Oo 5 Duiuonisog eAnejleH S e v 4 Checking Wiring from the Sysmac Studio 4 12 NJ series CPU Unit Motion Control User s Manual W507 Motion Control Parameters This section explains about axis parameters and axes group parameters used for motion control 5 1 INUOGQUCHON CPP 5 2 5 2 AXIS Parameters 5 fc akc teeta dada i bee Ed eee cee Se UE eee 5 4 5 2 1 PRIS Para EE EE dub OM pter s 5 4 5 22 AXS Basie Seulhgs cc226e55e8 Clee cto Peet Me e 5 5 5 2 3 Unit Conversion Settings EE Ee E dried 5 8 5 2 4 Operation Settings i 5 3 ot ea ah te ei Ee E be hase aad AE e 5 11 5 2 5 Other Operation Settings 5 12 532 5 LIMIPGCUINGS eer A wre be oe eee e eee Sete eS Bee 5 13 5 2 7 Position Count Settings 5 13 5 2 8 Servo Drive Settings 5 15 5 2 9 HOMING Settings aide v EXGG ERGO Ra S sods Kui LES ere toes 5 16 5 2 10 Axis Parameter Setting Example 0 0000 c eee eee 5 17 5 3 Axes Group Parameters 000 c eee es 5 20 5 3 1 Axes Group Parameters EE 5 20 5 3 2 Axes Group Basic Settings 0 0 eee ees 5 21 5 3 3 Axes Group Op
44. System defined variables Cause and correction Attached information Precautions Remarks 11 Troubleshooting Following Error Warning 644C0000 hex The following error exceeded the Following Error Warning Value timing tion execution Performance of positioning operation Remove the cause of poor following Remove the cause of poor following is poor and the actual motion is performance in the positioning opera performance in the positioning opera slower than the command tion Or increase the Following Error tion much as possible Warning Value within the range that will not create problems None None Velocity Warning 644D0000 hex The command velocity exceeded the velocity warning value timing tion execution Axes Group Observation Occurrence The command velocity exceeded the Find the reason the velocity warning The goal is to enable detecting when suonduoseq 1043 Z Z velocity warning value value was exceeded and make suit the velocity warning value is able corrections Or increase the exceeded Preventative measures are Velocity Warning Value within the not required range that will not create problems None None NJ series CPU Unit Motion Control User s Manual W507 11 45 I N zi Oo c za 0 gt O Oo m 5 11 Troubleshooting Event name Acceleration Warning 644E0000 hex Meaning The command acceleration exceeded the acceleration warning value So
45. The home input sensor or limit sensor is installed in the wrong location The contact logic of the home input signal or limit signal is not correct The home input signal output device or limit sensor failed The wiring of the home input signal or limit signal is incorrect The home input sensor or limit sensor is installed in the wrong location The contact logic of the home input signal or limit signal is not correct The home input signal output device or limit sensor failed The set value of the home input mask distance when the oper ating mode of the MC Home instruction is set to Proximity Reverse Turn Home Input Mask Distance is insufficient to decel erate from the homing velocity to the homing approach veloc ity There was no home signal input during the homing operation A limit signal was detected before there was a home input There was no home proximity signal input during the homing operation when a home proxim ity input signal was specified NJ series CPU Unit Motion Control User s Manual W507 p Level O tee aes T ll page 11 36 page 11 36 page 11 37 page 11 37 page 11 38 page 11 38 Slave Error Detected 742F0000 hex 74300000 hex 74330000 hex 74340000 hex 74350000 hex 74360000 hex 74370000 hex 74380000 hex Axes Group Composition Axis Error MC Com mon Error Occurrence Latch Posi tion Overflow Latch Posi tion Under flow
46. You can check the sources and causes of the errors in the system defined variables or from the Sys mac Studio or an NS series PT I Classifications There are the following three sources of errors in the Motion Control Function Module Classification Description MC Common Errors If an error is detected in the common portion of the Motion Control Function Mod ule the corresponding bit in the MC Common Error Status variable shows the error Axis Error If an error is detected for an axis the corresponding bit in the Axis Error Status variable shows the error Axes Group Errors If an error is detected for an axes group the corresponding bit in the Axes Group Error Status variable shows the error If an axis error with a minor fault level or higher level occurs operation is also not possible for an axes group that contains the axis as a composition axis I Event Levels This section describes the operation of the Motion Control Function Module for each event level Event level of the error Operation Major fault All NJ series Controller control operations stop for errors in this event level Partial fault All control operations for one of the function modules in the NJ series Controller stop for errors in this event level If a partial fault level error occurs in the Motion Control Function Module all function of the Motion Control Function Module such as axis operation stop Minor fault Some of the control operations for one
47. _MC_GRP 0 Cmd AccDec _MC_GRP 0 Cfg _MC_GRP 0 Cfg GrNo _MC_GRP 0 Cfg GrEnable _MC_GRP 0 Kinematics _MC_GRP 0 Kinematics GrType _MC_GRP 0 Kinematics Axis 0 _MC_GRP 0 Kinematics Axis 3 MC GRHRPT1 e Examples of Axes Group Variable Levels and Changing Axes Group Variable Axes Group Variables Level that indicates the axes group status Level that indicates the axes group command values Variable that indicates the command interpolation velocity Variable that indicates the command interpolation accelera tion deceleration rate Level that indicates the axes group basic settings Variable that indicates the axes group number Variable that indicates when the axes group is enabled Level that indicates the kinematics transformation settings Variable that indicates the axis composition Variable that indicates the axis AO composition axis Variable that indicates the axis A3 composition axis Axes Group Variable Example If MC GroupOO0 is changed to MyGroup then either MyGroup1 Cmd Vel or MC GHP 0 Cmd Vel can be used as the variable that indicates the command inter polation velocity Hefer to Axes Group Variables on page 6 25 for details on Axes Group Variables NJ series CPU Unit Motion Control User s Manual W507 3 Configuring Axes and Axes Groups 3 3 4 Specifying an Axes Group in the User Program In the user program an axes group variable name is specified for the in out variable AxesGroup in motion
48. c fo X o o O Oo Oo 2 gt fo mp o O Oo 3 mp 9 041002 PS JEUIPJOON sexe n n N Jour A0 3A L 2 6 9 Motion Control Functions 9 7 2 Acceleration and Deceleration Under Multi axes Coordinated Control Multi axes coordinated control performs control on the path for the interpolation acceleration and inter polation deceleration rates The unit is the same as for single axes command units s2 Axis Parameters That Are Related to Interpolation Acceleration and Interpolation Deceleration Maximum Interpolation Set the maximum interpolation acceleration Non negative long 0 Acceleration for the path Set O for no interpolation accel eration limit Unit command units s2 Maximum Interpolation Set the maximum interpolation deceleration Non negative long 0 Deceleration for the path Set 0 for no interpolation decel eration limit Unit command units s Interpolation Accelera Set the operation for when the maximum 0 to 2 0 tion Deceleration Over interpolation acceleration deceleration rate would be exceeded after excessive acceler ation deceleration during accelera tion deceleration control of the axes group because stopping at the target position is given priority 0 Use rapid acceleration deceleration Blending is changed to Buffered 1 Use rapid acceleration deceleration 2 Minor fault error Interpolation Accelera Set the percentage of the maximum inter O to 100 0
49. ence Position for csp when required 1 If required map the selected process data to a PDO before setting it The standard setting is 606Ch 00 0 Velocity actual value 2 This data is accessed by the MC SyncMoveVelocity Cyclic Synchronous Velocity Control instruction If it is required set 4020 hex 00 0 Reference position for csp However an error occurs in the Servo Drive if it is mapped to a PDO when the process data communications cycle for EtherCAT communications is 250 us or 500 us or when the electronic gear ratio at the Servo Drive 6091 hex is not 1 1 For details refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 8 Refer to the G5 series AC Servomotors Servo Drives with Built in EtherCAT Communications User s Manual Cat No 1576 if you use 4020 hex Reference position for csp and check the process data communications cycles that can be set for EtherCAT communications la Precautions for Correct Use e Some functions may not be supported if you a connect unit versions of the OMRON G5 series Servo Drives with Built in EtherCAT Communications other than the recommended unit ver sions Refer to the manual for the connected servo drive for details e f you change the settings make sure that the desired operations are performed for the MC Function Module and process data settings e Digital Input Settings The MC Function Module uses the following input signals of the Servo Dri
50. error sources causes and corrections Checking with instructions that read function You can check the highest level status and highest level event module error status code in the current Controller errors Checking with System defined Variables You can check the current Controller error status for each function module This section describes the above checking methods i Checking the Indicators You can use the PWR indicator on the Power Supply Unit and the RUN and ERROR indicators on the CPU Unit to determine the event level for an error The following table shows the relationship between the Controllers indicators and the event level ch I ch I ch SR o z m O 2 D CH escht O m lt O x o Indicator Error confirmation with the Sysmac aS RUN EHHDE CPU Unit operating status Studo or an Ne seres PT Not lit Not lit Not lit Power Supply Error Not possible Lit Not lit CPU Unit Reset Es 2 EE ar Lit Flashing Incorrect Power Supply Unit Con nected Lit Not lit CPU Unit Watchdog Timer Error 2 Lit wo ems Fees eed ab recien Qu series PT and check the cause of and Lit Lit Flashing Flashing Minor Mimrfautlevel level Minor fault level correction for the error in the trouble shooting functions of the Sysmac Stu dio or the Troubleshooter of the NS series PT Lit Not lit Observation Lit Lit Moin lit Normal operation in RUN mode Normal operation in RU
51. instruction This also occurs during deceleration Buffered The buffered instruction remains in the buffer until the operation of the current instruction is finished The buffered instruction is executed after the operation for the current instruction is normally ended The target position is reached and the next command is executed after the current Velocity operation is normally finished i Multi execution timing ee Current instruction Buffered instruction Time 9 42 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions I Blending The buffered instruction remains in the buffer until the target position of the current instruction is reached The buffered instruction is executed after the current instruction s target position is reached However motion does not stop at this time Operation transitions to the next instruction at the velocity specified with the BufferMode Buffer Mode Selection input variable For relative travel the final posi tion will be the total of the values for both instructions For absolute travel the final position will be the target position of the second multi execution instruction The Acceleration Deceleration Over axis parameter is used to select one of the following operations for when the target position would be exceeded with the values that are set in the Maximum Acceleration and Maximum Deceleration axis parameters e Use rapid acceleration decel
52. is executed in the periodic task 8 The values are written during this motion control processing MC Lal Precautions for Correct Use nd e no ITI x lt Di 3 D o cb e o A O CH D em D SH o 2 o h O lt o y O 2 O O 2 mE bes o e When motion control instructions are placed in a periodic task the response time of the Servo Drive will increase if the task period of the periodic task is lengthened e Make sure that all axes can be stopped safely for emergency stops including emergency stops commanded from external devices e The execution timing of motion control instructions in a priority 16 periodic task is not the same as the execution timing for UO control Design the user program to allow for this ES Additional Information For information on Axis Variables refer to 3 1 3 Introduction to Axis Variables NJ series CPU Unit Motion Control User s Manual W507 2 9 2 Motion Control Configuration and Principles I Using Motion Control Instructions in Two Different Types of Tasks If you have processes that require high speed motion control and processes that do not require high speed motion control for the same axis you can place the motion control instructions FB both in the primary periodic task and in a priority 16 periodic task If motion control instructions FB are executed in both tasks within the period of the priority 16 periodic task the MC Function Module will perf
53. lt it o z Oo m oO o0 e Error Code Notification When the Servo Drive reports the error code the Motion Control Function Module generates a Slave Error Code Report information event 94220000 hex The error code from the Servo Drive is included in the attached information of the Slave Error Code Report event You must change the settings to receive notification of the Slave Error Code Report event Map object 603F hex Error Code in the PDO Edit Pane e npo N uonounJ OJ1UO2 UOI o N eui 0 pay SJo4uJ3 c L LL NJ series CPU Unit Motion Control User s Manual W507 11 9 11 Troubleshooting 11 2 Troubleshooting This section describes the errors that can occur and the corrections for them 11 2 1 Error Table The errors i e events that can occur in the Motion Control Function Module are given on the following pages Event levels are given in the table as follows Maj Major fault level Par Partial fault level Min Minor fault level Obs Observation Info Information The upper four digits of the event codes that are given in the following table are output as the error codes to the system defined variable for motion control Refer to the NJ series Troubleshooting Manual Cat No W503 for all of the event codes that may occur for an NJ series Controller tee 10200000 hex User Pro gram Con troller Configura tions and Setup Trans fer Error 14600000 hex Abso
54. o x D O m 2 D LD lt 2 O CD m 0 Se U O o O 2 10 Sample Programming If both gear and cam operation are in progress the Combine Axes instruction is executed COMBINE MC CombineAxes MC AxisO01 Master Master MC Axis002 Auxiliary Auxiliary l Gearin Act Camin_Act MC Axis003 Slave Slave combine InComb c Execute InCombination eMC_COMBINE_MODE _mcAddAxes CombineMode Busy Combine_Bsy RatioNumeratorMaster Active F Combine Act RatioDenominatorMaster CommandAborted Combine Ca RatioNumeratorAuxiliary Error Combine_Err RatioDenominatorAuxiliary ErrorlD Combine_ErrlD eMC_REFERENCE_TYPE _mcLatestCommand ReferenceTypeMaster eMC_REFERENCE_TYPE _mcLatestCommand ReferenceTypeAuxiliary BufferMode I ST Programming If the input parameters for the motion instructions are not set the target values and other parameters are set IF InitFlag FALSE THEN END JE The input parameters for the MC MoveVelocity Velocity Control instruction are set Vel Vel LREAL 100 0 Vel Acc LREAL O 0 Vel Dec LREAL 0 0 Vel_ Dir eMC_DIRECTION _mcPositiveDirection The input parameters for the MC_Camln Start Cam Operation instruction are set Camin_Em TRUE Camin_Sm eMC_START_MODE _mcRelativePosition Camin_Sp gt LREAL 20 0 Camin_Msd LREAL 40 0 Camin_Ms LREAL 1 0 Camin_Ss LREAL 1 0 Camin_Mo LREAL 0 0 Camin_So
55. primary periodic task Primary periodic EtherCAT data communi period in slave task period cations cycle Primary depends on periodic task period the slave poueg IOIUOCH uorno N pue ajOAD suoreoiunuluo BIC sseooJg ueewjeq diusuone eH e p z NJ series CPU Unit Motion Control User s Manual W507 2 13 2 Motion Control Configuration and Principles NJ series CPU Unit Motion Control User s Manual W507 Configuring Axes and Axes Groups EEE This section describes the concept of axes and axes groups the settings for axes that are required for the MC test run function to operate on the Sysmac Studio and the instructions for creating and configuring axes and axes groups using the Sysmac Stu dio CONES EE 3 2 3 1 1 Introducllol Io AXES ve aeu RP Gat eee ad a ey acme Gate eet 3 2 3 1 2 Introduction to Axis Parameters llli 3 3 3 1 3 Introduction to Axis Variables 3 5 3 1 4 Specifying an Axis inthe User Program 3 7 3 2 Axis Setting Procedure elec eee 3 8 3 2 1 Axis OCoonfig rationi Procedure 2 etus toc So RR pto ac egg er ccu eo 3 8 3 2 2 Setting Procedure act ER OMA EE Maa ake he eke dans dem 3 8 JJ Axes GIOUDS x2 iE EO Ea ROLE Eu IRq ETE iua e ES 3 17 3 3 1 Introduction to Axes Groups 3 17 3 3 2 Introduction to Axes Group Parameters 0 0000 cece eee eee 3 18 3 3 3 Introduction to Axes Group Variables 3 19 3 3 4 Specifying an Axes Group in the User Program
56. program user program Inline ST system defined variables global variable local variable download upload major fault level Control error partial fault level Controller error minor fault level Controller error observation NJ series Controller Description The memory inside the CPU Unit that is used by the CPU Unit to execute the OS and user program Tasks for which user program execution and I O refreshing are performed each period The task with the highest priority The interval at which the primary periodic task or a periodic task is executed Cyclic data exchange with external devices that is performed with predetermined memory addresses One of three POUs The others are functions and function blocks Programs are assigned to tasks to execute them All of the programs in one project ST programming that is included within a ladder diagram program A variable for which all attributes are defined by the system and cannot be changed by the user Reading and writing global variables are possible from all POUs programs functions and function blocks A variable that can be accessed only from the POU in which it is defined Local variables include internal variables input variables output variables in out vari ables and external variables To transfer data from the Sysmac Studio to the Controller e g with the synchro nization operation of the Sysmac Studio To transfer data from the Controller to the Sysmac Studi
57. tion Warning Value polation acceleration at which to output an interpolation acceleration warning No inter polation acceleration warning is output if O is set Unit 26 Interpolation Decelera Set the percentage of the maximum inter O to 100 0 tion Warning Value polation deceleration rate at which to output an interpolation deceleration warning No interpolation deceleration warning is output if O is set Unit 96 Specifying an Interpolation Acceleration and Interpolation Deceleration for an Axes Group The interpolation acceleration and interpolation deceleration rates used in an actual positioning motion are specified by the Acceleration Acceleration Rate and Deceleration Deceleration Rate input vari ables to the motion control instruction 9 54 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions Monitoring Interpolation Acceleration and Interpolation Deceleration Rates You can read Axes Group Variables in the user program to monitor interpolation acceleration and inter polation deceleration rates Variable name Data type Meaning Function MC GHP 0 31 Cmd AccDec LREAL Command Interpo This is the current value of the com lation Accelera mand interpolation accelera tion Deceleration tion deceleration rate A plus sign is added for acceleration and a minus sign is added for deceleration 9 7 3 Jerk for Multi axes Coordinated Control Jerk for mul
58. 0 Phasing_Dec LREAL 0 0 D The input parameters for the MC Camln Start Cam Operation instruction are set Camin Em TRUE S Camin_Sm eMC_START_MODE _mcRelativePosition D Camin_Sp LREAL 20 0 Camin Msd LREAL 40 0 o Camin Ms LREAL 1 0 RV Camin Ss LREAL 1 0 Camin_Mo LREAL 0 0 T Camin_So LREAL 0 0 gt Camin_Rt _eMC_REFERENCE_TYPE _mcCommand o Q 3 a S When StartPg is TRUE the Servo is turned ON for axis O if process data communications are active and normal IF StartPg TRUE AND EC PDSIlavTbI MC Axis000 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwri_En TRUE ELSE Pwr1_En FALSE END_IF When StartPg is TRUE the Servo is turned ON for axis 1 if process data communications are active and normal IF StartPg TRUE AND EC PDSIavTbI MC Axis001 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis001 Cfg NodeAddress FALSE THEN Pwr2_En TRUE ELSE Pwr2_En FALSE END_IF f a minor fault level error occurs for axis O or axis 1 the error handler for the device FaultHandler is executed Program the FaultHandler according to the device IF MC Axis000 MFaultLvl Activez TRUE OR MC Axis001 MFaultLvl Activez TRUE THEN FaultHandler END IF f the Servo is ON for axis O and home is not defined the MC Home instruction is executed for axis O IF Pwr1 Status TRUE AND MC Axis000 Details Homed FALSE THEN
59. 0 the error handler for the device FaultHandler is executed Program the FaultHandler according to the device IF MC Axis000 MFaultLvl Activez TRUE THEN FaultHandler END IF If ResetON is TRUE i e when the external button is ON and the command current velocity is zero the error is reset IF ResetOnz TRUE AND MC AxisOOO0 Status ErrorStop T RUE AND MC Axis000 Details Idle TRUE THEN e d GA IT x x O I o m O 2 e pe 2 ok m x O JU D o D a 2 e escht O H 2 a P 0 x o O O D 0 O 2 pe 2 oz LD lt 2 Q 2 x O N D oO O O D 0 ze O 2 Reset_Ex TRUE Minor fault is reset END_IF MC_Power PWR Axis MC Axis000 Enable Pwr En Status gt Pwr Status Busy gt Pwr Bsy Error gt Pwr Err ErrorlD gt Pwr_ErrlD MC_Reset RESET Axis MC_Axis000 Execute Reset_Ex Done gt Reset D Busy gt Reset_Bsy Failure gt Reset Fai Error gt Reset_Err ErrorlD gt Reset_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 9 10 Sample Programming 10 2 4 Error Monitoring and Error Resetting for Multi axes Coordinated Operation You can monitor error status by monitoring the status of Axis Minor Fault Occurrence in the Axis Vari ables and Axes Group Minor Fault Occurrence in the Axes Group Variable If a minor fault level error occurs in this s
60. 1 of the Servo Drive is used in this sample Hm Ex BOOL FALSE This variable is used to execute the MC Home instruction It is used in ST pro gramming NJ series CPU Unit Motion Control User s Manual W507 10 41 Duuuugiboid 2Iseg Z 0L so duiegs sch eo fa sch 3 mE D c Oo mE TI D D 2 2 10 Sample Programming Variable name Data type Default Comment Mv Feed Ex BOOL FALSE This variable is used to execute the MC MoveFeed Interrupt Feeding instruc tion It is used in ST programming InitFlag BOOL FALSE TRUE if the input parameters are set for the MC MoveFeed instruction Ladder Diagram When StartPg is TRUE the status of process data communications of axis O is checked to see if communications are active and normal StartPg EC PDSlavTbI MC Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress Lock H The Servo for axis O is turned ON if process data communications for axis O are active and normal PWR MC Power Lock MC Axis000 Axis Axis Pwr Status Enable Status Busy Pwr Bsy Error Pwr Er ErrorlD Pwr_ErrlD If a minor fault level error occurs for axis O the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler If the Servo is ON for axis O and home is not defined the MC Home instruction is executed MC Axis000 MFaultLvl
61. 2 Basic Programming Sampl Ssss ee 10 4 10 2 1 Monitoring EtherCAT Communications and Turning ON Servos ssssssssssssssnsrnrsssrrnrrrrnsserrrnnee 10 4 10 2 2 Interlocking Axis Operation with Master Control Instructions eseeeeesseeeeeeeeee 10 6 10 2 3 Error Monitoring and Error Resetting for Single axis Operation and Synchronized Operation 10 8 10 2 4 Error Monitoring and Error Resetting for Multi axes Coordinated Operation 10 10 10 2 5 Monitoring for Instruction Errors AAA 10 16 10 2 6 Checking to See If Errors Are Heset RRE EEN 10 18 10 2 7 Stopping Axes during Single axis Operation 10 20 10 2 8 Stopping an Axes Group in Coordinated Motion ccccccccsseceecceseeeeeeseeeeessaeeeeseaeeeeseanees 10 24 10 2 9 Homing and Absolute Positioning ccc ee eee ee eee ee eee ee eed eee ee sane eeeeeaaeeee saan 10 30 10 2 10 Changing the Target Position by Re execution of an Instruction sseeeeessssssss 10 35 Jer mies Tert O en 10 41 10 2 12 Changing the Cam Table by Re execution of an Instruction ssssssssssnnrrrreersrrrrrreesrrrnrenee 10 45 10 2 13 Using a Cam Profile Curve to Correct the Sync Start Position ccccceeeeeeeceseeeeeeeeeeeeeeeees 10 54 10 2 14 Shifting the Phase of a Master Axis in Cam Motion 10 64 10 2 15 Changing the Actual Position during Velocity Control 10 72 10 2 16 Cha
62. 7 2 7 3 Section 8 8 1 8 2 8 3 8 4 8 5 CONTENTS Motion Control Programming Idee Ze UE Ve P 6 2 Motion Control Instruclions oiii eO ope Pee EE 6 3 6 2 1 Function Blocks for PLCopen Motion Control 6 3 6 2 2 Motion Control Instructions of the MC Function Module 6 3 State Trape eee En 6 4 6 3 1 Status of the Motion Control Function Module 6 4 6 3 2 Eeer 6 4 6 3 3 Axes Ee 6 6 Execution and Status of Motion Control Instructions sees 6 8 6 4 1 Basic Rules for Execution of Instructions ccccccsseeececeeeeeeeeceueeeeceseueeeecsaseeeessaceeeeseneneeessaaess 6 8 6 4 2 Execution Dim CF EE 6 10 6 4 3 Timing Chart for Re execution of Motion Control Instructions es 6 12 6 4 4 Timing Chart for Multi execution of Motion Control Instructions ss 6 13 wel iie tme M 6 14 6 5 1 ere Ee en E 6 14 6 5 2 Valid Positions for Each Axis BVDQ uia caet Pract eat actio tee ira e 6 14 System defined Variables for Motion Control eeeeeeeee e eeeeee eene 6 15 6 6 1 Overview of System defined Variables for Motion Control 6 15 6 6 2 System for System defined Variables for Motion Control 6 17 6 6 3 Tables of System defined Variables for Motion Control 6 18 Cam Tables and Cam Data Variables 111 lesse eeeeee ee eeee nenne enne n
63. Active 41 MC Home Pwr Status MC Axis000 Details Homed MC Axis000 i Axis Hm_D RENE Done E Busy Hm Bsy CommandAborted Hm Ca Error Hm Err ErrorlID Hm ErrlD The input parameters for interrupt feeding are set InitFlag Parameters for MC MoveFeed Mv Feed TrigRef Mode eMC TRIGGER MODE amp mcbDrive Mv Feed TrigRef LatchlD eMC TRIGGER LATCH ID mcLatch1 Mv Feed TrigRef InputDrive eMC TRIGGER INPUT DRIVE mcEncoderMark Mv Feed TrigVar FALSE Mv Feed Pos LREAL 2000 0 Mv_Feed_Vel LREAL 1000 0 Mv_Feed_Acc LREAL 10000 0 OO Jo Om PS WN Mv Feed Dec LREAL4 0000 0 Mv Feed Dir eMC_DIRECTION _mcCurrentDirection Mv_Feed_Mm _eMC_MOVE_MODE _mcVelocity Mv_Feed_FeedDis LREAL 500 0 Mv_Feed_FeedVel LREAL 500 0 The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag TRUE 10 42 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming e If homing is completed interrupt feeding is executed m o MV FEED E MC MoveFeed S MC Axis000 Axis Axis WE MvFeed_TrigRef Triggerlnput Triggerlnput 3 3 Hm_D Mv_Feed_TrigVar TriggerVariable fTriggerVariable Mv_Feed_D od Execute Done WindowOnly InFeed Mv Feed InFeed FirstPosition Busy Mv Feed Bsy LastPosition Active Mv Feed Act HeferenceType CommandAborted Mv Feed Ca Mv Feed Pos Position Error Mv Feed Er Mv Feed Vel
64. Axis Detection At or during instruction execu tion timing Level Error attributes Minor fault Recovery Effects User program Continues Operation Operation is not possible for relevant slave axis Relevant slave axis decelerates to a stop if it is in motion EISES MC AX MFaultL vl Active BOOL Axis Minor Fault Occurrence Seinen EtherCAT process data communica If the EC PDSlavTbl Process Data If you execute synchronized instruc tions are not established for the auxil Communicating Slave Table system tions after you turn ON the power iary axis of the synchronized defined variable for the EtherCAT supply download data or reset slave instruction master of the auxiliary axis is FALSE communications error make sure that investigate the error in the auxiliary the EC PDSlavTbl Process Data axis and remove the cause Communicating Slave Table system defined variable for the EtherCAT master is TRUE for the node of the auxiliary axis before you execute the synchronized instruction The slave of the auxiliary axis for the Check the slave of the auxiliary axis Make sure that the slave of the auxil synchronized instruction was discon and reconnect it if it was discon iary axis is not disconnected during nected nected execution of a synchronized instruc tion An Absolute Encoder Current Position See if an Absolute Encoder Current Do not use an axis with a Absolute Calculation Failed error 6458000 Position
65. BOOL Axis Minor Fault Occurrence The Operation Selection at Negative Limit Input or Operation Selection at Positive Limit Input parameter is set to No reverse turn The location of the homing input sig nal sensors homing settings and homing start position cause a limit input to be reached The input signal sensor wiring is incorrect or the sensor is faulty None None To prevent errors at the limit inputs Name Check to see if any of the conditions set the Operation Selection at Nega that are given as causes exist in tive Limit Input and Operation Selec advance tion at Positive Limit Input parameters to Reverse turn Correct the location of the input signal sensors homing settings and homing start position so that a limit input is not reached Correct the wiring of the input signal sensor or replace the sensor Homing Limit Inputs Detected in Both Directions 74260000 hex The limit signals in both directions were detected during a homing operation The limit sensor is installed in the wrong location The contact logic of the limit signal is not correct The limit sensor failed Replace the limit sensor None None Motion Control Function Module Source details Axis Detection During instruc timing tion execution MC AX MFaultLvl Active BOOL Axis Minor Fault Occurrence The wiring of the limit signal is incor Correct the wiring of the limit signal Check to see if any of
66. Built in EtherCAT Port User s Manual Cat No W505 Section Description Section 1 This section provides an overview of EtherCAT communications describes the sys Introduction tem configuration and specifications and provides operating procedures Section 2 This section provides the part names and describes the slave settings and Sysmac Part Names and Slave Settings device functions Section 3 This section describes the different types of EtherCAT communications EtherCAT EtherCAT Communications settings and state transitions Section 4 This section describes how to connect and wire an EtherCAT network EtherCAT Network Wiring Section 5 This section describes how to set the network configuration information and how to Setting Up EtherCAT Communica check EtherCAT communications from the Sysmac Studio tions with the Sysmac Studio Section 6 This section describes the timing of communications response times and special Process Data Communications and instructions for process data communications and SDO communications It also pro SDO Communications vides sample programming Section 7 This section describes the system defined variables that are related to the built in System defined Variables That Are EtherCAT port Related to the Built in EtherCAT Port Section 8 This section provides a series of example operations for when an NJ series CPU Unit Example of Operations for EtherCAT is connected to slaves Communications This sectio
67. CPU Unit Motion Control User s Manual W507 10 39 10 Sample Programming 10 40 ErrorlD gt Pwr ErrlD AMC Home HM Axis Execute Done Busy CommandAborted Error ErrorlD MC_MoveAbsolute MV_ABS Axis Execute Position Velocity Acceleration Deceleration Direction Done Busy Active CommandAborted Error ErrorlD MC_Axis000 Hm Ex gt Hm D gt Hm Bsy gt Hm Ca gt Hm Er gt Hm Ermi MC Axis000 Mv Abs Ex Mv Abs Pos Mv Abs Vel Mv Abs Acc Mv Abs Dec Mv Abs Dir gt Mv Abs D gt Mv Abs Bsy gt Mv Abs Act gt Mv Abs Ca gt Mv Abs Err gt Mv Abs Ermi NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming 10 2 11 Interrupt Feeding This sample performs interrupt feeding when an interrupt occurs during velocity control One of the fol lowing is specified for the Direction variable when velocity control is performed in Rotary Mode e mcPositiveDirection e _mcNegativeDirection e mcCurrentDirection This sample uses _mcCurrentDirection A positive value is specified for the FeedDistance input variable to perform feeding in the same direction as the motion before the interrupt input A negative value is specified for the FeedDistance input variable to perform feeding in the opposite direction as the motion before the interrupt input For example if a positive value is specified f
68. CPU Unit Software User s Manual Cat No W501 Describes the operating procedures of the Sys mac Studio Describes operating procedures for the CX Inte grator Describes operating procedures for the CX Designer Describes operating procedures for the CX Pro tocol NJ series CPU Unit Motion Control User s Manual W507 Revision History Revision History A manual revision code appears as a suffix to the catalog number on the front and back covers of the Cat No W507 E1 01 f Revision code Revision code Dae Revised content 01 July 201 1 Original production NJ series CPU Unit Motion Control User s Manual W507 31 Revision History 32 NJ series CPU Unit Motion Control User s Manual W507 Introduction to the Motion Control Function Module n This section describes the features system configuration and application flow for the Motion Control Function Module INS 2 e c PD 1 2 1 2 System Configuration vx br RI eee orwell e Ta Wk ui Rm 1 3 1 3 Application Procedure sese I I IR IRIRII amp AHH 1 4 jb DT e e rn EE EE 1 6 1 4 1 General Specifications llle 1 6 1 4 2 Performance Specifications 1 6 1 4 3 FUNCION SDECIICALIONS acera itk aiti eati ed bai et peo ap di e E 1 7 NJ series CPU Unit Motion Control User s Manual W507 1 1 1 Introduction to the Motion Control Function Module 1 1 Features The Motion Control Function Module sometime
69. CommandAborted Error d ErrorlD 16 0000 Decelerates to a stop Velocity i when another instruction i causes an error Target velocity Time The MC Function Module uses Position Control Mode of the Servo Drive and sends target position commands to achieve the specified target velocity The position control loop is enabled in the Servo Drive Therefore as the command velocity slows down e g due to disturbance and the following error increases the velocity will change to eliminate this following error e do H 3 e D 1 D X o lt o Oo o lt O Oo 5 9 For details refer to the MC MoveVelocity Velocity Control instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 O1JUOD J90 J9A L 6 NJ series CPU Unit Motion Control User s Manual W507 9 23 9 Motion Control Functions 9 3 2 Cyclic Synchronous Velocity Control The control mode of the Servo Drive is set to Velocity Control Mode and a command speed is output every control period To stop an axis use the MC_Stop instruction or execute another motion control instruction If you specify a target velocity of O the axis will not move but the axis status will indicate that itis moving MC SyncMoveVelocity Instruction Execute InVelocity zeg Ee Active _ Cem CommandAborted Error ErrorlD 16320000 NM L I l MC_Stop Instruction Execute gt Done Bus
70. Common Functions for Multi axes Coordinated Control 9 53 9 7 1 Velocity Under Multi axes Coordinated Control 9 53 9 7 2 Acceleration and Deceleration Under Multi axes Coordinated Control 9 54 9 7 3 Jerk for Multi axes Coordinated Control 9 55 9 7 4 RHe executing Motion Control Instructions for Multi axes Coordinated Control 9 56 9 7 5 Multi execution Buffer Mode of Motion Control Instructions for Multi axes Coordinated Control 9 56 Sani duliei g RUP 9 65 9 8 1 Changing the Current Position 9 65 9 8 2 Jorgue LImlt iu omiies aie eet ihe det malts NERA 9 66 9 8 3 Belge rc T rm 9 66 9 8 4 Zone Monitoring llle hh 9 67 9 8 5 Software Limits iz daas ua ert e E Ro Er Bed Scu Et Eos 9 68 9 8 6 X Following Error Monitoring 9 69 9 8 7 Following Error Counter Reset 9 70 9 8 8 Axis Following Error Monitoring ln 9 70 SE EE EIER 4 256 Lede eee he ee E estet ate E wed cote 9 71 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 1 Single axis Position Control The MC Function Module can be connected to OMRON G5 series Servo Drives with built in EtherCAT communications to implement position control velocity control and torque control This section describes positioning operation for single axes 9 1 1 Outline of Operation The single axis control function of the MC Function Module consists of control for motion profile com mand
71. Control User s Manual W507 1 6 Motion Control Programming Transition into this state occurs when there is an axis error in any state except for Coordinated Motion state 2 Transition into this state occurs when there are no axis errors and the Status output to the MC Power instruc tion is FALSE The Servo is OFF 3 Transition into this state occurs if an error is reset with the MC Reset or ResetMCError instruction when the Servo is OFF 4 Transition into this state occurs if an error is reset with the MC Reset or ResetMCError instruction when the Servo is ON 5 Transition into this state occurs when the Enable input to the MC Power instruction changes to TRUE and the Status Servo ON output from the MC Power instruction changes to TRUE The Servo is ON 6 Transition into this state occurs when the Done output from the MC Stop instruction is TRUE and the Execute input to the MC Stop instruction changes to FALSE 7 Transition into the Deceleration Stopping state occurs when the MC ResetFollowingError instruction is exe cuted 8 The Continuous Motion state exists from when velocity control is set for the MoveMode input variable of the MC MoveFeed instruction until a trigger input is detected State name Definition Servo OFF In this state the Servo is OFF for the axis When this state is moved to the buff ered status for multi execution of instructions is cleared Axis Disabled In this state the Servo is OFF for the axis
72. Controller Simulation Tools Help New Project new_NJ501_0 v I Y Configurations and Setup gt 38 EtherCAT gt CPU Expansion Racks 10 F3 Edit PDO Map Settings PDO Map Process Data Size Input 208 bit 240 bit Output Selection Input Output L e L e bcd LJ L o L e bod L CJ LJ e M D filter A Configurations and Setup Node Address Network configuration M r Pr es R88D KNO1L ECT Rev 2 1 No option 1st receive PDO Mapping 258th receive PDO Mapping 261th receive PDO Mapping 262th receive PDO Mapping No option 1st transmit PDO Mapping 258th transmit PDO Mapping 259th transmit PDO Mapping 260th transmit PDO Mapping 261th transmit PDO Mapping No option All vendors Groups Servo Drives E001 R88D KNO1L ECT R88D KNO1L ECT G5 S a04 Revision PDO entries induded in 512th transmit PDO Mapping Index Size Datatypel PDO entryname Comment UBE Kz 184 bit 192 bit t Keyword i Hag BR Show hidden slaves J R88D KNO1H ECT G5 Series ServoDri R88D KNO1L ECT Rev 2 1 RB8D KNO1L ECT GS Series ServoDriy J R88D KNO2H ECT Rev 2 1 R88D KNO2H ECT GS Series ServoDri R88D KNO2L ECT Rev 2 1 R88D KNO2L ECT GS Series ServoDriy J R88D KNO4H ECT Rev 2 1 RBSD KNO4H ECT G5 Series ServoDri J R88D KNO4L ECT Rev 2 1 RBBD KNO4L ECT G5 Series ServoDrh J R88D KNOGF ECT Rev 2 1 RB8D KNOGF ECT G5 Series Se
73. Data Trace Settings FIR gt Programming e lt 2 Motion Control Setup V i Axis Settings 1 MC_Axis000 0 Setting Axis Parameters 1 Click each of the icons in the Axis Parameter Settings Tab Page The settings for each icon are displayed on the Axis Parameter Settings Tab Page P A u i ESTUE A Configurations and Setup iQ Qr LEUR new_NI501_0 v v Configurations and Setup Lei Unit of display pulse mm Wio nm deg Command pulse count per motor rotation pulse rev Work travel distance per motor rotation pulse rev ww t Motion Control Setup Reference Unit conversion formula Y i5 Axis Settings _ Command pulse count per motor rotation UDINT 3z MC Axis000 0 Number o pulses pulse Work travel distance per motor rotation LREAL 3 Axes Group Settings amp Cam Data Settings gt Event Settings E Task Settings F Data Trace Settings gt Programming Travel distance Unit o 3 14 NJ series CPU Unit Motion Control User s Manual W507 3 Configuring Axes and Axes Groups Right click Axis Settings in the Multiview Explorer and select Axis Setting Table to enable set ting the axes parameters for all axes at the same time E s New Project A Configurations and Setup new_NJ501_0 Y SS Parameters to show Al v TATT Y Axis Basic Settings Axis use Used axis Used axis Axis Servo axis Virtual servo axis No control loop v i5 Motion Control Setu
74. Deceleration Operation Velocity Maximum velocity oen scesro m er S E I ITE EE HU OTIO IOS 2 Target velocity after velocity change 1 Target velocity at startup Time When Starting For Velocity Changes When Decelerating Ta1 Actual acceleration time Ta2 Actual acceleration time Td Actual deceleration time A Acceleration rate A Acceleration rate D Deceleration rate If you specify a short travel distance or a low acceleration deceleration rate the target velocity may not be reached If the target position is exceeded after re execution of the motion control instruction with the newly updated acceleration or deceleration rate positioning is performed at an acceleration or deceleration rate that will enable stopping at the target position NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 5 4 Jerk The jerk specifies the rate of change in the acceleration rate or deceleration rate If the jerk is specified the velocity waveform during acceleration will be an S curve which will reduce the shock on the machine EN Additional Information Jerk is also called jolt surge and lurch I Jerk Unit Jerk is given in command units s3 The command unit is the value obtained from unit conversion of the position display unit and the electronic gear I Specifying Jerk for Axis Motion The jerk used in an actual positioning motion is specified with the Jerk input variable to the moti
75. E hae ee ee ee ere 7 2 7 2 Turning ON The Serve nose yeaa eee ee eee Be eee Ce GE 7 3 7 2 1 Turning ON the Servo 7 3 7 2 2 Setting Axis Parameters 7 4 f 2 9 Programming Example csi aotces cu vele xe ee Gat ie mee UR BOR edad X 7 4 TS DOC e Un e aire P 7 5 7 3 1 Jogging Geen EE 7 5 7 3 2 Setting Axis Parameters celle 7 6 7 3 3 Setting Example for Input Variables 0 0 0 0 0 ee 7 6 7 3 4 Programming Example eee 7 7 NJ series CPU Unit Motion Control User s Manual W507 7 1 7 Manual Operation 7 1 Outline This section describes how to combine the MC Function Module and OMRON Gb series Servo Drives together and use motion control instructions from the user program to perform manual operations The motion control instructions for manual operation are MC Power and MC MoveJog MC Power changes the Servo Drive to the Servo ON state and MC MoveJog performs jogging l Precautions for Correct Use You must set the axes to perform manual operation Refer to Section 3 Configuring Axes and Axes Groups for details on how to set axes EN Additional Information e Use the Sysmac Studio if you want to perform manual operation without programming Refer to 4 3 Checking Motor Operation for information on how to use the Sysmac Studio to perform manual operation e Refer to Section 6 Motion Control Programming for information on how to create user pro grams NJ series CPU Unit
76. Gear Operation 00 ccc eee ees 9 12 9 2 4 Cam Operation EE 9 13 92 5 Cam Tables serieei rae r a 5 e DERE he DI e 9 14 9 2 6 Synchronous Positioning 9 19 9 2 7 COMBINING AXCS EE 9 21 9 2 8 Master Axis Phase ht 9 22 9 3 Single axis Velocity Control 9 23 9 3 1 Velocib CODO 4t E trabe aeu dat ata 9 23 9 3 2 Cyclic Synchronous Velocity Control 9 24 9 4 Single axis Torque Control 0 0 0 cee es 9 25 9 5 Common Functions for Single axis Control 9 26 9 5 1 mec p 9 26 9 2 NEEN gebeten Suh Sas ads go rae acd Bo a ice e Da wena Dr 9 28 9 5 3 Acceleration and Deceleration 0 0 0 ccc eee ee eee 9 29 Grote E EE 9 31 9 5 5 Specifying the Operation Direction llle 9 32 9 5 6 Re executing Motion Control Instructions 9 35 9 5 7 Multi execution of Motion Control Instructions Buffer Mode 9 41 9 6 Multi axes Coordinated Control 9 46 9 6 1 Outline Of Operation cioe eto re Roe er MEA 9 46 9 6 2 Linear Interpolation 15 saca tutem RR Drm Re Roe Sore dX Ron REUS Rum s 9 48 NJ series CPU Unit Motion Control User s Manual W507 9 1 9 Motion Control Functions 9 2 9 7 9 8 9 6 3 Circular Interpolation llli 9 49 9 6 4 Stopping Under Multi axes Coordinated Control 9 50 9 6 5 Overrides for Multi axes Coordinated Control 9 51
77. Hm1_Ex TRUE END_IF If the Servo is ON for axis 1 and home is not defined the MC Home instruction is executed for axis 1 IF Pwr2 Status TRUE NJ series CPU Unit Motion Control User s Manual W507 10 69 10 Sample Programming AND MC Axis001 Details Homed zFALSE THEN Hm2_Ex TRUE END IF If homing is completed for axis O velocity control is executed IF Hm DZTRUE THEN Vel_Ex TRUE END IF When axis O reaches the target velocity and the home is defined for axis 1 cam operation is executed IF Vel InVel TRUE AND MC Axis001 Details Homed TRUE THEN Gamm Ex TRUE END IFE f StartOn is TRUE and cam motion is in sync shifting the phase of the master axis is started IF StartOnz TRUE AND Camin_InSync TRUE THEN Phasing_Ex TRUE END_IF MC Power for axis O PWR1 Axis MC_Axis000 Enable Pwr1 En Status gt Pwr1 Status Busy Pwrl Bsy Error gt Pwrl Em ErrorlD gt Pwri_ErrlD MC Power for axis 1 PWR2 Axis MC Axis001 Enable Pwr2 En Status gt Pwr2_ Status Busy gt Pwr2 Bsy Error gt Pwr2 Err ErrorlD gt Pwr2 ErrlD MC Home for axis 0 HM1 Axis Execute Done Busy CommandAborted Error ErrorlD MC Home for axis 1 HM2 Axis Execute Done Busy CommandAborted Error ErrorlD MC MoveVelocity 10 70 MC Axis000 Hm1 Ex gt Hm D gt Hm1 Bsy gt Hm
78. Home Input Detec Set the home input detection direction for homing 0 or 2 0 tion Direction 0 Positive direction 2 Negative direction Operation Selection Set the stopping method when the positive limit input O to 2 1 at Positive Limit turns ON during homing Input 0 No reverse turn minor fault stop 1 Reverse turn immediate stop 2 Reverse turn deceleration stop Operation Selection Set the stopping method when the negative limit input O to 2 1 at Negative Limit turns ON during homing Input 0 No reverse turn minor fault stop 1 Reverse turn immediate stop 2 Reverse turn deceleration stop Homing Velocity Set the homing velocity Unit command units s Positive long reals 10 000 Homing Approach Set the velocity to use after the home proximity input 1 000 Velocity turns ON Unit command units s Homing Accelera Set the acceleration rate for homing Set O for no Non negative long 0 tion acceleration Unit command units s Homing Decelera Set the deceleration rate for homing Set O for no Non negative long 0 tion deceleration Unit command units s2 reals Homing Jerk Set the jerk for homing Set O for no jerk Unit com Non negative long 0 mand units s3 reals Home Input Mask Set the home input mask distance when you set the Non negative long 10 000 Distance Homing Operation Mode to a proximity reverse turn reals and home input mask distance Unit command units Home Offset Preset the actual po
79. KNO4L ECT Rev 2 1 RB8D KNO4L ECT G5 Series ServoDrh R88D KNOGF ECT 1 RB8D KNOGF ECT G5 Series ServoDrh R88D KNOBH ECT Rev 2 1 RB8D KNOBH ECT G5 Series ServoDri R88D KN10F ECT Rev 2 1 RB8D KN10F ECT G5 Series ServoDrh R88D KN10H ECT Rev 2 1 RB8D KN10H ECT G5 Series ServoDri R88D KN150F ECT Rev 2 1 RBSD KN150F ECT G s ServoDr R88D KN150H ECT Rev 2 1 RB8D KN150H ECT GS Series ServoD R88D KN15F ECT 1 R KN15F ECT G5 Series ServoDrin R88D KN15H ECT Rev 2 1 RBSD KN15H ECT G5 Series ServoDri R88D KN20F ECT Rev 2 1 RB8D KN20F ECT G5 Series ServoDrh H R38D KN20H ECT Rev 2 1 RB8D KN20H ECT G5 Series ServoDri Model R88D KNO1H ECT Product name R88D KNO1H EC Revision 2 1 Vendor OMRON Corporation 1 Comment 200V 100W ServoDri Device name URL Set a name for the master 2 Right click the slave to connect and select Insert from the menu Fs Sysmac Stu j All vendors fe Configurations and Setup A Q Groups new_NJ501_0 M d Node AddressiNetwork configuration Servo Drives v Configurations and Setup Master j EI Frequency Inverter 3 Digital 10 e Analog IO gt 53 CPU Expansion Racks Model m Input d JO Map Product name FF Vision Sensor P Cer Sap Number of Slaves gt 42 Motion Control Setup PDO Communications Cycle Time amp Cam Data Settings Total Cable Length gt Event Settings Fail soft Operation Setting a Wa TNE On SNS tere E F7 Data Trace Settings PDO communicati
80. MFaultLvl Active TRUE THEN FaultHandler END IF MC Power PWR Axis MC Axis000 Enable Pwr En Status gt Pwr Status Busy gt Pwr Bsy Error gt Pwr Err ErrorlD gt Pwr_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 5 10 Sample Programming 10 2 2 Interlocking Axis Operation with Master Control Instructions 10 6 You can place the MC Power Power Servo instruction between the MC Master Control Start and MCR Master Control End instructions in ladder diagrams to interlock axis operation When Mc On is FALSE in this sample the MC Power Power Servo instruction between the MC and MCR instructions is disabled to turn OFF the Servo The CommandAborted output variable from the current motion con trol instruction changes to TRUE at the same time and axis motion stops You cannot use the MC instruction in ST Therefore a sample is provided only for a ladder diagram Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 sAXIS REF This is the Axis Variable for axis O MC Axis000 MFaultL vl Active BOOL FALSE TRUE when there is a minor fault level error for axis O Mc On BOOL FALSE This variable enables and disables the MC instruction Control programming is not given in this sample In actual programming program controls for the required device operation StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON
81. Manual Cat No W500 and NJ series CPU Unit Soft ware User s Manual Cat No W501 The motion control instructions are described When programming use this manual together with the NJ series CPU Unit Hardware User s Manual Cat No W500 NJ series CPU Unit Software User s Manual Cat No W501 and NJ series CPU Unit Motion Control User s Man ual Cat No W507 The methods and precautions for using CJ series Units with an NJ501 CPU Unit are described including access methods and pro gramming interfaces Manuals are available for the following Units Analog I O Units Insulated type Analog IC Units Temperature Control Units ID Sensor Units High speed Counter Units Serial Com munications Units and DeviceNet Units Use these manuals together with the NJ series CPU Unit Hardware User s Manual Cat No W500 and NJ series CPU Unit Software User s Manual Cat No W501 29 Helated Manuals Manual name NJ series CPU Unit Built in EtherCAT Port User s Manual NJ series CPU Unit Built in EtherNet IP Port User s Manual NJ series Troubleshoot ing Manual Sysmac Studio Version 1 Operation Manual CX Integrator CS CJ CP NSJ series Network Configuration Tool Operation Manual CX Designer User s Manual CX Protocol Operation Manual 30 Model numbers Application W505 W506 W503 W504 W464 V099 W344 NJ501 L IL TL TE NJ501 L JE TL E NJ501 L IE TL TE SYSMAC GEZ TI Usin
82. Meaning An Axes Group Immediate Stop MC GrouplmmediateStop instruction was executed Source Motion Control Function Module Source details Axes group Detection At instruction SEN execution Effects User program Continues Operation An immediate stop is SE for all axes in the axes group according to the Immediate Stop Input Stop Method axis parameter System defined Variable 0 0000 Datatype 0 Datatype 0 Name variables ee BOOL Axes Group Minor Fault Occurrence correction A Group Immediate Stop instruction zd was executed Attached None information Precautions None Remarks 11 26 NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Event name Positive Software Limit Exceeded 64450000 hex Meaning The position exceeded the positive software limit while the axis is in motion Source Motion Control Function Module Source details Axis Detection During instruc timing tion execution Effects Follows the setting of the Software Limit Function Selec tion variables MC AX MFaultLvl Active BOOL Axis Minor Fault Occurrence S Hsc The position exceeded the positive Find the reason that the software limit The goal is to enable detecting the software limit was exceeded and make suitable cor software limits when they are rections exceeded due to unanticipated causes Preventative measures are not required Attached None information Precautions
83. Motion Control User s Manual W507 7 Manual Operation 7 2 Turning ON the Servo You can turn the Servo ON or OFF to enable or disable sending operation commands to the Servo Drive The MC Power Power Servo motion control instruction is used Instance name Body name In out variable MC Power instance Input parameter UM A Axis1 Status 41 e Input variable Busy Error1 l ErrorlD1 N Ka Output parameter Output variables Specify the axis to move with the Axis in out variable Change the Enable input variable for MC Power to TRUE to turn ON the Servo Change Enable to FALSE to turn OFF the Servo la Precautions for Correct Use If you change Enable to FALSE while the axis is moving the command stops immediately and all motion control instructions for that axis are disabled OAJ9S 9u1 NO Buriuuinj Z Z EN Additional Information If an OMRON G5 series Servomotor with an absolute encoder is used home is defined when Enable changes to TRUE 7 7 2 1 Turning ON the Servo 1 Adding and Setting an Axis Add and set an axis from the Sysmac Studio For details refer to 3 2 2 Setting Procedure OAJOS eui NO ulun Z Z 2 Setting Axis Parameters Set the axis parameters from the Sysmac Studio For details refer to 3 2 2 Setting Procedure 3 Writing the User Program Create the user program from the Sysmac Studio For details refer to 6 8 Programming Motion Controls 4 Downloading Axis Parameters a
84. O The contact logic of the home proxim Correct the contact logic N C N O e ity signal or limit signal is not correct of the home proximity sensor or limit o sensor g O The home proximity sensor or limit Replace the home proximity sensor or D sensor failed limit sensor Attached None information Precautions None Remarks NJ series CPU Unit Motion Control User s Manual W507 11 35 11 Troubleshooting Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks 11 36 Home Proximity Homing Direction Limit Input Detected 74280000 hex The home proximity input and the limit signal in the homing direction were detected at the same time during a homing operation Motion Control Function Module Source details Axis Detection During instruc timing tion execution The axis stops with the stop method for the homing execu tion status Check to see if any of the conditions nal or limit signal is incorrect imity signal or limit signal that are given as causes exist in The home proximity sensor or limit Correct the installation location of the advance sensor is installed in the wrong loca home proximity sensor or limit sensor tion so that they do not turn ON
85. O for automatic setting Index 3015 hex 00 hex 3317 hex 00 hex 3324 hex 00 hex Numerator 3401 hex 00 hex Input Signal Selec 00818181 Positive Drive Prohibit Input NC tion 2 hex 3402 hex 00 hex Input Signal Selec 00828282 Negative Drive Prohibit Input NC tion 3 hex 3403 hex 00 hex Input Signal Selec 00222222 Home proximity input NO tion 4 hex 3404 hex 00 hex Input Signal Selec 002B2B2B External Latch Signal 3 NO tion 5 hex 3405 hex 00 hex Input Signal Selec 00212121 External Latch Signal 2 NO tion 6 hex 3406 hex 00 hex Input Signal Selec 00202020 External Latch Signal 1 NO tion 7 hex NJ series CPU Unit Motion Control User s Manual W507 A 9 Appendices Index 3504 hex 3508 hex 3521 hex 3 03 hex 3801 hex 3 58 hex 3 59 hex 607C hex 6091 hex 60E0 hex 60E1 hex 00 hex 00 hex 00 hex 00 hex 00 hex 00 hex 00 hex 00 hex 01 hex 02 hex 00 hex 00 hex Drive Prohibit Input Selection Recom mended Description setting 0001 hex The drive prohibit input is disabled at the Servo This is performed by the MC Function Module instead Undervoltage Error 0001 hex Operation is stopped for an insufficient main Selection power voltage Torque Limit Selec tion 0006 hex There are two limit values one for positive and one for negative Switch between them by using PCL and NCL Torque Limit Output 0001h he
86. Setup LQ dE ten sech search M new NJ501 0 D MC Group000 0 x v Configurations and Setup gt 78 EtherCAT gt 53 CPU Expansion Racks I O Map Axes group number DR M Axes group use Unused axes group v gt F Controller Setup ams Unused axes group w i Motion Control Setup Ised V 9 Axis Settings i MC Axis000 0 1 MC Axis001 1 v Axes Group Settings fif MC_Groupooo 0 amp Cam Data Settings gt Event Settings i Task Settings F Data Trace Settings Select the axes compost eese mmm Aal MIANN A e I o it 3 Ve U Oo OH o Q c o o h Oo gt X tu o C Oo c Kei o 3 Select the composition of the axes group in the Composition Box A 2 axis composition is selected in the following example ysmac Studio Fille Edit View Insert Project Controller Simulation Zock Help ge 1 oV PESCE A Configurations and Setup iQ tetra new NJ501 0 v MC Group000 0 x lt Clearsearch gt search M CD D Configurations and Setup Jot Axes Group Basic Settings gt 73 EtherCAT D gt P S CPU Expansion Racks Axes group number lls To 1 0 Map r Axes group use Used axes group v gt F Controller Setup Vi Composition 2 axes V X Motion Control Setu pm Ma ge K f Select the axes comp c ARRA n axes group O XZ Axis Settings 3 axes 3 MC_Axis000 0 Logical axes 4 axes CH MC Axis001 1 Axis AO lt Not assigned Y D LAS er T
87. Slave User s Manual Cat No W488 for input signal wiring methods NJ series CPU Unit Motion Control User s Manual W507 A 11 n N OH o 2 D 5 e mp o m 2 O o ch D mp ge 3 2 m 0 s euiue 1ndu 1epoou3 0 BuulM L c V Appendices I PDO Mapping This section describes mapping PDOs to control encoder axes from the MC Function Module You must map the objects that are required for the motion control functions that you will use to process data communications The PDO map is a list of required objects that is prepared in advance You select the PDOs to use in the Edit PDO Map Settings Dialog Box of the EtherCAT Edit Tab Page in the Sysmac Studio mmer Studio E x als zxza z E Edit PDO Map Settings DER Al v PDO Map PDO entries induded in 512th transmit PDO Mapping Process Data Size Input 208 bit 240 bit Index Size Datatypel PDO entry name Comment Output 184 bit 192 bit lag l i i E S iugum G HN RB REIR dh d RN ex JI er IJ Ie III Edit PDO Map Settings Edit Setting Parameters lly by the process data PDO The following PDOs are mapped by default in the Sysmac Studio RxPDO 1700 hex GES E Bits 4020 hex 01 hex and Channel 2 Instruction Bits RxPDO 1701 hex oo Value 4011 hex 01 hex and Channel 2 Preset Value 4011 TxPDO 1B00 hex GE Value 4010 hex 01 hex and Channel 2 Position Value TxPDO 1B01 hex
88. TRUE AND Camin InCamO zFALSE THEN Camin Ex TRUE ELSE Camin_Ex FALSE END_IF ga n sch NO O 2 Di 2 a 2 mE 2 D Di 3 e o D oO lt JU P D X D O c o 2 O Ge H Di 2 2 o ct c O ze o 2 UH CamTable7 is TRUE during absolute positioning then the instance that uses CamProfile1 for the cam table is executed IF Mv Abs Act TRUE AND CamTable1 TRUE THEN Camin Ex TRUE END IF AMC Camin IF CamTableO TRUE THEN CAMIN Master MC Axis000 Slave MC Axis001 CamTable CamProfileO Execute Camin Ex Periodic Gamm EM StartMode Camin_StMode StartPosition Camin_StPos MasterStartDistance Gamm MStDis MasterScaling Gamm MSc SlaveScaling Camin_SSc MasterOffset Camin MO SlaveOffset Gamm SO Reference Type Camin HT Direction Camin Dir InCam gt Camin InCam0 InSync gt Camin_InSync EndOfProfile gt Camin EOP Index gt Camin Index Busy gt Camin Bsy NJ series CPU Unit Motion Control User s Manual W507 10 51 10 Sample Programming 10 52 END JE Active CommandAborted Error ErrorlD IF CamTable1 TRUE THEN END_IF gt Camin Act gt Camin Ca gt Camin Err gt Camin_ErrlD CAMIN Master MC_Axis000 Slave MC_Axis001 CamrTable CamProfile1 Execute Camin_Ex Periodic Camin_EM StartMode Camin_StMode StartPosit
89. There will be no limitto reals the deceleration rate if O is set Unit com mand units s2 Acceleration Decel Set the operation for when the maximum 0 to 2 0 eration Over acceleration deceleration rate would be exceeded after excessive acceleration decel eration during acceleration deceleration con trol of the axis because stopping at the target position is given priority 0 Use rapid acceleration deceleration Blend ing is changed to Buffered 1 Use rapid acceleration deceleration 2 Minor fault stop Operation Selection Specify the operation for reversing rotation for O to 1 0 at Reversing multi execution of instructions re execution of instructions and interrupt feeding 3 0 Deceleration stop 1 Immediate stop Velocity Warning Set the percentage of the maximum velocity at O to 100 0 Value which to output a velocity warning for the axis No velocity warning is output if O is set Unit Acceleration Warn Set the percentage of the maximum accelera 0 to 100 0 ing Value tion rate at which to output an acceleration warning for the axis No acceleration warning is output if O is set Unit 96 NJ series CPU Unit Motion Control User s Manual W507 5 11 e N gt x 0 U 9 D 3 D D m sbumes uonejedo rp z S 5 Motion Control Parameters Deceleration Warn ing Value Positive Torque Warning Value Negative Torque Warning Value Actual Velocity Fil
90. Types Type Description Enumerated data types This data type uses one item from a prepared name list as its value Variables with this data type start with e Structure data type This data type consists of multiple data types placed together into a single layered structure Variables with this data type start with s Hefer to the NJ series CPU Unit Software User s Manual Cat No W501 for details on the other data types that are used by an NJ series Controller g Attributes of System defined Variables for Motion Control The attributes that are shown in the following table are the same for all system defined variables for motion control Attribute Attribute of system defined variables for motion control Global Local Global variable R W access Read only Retain Non retain Network Publish Publish o o lt o mr o SZ Q 3 a S fo o o Oo O Oo 3 O Oo 3 mp o Variables are published on the network with the variable names of the system defined variables The variable names that are created when the axes or axes groups are created on the Sysmac Studio are not published to the network 6 6 2 System for System defined Variables for Motion Control oystem defined variables for motion control consist of information representing the status of the MC Function Module status information for slave devices connected via EtherCAT communications and the portion of the MC parameter se
91. Unit Software User s Manual weise eris e Setting devices and hardware Software settings Programming Testing operation and debugging Using motion control Using EtherCAT Using EtherNet IP Use the relevant manuals for references according to any error that Troubleshooting and managing errors in an NJ series Controller Maintenance Using EtherCAT Using EtherNet IP Using CJ series Units WW i AI Dd Qi OD iile iii NJ series User s Manuals NJ series Instructions NJ series CPU Unit Motion Control User s Manual NJ series CPU Unit Built in EtherCAT Port User s Manual NJ series Motion Control Instructions Reference Manual NJ series CPU Unit Built in EtherNet IP Port User s Manual NJ series Troubleshooting Manual CJ series Special Unit Operation Manuals for NJ series CPU Unit Reference Manual v v e oO I gt NJ series CPU Unit Motion Control User s Manual W507 Manual Configuration Manual Configuration NJ series CPU Unit Hardware User s Manual Cat No W500 ui sees CPU Unit Hardware User s Manual Cat No W500 Section Section 1 Introduction Section 2 System Configuration Section 3 Configuration Units Section 4 Installation and Wiring Section 5 Troubleshooting Section 6 Inspection and Maintenance Appendices Description This section provides an introduction to the NJ series Controllers and their features and gives the NJ series Cont
92. Unit Motion Control User s Manual W507 6 Motion Control Programming I Cam Profile Curve Names When a cam profile is created in the Sysmac Studio CamProfileO is used as the default name Each time you create another cam profile the number on the end of the name is incremented You can change the name of any cam profile as required from the Sysmac Studio The cam profile names that are set on the Sysmac Studio are used as the cam table names Specifying Cam Tables in the User Program In the user program the cam table name is specified for the in out variable CamTable in motion control instructions Specify a variable name MC Axis000 MC AxisO01 CamTable1 CamProfileO MCCI1 Pd MCCI1 StMode MCCI1 StPos MCCI1 MStDis MCCI1 MSc MCCI1 SSc MCCI1 MO MCCI1 SO MCCI1 RT MCCI1 Dir MCCI1 CT MCCI1 BM In out variable CamTable MCCI1 MC Camln Master Slave CamTable InCam InSync EndOfProfile Index Busy Active Command Aborted Error ErrorlD CamrTable Execute Periodic StartMode StartPosition MasterStartDistance MasterScalling SlaveScalling MasterOffset SlaveOffset Reference Type Direction CamtTransition BufferMode NJ series CPU Unit Motion Control User s Manual W507 MC Axis000 MC Axis001 CamProfileo MCClH InCam MCCI1 InSync MCCI1 EOP MCCI1 Index MCCI1 B MCCI1 A MCCI1 CA MCCI1 E MCCI1 EID 6 31 rji N O D 3 y z2 D N D 5 2 O D 3 UO e D
93. Used in the Programming Samples Variable name Data type Default Comment MC Axis000 SAXIS REF I This is the Axis Variable for axis O MC AxisO001 SAXIS REF REF This i is the Axis Variable for axis 1 CamProfileO ARRAY 0 360 OF This is the cam data variable rear Pwr1 Status BOOL FALSE This variable is assigned to the Status output vari able from the PWR1 instance of the MC Power instruction It is TRUE when the Servo is ON Pwr2 Status BOOL FALSE This variable is assigned to the Status output vari able from the PWR2 instance of the MC Power instruction It is TRUE when the Servo is ON StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communications are active and normal WriteCamdata keeft m This variable is used to start changing the cam ee It is changed to TRUE to start editing WriteDone ee FALSE This variable is used to indicate that the changes to the cam data are completed It is changed to TRUE when the changes to the cam data are completed SaveCamtable BOOL FALSE This variable is used to execution the Save Cam Table instruction _MC_COM Status BOOL FALSE This system defined variable is TRUE while cam CamTableBusy table data is being saved Sv Cam Ex BOOL FALSE This variable is used to execute the MC SaveCamrTable instruction Camin Ex BOOL FALSE This variable is used to execute the MC Camln Start Cam instruction It is used in ST program
94. When overflow or underflow occurs Home is undefined NJ series CPU Unit Motion Control User s Manual W507 8 3 8 Homing 8 4 la Precautions for Correct Use e For a virtual axis home is always defined with a zero position preset The setting of the Hom ing Method axis parameter is ignored e The positive drive prohibit input POT negative drive prohibit input NOT and home proxim ity input DEC of the Servo Drive are used by the MC Function Module as the positive limit input negative limit input and home proximity input Make sure that the signal widths for all of these input signals are long enough for the Servo Drive to detect them and longer than the control period of the MC Function Module If the input signal widths are shorter than the con trol period the MC Function Module may not be able to detect the input signals resulting in incorrect operation e You must set the Servo Drive parameters for each Servo Drive input signal Refer to the man ual for your Servo Drive and the appendices and make the proper settings NJ series CPU Unit Motion Control User s Manual W507 8 Homing 8 2 Homing Procedure This section describes the procedure to perform homing 1 Adding and Setting an Axis Add and set an axis from the Sysmac Studio 2 Setting Axis Parameters Set the homing method with the homing parameters 3 Writing the User Program Create the user program from the Sysmac Studio For details refer to 6 8 Pr
95. Whenever you change the positive software limit setting make sure that the new setting is safe Remarks Event name Negative Software Limit Exceeded 64460000 hex Meaning The position exceeded the negative software limit while the axis is in motion Source Motion Control Function Module Source details Axis Detection During instruc L1 tion execution Effects Follows the setting of the D Limit Function Selec tion variables _MC_AX MFaultLvl Active BOOL Axis Minor Fault Occurrence ZEIEN The position exceeded the negative Find the reason that the software limit The goal is to enable detecting the software limit was exceeded and make suitable cor software limits when they are rections exceeded due to unanticipated causes Preventative measures are not required Attached None information Precautions Whenever you change negative software limit settings make sure that the new setting is safe Hemarks NJ series CPU Unit Motion Control User s Manual W507 11 27 I N zi Oo c za 0 gt O Oo m 5 suonduoseq 1043 Z Z 11 Troubleshooting Event name Meaning Source Error attributes Effects System defined In position Check Time Exceeded 64470000 hex The in position check was not completed within the monitoring time Motion Control Function Module Source details Axis Detection During instruc timing tion execution User program Continues Operation Operation is not possible for
96. a minor fault level error occurs for axis O or axis 1 the error handler for the device FaultHandler is executed Program the FaultHandler according to the device IF MC Axis000 MFaultLvl Activez TRUE OR MC Axis001 MFaultLvl Activez TRUE THEN FaultHandler END IF If the Servo is ON for axis O and home is not defined the MC Home instruction is executed IF Pwr1 SZTRUE AND MC Axis000 Details Homed FALSE THEN Hm1_Ex TRUE END_IF If the Servo is ON for axis 1 and home is not defined the MC Home instruction is executed NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o IF Pwr2 SZTRUE AND MC Axis001 Details Homed FALSE THEN D Hm2_Ex TRUE END_IF 3 ns If homing is completed for axis 0 absolute positioning is executed S IF Hm1_D TRUE THEN sz odo Mv Abs Ex TRUE END IFE If the command position for axis 0 is 5000 or less CamTableO is changed to TRUE and CamTable7 is changed to FALSE If it exceeds 5000 CamTableO is changed to FALSE and CamTable7 is changed to TRUE IF MC Axis000 Cmd Pos LREAL45000 0 THEN CamrTableO BOOL T RUE CamrTable1 BOOLZFALSE ELSE CamTableO BOOLZFALSE CamrTable1 BOOL TRUE END_IF UI CamTableO is TRUE during absolute positioning then the instance that uses CamProfileO for the cam table is executed f InCam is TRUE Execute is changed to FALSE IF Mv Abs Act TRUE AND CamTableOz
97. acceleration rate deceleration rate and jerk If you execute this instruction when home is not defined an instruction error will occur Velocity Target velocity Acceleration Y Deceleration m Position Command current position 0 EN Additional Information For details on the MC_MoveZeroPosition High speed Homing instruction refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 i on T ae 7 D D Q T O 3 5 ae NJ series CPU Unit Motion Control User s Manual W507 8 15 8 Homing 8 16 NJ series CPU Unit Motion Control User s Manual W507 Motion Control Functions n B This section describes the motion control functions that are used when connected to OMRON G5 series Servo Drives with built in EtherCAT communications 9 1 Single axis Position Control 9 3 9 1 1 O tline oF Operation x 5 i iit een EE teams 9 3 9 1 2 Absolute Positioning 9 4 9 1 3 Helalive Positioning 3 3 rideo ea wx EDI ORE Cd d p wed a 9 4 9 1 4 Interrupt Feeding Ae SE RE RR EO E CR P ert dede Pto Rea 9 5 S Tsb AOPP 5 abi ded oboe e he oe Ure a Sr SUIS I edit orta ted e ird 9 6 921 6 OVerride Ea36ClOlS xs uei e aod ed Se pore CE Uode EE 9 9 9 2 Single axis Synchronized Control 9 11 9 2 1 Overview of Synchronized Control 0 0 cc eee 9 11 9 2 2 368r ODSFalloll 5d unius e Coma ah in te Pts enu EE 9 11 9 2 3 Positioning
98. and MC Move Positioning instruc tions in the NJ series Motion Control Instructions Reference Manual Cat No W508 9 1 3 Relative Positioning Relative positioning specifies the distance from the actual position You can specify a travel distance that exceeds the ring counter range by setting the Count Mode to Rotary Mode Velocity Target L velocity Deceleration Acceleration Position ol Command current position Target distance For details refer to the MC Movehelative Relative Positioning and MC Move Positioning instruc tions in the NJ series Motion Control Instructions Reference Manual Cat No W508 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 1 4 Interrupt Feeding Interrupt feeding feeds the axis at the specified velocity and for the specified distance from the actual position when a trigger signal occurs You can also select to output an error if the trigger signal does not occur within the specified travel distance when you specify either absolute or relative travel Feeding is not affected by following error This is achieved by using the latch function of the Servo Drive to deter mine the actual position when the trigger signal occurs You can also use the window function to disable trigger signals that occur outside of a specified position range For applications such as wrapping machines this enables feeding only on trigger signals for printed marks
99. auxiliary functions are used The compensation method and setting range depend on the specifications of the Servo Drive The following Servo Drive input signals are used Home signal home proximity signal positive limit signal negative limit signal immediate stop signal and interrupt input signal 1 9 d 1 A o D O zh O e O 2 0 suoneoyiooedg UONOUNY e p L 4 Introduction to the Motion Control Function Module NJ series CPU Unit Motion Control User s Manual W507 Motion Control Configuration and 2 Principles EE This section outlines the internal structure of the CPU Unit and describes the configura tion and principles of the MC Function Module 2 1 Internal Configuration of the CPU Unit 2 2 2 2 Motion Control Configuration e es 2 3 2 3 Motion Control Principles ellleerelle 2 4 2 3 1 CEU WT EE EE 2 4 2 3 2 Example of Task Operations for Motion Control LL 2 7 2 4 EtherCAT Communications and Motion Control 2 11 2 4 1 CAN Application Protocol over EtherCAT Co 2 11 2 4 2 X Relationship between EtherCAT Master Function Module and MC Function OOo canti e Pru LI MC qtu ME uiu sU E bir 2 12 2 4 3 Relationship between Process Data Communications Cycle and Motion Control dise EE 2 13 NJ series CPU Unit Motion Control User s Manual W507 2 1 2 Motion Control Configuration and Principles 2 1 Intern
100. called MyCam 1 with 1 000 points use the following declaration Cam table MyCam 1 ARRAY 0 999 OF sMC CAM REF END VAR The following notation is used to specify MyCam 1 for a cam operation instruction In this example the master axis is Avis and the slave axis is Axis2 MC Camln Instance MC Camiln Axis1 NEES Master be Axis1 AXxiS2 9laV8 eee eene nemen Slave bes Axis2 MyCam1 CamTable CamTable F MyCam1 An error will occur if the specified cam table does not exist in the Controller You can also specify the same cam table for more than one axis N d 3 a o I Q x o GA lt 3 Oo bet O 3 N o Q O o 3 e S Switching Cam Tables You can switch cam tables by re executing the cam operation instruction during cam operation After switching cam operation will be performed with the cam table you specified for re execution of the instruction The EndOfProfile and Index output variables from the MC Camln instruction are output according to the new cam table Slave Displacement Cam table 1 Cam table 2 Slave axis Se qe WED G c 6 Re executed Master Phase Master axis Precautions for Correct Use e The cam table you want to switch to must be saved to non volatile memory before it can be used NJ series CPU Unit Motion Control User s Manual W507 9 17 9 Motion Control Functions 9 18 e Switching cam tables during cam operation will cause disc
101. cam data from the Sys mac Studio e Execute the MC SaveCamrTable instruction first if you need to save cam data that you modi fied in the user program to non volatile memory or if you need to upload it to the Sysmac Stu dio Editing a Cam Data Variable on the Computer after Editing It from the User Program If you edit a cam data variable from the user program and then use the MC SaveCamrTable instruction to save the cam table to non volatile memory you cannot edit the data with the Cam Editor of the Sys mac Studio This section describes how to use spreadsheet software to edit the data and then use it as a cam table Transfer Cam Table Controller to File Uploads the cam table from the Controller and saves it in a CSV file Transfer Cam Table File to Controller Downloads the cam table from a CSV file to the Controller yay Ee oth SSSR EZ EE PES See Save Export Sysmac Studio Je Spreadsheet Read Import software Upload Download T EEN f Weeleaiesleslesleskesesleg W GEES N H EES P Valslalclclolololol n lees l CALACA ael a ed e Saving a Cam Table from Non volatile Memory to a CSV File e Right click a cam profile that you edited in the Cam Data Settings of the Sysmac Studio and select Transfer Cam Table Controller to File from the menu e The Save Dialog Box is displayed Enter the file save location and file name and then
102. collection of device dependent information and functionality providing consistency between similar devices of the same device type T e o 3 o Oo e lt suomgeolunuluo t Iy0194 3 amp e v Appendices NJ series CPU Unit Motion Control User s Manual W507 Index NJ series CPU Unit Motion Control User s Manual W507 Index 1 Index Index A SHEET etw EE EE 9 42 9 57 absolute encoder Absolute Encoder Origin Position Offset 8 13 applicable Servomotors sseessssss 8 13 NOMIN o EE 8 12 miei A Moo a EE 8 14 E E 8 14 absolute pOSItIOhlFigi TE 9 4 acceleration and deceleration 9 29 acceleration and deceleration rates Wig gU te ancoe ae OA at E E E E entice 9 29 acceleration rate ehangiig WE 9 38 Acceleration Warning Value sssssss 5 11 Acceleration Deceleration Over ssssssssessrreeesrrreeen 5 11 Actual Current Position eeeeeeeeeeeeeeense 6 21 Actual Current Torque essere 6 21 Actual Current Velocity ccccccsseseceeceseeeeeeeeneeeeesaeees 6 21 actual POSION WEE 6 14 9 26 ACIUAl velocity E 9 28 Actual Velocity Filter Time Constant 5 12 assured CAUSES eege 11 10 QXOS EE 3 2 specifying in user program eeeeeeeee 3 2 Axes Group Basic Settings
103. command units s Set the acceleration rate for homing Set O for no acceleration Unit command units s2 Set the deceleration rate for homing Set O for no deceleration Unit command units s2 Set the jerk for homing Set 0 for no jerk Unit command units s3 Set the home input feeding distance when you set the Homing Opera tion Mode to the proximity reverse turn and home input mask distance specification Unit command units Preset the actual position for the value that is set after homing Unit command units NJ series CPU Unit Motion Control User s Manual W507 8 5 Vi N O 3 3 U O O D Q c C sJojeuiejeg BulwoyH ues L Z 8 8 Homing Parameter name Description Homing Holding Time Set the holding time when you set the Homing Operation Mode to the proximity reverse turn and holding time specification Unit ms Homing Compensation Value Set the homing compensation value that is applied after the home is defined Unit command units Homing Compensation Velocity Set the velocity to use for homing compensation command units s Home proximity ON input signal OFF ON Home input signal OFF Velocity Homing velocity F Homing compensation velocity Chee ee eee Homing approach velocity f Homing compensation Absolute travel to position where value home input signal was detected Homing Methods You can select any of the ten operations
104. complies with EC Directives the Controller must be installed as fol lows e The NJ series Controller must be installed within a control panel e You must use reinforced insulation or double insulation for the DC power supplies connected to DC Power Supply Units and I O Units e NJ series Controllers that comply with EC Directives also conform to the Common Emission Stan dard EN 61000 6 4 Radiated emission characteristics 10 m regulations may vary depending on the configuration of the control panel used other devices connected to the control panel wir ing and other conditions You must therefore confirm that the overall machine or equipment complies with EC Directives 24 NJ series CPU Unit Motion Control User s Manual W507 Regulations and Standards Conformance to Shipbuilding Standards The NJ series Controllers comply with the following shipbuilding standards Applicability to the ship building standards is based on certain usage conditions It may not be possible to use the product in some locations Contact your OMRON representative before attempting to use a Controller on a ship Usage Conditions for NK and LR Shipbuilding Standards e The NJ series Controller must be installed within a control panel e Gaps in the door to the control panel must be completely filled or covered with gaskets or other material e The following noise filter must be connected to the power supply line Noise Filter Manufacturer Mode
105. control instructions are executed in the user program the MC Function Module inter prets the resulting commands e The MC Function Module then performs motion control processing at a fixed period based on the results of the command interpretation It generates command values to send to the Servo Drive The following command values are generated target position target velocity and target torque e The command values are sent by using PDO communications during each process data communica tions cycle of EtherCAT communications e The Servo Drive performs position loop control velocity loop control and torque loop control based on the command values received during each process data communications cycle of EtherCAT com munications e The encoder s current value and the Servo Drive status are sent to the CPU Unit during each process data communications cycle of EtherCAT communications EN Additional Information e Motion control processing and process data communications in EtherCAT communications are performed during the same time period e The MC Function Module controls the Servo Drive which contains the position control loop velocity control loop and torque control loop NJ series CPU Unit Motion Control User s Manual W507 2 3 2 Motion Control Configuration and Principles 2 3 Motion Control Principles This section provides information on the CPU Unit tasks and how they relate to motion control 2 3 1 CPU Unit Tasks Ta
106. error list m SCHER B Ss _ 3 MC Axis000 0 a MC Axis001 1 Countermeasur e and remedy Test Run T N O 5 O 5 o D 5 D O o amp 5 E 0 Servo ON Drive status Command current Em 5 OMS Positive limit input Home input Actual current position OI Negative limit input Servo ready Command current Me O lt OMR Immediate stop input Main power Actual current velocity Home proximity input Drive error input Latch input 1 Drive waming input Latch input 2 2 Check to see if the signals turn ON and OFF properly on the monitor screen by turning ON and OFF the sensor connected to each input signal NJ series CPU Unit Motion Control User s Manual W507 4 7 4 Checking Wiring from the Sysmac Studio 4 3 Checking Motor Operation Use the functions of the MC Test Run to check motor operation 4 3 1 Turning ON the Servo You can use the Servo ON Button to turn the Servo ON and OFF 1 Select the axis for which to turn ON the Servo 5 Sysmac Studio a oR File Edit ven Insert Project Controller Simulation Tools Help aEESEN E Axis selection MC Axis000 0 Node 10 v Status e mg E 9 abled Standstill i j Homing Stopping d Home defined In home position Motion error list Event LevellSourcelMessage Namel 2 Click the Servo ON Button to turn ON the Servo 3 Click the Servo OFF Button to turn OFF the Servo n Precautions for Co
107. exceeded the velocity warn ing value The command acceleration exceeded the acceleration warn ing value e When the MC SyncMoveVelocity instruc tion was stopped the actual current velocity was not reduced to 10 or less of the maximum velocity within 10 seconds for three consecutive periods after a command veloc ity of O was output For an OMRON G5 series Servo Drive the actual current velocity was not reduced to 10 or less of the maximum velocity within 10 seconds for three consecutive periods when the MC_TorqueControl instruc tion was stopped Changing the Control Mode of the Servo Drive between CSP CSV and CST was not com pleted within one second after the command was executed EtherCAT process data com munications are not established for the master axis of the syn chronized instruction The slave of the master axis for the synchronized instruction was disconnected An Absolute Encoder Current Position Calculation Failed error 6458000 hex was detected for the master axis of a synchro nized instruction EtherCAT process data com munications are not established for the auxiliary axis of the syn chronized instruction The slave of the auxiliary axis for the synchronized instruction was disconnected An Absolute Encoder Current Position Calculation Failed error 6458000 hex was detected for the auxiliary axis of a synchro nized instruction A communications error occurred for
108. execution of instruction Velocity Buffered instruction Time e Blending High High Velocity Operation is performed using the target position of the current instruction and the target velocity that is the faster of the target velocities for the current instruction and buffered instruction I Transition Modes Multi execution of instructions for axes groups may create some shock on the device and or workpiece due to changes in the direction of the interpolation path You can specify the TransitionMode input vari able to the motion control instruction to select a transition method to use between instructions in order to lessen this shock You can choose from the following transition modes in the MC Function Module 0 Transition disabled Do not perform any processing for transitions default No TMNone attempt is made to lessen the shock but this results in a shorter operation time 10 Superimpose corners The deceleration of the current instruction is superimposed TMCornerSuperimpose on the acceleration of the buffered instruction You can keep the linear velocity of the interpolation path constant EN Additional Information The PLCopen technology specifications define numbers O through 9 Number 10 is unique to the MC Function Module NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions e Transition Disabled 0 TMNone No processing is performed to connect the two positions Trans
109. gt 293 EtherCAT gt CPU Expansion Racks I O Map gt F Controller Setup gt lt 2 Motion Control Setup Y e Cam Data Settings eegen E gt Event Settings Cut Task Settings Copy F Data Trace Gei Delete c b Programming Rename Export Export Cam Table to CSV File pm P EH A Configurations and Setup aad IET new NJ501 0 Y Configurations and Setup e Ra Fad ES d h u Master axis unit Slave axis unit Number of null car Node lock Cam cyde time gt CPU Expansion Racks Degree duo Fo M Se Yo z P SZ Setu Maximum velocity Maximum acceleration Maximum jerk eee mm Sec mm Sec 2 mm Sec 3 kA Motion Control Setup EC ae e Initial veloci nitial acceleration di Data Settings id camProiled 0 000 EAE 0 000 unge gt Event Settings Master axis Slave axis Cam curve Connecting velocity Connecting acceleration Phase pitch fr Task Settings F Data Trace Settings E p O D D ct 3 D 3 y CH D N Make the settings and enter the cam profile Refer to the Sysmac Studio Version 1 Operation Manual Cat No W504 for specific proce dures NJ series CPU Unit Motion Control User s Manual W507 6 35 6 Motion Control Programming 6 36 NJ series CPU Unit Motion Control User s Manual W507 Manual Operation EM This section describes manual operation when the MC Function Module is used together with an OMRON G5 series Servo Drive ro OUN ed gege
110. hex Cam Data The cam data that Power was interrupted during page 11 22 Read Error was saved in non save processing for cam data volatile memory is e Non volatile memory failure missing 34600000 hex Required The object that is e The required PDOs are not page 11 22 Process Data required for the axis mapped when the axis type is Object Not type is not allocated set to a servo axis or encoder Set to PDO axis e Non volatile memory failure 34630000 hex Axis Slave The slave to which The slave to which the axis is Disabled the axis is assigned assigned is disabled is disabled I N zi Oo c 0 gt O Oo m 5 page 11 23 page 11 23 34640000 hex Network The network config e The EtherCAT network configu Configura uration information ration information is not regis tion Informa is not registered for tered for the slave to which the tion Missing the slave to which axis is assigned for Axis Slave the axis is assigned 44200000 hex Motion Con A fatal error e Hardware has failed trol Initializa occurred in the sys tion Error tem and prevented initialization of the Motion Control Function Module page 11 24 SOT 104 L ck 74200000 hex Motion Con Processing forthe The processing load in the pri page 11 24 trol Period primary periodic mary periodic task is too heavy Exceeded task was not fin ished within two control periods 14630000 hex Cam Tabl
111. higher priority stop method occurs while stopping the stop method will switch to the higher priority method Priority Stop method higher numbers mean higher priority Immediate stop and Servo OFF 4 Immediate stop and error reset 3 Immediate stop 2 Deceleration stop 1 Example The following figure is an example of an immediate stop when the limit input signal is ON and the immediate stop input changes to ON during a deceleration to a stop Limit input ee M Immediate stop input il Command velocity 9 1 6 Override Factors You can use the MC_SetOverride instruction to set override factors for the motion of the axes that are currently in motion The velocity override factor is set as a percentage of the target velocity It can be set between 0 and 500 If an override factor of 0 is set for the target velocity operating status will con tinue with the axis stopped as a velocity of O The set override factor is read as long as the overrides are enabled If the overrides are disabled the override factors return to 10096 If the maximum velocity is exceeded when an override factor is changed the maximum velocity for the axis is used NJ series CPU Unit Motion Control User s Manual W507 9 9 d o 5 e D 1 D X 0 U fe O o 5 O fe 5 o S1O OC epJJeAQ 9 L 6 9 Motion Control Functions Overriding the MC MoveAbsolute Instruction An example of a time chart for using the Set Override F
112. if EtherCAT process data communications are active and normal Timing Chart Mc On StartPg Pwr_Bsy Pwr_Status NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N W I Ladder Diagram 3 Oo ug When Mc_Onis TRUE master control is started 2 On Mc_On MC S In 93 0G 0 MCNo When StartPg is TRUE the status of process data communications is checked to see if communications are active and normal StartPg EC PDSIavTbI MC Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress Lock kH The Servo for axis O is turned ON if process data communications are active and normal PWR MC Power Lock MC Axis000 Axis Axis Pwr Status Enable Status Busy Pwr_Bsy Error Pwr_Err ErrorlD Pwr ErrlD Master control is ended MCR In 0 MCNo P N NO 5 D Q O x 2 D A o O O D 0 o 2 2 lt 0 o D C o 2 x zi o x c eO O 2 o If a minor fault level error occurs for axis O the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler MC Axis000 MFaultLvl Active 4 NJ series CPU Unit Motion Control User s Manual W507 10 7 10 Sample Programming 10 2 3 Error Monitoring and Error Resetting for Single axis Operation 10 8 and Sy
113. ity Warning Value 5 22 Set the maximum interpolation velocity for the path Set O for no interpolation velocity limit If a target velocity that exceeds the maxi mum interpolation velocity is specified for an axes group operation instruction the axis will move at the maximum interpolation velocity Unit command units s Set the maximum interpolation acceleration for the path Set O for no interpolation accel eration limit Unit command units s2 Set the maximum interpolation deceleration for the path Set O for no interpolation decel eration limit Unit command units s2 Set the operation for when the maximum interpolation acceleration deceleration rate would be exceeded after excessive acceler ation deceleration during acceleration decel eration control of the axes group because stopping at the target position is given prior ity 0 Use rapid acceleration deceleration Blending is changed to Buffered 1 Use rapid acceleration deceleration 2 Minor fault stop Set the percentage of the maximum interpo lation velocity at which to output an interpo lation velocity warning No interpolation velocity warning is output if O is set Unit 96 Default Non negative long 800 000 000 reals Non negative long reals Non negative long reals 0 to 100 0 NJ series CPU Unit Motion Control User s Manual W507 Parameter name Interpolation Accel eration Warning Value Interpolation
114. minimum position setting a M M M value 70 Moves towards the i ring counter range i Similarly the following example illustrates when the ring counter upper limit is 100 the lower limit is 70 the command current position is 20 and positioning is performed towards a target position of 290 Modulo maximum position setting lt i i s mm i i M value 100 Command current Position after position 20 positioning 50 0 Modulo minimum position setting M value 70 l P Wu O Oo 3 3 Oo 3 TI c 3 O Oo 3 o Oo o 3 e o 1 fo X o O Oo 3 mp Performs relative positioning with target distance of 290 target position 100 upper limit 190 9 5 6 Re executing Motion Control Instructions This section describes how to modify input variables of the same instance of a motion control instruc tion during operation of a single axis and re execute that instruction The input variables Position Tar get Position Distance Travel Distance Velocity Target Velocity Acceleration Acceleration Rate Deceleration Deceleration Rate and Torque Target Torque and sometimes other input variables can be changed by re execution An instruction error will occur if y
115. motion control program and the operat ing procedures that are required up through actual program development This section describes manual operation when the MC Function Module is used together with an OMRON G5 series Servo Drive This section describes homing This section describes the motion control functions that are used when connected to OMRON G5s5 series Servo Drives with built in EtherCAT communications This section describes basic application methods for homing error monitoring and other functions and provides programming samples for absolute positioning cam operation and other axis operations This section describes the items to check when problems occur in the MC Function Module It includes error diagnosis and countermeasures for error indications and error diagnosis and countermeasures for operating conditions The appendices describe settings and connection methods for OMRON G5 series Servo Drive objects I NJ series Instructions Reference Manual Cat No W502 Section Section 1 Instruction Set Section 2 Instruction Descriptions Appendices Description This section provides a table of the instructions that are described in this manual This section describes instruction specifications in detail The appendices provide a table of error codes and other supplemental information to use instructions NJ series CPU Unit Motion Control User s Manual W507 Manual Configuration NJ series CPU Unit
116. number bit data the instruction Or change the elec of pulses does not exceed the range tronic gear ratio settings To recover of signed 40 bit data from the underflow change the cur rent position or perform the homing operation Attached None information Precautions None Hemarks 11 48 NJ series CPU Unit Motion Control User s Manual W507 Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects variables Cause and correction Attached information Precautions Remarks 11 Troubleshooting Actual Position Overflow 64540000 hex The number of pulses for the actual position overflowed Motion Control Function Module Source details Continuously timing The position is not updated but motion continues The actual position when converted to Correct the program so that the target pulses exceeded the upper limit of position is well within the pulse num signed 40 bit data ber limit so that the actual position does not exceed the pulse number limit for the instruction Or change the electronic gear ratio settings To recover from the overflow change the current position or perform the hom ing operation None None Check the gear ratio setting and the target position setting value and make sure that the converted number of pulses d
117. occur for the instruction The output variable Done will change to TRUE for only one period after the instruction operation is completed Execute Busy Done CommandAborted p I m Pad D O c Oo 3 fo gt o o e fo mp c o Oo Oo c Oo 3 O Oo 3 mp 2 gt o mp c O Oo 3 o Error e The following timing chart is for when the input variable Execute is TRUE for only one period and an error occurs for the instruction The output variable Error will remain TRUE Execute Busy Done sueu Buiu uonnoex3 z v 9 CommandAborted Error NJ series CPU Unit Motion Control User s Manual W507 6 11 6 Motion Control Programming I Timing Charts for Enable type Instructions e The following timing chart is for when the input variable Enable changes to TRUE and an error does not occur for the instruction Enable Enabled Busy Error e The following timing chart is for when the input variable Enable changes to TRUE and an error occurs for the instruction Enable A Enabled Busy Error T ES Additional Information Enable and Enabled change at the same time for instructions such as MC ZoneSwitch Zone Monitor and MC AxesObserve Monitor Axis Following Error For details on the timing of indi vidual instructions refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 6 4 3 Timing Chart for Re execution of Mo
118. on films and eliminates other influences e Motion Relative to the Actual Position Feeding for a Specified Distance in the Moving Direction Velocity JL Interrupt input Actual Position The figure on the left shows that there is a follow e git Relative absolute i Specified travel delay in relation to the command position or velocity feeding distance Command position Relative absolute or velocity feeding When the interrupt input occurs the specified travel distance is added to the actual position and used as the target position for the command position Feeding for a Specified Distance in the Direction Opposite to the Moving Direction Velocity J Interrupt input Te o 5 e D 1 D X 0 U fe O o 5 O fe 5 9 Actual Position The figure on the left shows that there is a follow delay in relation to the command position Relative absolute or velocity feeding Specified travel distance i Command position Relative absolute or velocity feeding DuipeeJ nau p L 6 If decelerating to a stop after a reverse turn is specified for the Operation Selection at Reversing axis parameter an acceleration deceleration curve is used when reversing For details refer to the MC MoveFeed Interrupt Feeding instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 NJ series CPU Unit Motion Control Us
119. operation of the slaves will depend on slave specifications For OMRON slaves SDO communications will result in errors e f Servo Drive and encoder input terminal EtherCAT slaves are not assigned to axes variables you must execute sequence control for them in the same way as for general purpose Ether CAT slaves NJ series CPU Unit Motion Control User s Manual W507 2 Motion Control Configuration and Principles 2 4 3 Relationship between Process Data Communications Cycle and Motion Control Period The PLC Function Module sends motion control commands to the MC Function Module when motion control instructions are executed in the user program The MC Function Module then performs motion control processing based on those commands and sends the results of processing as commands to the EtherCAT s Servo Drive This type of data exchange is updated as shown in the following processing period UOIJO N pue suomneoiunululo9 Ivo r c O o 3 i Primary period Motion control period Process data communications cycle for EtherCAT communications Sequence control period primary periodic task period or Basic I O Units periodic task period Special I O Units and CPU Bus Units CPU Unit Execution of user program in PLC Function Module Slaves Motion control processing by MC Function Module Processing in slave Sequence control period Motion control period Communications cycle Data refresh
120. place Move the sliders toward the back until they lock into place Sjueuoduio 1ejjoguo Bunoeuuo2 e p It Precautions for Correct Use EI EU MHEE ERN The sliders on the tops and bottoms of the Power Supply Unit CPU Unit I O Units Special UO Units and CPU Bus Units must be completely locked until they click into place after connecting Icons indicate the adjacent Unit connectors precautions additional information or reference information Special information en M a n u al n am e NJ series CPU Unit Hardware User s Manual W500 This illustration is provided only as a sample It may not literally appear in this manual Special Information Special information in this manual is classified as follows Precautions for Safe Use Precautions on what to do and what not to do to ensure safe usage of the product V Precautions for Correct Use Precautions on what to do and what not to do to ensure proper operation and performance EN Additional Information Additional information to read as required This information is provided to increase understanding or make operation easier Note References are provided to more detailed or related information NJ series CPU Unit Motion Control User s Manual W507 Manual Structure Precaution on Terminology In this manual download refers to
121. position to 2000 WE 33 d Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 sAXIS REF This is the Axis Variable for axis O MC Axis000 MFaultL vl Active BOOL FALSE TRUE when there is a minor fault level error for axis O MC Axis000 Details Homed BOOL FALSE TRUE when home is defined for axis O Pwr Status BOOL FALSE This variable is assigned to the Status output variable from the PWR instance of the MC Power instruction It is TRUE when the Servo is ON StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communications are active and normal ReExeSw BOOL FALSE This variable is used to re execute the instruc tion Mv_Abs_Ex BOOL FALSE This variable is used to execute the MC_MoveAbsolute Absolute Positioning instruction It is used in ST programming Hm_Ex BOOL FALSE This variable is used to execute the MC Home instruction It is used in ST programming e de eo O 2 Di 2 a 2 mE 2 D m D mE H O o mE o 2 oO lt JU Pp D X D O c o 2 O h Di 2 3 o mE c O Ee o 2 NJ series CPU Unit Motion Control User s Manual W507 10 35 10 Sample Programming I Timing Chart e Ladder Diagram Pwr Status le Hm D Hm Bsy MAbs ExT Pf Mv_Abs_D Mv Abs Bsy MEE RN Mv Abs Act TH ReExeSw NENNEN Command position Command veloc
122. positive limit input signal is not connected correctly or the logic setting for the positive limit input is wrong A negative limit input signal was detected The negative limit input signal is not connected correctly or the logic setting for the negative limit input is wrong The command current position was restricted so that the axis velocity of the slave axis would not exceed the axis maximum velocity for the specified travel distance Performance of slave axis posi tioning operation is poor and the actual motion is slower than the command The Servo was turned OFF for an axis due to an axes group error The ring counter setting in the Controller or the ring counter setting in the Servo Drive set tings was changed The position to restore when converted to pulses exceeded the range of signed 40 bit data NJ series CPU Unit Motion Control User s Manual W507 wea tee aes iis NN WW page 11 28 page 11 29 page 11 29 page 11 30 page 11 30 TEL WW HU i 11 Troubleshooting tee Home Unde fined during Coordinated Motion 64590000 hex Home of the logical axis became unde fined during axes group motion or while decelerating to a stop Servo Main The main circuit Circuit Power power of the Servo OFF Drive turned OFF while the Servo was ON An interrupt input was not received during execution of an MC MoveFeed Interrupt Feeding instruction 74210
123. program that will produce the intended device operation e Check the user program for proper execution before you use it for actual operation 10 1 1 Devices The following devices are used in the sample programming Device Servo configuration example CPU Unit NJ501 1 100 unit version 1 0 Power Supply Unit NJ Px3001 Servo Drive R88D KNL ECT version 2 1 Servomotor R88M KI Encoder Input Terminal GX EC0211 version 1 1 10 1 2 Installation and Wiring Refer to the following manual for details on installing and wiring the devices Device Manual CPU Unit and Power Supply Unit NJ series CPU Unit Hardware User s Manual Cat No W500 Servo Drive and Servomotor OMRON G5 series AC Servomotors Servo Drives with Built in EtherCAT Communications User s Manual Cat No 1576 Encoder Input Terminal GX series EtherCAT Slave User s Manual Cat No W488 EtherCAT communications cables GX series EtherCAT Slave User s Manual Cat No W488 10 2 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o o 10 1 3 Setup SE Refer to the following manual for details on settings k S so Setup Manual 3 5 Controller Setup NJ series CPU Unit Software User s Manual Cat No W501 Ze Motion Control Setup 3 2 Axis Setting Procedure 5 2 Axis Parameters and A 1 Connecting the Servo Drive in this manual Servo parameters OMRON G5 series AC Servomotors Servo Drives with Built in EtherCAT Com munications User s Ma
124. series CPU Unit Motion Control User s Manual W507 10 Sample Programming e Variable name Datatype Default Comment m StartPg BOOL FALSE When StartPg is TRUE the Servo is turned 2 ON if EtherCAT process data communica y tions are active and normal e Gearin Ex BOOL FALSE This variable is used to execute the WE MC Gearln Start Gear Operation instruc S 3 Lamm Ex BOOL FALSE This variable is used to execute the MC Camln Start Cam Operation instruc Combine Ex This variable is used to execute the MC CombineAxes Combine Axes instruc tion 2 1 The array elements ARRAY O N are set with the Cam Editor in the Sysmac Studio The range of the array is O to 109 in this sample 2 The variable is used in ST programming sch Ge NO et LO C o 2 Di eO Di 3 U O Zh D O c M lt D mE O O O my D O p mE 2 D LD lt 2 O CD mE Di U O e E O 2 NJ series CPU Unit Motion Control User s Manual W507 10 55 10 Sample Programming f Timing Chart amp 1 8 e Ladder Diagram VEL Vive M a GEARIN GEARIN Execute MN EE Gearin_InGear a Gearin_Bsy MN EE Gearin Act a CAMIN CAMIN Execute B e Camin InCam MEUM Camin InSync S S Camin_Bsy X4 Camin Ac NNI NK COMBINE COMBINE Execute rs Combine Bsy NNNM ee Combine Act Od Position ac MC Axis000 MC_Axis001 MC_Axis002 MC Axis003 Time 10 56 NJ series CPU Unit
125. some of the input signals and functions of the Servo Drives Servo Drive signal wiring and object setting are required to use the MC Function Module properly Refer to A 1 Connecting the Servo Drive for specific settings 3 16 NJ series CPU Unit Motion Control User s Manual W507 3 Configuring Axes and Axes Groups 3 3 Axes Groups This section describes the axes groups of the MC Function Module 3 3 1 Introduction to Axes Groups Use axes groups to perform complex operations on multiple axes such as linear or circular interpola tion An axes group consists of multiple axes Use the Sysmac Studio to set Axes Group Variables to enable execution of axes group motion control instructions or to enable access of the status of the axes group The MC Function Module can handle up to 32 groups The specifications for axes groups are shown in the following table do gt x N Q Oo c e 0 Item Specification Number of axes groups 32 groups max Number of composition axes 4 axes max per axes group The following elements are related to the axes groups of the MC Function Module Axes group parameters The axes group parameters set the maximum interpolation veloc ity maximum interpolation acceleration deceleration and other items for the axes groups controlled by the MC Function Module Use the Sysmac Studio to set the axes group parameters Axes Group Variable Axes Group Variables are system defined variables that inclu
126. status of process data communications of axis 0 is checked to see if communications are active and normal StartPg _EC_PDSlavTbl MC_Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress Lock The Servo for axis O is turned ON if process data communications for axis O are active and normal Lock MC Axis000 Pwr Status Pwr Bsy Pwr Err Pwr ErrlD 10 20 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o If a minor fault level error occurs for axis O the error handler for the device FaultHandler is executed e Program the FaultHandler according to the device 7 Oo MC Axis000 MFaultLvl Active FaultHandler y EN FaultHandler ZS og 53 o3 o gt o qc If the Servo is ON for axis O and home is not defined the MC Home instruction is executed for axis O Pwr Status MC Axis000 Details Homed MC Axis000 Axis Axis Execute Done Busy Hm Bsy CommandAborted Hm Ca Error Hm Err ErrorlD Hm_ErrlD r After homing is completed for axis 0 the MC_MoveAbsolute Absolute Positioning instruction is executed MV_ABS MC_MoveAbsolute m D MC_Axis000 Axis _ Axis Mv_Abs_D H Execute Done LREAL 10000 0 Position Busy Mv Abs Bsy LREAL 500 0 Velocity Active Mv_Abs_Act LREAL 500 0 Acceleration CommandAborted Mv_Abs_Ca LREAL 500 0 Deceleration Error Mv_Abs_Err Jerk ErrorlD Mv Abs ErrlD eMC DIRECTIONz mcPositiveDirection
127. target position for relative or absolute positioning that exceeds this range A command position overflow or underflow observation will occur if this range is exceeded for operations that do not have a target position such as velocity control homing or torque control Command position output will continue but the actual position is not updated and will be fixed to either the upper limit or the lower limit While the value of the actual position is fixed you can execute commands and stop the axis with any operation that does not have a target position in the direction toward the linear range Any command that specifies a direction away from the range will cause an error on execution of the instruction The actual position does not update until the overflow or underflow status is cleared a 0x8000000000 0 Ox7FFFFFFFFF e Rotary Mode Infinite Length Axis Count value Ox7FFFFFFFFF Modulo maximum position Modulo minimum position 0x8000000000 This mode repeatedly counts with a ring counter for an infinite amount within the set range Use this mode for rotary tables or winding shafts Use the Sysmac Studio to set the modulo maximum position and the modulo minimum position to define the range of the ring counter The setting range when the value is converted to pulses is 40 bits signed integer Ox8000000000 to OX7FFFFFFFFF 0 NJ series CPU Unit Motion Control User s Manual W507 5 Motion Control Paramet
128. that is given for individual errors i Controller Error Descriptions The items that are used to describe individual errors events are described in the following copy of an error table Event name Meaning Source Error attributes Effects Indicators System defined variables Cause and cor rection Attached information Precautions Remarks Gives the name of the error Gives the code of the error Gives a short description of the error Tells when the error is detected Detection timing Gives details on the source of the error Gives the source of the error Source details Tells the level of Gives the recov Tells which log influence on con ery method 2 the error is saved trol in 3 Recovery Log category Provides special information on the operation that results from the error Tells what will hap pen to execution of the user pro User program Operation gram 4 Gives the status of the built in EtherNet IP port and built in EtherCAT port indicators Indicator status is given only for errors in the EtherCAT Master Function Module and the EtherNet IP Function Module Data type Name Lists the variable names data types and meanings for system defined variables that provide direct error notification that are directly affected by the error or that contain settings that cause the error Correction Prevention Lists the possible causes corrections and preventive mea
129. the operating mode changes from RUN to PROGRAM mode the output variable Command Aborted from the current motion control instructions change to TRUE e The save process will continue during a save for the MC SaveCamrTable Instruction 9 6 5 Overrides for Multi axes Coordinated Control You can use the MC_GroupSetOverride Set Group Overrides instruction to set override factors for multi axes coordinated control of the axes group in the current interpolation operation The velocity override factor is set as a percentage of the target velocity for interpolation It can be set between 0 and 500 If an override factor of 0 is set for the interpolation target velocity operating status will con tinue with the axis stopped at a velocity of 0 The set override factor is read as long as the overrides are enabled If the overrides are disabled the override factors return to 10096 If the maximum interpolation velocity is exceeded when an override factor is changed the maximum interpolation velocity for the axes group is used NJ series CPU Unit Motion Control User s Manual W507 9 51 P o c D x 0 O o o 2 3 D D 2 O fe 5 e JOJJUOD PS JCUIPJOOD Sexe n n N 10 SepJJoAQ G 9 6 9 Motion Control Functions Overrides for the MC MoveLinear Linear Interpolation Instruction An example of a time chart for using the Set Override Factors instruction for the MC MoveLinear Linear Interpolation instruct
130. the EtherCAT slave that is allo axis with an error and operations Error cated to an axis in the Motion other than error resets are not Control Function Module acknowledged 2 Slave Error 742F 0000 hex An error was detected in an The Servo is turned OFF for the Detected EtherCAT slave that is allocated axis with an error and operations to an axis in the Motion Control other than error resets are not Function Module acknowledged 1 When an error occurs in communications with an EtherCAT slave an error also occurs in the EtherCAT Master Function Module 2 When an error occurs in slave communications home becomes undefined for the axis 11 8 NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting H Servo Drive Errors This section describes the notification that is provided for errors that occur in OMRON G5 series Servo Drives There is a difference between the timing of when the Motion Control Function Module detects the error in the Servo Drive and when the error code is obtained from the Servo Drive The Motion Control Func tion Module therefore reports different events for the error in the Servo Drive and the error code e Error Notification When the Motion Control Function Module detects an error a Slave Error Detected minor fault level error 742F0000 hex occurs At this point the Motion Control Function Module performs the error operation e it turns OFF the Servo 5 sch L zech o
131. the conditions rect that are given as causes exist in Correct the installation locations of The axis stops with the stop method for the homing execu tion status Name advance the limit sensors so that they do not turn ON at the same time Correct the contact logic N C N O of the limit signal NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Event name Home Proximity Homing Opposite Direction Limit Input 74270000 hex Detected Meaning The home proximity input and the limit signal in the direction opposite to the homing direction were detected during a homing operation Source Motion Control Function Module Source details Axis Detection During instruc timing tion execution Error attributes Leg o Minor fault Log category System Effects The axis stops with the stop method for the homing execu tion status variables MC AX MFaultLvl Active BOOL Axis Minor Fault Occurrence eolit seti The wiring of the home proximity sig Correct the wiring of the home prox Check to see if any of the conditions nal or limit signal is incorrect imity signal or limit signal that are given as causes exist in I N zi Oo c za 0 gt O Oo m 5 The home proximity sensor or limit Correct the installation location of the advance E sensor is installed in the wrong loca home proximity sensor or limit sensor o tion so that they do not turn ON at the m same time
132. the homing velocity is used without an acceleration curve Homing Deceleration Set the homing deceleration rate in command units per seconds squared command units s If the homing deceleration is set to 0 the velocity goes to O without a deceleration curve I Homing Jerk Set the homing jerk in command units per seconds cubed command units s3 If the homing jerk is set to 0 acceleration and deceleration are performed without jerk qp N zL O 3 3 U O Q D Q c C I Home Input Signal In a Homing Method that uses a home input signal select either the Z phase signal of the Servo Drive or an external home signal as the signal to define home sJojeurejeg Duo ues L Z 8 la Precautions for Correct Use This parameter can be used to set a home input signal only when you are connected to an OMRON G5 series Servo Drive NJ series CPU Unit Motion Control User s Manual W507 8 9 8 Homing 8 2 2 Monitoring the Homing Operation You can read Axis Variables in the user program to monitor the homing status and the input signal sta tus Variable name me Meaning Function type MC AX 0 63 Status Homing audi TRUE when homing for the MC Home AER MC AX 0 63 Dtails Homed m Home Defined TRUE when home is defined FALSE Home not defined TRUE Home is defined MC AX 0 63 Dtails InHome BOOL In Home Posi TRUE when the axis is in the range for tion home It gives an AND of the follow
133. tions are active and normal Camin_Ex BOOL FALSE This variable is used to execute the MC Camln Start Cam instruction It is used in ST programming Vel Ex BOOL FALSE This variable is used to execute the MC MovevVelocity Velocity Control instruc tion It is used in ST programming Phasing Ex BOOL FALSE This variable is used to execute the MC Phasing Shift Master Axis Phase instruction It is used in ST programming The array elements ARRAY O N are set with the Cam Editor in the Sysmac Studio The range of the array is O to 360 in this sample 10 64 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o d m m D I Timing Chart p O D e Ladder Diagram StartOn 35 2a MC Phasing PHASINGExecue ff Phasing Bsy Phasing Act Phasing D uu up o MC MovevVelocity VELExecute fo Ve ne le MC Camin CAMIN Execute Camin InCam ch Es ho un B CD 2 ul 2 D U 2 Q o D o A fb lt D o em D nn 2 A o 5 C o I o o 2 Camin InSync Camin Bsy Command velocity MC Axis000 u JAA Time NJ series CPU Unit Motion Control User s Manual W507 10 65 10 Sample Programming e ST Programming StartOn MC Phasing Phasing Ex Phasing Bsy Phasing Act Phasing D MC MovevVelocity Vel Ex Vel InVel MC Camin Camin Ex Camin InCam Camin InSync Camin Bsy Command ve
134. to TRUE Error Deceleration In this state the Servo is ON for the axis and an axis error has occurred This Stopping includes during execution of the MC ImmediateStop Immediate Stop instruc tion and during a deceleration stop for an axis error It is not possible to execute axis operation commands in this state The instruction will enter the aborted CommandAborted TRUE status if executed Homing In this state home is being searched for by the MC Home instruction Coordinated Motion In this state the axis is being controlled by an instruction for an axes group command In this state the axis is in motion for an axes group state of Group Moving GroupStopping or GroupErrorStop Note Axis status can be monitored in the member variables of the Axis Variables MC AX O Status to MC AX 63 Status NJ series CPU Unit Motion Control User s Manual W507 6 5 p do o D D zl D 5 o Oo 5 D SOJEIS SIXV c 9 6 Motion Control Programming 6 3 3 Axes Group States The operation of an axes group when motion control instructions are executed for it is shown in the fol lowing figure Moving Moving MC GroupStop Deceleration Stopping Stopping MC GroupEnable Axes Group Disabled Stopped 6 Disabled e Standby MC GroupDisable 5 1 The Moving state is entered for any axes group motion control instruction 2 The ErrorStop state is entered from any other state It is e
135. to define home e Proximity reverse turn home proximity input OFF e Proximity reverse turn home proximity input ON e Home proximity input OFF e Home proximity input ON e Limit input OFF e Proximity reverse turn home input mask distance e Limit inputs only e Proximity reverse turn holding time e No home proximity input holding home input e Zero position preset For details refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 Operation Selection at Positive Limit Input and Operation Selection at Negative Limit Input e You can set the stopping method when the limit input in the motion direction turns ON during homing e The stopping method depends on the limit input stop method e The limit input setting in the direction of motion is enabled It is also enabled during motion at homing velocity or homing approach velocity e f you set reversing in the limit input settings an error stop will occur if the limit input signal in the home input detection direction turns ON at homing approach velocity However this does not apply in operation modes in which the home proximity signal is not used e An error will occur and operation will stop if you set reversing for the limit input operations in both directions and the home input signal cannot be detected after moving from the limit input position opposite to the home input detection direction to the other limit input position NJ series CPU Unit Motion C
136. used as the command velocity if you specify a velocity command value that is greater than the maximum jog velocity 8 Refer to 9 5 6 Re executing Motion Control Instructions and 9 5 7 Multi execution of Motion Control Instruc tions Buffer Mode for details on the Operation Selection at Reversing parameter 5 2 5 Other Operation Settings 5 12 These parameters are used to set the stopping methods and torque limits to use when the input sig nals are enabled Immediate Stop Input Stop Method Limit Input Stop Method Drive Error Reset Monitoring Time Set the stopping method in the MC Function Module 0 2 or 3 0 when the immediate stop input is enabled 0 Immediate stop 2 Immediate stop and error reset 3 Immediate stop and Servo OFF Set the stopping method in the MC Function Module 0 to 3 0 2 when the positive limit input or negative limit input is enabled 0 Immediate stop 1 Deceleration stop 2 Immediate stop and error reset 3 Immediate stop and Servo OFF Set the monitor time for a drive error reset Unit ms 1 to 1 000 00 After the monitor time has elapsed reset processing will end even if the drive error is not yet reset NJ series CPU Unit Motion Control User s Manual W507 5 Motion Control Parameters Maximum Positive Set the maximum value of the positive torque limit 0 0 to 1000 0 300 0 Torque Limit Unit 96 Maximum Negative Set the maximum value of the negative torque limi
137. v 60FDh 00 1 Digital inputs 29 Negative limit switch Node 10 Device R88D KNO1L ECT CH1 v 60FDh 00 0 Digital inputs 30 Immediate Stop Input Node i0 Device R88D KNO1L ECT CHI v 60FDh 00 25 Digital inputs 32 Encoder Phase Z Detection Node 10 Device R88D KNO1L ECT CH1 v 60FDh 00 16 Digital inputs 33 Home switch Node 10 Device R88D KNO1L ECT CH1 v 60FDh 00 2 Digital inputs 37 External Latch Input 1 Node 10 Device R88D KNO1L ECT CH1 v 60FDh 00 17 Digital inputs 38 External Latch Input 2 Node 10 Device R88D KNO1L ECT CH1 v 60FDh 00 18 Digital inputs EN Additional Information If you use the recommended Servo Drives OMRON R88D KNLILILI ECT version 2 1 or higher then it is not necessary to change the default relationships between MC Function Module func tions and the PDOs on the Sysmac Studio Output Settings Controller to Servo Drive The input settings apply to the command data that is sent from the MC Function Module to the Servo Drive The default settings in the Sysmac Studio are listed in the following table Required objects are marked with a star Function name Description Control word 6040 hex 00 0 Controlword This data is used to control the status of the Servo Drive Set 6040 hex Controlword Target position 607A hex 00 0 Target posi The target position for position control tion Set 607A hex Target position Target velocity 60FF hex 00 0 Target veloc The target velocity for velocity c
138. variable names The Axes Group Variable name in the system defined variables and the Axes Group Variable that is assigned when the axes group is added on the Sysmac Studio The Axes Group Variable names in the system defined variables are MC GHP O to MC GHP S1 When you add axes groups on the Sysmac Studio MC_Group000 to MC GroupOS31 are set by default for MC GRP O to MC GHP S81 The numbers are assigned in the order that the axes are added You can change each of these Axes Group Variable names as required from the Sysmac Studio You can use either the Axes Group Variable names for the system defined variables or the Axes Group Variable names that are set on the Sysmac Studio to specify the Axes Group Variables in the user program e do gt x N Q Oo c e 0 Axes Group Variable name in the system defined variables AT speci fication in global variable table _MC_GRP 0 MC_Group000 Axes group 0 _MC_GRP 1 MC_Group001 Axes group 1 _MC_GRP 81 MC_Group031 Axes group 31 An error will occur if you change the names in the AT column in the global variable table on the Sysmac Studio Default Axes Group Variable name when Axes group number axes group is added on Sysmac Studio example SOIOGUGA dnoiy sexy oj uononpoJg lu 8 8 6 NJ series CPU Unit Motion Control User s Manual W507 3 19 3 Configuring Axes and Axes Groups 3 20 Names MC GRP O _MC_GRP 0 Status _MC_GRP 0 Cmd _MC_GRP 0 Cmd Vel
139. velocity e When a Reverse Turn Occurs for the New Command Value Decelerating to a Stop after Reverse Turn Stopping Immediately after Reverse Turn Velocity Velocity Command re executed Command re executed ees If the travel distance upon reverse turn is small triangular control is performed as it was for the first execution of the 4 Jinitial command position instruction TExecuted TNew command TExecuted Initial TNew command position command position position If the instruction is re executed If the travel distance upon reversal If the instruction is re executed during during acceleration the axis is small triangular control is acceleration or deceleration the axis starts deceleration as soon as performed as it was for the first stops immediately upon re execution the instruction is re executed execution of the instruction This also occurs during deceleration e Triangular Control Patterns The triangular control shown in the figure below may result if the travel distance is shortened due to a change in the target position No Reverse Turn Velocity Command re executed Executed T New command Initial command position position e Excessive Deceleration Patterns In the following case priority is given to stopping at the target position Therefore the deceleration rate will exceed the specified deceleration rate If the deceleration rate exceeds the rate that is set in the
140. will occur if the software limits are enabled for the command position and the com mand position leaves the range e An axis error will occur if the software limits are enabled for the actual position and the actual posi tion leaves the range EN Additional Information Software limits can be enabled when the Count Mode is set to Linear Mode and home is defined Software limits are disabled in the following situations no matter what axis parameters have been set e When Count Mode is set to Rotary Mode e When home is not defined e During homing For details on writing MC settings refer to the MC Write Write MC Setting instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 9 8 6 Following Error Monitoring Following error is the difference between the command position and the actual position of an axis The MC Function Module monitors the following error every motion control period If the value of the following error exceeds the Following Error Over Value that is set in the axes parame ters Following Error Limit Exceeded minor fault level error occurs If it exceeds the Following Error Warning Value a Following Error Warning observation occurs Monitoring the following error is disabled during execution of the holding operation for homing e Axis Parameters That Are Related to Monitoring the Following Error You can set the check values for monitoring the following error by setting the appropr
141. 0 Enable Pwri_En Status gt Pwr1 Status Busy gt Pwrl Bsy Error gt Pwr1 Err ErrorlD gt Pwr1 Ei NJ series CPU Unit Motion Control User s Manual W507 10 61 10 Sample Programming 10 62 MC Power for axis 3 PWR4 Axis MC Axis003 Enable Pwr4 En Status gt Pwr4 Status Busy gt Pwr4 Bsy Error gt Pwr4 Err ErrorlD gt Pwr4 ErrlD MC Home for axis 0 HM1 Axis Execute Done Busy CommandAborted Error ErrorlD MC_Home for axis 3 HM4 Axis Execute Done Busy CommandAborted Error ErrorlD MC_MoveVelocity VEL Axis Execute Velocity Acceleration Deceleration Direction InVelocity Busy Active CommandAborted Error ErrorlD MC_CamIn CAMIN Master Slave CamTable Execute Periodic StartMode StartPosition MasterStartDistance MasterScaling SlaveScaling MasterOffset SlaveOffset Reference Type Direction InCam MC Axis000 Hm Ex gt Hm D gt Hm1 Bsy gt Hm1 Ca gt Hm Err gt Hm1 ErrlD MC Axis003 Hm4 Ex gt Hm4 D gt Hm4_Bsy gt Hm4_Ca gt Hm4_Err gt Hm4_ErrlD MC Axis000 Vel Ex Vel Vel Vel Acc Vel Dec Vel Dir Vel Invel gt Vel Bsy Vel Act gt Vel Ca Vel Err gt Vel El MC Axis000 MC_Axis002 CamProfileO Camin_Ex Gamm Em Camin Sm Camin Sp Camin Me
142. 0 Disabled 0 Disabled 1 Deceleration stop for command position 2 Immediate stop for command position 3 Deceleration stop for actual position 4 Immediate stop for actual position Positive Software Set the software limit in the positive direction Long reals 2 147 483 647 Limit The unit is command units Negative Software Set the software limit in the negative direction 2 147 483 648 Limit The unit is command units You can set the above axis parameters from the Sysmac Studio or by using the MC Write Write MC Setting instruction If any setting values are changed for an axis or axes group in operation those settings are enabled when the next operation begins Software limits function in the following two cases based on the axis operation state and the motion control instruction that is used e Executing Motion Instructions e When the Actual Position Is within the Software Limits An instruction error will occur if the target position is outside the software limit range e When the Actual Position Is outside the Software Limits Motion is allowed only toward the software limit range As long as the motion is toward the range the target position does not need to be within the software limit range e During Axis Motion When the axis is in discrete motion synchronized motion continuous motion or coordinated motion NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions e An axis error
143. 0 0 Deceleration CommandAborted Vel_Ca LREAL 100 0 Jerk Error Vel_Err Direction ErrorlD Vel ErrlD Continuous BufferMode If StartSetPos is TRUE while the Servo is ON the Set Position instruction is executed SET POS MC SetPosition Pwr Status StartSetPos MC Axis000 j Axis set PosD H Done LREAL 0 0 Busy Set_Pos_Bsy ReferenceType CommandAborted Set_Pos_Ca Relative Error Set_Pos_Err ExecutionMode ErrorlD Set_Pos_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 75 10 Sample Programming i ST Programming If the input parameters for the instructions are not set the target values and other parameters are set IF InitFlagZFALSE THEN The input parameters for the MC MoveVelocity Velocity Control instruction are set Vel Vel LREAL 36 0 Vel Acc LREAL 1000 0 Vel Dec LREAL 1000 0 Vel Jrk z LREAL 100 0 The input parameters for the MC SetPosition instruction are set Set Pos Pos LREAL 0 0 The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag Z TRUE END IF When StartPg is TRUE the Servo is turned ON for axis O if process data communications for axis O are active and normal f process data communications are not active the Servo is turned OFF IF StartPg TRUE AND EC PDSIlavTbI MC Axis000 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwr_En TRUE ELSE Pwr_En FALSE END_IF f a minor
144. 0 73 10 Sample Programming e ST Programming MC MoveVelocity Vel Ex Ve InVel Vel Bsy MC_SetPosition oet Pos Ex Set Pos D Set_Pos_Bsy BN MC Axis000 Command current velocity Command current position Actual current position Time 10 74 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming S N e D I Ladder Diagram D Oo ug When StartPg is TRUE the status of process data communications of axis 0 is checked to see if communications are active and normal 2 StartPg EC PDSlavTbI MC_Axis000 Cfg NodeAddress _EC_CommErrTbl MC_Axis000 Cfg NodeAddress Lock E eg 3 EE odo The Servo for axis 0 is turned ON if process data communications for axis O are active and normal MC Power Axis Pwr Status Status Busy Pwr Bsy Error Pwr Err ErrorlD Pwr_ErrlD If a minor fault level error occurs for axis 0 the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler If the Servo is ON for axis O velocity control is executed MC Axis000 MFaultLvl Active MC MoveVelocity Pwr Status MC Axis000 Axi Axis MEL IIR ch EN is ch Cc 2 Q 2 e 2 e r 2 D 2 O m C U O o o 2 Q c E 2 e a o O m lt O 2 r InVelocity LREAL 36 0 i Busy Vel_Bsy LREAL 1000 0 Acceleration Active Vel_Act LREAL 100
145. 000 0 Velocity Active Mv Abs Act LREAL 2000 0 Acceleration CommandAborted Mv_Abs_Ca LREAL 2000 0 Deceleration Error Mv_Abs_Err Jerk ErrorlD Mv_Abs_ErrlD eMC_DIRECTION _mcPositiveDirection Direction BufferMode If the command position for axis 0 is 5000 or less CamTable0 is changed to TRUE and CamTable7 is changed to FALSE If itis over 5000 CamTableO is changed to FALSE and CamTable7 is changed to TRUE IF MC Axis000 Cmd Pos LREAL45000 0 THEN CamTable0 BOOL TRUE CamTable1 BOOL FALSE CamTable0 BOOL FALSE CamTable1 BOOL TRUE If CamTableO is TRUE during absolute positioning then the instance that uses CamProfileO for the cam table is executed If InCam is TRUE then Execute is changed to FALSE CamTableO SkipCamTableO gt Mv Abs Act CamTableO Camin InCamO Lock3 10 48 NJ series CPU Unit Motion Control User s Manual W507 MC Axis000 MC Axis001 Lock3 CamProfileO BOOL TRUE eMC STARTMODEZ mcAbsolutePosition LREAL 1 0 LREAL 1 0 LREAL 1 0 LREAL 1 0 LREAL 0 0 LREAL 0 0 eMC REFERENCE TYPE 4 mcCommand eMC DIRECTION mcNobDirection 10 Sample Programming MC Camiln Master Slave CamTable InCam InSync EndOfProfile Index Busy Active CommandAborted Error ErrorlD Master Slave CamtTable Execute Periodic StartMode StartPosition MasterStartDistance MasterScalling SlaveScalling MasterOffset SlaveOffset Reference Type Direction CamtT
146. 000 hex 74230000 hex Interrupt Feeding Interrupt Sig nal Missing 74240000 hex Homing Opposite Direction Limit Input Detected The limit signal in the direction oppo site to the homing direction was detected during a homing operation 74250000 hex Homing Direction Limit Input Detected The limit signal in the homing direc tion was detected during a homing operation 74260000 hex Homing Limit Inputs The limit signals in both directions Detected in were detected dur Both Direc ing a homing opera tions tion NJ series CPU Unit Motion Control User s Manual W507 e The command position or page 11 32 actual position overflowed or underflowed for a logical axis in an axes group motion or a logi cal axis that was decelerating to a stop and the home definition was lost A slave communications error occurred for a logical axis and home became undefined during axes group motion or while decelerating to a stop A slave for a logical axis left the network and home became undefined during axes group motion or while decelerating to a stop The main circuit power of the Servo Drive was interrupted while the Servo was ON IE i The latch enabled range speci d page 11 33 fication is invalid There is a problem with the wir ing of the interrupt signal The sensor that outputs the interrupt signal has failed The Operation Selection at d page 11 33 Negative Limit Input or Opera tio
147. 1 Ca gt Hm Err gt Hm1 ErrlD MC Axis001 Hm2 Ex gt Hm2 D gt Hm2 Bsy gt Hm2 Ca gt Hma2 Err gt Hm2_ErrlD NJ series CPU Unit Motion Control User s Manual W507 VEL Axis Execute Velocity Acceleration Deceleration Direction In Velocity Busy Active CommandAborted Error ErrorlD MC_Phasing PHASING Master Slave Execute PhaseShift Velocity Acceleration Deceleration Done Busy Active CommandAborted Error ErrorlD MC_CamIn CAMIN Master Slave CamtTable Execute Periodic StartMode StartPosition MasterStartDistance MasterScaling SlaveScaling MasterOffset SlaveOffset Reference Type Direction InCam InSync EndOfProfile Index Busy Active CommandAborted Error ErrorlD 10 Sample Programming MC Axis000 Vel Ex Vel Vel Vel Acc Vel Dec Vel Dir Vel Invel Vel Bsy Vel Act gt Vel Ca Vel Err gt Vel Ermi MC Axis000 MC_Axis001 Phasing Ex Phasing Ps Phasing Vel Phasing Acc Phasing Dec gt Phasing D gt Phasing Bsy Phasing Act gt Phasing Ca Phasing Err gt Phasing_ErrlD MC_Axis000 MC Axis001 CamProfileO Camin Ex Camin Em Camin Sm Camin_Sp Camin Med Camin Ms Camin Ss Camin Mo Camin_So Gamm Ht Camin Dir gt
148. 1 MC Axis002 MC Axis003 Axis type Virtual servo axis Servo axis Main Variables Used in the Programming Samples Variable name Data type Default Comment MC Axis000 SAXIS REF Thisis the Axis Variable for axis 0 MC Axis000 Details Homed FALSE TRUE when home is defined for axis 0 MC Axis000 MFaultLvl Active BOOL TRUE when there is a minor fault level error for axis O MC Axis001 sAXIS REF This is the Axis Variable for axis 1 MC Axis001 MFaultLvl Active BOOL TRUE when there is a minor fault level error for axis 1 MC Axis002 sAXIS REF This is the Axis Variable for axis 2 MC Axis002 MFaultLvl Active BOOL TRUE when there is a minor fault level error for axis 2 MC Axis003 sAXIS REF This is the Axis Variable for axis 3 MC Axis003 Details Homed FALSE TRUE when home is defined for axis 3 MC Axis003 MFaultLvl Active TRUE when there is a minor fault level error for axis 3 CamProfileO ARRAY 0 109 OF I This is the cam data variable SsMC CAM REF Pwr1 Status BOOL FALSE This variable is assigned to the Status output variable from the PWR1 instance of the MC Power instruction It is TRUE when the Servo is ON F Pwr4_Status BOOL ALSE This variable is assigned to the Status output variable from the PWR4 instance of the MC Power instruction It is TRUE when the Servo is ON Vel InVel BOOL FALSE TRUE when the target velocity for MC Movevelocity for axis O is reached NJ
149. 1 MFaultLvl Active FALSE TRUE when there is a minor fault level error for axis 1 MC Axis001 Details Homed FALSE TRUE when home is defined for axis 1 Pwr1 Status This variable is assigned to the Status output variable from the PWR1 instance of the MC Power instruction Itis TRUE when the Servo is ON Pwr2 Status BOOL FALSE This variable is assigned to the Status output variable from the PWR2 instance of the MC Power instruction Itis TRUE when the Servo is ON FALSE This variable is assigned to the CommandAborted output variable from the GRP EN instance of the MC GroupStop instruction FALSE This variable is assigned to the Error output variable from the GRP EN instance of the MC GroupStop instruction FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communications are active and normal FALSE This variable gives the status of the external button that is used to stop The MC GroupStop instruction is executed to stop the axes group if this variable is TRUE FALSE TRUE if the input parameters are set for the MC MoveLinearAbsolute and MC GroupStop instructions FALSE This variable is used to execute the GRP EN instance of the MC GroupEnable instruction It is used in ST programming FALSE This variable is used to execute the MV LIN ABS instance of the MC MoveLinear instruction It is used in ST programming FALSE This variable is used to execute the GRP STP instance of the MC GroupStop ins
150. 10 uer 7 6 NJ series CPU Unit Motion Control User s Manual W507 9 55 9 Motion Control Functions 9 7 4 Re executing Motion Control Instructions for Multi axes Coordinated Control If you re execute a linear interpolation or circular interpolation instruction an instruction error will occur Execute Busy Hee Active xq l1 Done CommandAborted i Error MEN Interpolation velocity Time You can change the deceleration rate if you re execute the MC_GroupStop instruction but you cannot change the jerk in this way If you re execute the MC GroupReset instruction the re execution command will be ignored and error reset processing will continue For details on re executing motion control instructions refer to each instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 9 7 5 Multi execution Buffer Mode of Motion Control Instructions for 9 56 Multi axes Coordinated Control You can perform multi execution for multi axes coordinated control in axes groups the same way as you can for axis operations You can perform path control for multiple continuous lines and or arcs if you use Buffer Mode under multi axes coordinated control Linear interpolation 1 3 5 and 7 Circular interpolation 2 4 and 6 Point A You can set the BufferMode input variable to motion control instruction to select one of the same Buffer Modes as are supported for singl
151. 15 6 Motion Control Programming i Data Types Used for System defined Variables for Motion Control System defined variables for motion control use both basic data types and derivative data types e Basic Data Types Category Data type Size Range of values Notation Boolean BOOL TRUE or FALSE TRUE or FALSE Integer UINT 0 to 465 535 Binary expression 2 is added to the UDINT 4 0 to 4 294 967 295 front of the number Octal expression 8 is added to the front of the number Decimal expression 10 is added to the front of the number Hexadecimal expression 16 is added to the front of the number If you do not add any notation to the beginning of a number that number is treated as a decimal number Example Binary Notation 2941111 1111 2141110 0000 Octal Notation 04377 8 340 Decimal Notation 12 0 123 456 986 10211234 Hexadecimal Notation 16 FF 164ff 16 E0 16 e0 Floating LREAL 1 79769313486231e 308 to Written as sign integer part point 2 22507385850720e 308 decimal point decimal part expo numbers 0 nent You can omit items in parentheses 1 79769313486231 er 308 2 positive infinity or negative infinity 12 0 0 0 0 4560 3 14159_26 1 34E 12 1 34e 12 1 0E 6 1 0e 6 1 234E6 1 234e6 BOOL data is only 1 bit in size but it takes up 2 bytes of memory 6 16 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming e Derivative Data
152. 1576 for the setup procedure la Precautions for Correct Use After the absolute encoder is set up the power supply to the OMRON Gbs5 series Servo Drive must be cycled When setup processing for the absolute encoder is completed an Absolute Value Clear Error A27 1 will occur in the Servo Drive Cycle the control power supply to the Servo Drive to clear this error and complete the absolute encoder setup procedure Using an Absolute Encoder in Rotary Mode If you set the Count Mode axis parameter to Rotary Mode the actual position will be a ring shaped counter in the range between the modulo maximum position setting value and the modulo minimum position setting value When using an absolute encoder in Rotary Mode the absolute encoder home offset is automatically calculated and updated in the MC Function Module each motion control period The updated absolute encoder home offset is automatically saved to the battery backup memory in the CPU Unit when the power supply to the Controller is turned OFF This enables recovering the actual position of a rotating axis from the absolute encoder the next time power is turned ON even if the power to the CPU Unit or Servo Drive is turned OFF NJ series CPU Unit Motion Control User s Manual W507 8 Homing 8 5 High speed Homing This function performs quick positioning to the home Home is defined in advance Use the MC_MoveZeroPosition High speed Homing instruction and specify the target velocity
153. 2 O1JUOD uono N 10 sejqeueA peurjep uejs S Jo Sale 9 9 6 Motion Control Programming Variable name Data type Meaning Function sGHOUP REF CMD Axes Group Command DATA Values Vel LREAL Command Contains the current value of the command Interpolation Velocity interpolation velocity The interpolation veloc ity is calculated from the difference with the interpolation command current position A plus sign is added during travel in the positive direction and a minus sign is added during travel in the negative direction The value is O when the axes group is disabled AccDec LREAL Command Contains the current value of the command Interpolation interpolation acceleration deceleration The Acceleration interpolation acceleration deceleration rate is Deceleration calculated from the difference with the com mand interpolation velocity A plus sign is added for acceleration and a minus sign is added for deceleration The value is 0 when the axes group is disabled or when the com mand acceleration deceleration rate of the current axes group motion instruction is O sSsMC REF EVENT Axes Group Minor Fault Active BOOL Axes Group Minor TRUE while there is an axes group minor fault Fault Occurrence Code WORD Axes Group Minor Contains the error code for an axes group Fault Code minor fault The upper four digits of the event code have the same value sMC HEF EVENT Axes Group Observa tion Active BOOL Axes Group O
154. 4 3 Relationship between Process Data Communications Cycle and Motion Control Period 2 13 NJ series CPU Unit Motion Control User s Manual W507 11 CONTENTS Section 3 Section 4 3 2 3 3 3 4 Section 5 4 1 4 3 12 5 1 5 2 5 3 Configuring Axes and Axes Groups yc m 3 2 3 1 1 NT ROCUIGTION elo AKO Sci bers TREE ETT ODE EM 3 2 3 1 2 Iritroguell nrte AXIS PararmelelS u E 3 3 3 1 3 Introduction to Axis Variables E 3 5 3 1 4 Specifying an Axis in the User brogram nennen nnn nnn 3 7 AXIS tute POCO E 3 8 3 2 1 Axis Contiguratdorn PFOGOdllG ise EE 3 8 3 2 2 OWING Gelee EE 3 8 AXES E TT MDC PEL UES 3 17 3 3 1 Introduction to Axes Groups 3 17 3 3 2 Introduction to Axes Group Parameters e eret e tees estar ENKEN dap ER 3 18 3 3 3 Introduction to Axes Group Vanables nennen 3 19 3 3 4 Specifying an Axes Group in the User brogram nennen 3 21 Setting Procedures for Axes Groups 111 eee ieee eere eee ee eene nennen nnn nana nana 3 22 3 4 1 Setting Procedure for an Axes Group 3 22 3 4 2 rsiulgreRadesozo h emer c p HO 3 22 Checking Wiring from the Sysmac Studio Functions Of the Sysmac Studio EE 4 2 4 1 1 MC Test RUN FUNCION rusia D 4 2 4 1 2 Application Procedi B usi cect csts Rie isa Ger csetonisea dee Ouen a Sev DEPT C
155. 8 6 22 Dico DISDIay tacta ie i asta tota oet IA le 5 8 6 22 V Vall Bun Bel EE 9 14 velocities TY DGS p pees a E 9 28 VEIOGILY CONVO EE 9 23 ee Re E 9 28 Velocity Warning Value sssssssss 5 11 virtual encoder axis een 3 2 5 6 virtual servo axis eeeeeenmH m 3 2 5 6 W Work Travel Distance Per Motor Rotation 5 8 6 22 Z Zero Position Range esee 5 12 SEENEN 9 67 NJ series CPU Unit Motion Control User s Manual W507 Index Index 7 Index Index 8 NJ series CPU Unit Motion Control User s Manual W507 Authorized Distributor
156. AL E aal new_NJ501_0 i e amp BCD Conversion a Lo gt Communications b Comparison gt Conversion gt Counter gt Data Movement b Data Type Conversion nb FCS b Ladder Tools gt Math b Motion Control b Other b SD Memory Card gt Selection l Sequence Control Wi N gt x o o D 5 U O D Q c D Creating the EtherCAT Network Configuration There are two methods to create an EtherCAT Network Configuration online and offline e Online Method 1 Double click EtherCAT in the Multiview Explorer The EtherCAT Edit Tab Page is displayed ejnpeoojgd Dunes Z Z 2 Select Online from the Controller Menu The Sysmac Studio goes online with the Controller 3 Right click the Master Icon in the EtherCAT Tab Page and select Compare and Merge with Actual Network Configuration from the menu All vendors A Configurations and Setup LO Groups Servo Drives Item name Todel roduct name lumber of Slaves gt 43 Motion Control Setup DO Communications Cycle Time amp Cam Data Settings otal Cable Length gt Event Settings ail soft Operation Setting I Task Settings Vait Time for Slave Startup E Data Trace Settings 3 DO communications timeout detection s p evision Check Method erial Number Check Method REED HOFF ECT GS Ses ial Numbers R88D KNOLL ECT Rev 2 1 RBSD KNO1L CT G5 Series ServoDrih ra R88D KN20F ECT Rev 2 1 Model
157. AT network configuration and Sysmac Studio are used for the MC Function Module e EtherCAT Network Configuration The MC Function Module performs control for Servo Drives and Encoder Input Terminals through the EtherCAT master port that is built into the CPU Unit The EtherCAT network configuration is used to perform precise motion control in a fixed period with very little deviation e Sysmac Studio The Sysmac Studio is connected to the peripheral USB port on the CPU Unit with a commercially available USB cable You can also connect it to the built in EtherNet IP port on the CPU Unit with Ethernet cable NJ series Controller Peripheral USB port Power Supply Unit T Unit TE i dl Wy KR Eaa Network Eaa ee e a S e n Built in EtherNet IP port EtherCAT EtherNet IP Built in EtherCAT port C Gef CR B B ET mu LuMHH 5 Ge D D Immediate stop input Home proximity input Home input G5 series Servo Drives with Built in ZE External latch input etc EtherCAT Communications ncoder Input Termina NJ series CPU Unit Motion Control User s Manual W507 1 3 1 Introduction to the Motion Control Function Module 1 3 Application Procedure This section provides the basic procedure to perform motion control with the MC Function Module I Basic Flow of Operation START Sysmac Studio Version 1 Operation Manual Setup Cat No W504 Create the Ethe
158. Address TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwri_En TRUE Turn ON the Servo for axis O E i co CD m O O 2 o 2 2 X D o Q m O c O 5 o O x Q 2 o m D o I O o 2 ELSE Pwr1 En FALSE Turn OFF the Servo for axis O END IF When StartPg is TRUE the Servo is turned ON for axis 1 if process data communications are active and normal f process data communications are not active the Servo is turned OFF IF StartPg ZTRUE AND EC PDSIavTbI MC AxisO01 Cfg NodeAddress TRUE THEN Pwr2_En TRUE Turn ON the Servo for axis 1 ELSE Pwr2_En FALSE Turn OFF the Servo for axis 1 END_IF f a minor fault level error occurs the error handler for the device FaultHandler is executed IF MC Axis000 MFaultLvl Active TRUE OR MC Axis001 MFaultLvl Activez TRUE OR MC_Group000 MFaultLvl Active TRUE THEN FaultHandler END IF If the Servo is ON for axis O and home is not defined the MC Home instruction is executed for axis O IF Pwr1 Status TRUE AND MC Axis000 Details Homed FALSE THEN Hm1_Ex TRUE END_IF If the Servo is ON for axis 1 and home is not defined the MC Home instruction is executed for axis 1 IF Pwr2_Status TRUE AND MC Axis001 Details Homed FALSE THEN Hm2_Ex TRUE END_IF NJ series CPU Unit Motion Control User s Manual W507 10 27 10 Sample Programming If home is defined for ax
159. B 4030 hex 02 0 Status Bits Store the current values from the counters Set the objects given at the left for each channel This is the latched position for latch 1 Store the values of latch positions A You must map these objects to use the touch probe function i e to use the MC TouchProbe Enable External Latch instruction Set the objects given at the left for each channel This is the latched position for latch 2 Store the values of latch positions B You must map these objects to use the touch probe function i e to use the MC_TouchProbe Enable External Latch instruction Set the objects given at the left for each channel Store the status bits You must map these objects to use the touch probe function i e to use the MC_TouchProbe Enable External Latch instruction Set the objects given at the left for each channel e f you change the settings make sure that the desired operations are performed for the MC Function Module and process data settings Digital Input Settings Settings are not required to use an encoder axis I Object Settings in the Encoder Input Terminals There are no objects that you must set at the Encoder Input Terminal NJ series CPU Unit Motion Control User s Manual W507 Appendices A 3 Terminology This appendix provides definitions of terms related to motion control A 3 1 Term main memory periodic task primary periodic task period of tasks UO Refresh
160. Calculation Failed error Encoder Current Position Calculation hex was detected for the auxiliary 64580000 hex occurred for the aux Failed error 64580000 hex as the axis of a synchronized instruction iliary axis and make suitable correc auxiliary axis in a synchronized tions to restore operation instruction Attached None information Precautions None Hemarks Event name EtherCAT Slave Communications Error 84400000 hex Meaning A communications error occurred for the EtherCAT slave that is allocated to an axis Source Motion Control Function Module Source details Continuously timing Error attributes variables MC AX MFaultLvl Active BOOL Axis Minor Fault Occurrence correction A communications error occurred for Check the event log for the EtherCAT None the EtherCAT slave that is allocated to error that occurred Remove the an axis cause of the error and clear the rele vant error Attached None information Precautions Even if this error is reset the error in the EtherCAT Master Function Module is not reset This error can be reset without Remarks resetting the error in the EtherCAT Master Module but the axis will still be disabled 11 44 NJ series CPU Unit Motion Control User s Manual W507 Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects
161. Check to see if positioning agrees with the settings 4 10 NJ series CPU Unit Motion Control User s Manual W507 4 Checking Wiring from the Sysmac Studio 4 3 5 Relative Positioning 1 Click the Relative positioning Tab on the MC Test Run Tab Page The following dialog box will appear New Project v Configurations and Setup gt 78 EtherCAT w 42 Motion Control Setup Ww amp Axis Settings 2 MC Axis000 0 1 MC Axis001 1 gt Axes Group Settings Cam Data Settings F Event Settings I Task Settings F Data Trace Settings Q AWN Axis selection MC_Axis000 0 Node 10 v Status Axis ready to execute Axis disabled Standstill Discrete motion Continuous motion Homing Stopping Error stopping Home defined In home position Motion error list n epes ES D EE Countermeasur e and remedy Test Run Servo ON Drive status Command current p 5 5853 n use Positive limit input Home input Actual current position OD Negative limit input Servo ready Command current velocit OI Immediate stop input Main power Actual current velocity om Home proximity input Drive error input Latch input 1 Drive warming input OFF Latch input 2 Target distance pulse Target velocity pulse s Acceleration pulse s 2 Deceleration pulse s 2 Jerk jpulse s 3 Select the axis to perform relative positioning Click the Servo ON Button to turn ON the Servo Click the r3 Button
162. Command position and actual position Position command values Negative or positive long reals LREAL or 0 command units 2 Velocity command values Negative or positive long reals LREAL or 0 command units s Acceleration command values and decel Positive long reals LREAL or 0 command units s eration command values Jerk command values Positive long reals LREAL or 0 command units s3 Override factors 0 00 or 0 01 to 500 0096 Axis types Servo axes virtual servo axes encoder axes and virtual encoder axes Motion control period Same as the process data communications cycle for EtherCAT com munications NJ series CPU Unit Motion Control User s Manual W507 1 Introduction to the Motion Control Function Module Specification Item NJ501 1300 NJ501 1400 NJ501 1500 Cams Cam data points 65 535 points max per cam table 1 048 560 points max total for all cam tables Number of cam tables 640 tables max Cam profile curves Created with Cam Editor Positions master axis phase and slave axis displacement can be specified to change phase pitches for each section Overwriting cam data Cam data can be overwritten from the user program 1 The recommended unit version is 2 1 or later 2 The recommended unit version is 1 1 or later 23 Positions can be set to within the range of 40 bit signed integers when they are converted to pulses 1 4 3 Function Specifications The following functions are supported when connec
163. D sen osition loop instruction processing command units In position check Ru counter counter Velocity loop Actual position Current loop C Actual position Electronic pulses command units l gear E Remainder Feedback The command position and actual position share the following items Item Command position Actual position Count Mode You can set Linear Mode or Rotary The same Count Mode is used as Mode for the command position Position increment You can set one of the following The unit is the same as the unit of mm um nm inch degree or pulse the command position Software limits You can set the range of operation The range is the same as the range of the software for the command position Changing the current position You can change the actual position This value will be set to the same to any desired position position as the command position Defining home Home is either defined or The status of home is the same as undefined the command position f there is any following error before the change the following error value is maintained in the actual position 6 5 2 Valid Positions for Each Axis Type The following table lists the valid positions for each axis type Types of positions Axis type Actual position Servo axis Applicable Virtual servo axis Applicable Encoder axis Applicable Virtual encoder axis Applicable 2 1 For a virtual servo axis the actual position is the s
164. Decel eration Warning Value Axes Group Stop Method Correction Allow ance Ratio Function Steeg Set the percentage of the maximum interpo lation acceleration at which to output an interpolation acceleration warning No inter polation acceleration warning is output if O is set Unit 96 Set the percentage of the maximum interpo lation deceleration rate at which to output an interpolation deceleration warning No inter polation deceleration warning is output if O is set Unit 96 Set the stop method of the composition axes for which an error did not occur when an error occurs that forces an immediate stop of an axis that is in a multi axes coordinated motion 0 Immediate stop 1 Decelerate axes to a stop at maximum deceleration rate of the axes 3 Immediate stop and Servo OFF This parameter applies when the center des ignation method is used for a circular inter polation instruction It compensates the distance when the distance between the start point and the center point does not equal the distance between the end point and the center point Set the allowable range for that correction as a percentage of the radius Set the percentage to 0 196 or greater Error checking is not performed if O is set 5 3 4 Enabling an Axes Group 5 Motion Control Parameters Default 0 to 100 0 0 to 100 0 0 Single precision 0 floating point num ber between 0 and 100 Specify the num
165. Done CommandAborted Error ErrorlD 16 0000 Velocity FB2 target velocity FB2 travel distance FB1 target velocity i FB1 travel distance Time For details on multi execution of instructions for the MC Function Module refer to 9 5 7 Multi execution of Motion Control Instructions Buffer Mode and 9 7 5 Multi execution Buffer Mode of Motion Control Instructions for Multi axes Coordinated Control NJ series CPU Unit Motion Control User s Manual W507 6 13 p I m X OD O c Oo 3 fo gt Q o e fo mp c o Oo Oo c Oo 3 O Oo 3 mp 2 5 o mp c O Oo 3 o suononiisu 041002 uoro N Jo uonnoexe ninjN 10 yeyo DuULL p p 9 6 Motion Control Programming 6 5 Positions This section describes the positions that are used in motion control programming 6 5 1 Types of Positions The MC Function Modules uses the following two types of positions Type of position Definition Command position This is the position that the MC Function Module outputs to control an axis Actual position The actual position as input from the Servo Drive or encoder input The following figure shows the relationship between the command position and the actual position User program MC Function Module Command position Servo Drive ulses Motion Motion Command Electronic p Command Li Following Position I control control position gear position
166. E If Sv Ca CountUP changes to TRUE Sv Cam Disable is changed to FALSE Retry processing for the MC SaveCamrTable instruction is completed Sv Ca CTD CD Sv Cam Disable LOAD Sv Ca CountLoad PV INT S Q gt Sv_Ca_CountUP If the changes to the cam data variable and saving the cam table are completed and axis O is at the target velocity the cam operation is executed IF Vel_InVel TRUE AND WriteDone TRUE AND Sv_Cam_D TRUE THEN Camin_Ex TRUE END_IF MC SaveCamTable sch Se NO O O 2 Di 2 a 2 Di Di 3 J Di mE Di S Di o D Di 2 Q LD Di 2 mE 2 D eO Di 3 m o D SV CAM CamTable CamProfileO Execute Sv Cam Ex Done gt Sv Cam D Busy gt Sv Cam Dev CommandAborted gt Sv Cam Ca Error gt Sv Cam Em ErrorlD gt Sv Cam ErrlD CAMIN Master MC_Axis000 Slave MC Axis001 CamTable CamProfileO Execute Camin Ex Periodic Camin Em StartMode Camin Sm StartPosition Camin Sp MasterStartDistance Camin_Msd MasterScaling Camin Ms SlaveScaling Camin Ss MasterOffset Camin Mo SlaveOffset Camin_So Reference Type Camin Ht Direction Camin Dir InCam gt Camin_InCam InSync gt Camin_InSync EndOfProfile Camin Eop Index gt Camin Index Busy Camin Bsy Active gt Camin Act CommandAborted gt Camin Ca NJ series CPU Unit Moti
167. E This variable is assigned to the Status output variable from the PWR2 instance of the MC Power instruction It is TRUE when the Servo is ON StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communications are active and normal HesetON BOOL FALSE This variable gives the status of the external button that is used to reset errors 10 10 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N s D I Ladder Diagram o O ug When StartPg is TRUE the status of process data communications for axis O is checked to see if communications 2 are active and normal Og 3 3 3 StartPg ECG PDSlavTbI MC Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress Lock1 S When StartPg is TRUE the status of process data communications for axis 1 is checked to see if communications are active and normal StartPg EC PDSIavTbI MC Axis001 Cfg NodeAddress _EC_CommErrTbl MC_Axis001 Cfg NodeAddress Lock2 h The Servo for axis O is turned ON if process data communications for axis O are active and normal MC Power Pwr1 Status Pwr1_Bsy Pwr1 Err Pwr1 ErrID Pwr2 Status Pwr2 Bsy Pwra Err Pwr2_ErrlD P jx A m x x O I O 2 et O 2 pe 2 ok m x O JU D o D c 2 n O c pe X D o C Q O x E 2 0 D ok O O D 0 O 2 If a minor fault level er
168. EU keep RE LAM Re Gece EU DL dE 4 4 4 1 3 Axis Parameter Setting une EE 4 5 4 1 4 Staring the MG Test Pli FUNCION aeo ie alee tendo o ee Aen eebe 4 6 Monitoring EECH ET 4 7 Checking Motor Operalloh ooa e iir ro Eau ordo Re cene RC eo ve oue Mews ne a Feo o reenact 4 8 4 3 1 TONNO ON NE SEINO 22 otc tts tenente odia c talons ale al attaches cana ra a decet eed todas 4 8 4 3 2 Jog JN E 4 8 4 3 3 e chiaro e 4 9 4 3 4 Abs l te FOS OMAN LEE 4 10 4 3 5 Relative urere ilie e ET 4 11 Motion Control Parameters tee te Le de rere ret 5 2 Axis Parameter E 5 4 5 2 1 PIS E Te EE 5 4 5 2 2 Ae NET men Mr HET NN 5 5 5 2 3 Unt Conversion Settings uii as poat eH RERUM ELA Hei EE idaceteetadceeceaneetancs tunes osechiaees 5 8 5 2 4 ler Ent n s cM DU C 5 11 5 2 5 Other Operation Settings E 5 12 5 2 6 HTS d Le Seen a ME 5 13 5 2 7 Position Count gett e EE 5 13 5 2 8 Servo Drive Settings EE 5 15 5 2 9 FOMINS ENNIS MEE ES EE TU T ur 5 16 5 2 10 Axis Parameter Setting Exatmple uinssscies suiit eebe SE E eoa Esa Epi 5 17 Axes Group RTE EE 5 20 5 3 1 Axes Group El 5 20 5 3 2 Axes Group Basic Settings kA REENEN aras ase sanas nnn 5 21 5 3 3 Axes Group Operation Settings ccccseseccccssseeeeceesseeeeceaseeecceeeeeeeceeaeeeeseseeesssesseeesseseeeesaees 5 22 5 3 4 Enabling an Axes Ee In EE 5 23 NJ series CPU Unit Motion Control User s Manual W507 Section 6 6 1 6 2 6 5 6 7 6 8 6 9 Section 7 7 1
169. Error Sv Cam Err ErrorlD Sv Cam ErrlD If Sv Ca CountUp is FALSE a Cannot Execute Save Cam Table error occurs and Sv Cam Disable is changed to TRUE Sv Ca CountUp Sv Cam Ca Sv Cam Disable NJ series CPU Unit Motion Control User s Manual W507 10 81 10 Sample Programming One second after a Cannot Execute Save Cam Table error occurs Sv Ca TimeUp is changed to TRUE When Sv Ca TimeUp changes to TRUE Sv Cam Ex changes to FALSE Sv Ca TON Sv Cam Disable Sv Ca TlimeUp Sv Ca CountLoad changes to TRUE for one period when the cam table is saved If Sv Ca CountLoad is TRUE the retry counter is reset SaveCamTable Sv Ca CountLoad If a Cannot Execute Save Cam Table error occurs three times Sv Ca CountUp is changed to TRUE When Sv Ca CountUp changes to TRUE Sv Cam Disable is changed to FALSE Retry processing for the MC SaveCamrTable instruction is completed Sv Ca CTD Sv Cam Disable Sv Ca CountLoad INT 3 Sv_Ca_CountUP If homing is completed for axis O velocity control is executed _D MC Axis000 LREAL 1000 0 LREAL 0 0 LREAL 0 0 eMC_DIRECTION _mcPositiveDirection BOOL False MC_MoveVelocity Axis InVelocity Busy Active CommandAborted Error ErrorlD Axis Execute Velocity Acceleration Deceleration Jerk Direction Continuous BufferMode Vel InVel Vel Bsy Vel Act Vel Ca Vel Err Vel El If the changes to the cam data variable and saving the cam table are co
170. Ex Mv Abs Pos Mv Abs Vel Mv Abs Acc Mv Abs Dec Mv Abs Dir gt Mv Abs D gt Mv Abs Bsy gt Mv Abs Act gt Mv Abs Ca gt Mv Abs Err gt Mv Abs ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming 10 53 Duuuugiboid oIseg Z OL so duieg sch ga n sch NO O 2 Di 2 a 2 mE 2 D Di 3 e o D oO lt JU P D X D O c o 2 O Ge H Di 2 2 o ct c O ze o 2 10 Sample Programming 10 2 13 Using a Cam Profile Curve to Correct the Sync Start Position 10 54 This sample uses a cam profile curve to correct a slave axis in a gear motion The slave axis for gear motion is MC_Axis007 a virtual Servo axis and the slave axis for cam motion is MC Axis002 also a virtual Servo axis These slave axes are combined with MC CombineAxes and the results is output to MC_Axis003 a Servo axis The master axis is MC AxisO00 a Servo axis The processing flow is as follows synchronized motion with gear operation instructions Synchronized motion with cam operation instructions Master axis MC Axis000 Master axis MC Axis000 Slave axis MC Axis001 Slave axis MC Axis002 Corrected Motion with Combine Axes Instruction Slave axis MC Axis003 Axis Type Settings The axes types are set in the axis parameters for each axis as given below Setting Parameter name Axis 4 Axes variable name MC Axis000 MC AxisO0
171. Feed Er gt Mv Feed ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N m a UJ 10 2 12 Changing the Cam Table by Re execution of an Instruction S OH e This sample changes the cam table during cam motion CamProfileO is used when the command posi S tion for axis 0 is 5000 or less and CamProfile1 is used when it is over 5000 WE 33 3a Main Variables Used in the Programming Samples Variable name Data type Default Comment MC Axis000 SAXIS REF This is the Axis Variable for axis 0 MC Axis001 SAXIS REF This is the Axis Variable for axis 1 CamProfileO ARRAY 0 100 OF This is the cam data variable sMC CAM REF CamProfile1 ARRAY 0 10 OF This is the cam data variable sMC CAM REF Pwr1 S BOOL FALSE This variable is assigned to the Status out put variable from the PWHR1 instance of the MC Power instruction It is TRUE when the Servo is ON Pwr2 S BOOL FALSE This variable is assigned to the Status out put variable from the PWR2 instance of the MC Power instruction It is TRUE when the Servo is ON CamrTableO BOOL FALSE TRUE when CamProfileO is used for the cam table CamrTable1 BOOL FALSE TRUE when CamProfile7 is used for the cam table Camin InCamO BOOL FALSE This variable is assigned to the nCam out put variable from the CAMIN instance of the MC Camln instruction It is TRUE during cam motion for CamProfileO After this vari able chang
172. Function Module can be combined with OMRON G5 series Servo Drives with built in EtherCAT communications to enable exchange of all control information with high speed data communications The various control commands are transmitted via data communications That means that the Servo motor s operational performance is maximized without being limited by interface specifications such as the response frequency of the encoder feedback pulses You can use the Servo Drive s various control parameters and monitor data on a host controller to unify management of system information EN Additional Information What Is EtherCAT EtherCAT is an open high speed industrial network system that conforms to Ethernet IEEE 802 3 Each node achieves a short cycle time by transmitting Ethernet frames at high speed A mechanism that allows sharing clock information enables high precision synchronized control with low communications jitter 1 2 NJ series CPU Unit Motion Control User s Manual W507 1 Introduction to the Motion Control Function Module 1 2 System Configuration The MC Function Module receives sensor signal status from devices and control panels It receives commands from the motion control instructions that are executed in the user program It uses both of these to perform motion control with the Servo Drives and Encoder Input Terminals I N o lt 0 mr D 3 O Oo 5 e c e Oo 5 e Motion Control Configuration The EtherC
173. Homing Compensation veo f 1 Indicates whether you can use the MC Write Write MC Setting instruction to temporarily change a parame ter 2 Indicates whether you can access the parameter with a system defined variable for motion control in the user program VI N gt x 0 U 9 D j D D m sDumes seg SIXY Z 2 S Hefer to 3 2 Axis Setting Procedure for details on how to set axis parameters For details on the MC Write Write MC Setting instruction refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 Refer to 6 6 System defined Variables for Motion Control for information on system defined variables for motion control 5 2 2 Axis Basic Settings The Axis Basic Settings are used to set whether to use the axis If you use the axis set the axis type and the node address of the EtherCAT slave device Axis Number Set the logical number of the axis This number is accessed to recognize the axis number when accessing _SAXIS_REF Axis Use Set whether to enable or disable the axis An error O0 to 2 0 occurs if you execute a motion control instruction for an undefined axis but an error will not occur for an unused axis 0 Undefined axis 1 Unused axis 2 Used axis NJ series CPU Unit Motion Control User s Manual W507 5 5 5 Motion Control Parameters Set the axis type I O wiring is not required for virtual O to 3 0 Axis Type Node Address input devices an
174. ITES y amp im i New Project new_NJ501_0 Y gt 58 EtherCAT gt 5 CPU Eqpansion Racks I O Map gt I Controller Setup w i5 Motion Control Setup V i Axis Settings Axes Group Settings amp Cam Data Settings F Event Settings lm Task Settings F7 Data Trace Settings 2 Select Servo axis in the Axis type Box Axis number tJ Axis use Used axis Y Axis type Virtual servo axis v Feedback control Input device Encoder axis Virtual servo axis DUE GER Virtual encoder axis Detailed Settings em is number FR Axis use Used axis M Axis type Virtual servo axis v Feedback control Input device Output device Detailed Settings NJ series CPU Unit Motion Control User s Manual W507 A Configurations and Setup IQQ IET Clearseach search M 3 13 2 N gt x 0 o D E 5 e U O Si o Q c D ejnpeoojgd Dunes Z Z 3 Configuring Axes and Axes Groups 3 Select the Servo Drive to use in the nput Device Box This setting allows you to use the EtherCAT slave Servo Drive as an axis I A Configurations and Setup QAG tens v Configurations and Setup Loi xis numbor DR Axis use Used axis M Axis type Servo axis M Feedback control No controlloop v Input device Not assigned v Channel Output device Channel MEISE Detailed Settin Node 2 Device R88D KNO1H ECT amp Cam Data Settings Not assigned F Event Settings E Task Settings FF
175. Input The default settings of the input signals of a G5 series Servo Drive are listed in the following table Signal name Input signal Immediate stop input Servo Drive general purpose input 1 IN1 pin 5 on connector CN1 NC o Positive limit input Servo Drive general purpose input 2 IN2 pin 7 on connector CN1 NC Negative limit input Servo Drive general purpose input 3 IN3 pin 8 on connector CN1 NC E Home proximity input General purpose input 4 IN4 pin 9 on connector CN1 NO 3 1 The signal name for the Servo Drive is the positive drive prohibit input d 2 The signal name for the Servo Drive is the negative drive prohibit input 9 E e Trigger Signal Assignments for External Latches The input signals in the following table are assigned to external latch trigger signals by default for the G5 series Servo Drive Settings for the Triggerlnput Trigger Input Condition input variable of the MC_TouchProbe instruction External latch trigger signal Mode InputDrive LatchiD O mcDrive O mcEncoderMark LEER Encoder Z phase 1 mcEXT 1 mcLatch1 Servo Drive general purpose input 7 IN7 pin 12 on connector CN1 NO 2 mcLatch2 Servo Drive general purpose input 6 IN6 pin 11 m on connector CN1 NO 1 mcController mM dm Variable specified by TriggerVariable 1 The signal name for the Servo Drive is the external latch input 1 2 The signal name for the Servo Drive is the external latch input 2 cl N LD D
176. Input Detection Direction Set the home input detection direction Refer to Homing Start Direction on page 8 7 for details on the relationship between the homing start direction and the home detection method Homing Holding Time Set the holding time when you set the Homing Method to the proximity reverse turn and holding time specification This is the time from when the home proximity input signal e from when deceleration starts until home is defined Home input detection direction Home proximity ON input signal OFF l Home is defined when the set time elapses Vr Homing velocity Homing approach velocity Negative Command direction Start Positive direction output Homing velocity l Negative direction Command torque from previous operation after the set time elapses Home Input Mask Distance Set the home input mask distance in command units when you set the Homing Method to the proximity reverse turn home input mask distance This is the distance from when the home proximity input signal e from when deceleration starts until home is defined Home input detection direction Home proximity ON input signal OFF I Home input signal ON i OFF Homing velocity Negative f f tht Qo Command direction output Start Positive direction After the proximity input movement is according to the home input mask distance Homing Compensation Value After ho
177. KNO1H ECT E 1 gt CPU Expansion Racks UO Map gt 73 Controller Setup gt i Motion Control Setup amp Cam Data Settings gt Event Settings Ir Task Settings FF Data Trace Settings New Project new NJ501 0 Configurations and Setup EtherCAT gt Nodel R88D KNO1H ECT E gt Node2 R88D KNO1H ECT E gt 3 Node3 GX ID1611 1D08 E gt CPU Expansion Racks I O Map gt 3 Controller Setup gt 19 Motion Control Setup Cam Data Settings Event Settings i Task Settings F Data Trace Settings Node AddressiNetwork configuration Master Ww og EtherCAT Ka E001 R88D KNO1H ECT Rev 2 1 E002 R88D KNO1H ECT Rev 2 1 NJ series CPU Unit Motion Control User s Manual W507 Value E001 Model R88D KNO1 Product name R88D KNO1 Revision Node Address Enable Disable Settings Serial Number PDO Map Settings O0x60BA 00 0x60BC 00 0x60FD 00 0x2002 01 Edit PDO Ma Distributed Clock Enable Enabled Reference Clock Exist Setting Setting Parameters Device name Set a name for the slave Item name Model Product name Revision Node Address Enable Disable Settings Serial Number PDO Map Settings Distributed Clock Enable Reference Clock Setting Parameters Backup Parameter Settings Device name Set a name for the slave Edit Setting 1 Value GX ID16 GX ID16 1 1 Enabled v 0x6120 0 0x2002 0 Edit PDO I Exist
178. MC Setting instruction only when you need to temporarily change the in posi tion check time e Monitor Information That Is Related to In position Checks You can read Axis Variables from the user program to monitor when positioning finishes Variable name Data type Meaning Function MC AX 0 63 Details ldle BOOL TRUE when processing is not currently performed for the command value except when waiting for in position state dle and InPosWaiting are mutu ally exclusive They cannot both be TRUE at the same time MC AX 0 63 Details InPosWaiting BOOL In position TRUE when waiting for in position state Waiting The in position check is performed when positioning for the in position check This also includes states where processing is performed while in motion at velocity O during following error counter resets during synchronized control and during coordinated motion You can read Axes Group Variables from the user program to monitor when positioning finishes for the axes group Variable name Data type Meaning Function _MC_GRP 0 31 Details Idle BOOL Standstill TRUE when processing is not currently performed for the command value except when waiting for in position state 1 Idle and InPosWaiting are mutually exclusive They cannot both be TRUE at the same time MC GHRP 0 31 Details InposWaiting BOOL In position TRUE when waiting for in position state Waiting for any composition axis The in position c
179. Maximum Deceleration axis parameter the operation set in the Acceleration Deceleration Over axis parameter setting is performed 9 36 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions If There Is No Reverse Turn and the Target Position Would Be Exceeded at the Specified Deceleration Rate No Reverse Turn Velocity Command re executed TExecuted TInitial command position TNew command position If There Is A Reverse Turn and Decelerating to a Stop Would Exceed a Software Limit No Reverse Turn Velocity Command re executed Reverse operation TExecuted TSoftware limit If There Is A Reverse Turn and Decelerating to a Stop Would Result in Command Current Position Overflow or Underflow No Reverse Turn Velocity Command re executed TExecuted Reverse operation Q1 CH Oo 3 3 Oo TI c O O o A O di a D I Q X o CH le e S TCounter upper limit suononaisu J oJ1u02 uono Bunnoexe eH 9 9 6 NJ series CPU Unit Motion Control User s Manual W507 9 37 9 Motion Control Functions Changing the Travel Distance Even if you change the travel distance and re execute the MC MovehRelative Relative Positioning instruction positioning is performed for the new travel distance in reference to the position where the motion first started However if the instruction is executed again just before posit
180. Motion Control User s Manual W507 10 Sample Programming e ST Programming VEL Vel InVel GEARIN Gearin Ex Gearin InGear Gearin Bsy Gearin Act CAMIN Camn EN Ir Gamm InCam E gg Gamm InSync il Camin_Bsy B weem emm Camin Act MN COMBINE Combine Ex leen Combine Bsy Combine Act Position MC Axis000 MC AxisO01 MC Axis002 MC Axis003 i Time NJ series CPU Unit Motion Control User s Manual W507 10 57 Duuuugiboid 2Iseg Z 0L sojdwes uonisog WIS ou S eui 1294102 01 eAIn2 ejjo4g ure e Buisy EL Z 04 10 Sample Programming I Ladder Diagram When StartPg is TRUE the status of process data communications of axis O is checked to see if communications are active and normal StartPg EC PDSlavTbI MC Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress OCKO m When StartPg is TRUE the status of process data communications of axis 3 is checked to see if communications are active and normal StartPg _EC_PDSlavTbl MC_Axis003 Cfg NodeAddress _EC_CommErrTbl MC_Axis003 Cfg NodeAddress LOCKS E The Servo for axis 0 is turned ON if process data communications for axis O are active and normal MC Power LockO MC Axis000 Axis Axis Pwr1 Status Enable Pwr1_Bsy Pwr1 Err Pwr1 ErrID The Servo for axis 3 is turned ON if process data communications for axis 3 are active and normal PWR4 MC_Power MC Axis003 Axis Axis Pwr4 Status Enable Status
181. N mode in RUN mode Lit T lit m lit Normal operation in PROGRAM mode 1 Lit Flashing Normal operation in startup state 1 If you can go online with the CPU Unit from the Sysmac Studio with a direct USB connection the CPU Unit is in PROGRAM mode If you cannot go online the CPU Unit is being reset 2 If you can go online with the CPU Unit from the Sysmac Studio with a direct USB connection a major fault level error has occurred If you cannot go online a watchdog timer error has occurred in the CPU Unit 8 If you cannot go online with the CPU Unit from the Sysmac Studio it is also possible that the USB cable is faulty or that the network type on the Sysmac Studio is not set for a direct USB connection Refer to the NJ series Troubleshooting Manual Cat No W503 if you cannot go online with the CPU Unit NJ series CPU Unit Motion Control User s Manual W507 11 3 11 Troubleshooting i Checking with the Troubleshooting Function of Sysmac Studio When an error occurs you can connect the Sysmac Studio online to the Controller to check current Controller errors and the log of past Controller errors You can also check the cause of the error and corrections Refer to the NJ series Troubleshooting Manual Cat No W503 for the procedures to check for errors with the Sysmac Studio i Checking with the Troubleshooter of an NS series PT If you can connect communications between an NS series PT and the Controller when an error occurs
182. NJ series CPU Unit Motion Control User s Manual W507 Assigning an Axis 1 Right click an axis in the Multiview Explorer and select Edit from the menu F3 Sysmac Studio New Project new_NJ501_0 Y Configurations and Setup gt 73 EtherCAT gt CPU Expansion Racks 4 I O Map gt Controller Setup W i Motion Control Setup V i5 Axis Settings MC Axis000 0 Axes Gi amp Cam Data gt Event Sett B Task Settir F Data Trace Es Sysmac Studio E001 R88D KNO1H ECT Rev 2 1 E002 _R88D KNO1H ECT Rev 2 1 E003 3 Configuring Axes and Axes Groups Model Product name Revision Node Address Enable Disable Settings Serial Number PDO Map Settings Distributed Clock Enable Reference Clock Setting Parameters Edit Settir Setting Backup Parameter Settings Edit Back Device name Set a name for the slave DIS All vendors Groups Servo Drives EQ Frequency Inverter Digital 10 Analog IO Encoder Input E ninn Cannae Ii Show hidden slaves R88D KN30F ECT Rev 2 1 R88D KN75F ECT Rev 2 1 R88D KN75F ECT G5 Series ServoDri R88D KN75H ECT Rev 2 1 RB8D KN75H ECT G5 Series ServoDri R88D KNASL ECT Rev 2 1 R88D KNASL ECT G5 Series ServoDri 3G3AX MX2 ECT Rev 1 1 3G3AX MX2 ECT EtherCAT Communic IDOS 2 tier termin Model GX ID1611 ID08 Product name GX ID1611 XM mmj Revision 1 1 Vendor OMRON Corporation Comment 2 tier terminal block URL B
183. NJ series CPU Unit Motion Control User s Manual W507 9 39 9 Motion Control Functions e Timing Charts Variables Axis1PosSet1 AxisiPosSet2 Axis1Pos X 1000 X 1000 2000 Input Parameter Axis1Execute Output Parameters Axis1 Done Axis1Busy Axis1Active Precautions for Correct Use For input variables that are not changed always use the same values as before re execution of the instruction 9 40 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 5 7 Multi execution of Motion Control Instructions Buffer Mode You can execute another motion control instruction while an axis is moving In the PLCopen technical specifications this functionality is defined as Buffer Mode but in the MC Function Module this is some times referred to as multi execution of instructions You can use multi execution of instructions to exe cute multiple motion control instructions in sequence without stopping the overall motion The following terms are used in relation to multi execution of instructions in the MC Function Module Term Meaning This manual PLCopen Current instruction Previous function The motion control instruction that was in operation just before exe block cuting the multi execution instruction Buffered instruction Next function block A motion control instruction that was executed during an axis motion and is waiting to be executed Transit velo
184. NSOF ECT Rev 2 1 R88D F ECT G5 Series ServoDri R88D KNSOH ECT Rev 2 1 R88D KNSOH ECT G5 Series ServoDri R88D KN75F ECT Rev 2 1 Ra IN75F ECT G5 Series ServoDrn R88D KN75H ECT Rev 2 1 RB8D KN75H ECT G5 Series ServoDri R88D KNASL ECT Rev 2 1 R88D KNASL ECT G5 Series ServoDrn 3G3AX MX2 ECT Rev 1 1 3G3AX MX2 ECT EtherCAT Communic GX ID1611 XWT IDOS 2 ter termin a GX ID1611 ID08 1 Rev 1 1 m GX ID1611 XWT ID08 1 2 tier term Gx 611 XWT ID16 2 tier termin ag GX ID1611 ID16 Rev 1 1 i GX ID1611 D16 1 Rev 1 1 wm GX ID1611 XWT ID16 GX ID1611 XWT OD08 2 tier termi C1D1611 0D08 1 Rev 1 1 wA GX ID1611 XWT ODO08 1 2 tier terr GX ID1611 OD16 Rev 1 1 GX ID1611 XWT OD16 2 tier termi GX ID1611 40D16 1 Rev 1 1 Jed GX ID1611 XWT OD1 amp 1 2 Bar terr Model GX ID1611 1D08 Product name GX ID1611 XW Revision 1 1 Vendor OMRON Corporation Es Comment 2 tier terminal block URL Wi N gt x o o D 5 U O D Q c D ejnpeoojg Dunes Z Z 3 11 3 Configuring Axes and Axes Groups 3 12 Adding Axes 1 Right click Axis Settings in the Multiview Explorer and select Axis Settings from Menu Es Sysmac Studio File Edit View Insert Project Controller Simulation Tools Help JeJojdx3 MHADING E BS New Project mew Min 0 Y w Configurations and Setup gt 08 EtherCAT gt CPU Expansion Racks 4 I O Map gt 3 Con
185. Negative Software Limit eeseseseesssesss 5 13 Negative Torque Warning Value 5 12 Kli elle 6 22 node addresses EE 5 7 Nulle andata WEE 9 15 number of valid cam data ccccceseseeeeeceeeeeeeeeeeeeeees 9 14 O eere ein 2 11 EIER le ME 11 6 operation direction EE 9 32 current direction EEN 9 32 negative direction sees 9 32 no direction specified ssssusse 9 32 positive direction EE 9 32 EE 9 32 Operation Selection at Negative Limit Input 5 16 8 6 Operation Selection at Positive Limit Input 5 16 8 6 Operation Selection at Reversing 5 11 Operation Settings cccccsssseeeceeeseeeceeeeeeeeeseeeeeeens 5 11 onginal canm Re 9 14 Other Operation Settings seseeeessssssee 5 12 OVEMNGES EE 9 9 9 51 P partial faull e c Sinise sis oak asses a emes 11 6 performance specifications seeeeeseseeeesss 1 6 Penodi GE 2 4 eph D M PUR 9 14 phase PIEN ee E 9 15 PLC FUNCUON Mod le erunt rco A 2 2 PEG ODI pet ee cpt escheat ences ee nna E eau dese 1 2 Position Count Settings AANEREN 5 13 positioning gear operation sseseeeeeeeeeeee 9 12 See In c res 6 14 9 26 pgs CER 9 26 FOSIIVE Direction ssamen t ie ease 6 20 Index 6 Positive Lir ei EE 6 20 Posi
186. None Invalid Home Input Mask Distance 742B0000 hex The setting of the home input mask distance is not suitable for the MC Home instruction Motion Control Function Module Source details Axis Detection During instruc Were tion execution Log category System The axis stops with the stop method for the homing execu tion status _MC_AX MFaultLvl Active BOOL Axis Minor Fault Occurrence The set value of the home input mask distance when the operating mode of the MC_Home instruction is set to Proximity Reverse Turn Home Input Mask Distance is insufficient to decel erate from the homing velocity to the homing approach velocity None None Check the operating specifications for the MC_Home instruction then set the home input mask distance hom ing velocity and homing approach velocity so that they provide sufficient travel distance to decelerate Check the home input mask distance homing velocity and homing approach velocity Change the set tings so that they provide sufficient travel distance to decelerate based on the operating specifications of the MC Home instruction 11 37 I N zi Oo c za 0 gt O Oo m 5 suonduoseq 1043 Z Z 11 Troubleshooting Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effec
187. OMRON Machine Automation Controller NJ series CPU Unit Motion Control User s Manual NJ501 1300 NJ501 1400 NJ501 1500 CPU Unit always in control W507 E1 01 OMRON 2011 All rights reserved No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means mechanical electronic photocopying recording or otherwise without the prior written permission of OMRON No patent liability is assumed with respect to the use of the information contained herein Moreover because OMRON is constantly striving to improve its high quality products the information contained in this manual is subject to change without notice Every precaution has been taken in the preparation of this manual Nevertheless OMRON assumes no responsibility for errors or omissions Neither is any liability assumed for damages resulting from the use of the information contained in this publication Introduction Introduction Thank you for purchasing an NJ series CPU Unit This manual contains information that is necessary to use the Motion Control Function Module of an NJ series CPU Unit Please read this manual and make sure you understand the functionality and per formance of the NJ series CPU Unit before you attempt to use it in a control system Keep this manual in a safe place where it will be available for reference during operation Intended Audience This manual is int
188. OMRON slaves Non OMRON slaves 00 Value set from the Sysmac Value set from the Sysmac Studio 1 to 65 535 Studio 1 to 65 535 01 to 99 Node address switch setting la Precautions for Correct Use e OMRON G5 series Servo Drives can be set to specific node addresses by using the node address switches on the front panels If the node address switches are set to 00 the node address will be determined by the settings made in the EtherCAT Editor of the Sysmac Studio If the node address switches are set to 00 for all connected Servo Drives errors will not occur even if the Servo Drive s connection position is changed Set the node addresses on the node address switches to assign specific Servo Drives for each machine control NJ series CPU Unit Motion Control User s Manual W507 5 7 e N gt x 0 U 9 D 3 D D m sDumes oIseg SIXY Z 2 S 5 Motion Control Parameters e The value set on the Servo Drive s node address switches is loaded only once when the Servo Drive s control power is turned ON Such changes are enabled only after the power supply is turned ON again Do not change the setting on the node address switches after the power supply has been turned ON e An error occurs if the same node address is used more than once e The value set from the Sysmac Studio will be used for all non OMRON slaves regardless of any setting at the slave 5 2 3 Unit Conversion Settings 5 8 These parameters set position uni
189. Oo c 0 gt O Oo Gei 5 SOIPOWOY pue sesne 10113 Z L 4 11 Troubleshooting 11 58 Problem Position shift An MC Test Run is not possible from the Sysmac Studio The home position was already shifted before positioning Malfunction due to noise from a welder inverter etc Mechanical shift An MC Test Run is being executed from another installation of the Sysmac Studio Refer to The position of home defined with hom ing changes occasionally Check if a welder inverter or other similar device is located nearby Check if dimensional shifts accumulated Mark the mechanical connections to check for shifting Check to see if there is another installation of the Sysmac Studio connected to the same CPU Unit Countermeasure Refer to The position of home defined with hom ing changes occasionally Isolate the Controller from any nearby welders inverters etc Securely tighten the mechanical tightening points End all MC Test Run oper ation for other installa tions of the Sysmac Studio NJ series CPU Unit Motion Control User s Manual W507 pp Appendices This section describes settings and connection methods for OMRON G5 series Servo Drive objects A 1 A 3 Connecting the Servo Drive leer e esr A 2 A 1 1 Wiring the Servo Drive EEN A 2 A 1 2 Servo Drive Settings A 2 Connecting to Encoder Input Terminals
190. Pwr BsyZTRUE THEN on UpgOn TRUE Further processing executed ELSE gt UpgOn FALSE Further processing not executed END IF Q d MC Power o PWR m Axis MC Axis000 S Enable Pwr En Status gt Pwr Status Busy gt Pwr Bsy Error gt Pwr Err ErrorlD gt Pwr_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 17 10 Sample Programming 10 2 6 Checking to See If Errors Are Reset 10 18 In this sample the MC Reset Reset Axis Error instruction is executed if an external button turns ON while there is a minor fault level error Further normal processing is not executed until the Done output variable from the MC Reset instruction changes to TRUE If the Failure output variable changes to TRUE the axis decelerated to a stop or an MC common error has occurred The cause that made the Failure output variable from the MC Reset instruction turn ON is read Samples are provided for both ladder diagram and ST programming Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 sAXIS REF This is the Axis Variable for axis O MC Axis000 MFaultL vl Active BOOL FALSE TRUE when there is a minor fault level error for axis O Pwr Status BOOL FALSE This variable is assigned to the Status output variable from the PWR instance of the MC Power instruction It is TRUE when the Servo is ON ResetON BOOL FALSE This variabl
191. Rate The deceleration rate is changed only during acceleration constant velocity motion deceleration trian gular control or during deceleration exceed control If the new deceleration rate causes the axis to exceed the target position stopping at the target position is given the highest priority Therefore in this case the actual deceleration rate will exceed the specified deceleration rate e Patterns Where Deceleration Rate Increases Trapezoidal Control Triangular Control Followed by Trapezoidal Control Velocity Instruction lre executed Instruction Increased deceleration rate allows Velocit y jui operation to reach target velocity for trapezoidal control acceleration due to There is an area of the increased acceleration due to the deceleration rate IN ze increased deceleration during deceleration late during deceleration W a D There is an area of a a TExecuted TCommand position TExecuted TCommand position 9 38 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions e Patterns Where Deceleration Rate Decreases Trapezoidal Control or Triangular Control Deceleration exceed Control If the command position is exceeded at the reduced deceleration rate a switch is made to deceleration p exceed control No change for re execution during deceleration 5N Velocity Velocity Instruction re executed Decreased
192. S D E D o 6 Motion Control Programming 6 8 Programming Motion Controls Place motion control instructions in the user program of the NJ series Controller to perform motion con trol Programs that contain motion control instructions are called motion control programs i Precautions for Correct Use e You can set and program up to 64 axes on the Sysmac Studio for any model of CPU Unit If you download a project that exceeds the maximum number of control axes for the CPU Unit model to the CPU Unit with the Synchronization menu command a major fault level error occurs after the download or when power is turned ON e When you reuse a project make sure that the maximum number of control axes for the CPU Unit model is not exceeded e Even axes that are set as unused axes are included in the number of control axes Hefer to the NJ series CPU Unit Software User s Manual Cat No W501 for details on programming This section gives the procedure to create a program in an existing project on the Sysmac Studio 1 otarting the Sysmac Studio Start the Sysmac Studio and open the project 2 Adding a Program Right click Programs in the Multiview Explorer and select Multipart Ladder or Structured Text from the Add Menu Es Sysmac Studio DER File Edit View Insert Project Controller Simulation Tools Help em LEM ILES A mea A Configurations and Setup Wi A program is added to the Multiview Explorer 3 Edi
193. S RISK TO LIFE OR PROPERTY WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO ADDRESS THE RISKS AND THAT THE OMRON PRODUCTS ARE PROPERLY RATED AND INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM PROGRAMMABLE PRODUCTS OMRON shall not be responsible for the user s programming of a programmable product or any consequence thereof 18 NJ series CPU Unit Motion Control User s Manual W507 Head and Understand this Manual Disclaimers CHANGE IN SPECIFICATIONS Product specifications and accessories may be changed at any time based on improvements and other reasons It is our practice to change model numbers when published ratings or features are changed or when significant construction changes are made However some specifications of the products may be changed without any notice When in doubt special model numbers may be assigned to fix or establish key specifications for your application on your request Please consult with your OMRON representative at any time to confirm actual specifications of purchased products DIMENSIONS AND WEIGHTS Dimensions and weights are nominal and are not to be used for manufacturing purposes even when tolerances are shown PERFORMANCE DATA Performance data given in this manual is provided as a guide for the user in determining suitability and does not constitute a warranty It may represent the result of OMRON s test conditions and the users must correlate
194. Servo Drive Settings These parameters set the values for settings on the connected Servo Drive Modulo Maximum Posi Set the modulo maximum position _963 to 263 4 2 147 483 647 tion Setting Value setting value on the Servo Drive Modulo Minimum Position Set the modulo minimum position set 263 to 263 4 2 147 483 648 Setting Value ting value on the Servo Drive The default range is all DINT integers You can use the default range with OMRON G5 series Servo Drives NJ series CPU Unit Motion Control User s Manual W507 5 15 e N gt x 0 U 9 D 3 D D m suas eAug OMS 8 Z G 5 Motion Control Parameters 5 2 9 Homing Settings 5 16 Set the motor operation to use to determine home Homing Method Set the homing operation 0 1 4 5 8 9 ot 14 Proximity reverse turn home proximity input OFF 11 to 14 Proximity reverse turn home proximity input ON Home proximity input ON Limit input OFF 9 Proximity reverse turn home input mask distance 0 1 4 Home proximity input OFF 5 8 11 Limit inputs only 12 Proximity reverse turn holding time 13 No home proximity input holding home input 14 Zero position preset Home Input Signal Select the input to use for the home input signal 0 or 1 0 0 Use Z phase input as home 1 Use external home input 2 Homing Start Direc Set the start direction for when homing is started 0 or 2 0 tion 0 Positive direction 2 Negative direction
195. Servo is ON Pwr Bsy BOOL FALSE This variable is assigned to the Busy output variable from the PWR instance of the MC_Power instruction It is TRUE when the Servo is ON StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communications are active and normal UpgOn BOOL FALSE TRUE if further program execution is performed Ladder Diagram When StartPg is TRUE the status of process data communications is checked to see if communications are active and normal StartPg _EC_PDSlavTbl MC_Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress Lock Led The Servo for axis 0 is turned ON if process data communications are active and normal Pwr Status Pwr Bsy Pwr Err Pwr ErrlD A check is made to see if any errors occurred when MC Power was executed before execution of further processing Pwr Status UpgOn Pwr Bsy NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming N D I ST Programming S o When StartPg is TRUE the Servo is turned ON for axis O if process data communications are active and normal 3 f process data communications are not active the Servo is turned OFF ns IF StartPg TRUE SE AND EC PDSIlavTbI MC Axis000 Cfg NodeAddress TRUE a o dc AND EC CommErrTbI MC AxisO000 Cfg NodeAddress FALSE THEN Pwr_En TRUE ELSE Pwr_En FALSE END_IF IF Pwr Status TRUE d OR
196. Setting Edit Settin Setting Edit Bach All vendors Groups J Servo Drives EI Frequency Inverter Digital 10 Analog IO Encoder Input E Vision Sensor DH RB8D KNO1H ECT GS Series ServoDri R88D KNO1L ECT Rev 2 1 RB88D KNO1L ECT G5 Series ServoDri R88D KNO2H ECT Rev 2 1 RB88D KNO2H ECT GS Series ServoDri R88D KNO2L ECT Rev 2 1 R88D KNO2L ECT G5 Series ServoDri R88D KNO4H ECT Rev 2 1 NO4H ECT G5 Series ServoDri H R88D KNO4L ECT Rev 2 1 RB8D KNO4L ECT G5 Series ServoDri R88D KNOGF ECT Rev 2 1 R88D KNOGF ECT G5 Series ServoDri R88D KNOBH ECT Rev 2 1 RB88D KNOBH ECT G5 Series ServoDri R88D KN10F ECT Rev 2 1 R88D KN10F ECT G5 Series ServoDri R88D KN10H ECT Rev 2 1 R88D KN10H ECT GS Series ServoDri R88D KN150F ECT Rev 2 1 KN150F ECT G ries ServoDr R88D KN150H ECT Rev 2 1 R88D KN150H ECT GS Series ServoD R88D KN15F ECT Rev 2 1 RB N15F ECT G5 Seri ervoDrin R88D KN15H ECT Rev 2 1 RBBD KN15H ECT G5 Series ServoDri R88D KN20F ECT Rev 2 1 KN20F ECT G5 Series ServoDrin H R88D KN20H ECT Rev 2 1 RB8D KN20H ECT G5 Series ServoDri Model R88D KNO1H ECT Product name R88D KNO1H EC Revision 2 1 Vendor OMRON Corporation Comment 200V 100W ServoDri URL All vendors Groups Servo Drives EQ Frequency Inverter Digital 10 Analog IO Encoder Input P Vision Sensor Show hidden slaves R88D KN30F ECT Rev 2 1 RSSD KN30F ECT G5 Seri ervoDrin R88D KN30H ECT Rev 2 1 R88D KN30H ECT G5 Se ServoDri R88D K
197. Sta WORD MC Error Status Gives the collective error status of all error sta tus for the Motion Control Function Module MC ComErrSta WORD MC Common Error Gives the collective error status of all errors that Status occur for common processing in the Motion Con trol Function Module MC AX ErrSta ARRAY 0 63 OF Axis Error Status Gives the collective error status of all error sta WORD tus for each axis MC GHRP ErrSta ARRAY 0 31 OF Axes Group Error Gives the collective error status of all error sta WORD Status tus for each axes group 11 4 NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting The meanings of the individual bits in the above error status variables are given below Bt Name Deseipion Value Meaning 15 Master Detection This bit indicates whether the master detected an TRUE Error error in the slaves that it manages FALSE No error 14 Slave Summary Gives the collective error status of all error status for FASE Error EtherCAT slaves that are assigned to axes in the FALSE No error Motion Control Function Module 8 to 13 Not used 7 Major Fault Indicates if there is a major fault level error oc Error 6 Partial Fault Indicates if there is a partial fault level error ur Error 5 Minor Fault Indicates if there is a minor fault level error Error 4 Observation Indicates if there is an observation level error Error O0 to 3 Not used 1 This bit is not used in the erro
198. System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects variables Cause and correction Attached information Precautions Remarks NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Home Input Homing Direction Limit Input Detected 742A0000 hex The home input and the limit signal in the homing direction were detected at the same time during a homing operation Motion Control Function Module Source details Axis Detection During instruc timing tion execution The axis stops with the stop method for the homing execu tion status Name _MC_AX MFaultLvl Active BOOL Axis Minor Fault Occurrence The wiring of the home input signal or Correct the wiring of the home input Check to see if any of the conditions limit signal is incorrect signal or limit signal that are given as causes exist in The home input sensor or limit sensor is installed in the wrong location The contact logic of the home input signal or limit signal is not correct Correct the installation location of the 2 vance home input sensor or limit sensor so that they do not turn ON at the same time Correct the contact logic N C N O of the home input signal or limit sen sor The home input signal output device Replace the home input signal output or limit sensor failed device or limit sensor None
199. T process data communications are active and normal before you exe cute motion control instructions Refer to 10 2 1 Monitoring EtherCAT Communications and Turning ON Servos for details e Write the user program so that Execute is FALSE during the first period in which the instruction is executed 6 4 2 Execution Timing Charts The motion control instructions in the MC Function Module are function blocks that are unconditionally executed This section calls instructions that are executed according to the Execute input variable exe cute type instructions and instructions that are executed according to the Enable input variable enable type instructions Execution condition Description Execute variable These motion control instructions are executed when the input variable Execute to the instruction changes to TRUE These instructions will continue execution until one of the following status occurs e The specified operation is completed e Another motion control instruction is executed and interrupts operation e The instruction is restarted when Execute changes from FALSE to TRUE again Values for the other input variables are input when Execute changes to TRUE Enable variable These motion control instructions are executed every period while the input variable Enable to the motion control instruction is TRUE As long as Enable is TRUE the other input variables are also input every period However MC MoveJog input variables Veloc it
200. Velocity ErrorlD Mv Feed ErrlD Mv Feed Acc Acceleration Mv Feed Dec Deceleration Jerk Mv Feed Dir Direction Mv Feed Mm MoveMode Mv Feed Feeds FeedDistance Mv Feed FeedVel FeedVelocity BufferMode ErrorDetect ST Programming f the input parameters for interrupt feeding are not set the target values and other parameters are set IF InitFlagZFALSE THEN Parameters for MC MoveFeed P ix sch 3 m D x x c o m TI D D Si 2 Mv Feed TrigRef Mode eMC TRIGGER MODE mcDrive Mv Feed TrigRef LatchlD eMC THIGGER LATCH IDs mcLatch1 Mv Feed TrigRef InputDrive eMC TRIGGER INPUT DHRIVEs mcEncoderMark Mv Feed TrigVar FALSE Mv_Feed_Pos LREAL 2000 0 Mv_Feed_Vel LREAL 1000 0 Mv_Feed_Acc LREAL 10000 0 Mv_Feed_Dec LREAL 10000 0 Mv_Feed_Dir eMC_DIRECTION _mcCurrentDirection Mv_Feed_Mm _eMC_MOVE_MODE _mcVelocity Mv_Feed_FeedDis LREAL 500 0 Mv_Feed_FeedVel LREAL 500 0 The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag TRUE END_IF When StartPg is TRUE the Servo is turned ON for axis O if process data communications are active and normal IF StartPg TRUE AND EC PDSIavTbI MC AxisO00 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwr_En TRUE ELSE Pwr_En FALSE END_IF f a minor fault level error occurs for axis O the error handler for the device F
201. a mr T PCE 11 6 manual operation EEN REENEN 7 2 Index 4 master axis EE 9 14 master axis phase shift cccccssseeeeeceeeeeeeeeeeeeeeeees 9 22 master sync start position 9 15 Maximum Acceleration eeeeeeeeeeeseeee 5 11 Maximum Deceleration eeeeeesseese 5 11 Maximum Interpolation Acceleration 5 22 Maximum Interpolation Deceleration 5 22 Maximum Interpolation Velocity 5 22 Maximum Jog Velocity kk 5 11 Maximum Negative Torque Limit 5 13 maximum number of cam data 9 14 Maximum Positive Torque Limit 5 13 EK dai ie Ee ee EE 5 11 MC Common Error Status seeeeeeeeeese 11 4 MC Common EITOFS EE 11 6 MC Common Minor Fault sseesesss 6 18 MC Common Minor Fault Code 6 18 6 22 MC Common Minor Fault Occurrence 6 18 MC Common Observation eeeeesseeee 6 18 MC Common Observation Code 6 18 MC Common Observation Occurrence 6 18 MC Common Partial Fault essssssse 6 18 MC Common Partial Fault Code ccececeeeeeeeee es 6 18 MC Common Partial Fault Occurren
202. able that represents the cam data as a structure array A data table that contains cam data If phase data is not in ascending order the cam table is treated as an illegal cam table The first point in the cam data The last point of valid cam data in the cam data If the cam end point is less than the number of cam data all phases and displacements after the cam end point will be 0 The start point for a cam block It is the same as the cam start point at the start of the cam operation If the cam profile curve continues this will be the same as the cam block end point The end point for a cam block It is the same as the cam end point at the end of the cam operation If the cam profile curve continues this will be the same as the cam block start point The cam block end point is defined as horizontal axis vertical axis phase end point displacement end point Cam data that is created by dividing up the cam profile curve in the Cam Editor The cam data changed by the user program while the CPU Unit is in operation The axis that serves as the input to the cam operation You can specify either Linear Mode or Rotary Mode The axis that serves as the output from the cam operation You can specify either Lin ear Mode or Rotary Mode The relative distance on the master axis from the start point of the cam table The relative distance on the slave axis from the master sync start position The cam data other than the cam start poi
203. actors instruction for the MC MoveAbsolute Absolute Positioning instruction is given below Previous Instruction MC MoveAbsolute Execute Busy Active Done CommandAborted Current Instruction Enable Enabled Busy VelFactor Velocity Override factor 20096 Override factor 10096 Override factor 5096 Time For details refer to the MC SetOverride Set Override Factors instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 NJ series CPU Unit Motion Control User s Manual W507 9 2 9 Motion Control Functions Single axis Synchronized Control 9 2 1 This section describes the operation of synchronized control for single axes Overview of Synchronized Control Synchronous control synchronizes the position of a slave axis with the position of a master axis The command position or actual position of any axis can be specified for the master axis If the command velocity for the slave axis exceeds the maximum velocity that is set in the axis parameters the com mand is performed at the maximum velocity of the axis If this occurs any insufficient travel distance is distributed and output in the following periods 9 2 2 Gear Operation This function specifies the gear ratio between the master axis and the slave axis and starts operation Start gear operation with the MC Gearln Start Gear Operation instruction End synchronization with the MC GearOut End Gear Operation in
204. adder Diagram Command current position of axis O CamTable1 CamTableO CamTable1 MV ABS Mu Abs Act CAMIN CAMIN Execute Lamm Bsy Camin Ac Gamm InCamO Gamm InCam1 Camin InSync e ST Programming Command current position of axis O CamTable1 CamTableO CamTable1 MV ABS Mu Abs Act CAMIN Camin Ex Lamm Bsy Camin Act Gamm InCamO Gamm InCam1 Camin InSync 10 46 CamProfileO A CamProfile1 d bL f Ll CamProfileO A CamProfile1 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N m D I Ladder Diagram A O To change from one cam table to another two instances of the MC Camln Start Cam Operation instruction with 3 the same instance name are used A different output parameter is assigned to the nCam Cam Motion output vari ns able from each instance An error will occur if you assign the same output parameter In this sample a JMP Jump S 3 instruction is used so that both instances are not executed at the same time z 2 o qc When StartPg is TRUE the status of process data communications of axis O is checked to see if communications are active and normal EE _EC_PDSlavTbI MC_Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress LockO When StartPg is TRUE the status of process data communications of axis 1 is checked to see if communications are active and normal ee _EC_PDSlavTbI MC_Axis001 Cfg NodeAddress EC CommErrTbI MC
205. ag TRUE END IF sch e fe co c oO Q Di et 2 mE 2 D Di 3 m Oo D m 2 CL H o 2 mE 5 Q D X f a minor fault level error occurs in the MC Common Error Status Variable the error handler for the device is executed Program the FaultHandler according to the device IF MC COM MFaultLvl Activez TRUE THEN FaultHandler END JE f StartPg and WriteCamData are TRUE the values in the cam data variable are changed The phases and displacements are set in CamProfile 100 to CamProfile 109 When the changes to the cam data variable are completed WriteDone is changed to TRUE IF StartPg TRUE AND WriteCamData TRUE THEN FOR Index UINT 10 100 TO UINT 10 109 DO PhaseData PhaseData REAL 0 DistanceData DistanceData REAL 3 0 CamProfileO Index Phase PhaseData CamProfileO Index Distance zDistanceData END FOR WriteDone TRUE END IF f the changes to the cam data variable are completed the Set Cam Table Properties instruction is executed IF WriteDonez TRUE THEN Set Cam Ex TRUE END IF IMC SetCamTableProperty SET CAM CamTable CamProfileO Execute Set Cam Ex Done gt Set Cam D EndPointlndex gt Set Cam Epi MaxDataNumber gt Set Cam Mudn Busy gt Set Cam B CommandAborted gt Set Cam Ca Error gt Set Cam Em ErrorlD gt Set_Cam_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 91 10 Sample Programming
206. ag Z TRUE END IF When StartPg is TRUE the Servo is turned ON for axis O if process data communications are active and normal IF StartPg Z TRUE AND EC PDSIavTbI MC AxisO00 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwr_En TRUE ELSE Pwr_En FALSE END_IF f a minor fault level error occurs for axis O the error handler for the device FaultHandler is executed Program the FaultHandler according to the device IF MC Axis000 MFaultLvl Activez TRUE THEN FaultHandler END IF sch Se o eo O 2 Di 2 a 2 mE 2 D m D p H O o mE o 2 oO lt JU P D X D O c o 2 O h Di 2 3 o mE c O Ee o 2 f the Servo is ON for axis O and home is not defined the MC Home instruction is executed IF Pwr Status TRUE AND MC Axis000 Details Homed FALSE THEN Hm_Ex TRUE END_IF After homing is completed for axis 0 absolute positioning is executed if it is not already in progress IF Hm_D TRUE AND Mv_Abs_Act FALSE THEN Mv_Abs_Ex TRUE ELSE Mv_Abs_Ex FALSE END_IF When ReExeSw changes to TRUE the absolute positioning instruction is re executed to change the target position to 2000 IF ReExeSw TRUE THEN Mv Abs Pos LREAL 2000 0 Mv Abs Ex TRUE END_IF MC_Power PWR Axis MC Axis000 Enable Pwr En Status gt Pwr Status Busy gt Pwr Bsy Error gt Pwr Err NJ series
207. al W507 10 89 10 Sample Programming 10 2 18 Updating the Cam Table End Point Index This sample increases the valid number of data points by 10 in a cam table with a maximum number of data points of 110 and a valid number of data points of 100 It also updates the end point index Main Variables Used in the Programming Samples Variable name Data type Default Comment CamProfileO ARRAY 0 109 OF This is a cam data variable with a maximum sMC CAM REF number of data points of 110 It contains 100 valid cam data points and 10 null cam data points WriteCamdata BOOL FALSE This variable is used to start changing the cam data It is changed to TRUE to start editing WriteDone BOOL FALSE This variable is used to indicate when the changes to the cam data are completed It changes to TRUE when the changes to the cam data are completed The array elements ARRAY O N are set with the Cam Editor in the Sysmac Studio The range of the array is O to 109 in this sample Ladder Diagram The axis parameters are set When setting the parameters is completed nitFlag is changed to TRUE InitFlag The phases and displacements for null cam data are set PhaseData HEAL 299 0 DistanceData REAL 2250 0 The Initialization Completed Flag is changed to TRUE InitFlag TRUE If a minor fault level error occurs in the MC Common Error Status Variable the error handler for the device FaultHandler is executed P
208. al W507 3 27 3 Configuring Axes and Axes Groups 3 28 NJ series CPU Unit Motion Control User s Manual W507 Checking Wiring from the Sysmac Studio This section describes the MC Test Run operations of the Sysmac Studio You can use the MC Test Run to monitor sensor signals check Servomotor wiring and more all without any programming 4 1 Functions of the Sysmac Studio 4 2 4 1 1 MG TesE RUN FUNCION 4 sena dotado ER 4 2 4 1 2 Application Procedure 4 4 4 1 3 Axis Parameter Setting Example 4 5 4 1 4 Starting the MC Test Run Function eee 4 6 4 2 Monitoring Sensor Signals 0 00 cece 4 7 4 3 Checking Motor Operation eese 4 8 4 3 1 Turning ON Bun e WEE 4 8 E ee ue WEEK 4 8 5 5 HON Gets 3d EE EE 4 9 4 3 4 Absolute POSITIONING Scie tetas that v vt wet a ed e e Deo vd uut 4 10 4 3 5 Relative POSIIONING WEE 4 11 NJ series CPU Unit Motion Control User s Manual W507 4 1 4 Checking Wiring from the Sysmac Studio 4 1 Functions of the Sysmac Studio This section describes how to use the MC test run function to check wiring and basic settings You can use the MC test run function in the Sysmac Studio to check wiring without any programming 4 1 1 MC Test Run Function The MC test run operation supports the following functions Axis operation Deceleration A deceleration stop is performed during the MC stop Test Run S
209. al Configuration of the CPU Unit This section provides an overview of the internal mechanisms of the NJ series CPU Unit The CPU Unit has the following software configuration The Motion Control Function Module is a software module that performs motion control Motion Control Function EtherCAT Master Function Other Function Module Module Modules PLC Function Module OS Refer to the NJ series CPU Unit Hardware User s Manual Cat No W500 for details The PLC Function Module runs on top of the OS The other Function Modules run on top of the PLC Function Module A description of each Function Module is given in the following table Function Module name Abbreviation Description PLC Function Module PLC This module manages overall scheduling executes the user program sends commands to the Motion Control Function Module and provides interfaces to USB and the SD Memory Card Motion Control Function Module MC This module performs motion control according to the commands from motion control instructions that are executed in the user program It sends data to the EtherCAT Master Function Module EtherCAT Master Function Module ECAT This module communicates with the EtherCAT slaves as the EtherCAT master Note Refer to the NJ series CPU Unit Hardware User s Manual Cat No W500 for details on other Function Mod ules This manual provides the specifications and operating procedures for the Motion Control Function Mod ule
210. ame as the command position However there is some times calculation error because processing is performed with long reals in the MC Function Module 2 This is used when there is no actual encoder 6 14 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming 6 6 System defined Variables for Motion Control This section describes the variables of the MC Function Module 6 6 1 Overview of System defined Variables for Motion Control The NJ series Controller is compliant with the IEC 61131 3 standard Parameter settings status information and other data are handled as variables in the user program in the NJ series Controller Of these system defined variables that belong to the MC Function Module are called system defined variables for motion control i Types of System defined Variables for Motion Control The following table lists all of the types of system defined variables for motion control System defined System defined vari MC Common You can monitor the overall status of the variables ables for motion con Variable MC Function Module trol Axis Variables You can monitor axis status and the set tings of part of the axis parameters Axes Group You can monitor axes group status and the Variables settings of part of the axes group parame ters P o o lt o mr OD SZ Q it h 3 o o S m fo 2 o o Oo Oo EE Oo 3 O Oo 3 mp 2 e MC Common Variable Y
211. ample the Execute input variable for the MC GroupDisable Disable Axes Group instruction changes to TRUE to disable the axes group If the external button is ON and the command current velocity for the axes group is zero the error is reset with the MC GroupReset Reset Axes Group Error instruction Samples are provided for both ladder diagram and ST programming Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC_Group000 sGHOUP REF E is the Axes Group Variable for axes group MC_Group000 MFaultLvl Active BOOL FALSE THUE when there is a minor fault level error for axes group 0 MC_Group000 Details Idle BOOL FALSE TRUE when the command interpolation velocity for axes group 0 is zero except when waiting for in position state MC Axis000 sAXIS REF HEF This is the Axis Variable for axis O MC Axis000 MFaultLvl Active SAXIS REF o er when there is a minor fault level error for axis O MC_Axis000 Details Homed FALSE TRUE when home is defined for axis 0 MC Axis001 sAXIS REF This is the Axis Variable for axis 1 MC Axis001 MFaultLvl Active mem TRUE when there is a minor fault level error for ba 1 MC Axis001 Details Homed mn FALSE TRUE when home is defined for axis 1 Pwr1 Status Er FALSE This variable is assigned to the Status output variable from the PWR1 instance of the MC Power instruction It is TRUE when the Servo is ON Pwr2 Status BOOL FALS
212. an EtherCAT slave You cannot save a cam table to a file when non volatile memory is being accessed by another operation e he command deceleration rate exceeded the deceleration warning value The torque command value exceeded the positive torque warning value The torque command value exceeded the negative torque warning value In Linear Mode the command position when converted to pulses exceeded the upper limit of signed 40 bit data In Linear Mode the command position when converted to pulses exceeded the lower limit of signed 40 bit data The actual position when con verted to pulses exceeded the upper limit of signed 40 bit data The actual position when con verted to pulses exceeded the lower limit of signed 40 bit data A warning was detected for the EtherCAT slave that is allocated to the axis An attempt was made to exe cute the MC SaveCamTable instruction when another opera tion was accessing the non vol atile memory e g transfer or data trace operation from the Sysmac Studio NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Lwa LIE E DE IT JL i page 11 47 page 11 47 page 11 48 page 11 48 page 11 49 page 11 49 page 11 50 page 11 50 11 17 mmh I N Oo c 0 gt O Oo Gei 5 SOT 104 L ck 11 Troubleshooting wea 94200000 hex 94210000 hex 94220000 hex 11 18 Notice o
213. an instruction instance These outputs are defined as follows e Error The output variable Error changes to TRUE to indicate that an error occurred during the execution of the instruction instance e ErrorlD Error Code This is an error code that represents the cause of the error The output variables Done InVelocity Target Velocity Reached nGear Gear Ratio Achieved and nSync all represent normal completion or normal operation and therefore will never be TRUE when the output variable Erroris TRUE Types of errors e Instruction instance errors eg parameter out of range and illegal condition for state transition e Axis errors eg Following Error Over Limit and Servo Drive errors Some instruction instance errors may not cause an axis error but will cause the axis to Stop Operation of output The output variable Done InGear Gear Ratio Achieved or nSync will change to TRUE variable Done when the instruction ends operation normally or when the commanded condition is reached When working with multiple instructions that operate on the same axis the out put variable Done from the first instruction will not change to TRUE if another operation instruction takes over before the axis operation for the first instruction reaches the target P I m X OD O c e Oo 3 fo 3 o o mp fo mp c o O Oo cx Oo 3 O Oo 3 mp 9 5 o mp c O Oo 3 o position Operation of output The output variable CommandAbor
214. an the command tion Or increase the Following Error tion as best you can Over Limit Value within the range that will not create problems Attached None information Precautions None Hemarks 11 28 NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Event name Immediate Stop Input 64490000 hex Meaning The immediate stop input turned ON Source Motion Control Function Module Source details Axis Detection Continuously timing mm Effects According to the Immediate Stop Input Stop Method 3 gt variables MC AX MFaultL vl Active BOOL Axis Minor Fault Occurrence 9 correction An immediate stop input signal was Turn OFF the immediate stop input The goal is to detect the immediate detected signal stop input Preventative measures are not required The immediate stop input signal is not If the error occurs even when the Make sure that the immediate stop connected correctly or the logic set immediate stop input signal is OFF signal connection and logic setting for A ting for the immediate stop input is correct the immediate stop signal the immediate stop input are correct E wrong connection and logic setting for the N immediate stop input m Attached None S information 5 Precautions You must turn OFF the immediate stop input signal before you reset the error Remarks o 2 n Event name Positive Limit Input Detected 644A0000 hex Meaning The positive limit input turned ON Source Motion Control Functio
215. and None CAT slave that is allocated to the axis check the slave error code reported in Slave Error Code Report 94220000 hex and perform the required correc tions None None Axes Group Composition Axis Error 74300000 hex An error occurred for an axis in an axes group Motion Control Function Module Source details Continuously timing m program Continues Operation If an immediate stop is performed for one of the composi tion axes operation will follow the setting of the Axes Group Stop Method Selection Otherwise an interpolated path stop is performed Variable 0000000 Datatype Datatype Name GE MFaultLvl Active BOOL Axes Group Minor Fault Occurrence An error occurred for an axis in an Check the error code of the axes in None the axes group and remove the cause of the error axes group that was in motion None When an axis error occurs any axes group that contains that axis will not operate MC Common Error Occurrence 74330000 hex An MC common error occurred Motion Control Function Module Source details Continuously timing Operation is not possible for relevant axis Check the MC common error that None Partial fault level MC common error occurred and remove the cause of the error occurred None When a partial fault level MC common error occurs the axis and axis group do not operate NJ series CPU Unit Motion Control User s Manual W507 11 39
216. and position of the slave axis are determined by the ratio of the travel distances of the mas ter axis and the slave axis as shown in the following figure The sync start position shown in the follow ing figure represents the position where the sync start condition is met Duiuonisog snouoJuou S 9 Z 6 NJ series CPU Unit Motion Control User s Manual W507 9 19 9 Motion Control Functions Master axis position MasterDistance for following master axis Time Slave axis position SlaveDistance E m lh e en rm rm rm rm mm mm rm rm rm pm em rm rm zm mm pm rm rm ka es rm rm zm zm rm rm rm Pp zm mm rm rm rm pm mm Slave axis velocity e rm rm rm rm mm rm rm mm mm omm mm zm zm rm pm rm air rm mm rm mm rm rm mm rm mm rm mm rm Time For details on synchronous positioning refer to the MC MoveLink Synchronous Positioning and MC Stop instructions in the NJ series Motion Control Instructions Reference Manual Cat No W508 9 20 NJ series CPU Unit Motion Control User s Manual W507 9 2 Combining Axes 9 Motion Control Functions The sum or difference of two command positions can be used as the command position for the slave axis Operation starts when the MC CombineAxes instruction is executed Use the MC Stop instruc tion to stop axes in motion The following figure is an example demonstrating operation when subtracting axes S ave Slave Axis command current position Master Master Axis command c
217. ansfer the project to the Controller This section gives the procedures to use the Sysmac Studio to set up an axes group in a project that already contains the axes I Starting the Sysmac Studio 1 Start the Sysmac Studio and open the project E7 Offline New Project T Open Project P Author Created 6 23 2011 10 09 33 PM Last Modified 6 23 2011 10 30 52 PM Comment Delete Open 3 22 NJ series CPU Unit Motion Control User s Manual W507 3 Configuring Axes and Axes Groups I Adding an Axes Group 1 Right click Axes Group Settings in the Multiview Explorer and select Axes Group Settings from the Add Menu V uu 23 W s Eieosemmng 000000000 EE Programmin E Brei W new_NJ501_0 v v Configurations and Setup w i5 Motion Control Setup V 5 Axis Settings o ao 0 1 MC Axis001 1 3 Axes Group Settinas l ef Cam Data Set Event Setting fr Task Settings F7 Data Trace Settings bi e I o it 3 Ve U Oo OH o Q c o o h Oo gt X tu o C Oo c Kei o An axes group is added to the Multiview Explorer The default name for the new axes group is MC GroupOOO Ss aA su New Project SA A Configurations and Setup jQ Qc unies Cearseach search M new NJ501 0 v i ejnpeoojg Dunes z v e v Configurations and Setup Lei Axes group number a Axes group use Unused axes group e w i5 Motion Control Setup EON CES
218. ar velocity is constant if the following two conditions are met e The target velocities of the current instruction and the buffered instruction are the same e The deceleration rate of the current instruction and the acceleration rate of the buffered instruction are the same I Combining Transition Modes and Buffer Modes The following table shows the combinations of Transition Modes and Buffer Modes OK Operation possible Generates an error and stops Buffer Mode Blending Blending Blending Blending Transition disabled TMNone Superimpose corners m nerSuperimpose The combinations of Blending Modes when transition is disabled TMNone will operate in the same way as for Buffered Mode 9 64 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 8 Other Functions This section describes other functions of the MC Function Module 9 8 1 Changing the Current Position The command current position of a Servo axis can be changed to a specified value The actual current position changes to a value that maintains the current following error with the command current posi tion For an encoder axis you can change the actual current position Use the MC SetPosition instruc tion to specify the actual position you want to modify You can change the actual position even while an axis is in motion If positioning to an absolute value is being executed positioning will be performed to the target po
219. are correct Correct any problems that are found NJ series CPU Unit Motion Control User s Manual W507 Assumed cause Correction Prevention Adjust the commands and load so that an error does not occur Make sure that there are no errors in the Servo Drives and make sure that the settings are correct Event name Meaning Source Error attributes Effects 11 Troubleshooting Master Axis Position Read Error 743A0000 hex The synchronized instruction was not executed because an error occurred in the position of the master axis of the syn chronized instruction Motion Control Function Module Level Axis Source details variables Cause and correction Attached information Precautions Remarks _MC_AX MFaultLvl Active BOOL Detection At or during instruction execu tion timing Operation is not possible for relevant slave axis Relevant slave axis decelerates to a stop if it is in motion Name Axis Minor Fault Occurrence Assumed cause Correction Prevention EtherCAT process data communica tions are not established for the mas ter axis of the synchronized instruction The slave of the master axis for the synchronized instruction was discon nected An Absolute Encoder Current Position Calculation Failed error 6458000 hex was detected for the master axis of a synchronized instruction None None If the _EC_PDSlavTbl Process Data Communicating Slave Ta
220. arning Value Interpolation Deceleration Warning Value Axes Group Stop Method Correction Allowance Ratio Refer to 5 3 Axes Group Parameters for details on axes group parameters e Settings Required to Use an Axes Group The following settings must be made to use the axes groups that are created with the Sysmac Stu dio Axes Group Axes Group Axes group numbers are automatically set in the 5 21 Basic Settings Number order that the axes groups are created Axes Group Use Select Use Select the axis composition to control Composition Axes This parameter sets the axes to assign to the axes group P Precautions for Correct Use Set appropriate values for the maximum interpolation velocity stop method and other items based on the operating conditions 3 18 NJ series CPU Unit Motion Control User s Manual W507 3 Configuring Axes and Axes Groups 3 3 3 Introduction to Axes Group Variables Axes Group Variables are system defined variables for the setting information and the monitoring infor mation such as the actual position and error information for the axes groups controlled by the MC Function Module When you create axes groups with the Sysmac Studio Axes Group Variables are reg istered in the variable table in the order that the axes groups are created Axes Group Variables are structures with a data type of sGROUP REF Axes Group Variable Names Each Axes Group Variable in the MC Function Module has two
221. ast position of the zone to check The nZone output variable for the Zone Monitor instruction will change to TRUE when the position of the axis enters the specified zone You can also specify multiple zones for a single axis Zones can overlap For details on zone monitoring refer to the MC_ZoneSwitch Zone Monitor instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 NJ series CPU Unit Motion Control User s Manual W507 9 67 p co Oo gt D Tl c 5 ct O 5 0 Duuojuo N 9uOZ 4 8 6 9 Motion Control Functions 9 8 5 Software Limits 9 68 Actual positions can be monitored in the MC Function Module software This function is separate from the hardware based limit input signals Set the range to monitor by setting the software limits in the Pos itive Software Limit and Negative Software Limit axis parameters During normal positioning motion is possible within the range of these software limits Set software limits to prevent potential damage to machinery caused by mistakes in the user program or improper operation Negative software limit Positive software limit Software range of motion Negative limit input signal Positive limit input signal Electrical range of motion Mechanical stopper Mechanical stopper Mechanical range of motion l 4 e Axis Parameters That Are Related to Software Limits Software Limits Select the software limit function 0 to 4
222. at the same time Correct the contact logic N C N O of the home proximity sensor or limit The contact logic of the home proxim ity signal or limit signal is not correct sensor The home proximity sensor or limit Replace the home proximity sensor or sensor failed limit sensor None None Home Input Homing Opposite Direction Limit Input Event code 74290000 hex Detected The home input and the limit signal in the direction opposite to the homing direction were detected at the same time during a homing operation Motion Control Function Module Source details Axis Detection During instruc timing tion execution The axis stops with the stop method for the homing execu tion status Check to see if any of the conditions limit signal is incorrect signal or limit signal that are given as causes exist in The home input sensor or limit sensor Correct the installation location of the advance is installed in the wrong location home input sensor or limit sensor so that they do not turn ON at the same time Correct the contact logic N C N O of the home input signal or limit sen The contact logic of the home input signal or limit signal is not correct sor The home input signal output device Replace the home input signal output or limit sensor failed device or limit sensor None None NJ series CPU Unit Motion Control User s Manual W507 Event name Meaning Source Error attributes Effects
223. ata communications are not active the Servo for axis 1 is turned OFF IF StartPg TRUE AND EC PDSIavTbI MC Axis001 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis001 Cfg NodeAddress FALSE THEN Pwr2_En TRUE Turn ON the Servo for axis 1 ELSE Pwr2_En FALSE Turn OFF the Servo for axis 1 END_IF f there is a minor fault level error for a composition axis in the axes group execute the error handler FaultHandler IF MC Axis000 MFaultLvl Active TRUE OR MC Axis001 MFaultLvl Activez TRUE OR MC_Group000 MFaultLvl Active TRUE THEN FaultHandler Program the FaultHandler according to the device END_IF If the Servo is ON for axis 0 and home is not defined the MC Home instruction is executed IF Pwr1_Status TRUE AND MC Axis000 Details Homed FALSE THEN Hm1 Ex TRUE END JE sch P e A m x x O I o 2 em O may 2 pe 2 ok m x O JU D o D 2 h O E D X D o C Q O x e 2 pe m D ok O O D pe G O 2 If the Servo is ON for axis 1 and home is not defined the MC Home instruction is executed IF Pwr2 Status TRUE AND MC Axis001 Details Homed FALSE THEN Hm2_Ex TRUE END JE f the axes group is disabled and home is defined for axis and axis 1 the axes group is enabled IF MC_Group000 Status Disabled T RUE AND Hm1 DZTRUE AND Hm2_D TRUE THEN Grp En Ex TRUE END IF f there is a minor fault l
224. ations and SIandards ocoeese eerie oet orna n oen ues rau soap auos a kre sauna eg egene 24 Unit VerSiOBS cod qe a a a E DI ME ED CDM CL UP D MELDE 26 Related Manuals ee aN 29 PROVISION HISIONY EE 31 Section 1 Introduction to the Motion Control Function Module E NN EE 1 2 1 2 System ee eh de UI Le BEE 1 3 1 3 Application RN Ge E ge 1 4 E SPESCITICATIONS NR RU 1 6 1 4 1 Eelere M S 1 6 1 4 2 Performance Specifications isss 9 tsi accesso cea de LH bes Uu a Sask ang tesa ester ls Ld ed epe 1 6 1 4 3 S lstegtel Rolers telle Ie PEN SR TU ROUTE mE 1 7 Section 2 Motion Control Configuration and Principles 2 1 Internal Configuration of the CPU Uhnit eeeeeee eese eene enne enne nnne 2 2 2 2 Motion Control COMM GUA ni sic ieiuna Dose eco aces ae eed cusa Duende exo E cases case eoa o Eos aia 2 3 2 9 Motion Control Principles rco pee etes osa de o ipao gun comes a Cada caosa andae oo vc Ca a eto dad etis duce aUas 2 4 2 3 1 e NES M CP TT aeaaleo ee a a 2 4 2 3 2 Example of Task Operations for Motion Control 2 7 2 4 EtherCAT Communications and Motion Control EEN KEEN RR rere 2 11 2 4 1 CAN Application Protocol over EtherCAT Co 2 11 2 4 2 Relationship between EtherCAT Master Function Module and MC Function Module 2 12 2
225. ations and Standards Conformance to EC Directives Applicable Directives e EMC Directives Low Voltage Directive i Concepts e EMC Directive OMRON devices that comply with EC Directives also conform to the related EMC standards so that they can be more easily built into other devices or the overall machine The actual products have been checked for conformity to EMC standards Whether the products conform to the standards in the system used by the customer however must be checked by the customer EMC related performance of the OMRON devices that comply with EC Directives will vary depending on the configuration wiring and other conditions of the equipment or control panel on which the OMRON devices are installed The customer must therefore perform the final check to confirm that devices and the overall machine conform to EMC standards Applicable EMC Electromagnetic Compatibility standards are as follows EMS Electromagnetic Susceptibility EN 61131 2 and EN 61000 6 2 EMI Electromagnetic Interference EN 61131 2 and EN 61000 6 4 Radiated emission 10 m regulations Low Voltage Directive Always ensure that devices operating at voltages of 50 to 1 000 VAC and 75 to 1 500 VDC meet the required safety standards The applicable directive is EN 61131 2 e Conformance to EC Directives The NJ series Controllers comply with EC Directives To ensure that the machine or device in which the NJ series Controller is used
226. attern for X Axis Coordinates Velocity Start1 End Time Operation Pattern for Y Axis Coordinates Velocity e l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l I l l l l l l l l l l l l l l l l l l l l l l l l l l l l Start2 End2 Time e Superimpose Corners 10 TMCornerSuperimpose The deceleration of the current instruction is superimposed on the acceleration of the buffered instruction Operation is executed in the same amount of time as for the deceleration of the current instruction no matter what is specified as the acceleration for the buffered instruction The superim posed area will apply no jerk even if jerk is specified P N O Oo 3 3 Oo 3 TI c 3 O EE Oo 3 o Oo c fo X D o O Oo Oo 2 fo mp o o O Oo 3 mp 9 The deceleration of the current instruction is superimposed on the acceleration of the buffered instruction Velocity Buffered instruction The output variable Done which indicates the end of a motion control instruction will change to TRUE for TMCornerSuperimpose when the area of superimposition is completed OLJUOD PO CUIPIOOD sexe nin N JO SUOIJONI SU O4JUOD uono w Jo OPON Jejgng UONDEXxE HINW G 2 6 NJ series CPU Unit Motion Control User s Manual W507 9 63 9 Motion Control Functions EN Additional Information The path line
227. attery la Precautions for Correct Use e f you use an absolute encoder connect a battery to the CPU Unit and an absolute encoder backup battery to the Servo Drive e Always execute the MC Home instruction to define home when you use the absolute encoder for the first time after you replace the motor when the battery in the absolute encoder expires or at any other time when the absolute value data is lost e f there is an error for the Battery in the CPU Unit when the power supply to the Controller is turned ON an Absolute Encoder Home Offset Read Error event code 14600000 hex occurs You can use the ResetMCError instruction to reset the error and turn ON the Servo When the Servo is turned ON home is defined with an absolute encoder home offset of O To move to correct positions execute the MC Home instruction to define the correct home position If the power supply to the Controller is turned OFF home will become undefined e After home is defined cycle the power to the Servo Drive After you complete these steps the position is defined by MC Power alone NJ series CPU Unit Motion Control User s Manual W507 8 Homing 8 4 1 Outline of Function To define home with an absolute encoder system the absolute encoder offset compensation is per formed when the MC Power Power Servo instruction is executed Home can also be defined by per forming a homing operation in the same way as for an incremental encoder After home is d
228. aultHandler is executed Program the FaultHandler according to the device IF MC Axis000 MFaultLvl Activez TRUE THEN FaultHandler END IF NJ series CPU Unit Motion Control User s Manual W507 10 43 10 Sample Programming If the Servo is ON for axis O and home is not defined the MC Home instruction is executed IF Pwr Status TRUE AND MC Axis000 Details Homed zFALSE THEN Hm_Ex TRUE END_IF lf homing is defined interrupt feeding is executed IF Hm D TRUE THEN Mv Feed Ex zTHRUE END IF MC Power PWR Axis MC Axis000 Enable Pwr En Status gt Pwr Status Busy gt Pwr Bsy Error gt Pwr Er ErrorlD gt Pwr_ErrlD e MC Home HM Axis Execute Done Busy CommandAborted Error ErrorlD MC_MoveFeed MV_FEED Axis Triggerlnput TriggerVariable Execute Position Velocity Acceleration Deceleration Direction MoveMode FeedDistance FeedVelocity Done InFeed Busy Active CommandAborted Error ErrorlD 10 44 MC_Axis000 Hm Ex gt Hm D gt Hm Bsy gt Hm Ca gt Hm Er gt Hm Ermi MC Axis000 Mv Feed TrigHRef Mv Feed TrigVar Mv Feed Ex Mv Feed Pos Mv Feed Vel Mv Feed Acc Mv Feed Dec Mv Feed Dir Mv Feed Mm Mv Feed Feeds Mv Feed FeedVel gt Mv Feed D gt Mv Feed InFeed gt Mv Feed Bsy gt Mv Feed Act gt Mv Feed Ca gt Mv
229. axes Axis Variable names from the Sysmac Studio to use for the AO to A3 axes An error occurs if you execute the MC GroupEnable Enable Axes Group instruction for an axes group that con tains an unused axis Composition The following table lists the axis compositions you can use with the MC Function Module The default is group disabled Use the Sysmac Studio to set the axis composition according to the actual devices Composition Description 2 axes A two axis configuration is used For example a machine with a two axis Carte sian coordinate system is used 3 axes A three axis configuration is used For example a machine with a three axis Cartesian coordinate system is used 4 axes A four axis configuration is used For example a machine with a three axis Car tesian coordinate system is used with a rotary axis at the end tool H Composition Axes The axes that are in an axes group are called composition axes To make it easier to reuse program ming with interpolation instructions for axes groups commands logical axes axis AO to axis A3 are used instead of axis numbers axis O to axis 63 For the Composition Axes parameter set the axis numbers and logical axis numbers for the axes in the axes group Servo axes or virtual servo axes can be selected for logical axes Use the Sysmac Studio to assign axes from axis AO for the number of axes you selected in the axis composition Set axis numbers from axis AO for each a
230. axis parameters axes group parameters system defined variables for motion control MC common variables axis variables axes group variables homing home zero position A 16 Motion Control Description A software component that executes motion control It performs motion control based on commands from the motion control instructions that are executed in the user program Abbreviation MC Function Module An instruction that is defined as a function block to execute a motion control function The MC Function Module supports instructions that are based on function blocks for PLCopen motion control as well as instructions developed specifically for the MC Function Module Controlling the position of one axis Controlling the velocity of one axis For single axis velocity control the MC Function Module sometimes outputs velocity commands to the Servo Drive and sometimes outputs position commands to the Servo Drive Controlling the torque of one axis Synchronizing the control of one slave axis with one master axis There are two types of single axis synchronized control gear operation in which the axes are synchronized with a gear ratio and cam operation in which the axes are synchronized according to the relationship between phases and displacements in a cam table Controlling an axis with manual operation such as jogging Functions that aid in controlling an axis such as override factor settings and reset ting er
231. ber of the axes group to enable in the MC GroupEnable Enable Axes Group instruc tion to enable operation instructions for an axes group in the user program An instruction error occurs if you execute a motion control instruction for an axes group that is not enabled You can enable more than one axes group at the same time but if you enable more than one axes group that include the same axis an instruction error occurs If you want to operate the same axis in different axes groups for each work process create multiple axes groups that include that axis You can then use the MC GroupEnable Enable Axes Group and MC GroupDisable Disable Axes Group instructions to enable and disable these axes groups as you need to use them If you execute the MC GroupDisable Disable Axes Group instruction during multi axis operation the axes in the group will decelerate to a stop NJ series CPU Unit Motion Control User s Manual W507 5 23 kA e E 0 Q O c o U 9 D j D D m dnouJc sexy ue Buiqeu3 p e G 5 Motion Control Parameters 5 24 NJ series CPU Unit Motion Control User s Manual W507 Motion Control Programming SS This section provides the specifications of a motion control program and the operation procedures that are required up through actual program development 6 1 INTFOGUCHUON ize Ee ee AR RE EE ee 6 2 6 2 Motion Control Instructions 00 0 cee es 6 3 6 2 1 Function Block
232. ble system defined variable for the EtherCAT master of the master axis is FALSE investigate the error in the master axis and remove the cause Check the slave of the master axis and reconnect it if it was discon nected See if an Absolute Encoder Current Position Calculation Failed error 64580000 hex occurred for the mas ter axis and make suitable corrections to restore operation NJ series CPU Unit Motion Control User s Manual W507 If you execute synchronized instruc tions after you turn ON the power supply download data or reset slave communications error make sure that the EC PDSIlavTbl Process Data Communicating Slave Table system defined variable for the EtherCAT master is TRUE for the node of the master axis before you execute the synchronized instruction Make sure that the slave of the mas ter axis is not disconnected during execution of a synchronized instruc tion Do not use an axis with an Absolute Encoder Current Position Calculation Failed error 64580000 hex as the master axis in a synchronized instruc tion 11 43 I N zi Oo c za 0 gt O Oo m 5 suonduoseq 1043 Z Z 11 Troubleshooting Event name Auxiliary Axis Position Read Error 743B0000 hex Meaning The synchronized instruction was not executed because an error occurred in the position of the auxiliary axis of the synchronized instruction Source Motion Control Function Module Source details
233. ble describes the units you can set Unit Description pulse Use this unit to express values in pulses mm Use this unit for comparatively long distance direct operation um Use this unit for precise direct operation NJ series CPU Unit Motion Control User s Manual W507 5 Motion Control Parameters Unit Description nm Use this unit for more precise direct operation than um degree Use this unit for rotary tables or other rotating axes inch Use this unit for direct operation VI N gt x 0 U 9 D j D D m sBumoesgs UOISJOAUOD PUN c G NJ series CPU Unit Motion Control User s Manual W507 5 9 5 Motion Control Parameters Electronic Gear Ratio Unit Conversion Formula Use the electronic gear to set the relationship between the display unit and pulse unit in the MC Func tion Module Use the Sysmac Studio and set the electronic gear ratio MC Function Command position Module Y pulses Se Jl Actual position X units X units Command position value pulses Command position X units x Electronic gear ratio Command Pulse Count Per Motor Rotation 1 Y Pulses Work Travel Distance Per Motor Rotation 2 X Units 1 Foran encoder axis this is the number of pulses per encoder rotation Electronic gear ratio 2 Foran encoder axis this is the travel distance per encoder rotation ES Additional Information The electronic gear converts units to the values that are use
234. ble prop The end point index of the cam table that is specified in the mon erties input parameter is changed items Saving cam tables The cam table that is specified in the input parameter is saved to non volatile memory in the CPU Unit Parameters Writing MC settings Some of the axis parameters or axes group parameters are overwritten temporarily 1 8 NJ series CPU Unit Motion Control User s Manual W507 1 Introduction to the Motion Control Function Module Item Auxiliary Count Modes functions Accelera Automatic accelera tion decel eration control tion deceleration control Changing the accelera tion and deceleration rates In position check Stop Method Re execution of motion control instruc tions Multi execution of motion control instructions Buffer Mode Continuous axes group motions Tran sition Mode Monitoring Software limits functions Following error Velocity acceleration rate deceleration rate torque interpolation velocity interpolation acceleration rate and interpolation decelera tion rate Absolute encoder support Backlash compensation External interface signals NJ series CPU Unit Motion Control User s Manual W507 Description You can select either Linear Mode finite length or Rotary Mode infinite length You can set the display unit for each axis according to the machine The acceleration deceleration curve is automatically adjusted fo
235. bles Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 sAXIS REF This is the Axis Variable for axis O MC Axis000 Status StandStill FALSE TRUE while the Servo is OFF for axis 0 MC Axis000 MFaultLvl Active BOOL FALSE TRUE when there is a minor fault level error for axis O MC Axis000 Details Homed FALSE TRUE when home is defined for axis O Pwr Status BOOL FALSE This variable is assigned to the Status output variable from the PWR instance of the MC Power instruction It is TRUE when the Servo is ON StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communications are active and normal Hm_Ex BOOL FALSE This variable is used to execute the MC Home instruction It is used in ST programming NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N Var Datatype iable name Datatype Default EN Comment o Mv Abs Ex BOOL FALSE This variable is used to execute the 2 MC MoveAbsolute Absolute Positioning y instruction It is used in ST programming Og 3 23 I Timing Chart 8 e Ladder Diagram Pwr Status HM Execute HM D may t MV ABS Execute Mv Abs D Mv Abs Act ib dip 1 4 MC Axis000 Status Standstill MC_Axis000 Dtails Homed es e ST Programming Pwr Status MEME LLL LLL Hm Ex Hm D Hm Bsy Mv Abs D 3 Mv_Abs_Bsy leen d Mv Ab
236. bserva TRUE while there is an axes group observa tion Occurrence tion Code WORD Axes Group Observa Contains the observation code for an axes tion Code group minor fault The upper four digits of the event code have the same value 6 26 NJ series CPU Unit Motion Control User s Manual W507 Variable name Data type sGHOUP REF CEO Axes Group Basic Settings UINT Axes Group Number GrpEnable eMC GROUP USE Axes Group Use SGROUP REF KIM Kinematics Transformation Settings 7 E Axis 0 UINT Composition Axis for Axis AO Axis 1 UINT Composition Axis for Axis A1 Axis 2 UINT Composition Axis for Axis A2 Axis 3 UINT Composition Axis for Axis A3 6 Motion Control Programming Function Gives the settings of the Axes Group Basic Settings parameters Contains the logical number of the axes group This number is accessed to recognize the axes group number when accessing sGROUP REF Shows if the axes group is enabled or dis abled 0 mcNoneGroup Undefined Axes Group 1 mcUnusedGroup Unused Axes Group 2 mcUsedGroup Used Axes Group Contains the definition of the kinematic con versions for the axes group Gives the axis composition of multi axes coor dinated control 0 mcXY two axes 1 mcXYZ three axes 2 mcXY ZU four axes Contains the axis number that is assigned to axis AO Contains the axis number that is assigned to axis A1 Contains the axis number that i
237. c Studio The following setting example is for a one axis device Servomotor Encoder resolution 20 bits rotation 1 rotation 10mm Ball screw l Ball screw pitch 10 mm h Encoder Output Pulse Count per Motor Rotation 20 bits 1 048 576 Parameter name Setting Axis Variable Name Axis1 1 Axis Number 1 2 Axis Use Used axis Axis Type Servo axis Node Address input device 1 3 Unit of Display um Command Pulse Count Per Motor Rotation 1 048 576 4 Work Travel Distance Per Motor Rotation 10 0004 Maximum Velocity 500 000 5 Maximum Jog Velocity 50 0006 Maximum Acceleration 5 000 000 7 Maximum Deceleration 5 000 000 7 Software Limits Immediate stop for command position Positive Software Limit 500 000 8 Negative Software Limit 0 8 Count Mode Linear Mode 1 If there is more than one axis a different variable name is set for each axis 2 fthere is more than one axis a different value is set for each axis 3 4 5 6 E 8 Set the same node address as for the Servo Drive If there is more than one axis a different value is set for each axis The position command unit will be 1 um The maximum velocity will be 3 000 r min 30 m min 0 5 m s 500 000 um s The maximum jog velocity will be 10 of the maximum velocity i e 0 05 m s 50 000 um s The maximum acceleration and the maximum deceleration will be 5 m s The acceleration time to the maximum velocity 3 000 r min will be 0 1 s Set a value that is within the
238. cam table data so that the start point in the cam table were not O phase and displacement of the start phase and displacement of the start during cam operation point are O point are O The phase of the end point in the cam Correct the cam table data so that the Set the cam table data so that the table when converted to pulses was phase of the end point is 1 pulse or phase of the end point is 1 pulse or not 1 pulse or greater during cam greater when converted to pulses greater when converted to pulses operation Attached None information Precautions None Remarks NJ series CPU Unit Motion Control User s Manual W507 11 25 11 Troubleshooting Event name Immediate Stop Instruction Executed 54850000 hex Meaning An Immediate Stop MC ImmediateStop instruction was executed Source Motion Control Function Module Source details Axis Detection At instruction timing execution Effects User program Continues Operation An immediate stop is performed according to the Stop Mode that is set in the StopMode input variable to the MC ImmediateStop instruction If the axis is part of an axes group in motion all other axes will act according to the Axes Group Stop Mode Selection variables MC AX MFaultLvl Active BOOL Axis Minor Fault Occurrence correction An Immediate Stop instruction was i executed Attached None information Precautions None Hemarks Event name Axes Group Immediate Stop Instruction Executed 54860000 hex
239. ce nonannnnannennn 6 18 MC COMMON RE 6 18 MC Common Variable cccceeeceeeeeeeeseeeeeeeeeeeeteeeees 6 18 MC EINOr Stati aside coec vie iocos idera du cedunt es ascend 11 4 MO m p M 6 18 MO TEST FIDE icon cocto cre ionem oer ed 4 2 6 18 MC Test Run functions 4 2 MC AX 0 63 Act Pos Actual Current Position 6 21 MC AX 0 63 Act Trq Actual Current Torque 6 21 _MC_AX 0 63 Act Vel Actual Current Velocity 6 21 MC AX 0 63 Cfg AxEnable Axis Use 6 22 MC AX 0 63 Cfg AxNo Axis Number 6 22 MC AX 0 63 Cfg AxType Axis Type 6 22 MC AX 0 63 Cfg NodeAddress Node Address 6 22 MC AX 0 63 Cmd AccDec Command Current Acceleration Deceleration esses 6 21 MC AX 0 63 Cmd Jerk Command Current Jerk 6 21 MC AX 0 63 Cmd Pos Command Current Position 6 21 MC AX 0 63 Cmd Trq Command Current Torque 6 21 MC AX 0 63 Cmd Vel Command Current Velocity 6 21 MC AX 0 63 Details Homed Home Defined 6 20 MC AX 0 63 Details Idle Standstill 6 20 MC AX 0 63 Details InHome In Home Position 6 20 MC AX 0 63 Details InPosWaiting In position Waiting 2 tio teet ere eneni 6 20 MC AX 0 63 Details VelLimit Command Velocity Saturation
240. city Blending When blending is specified it specifies the command velocity to use by the current instruction to move to the specified target position You can set the BufferMode Buffer Mode Selection input variable to motion control instruction to select one of the following Buffer Modes The main difference between these modes is the timing at which the buffered instructions are executed and the transit velocity Buffer Mode Description of operation Aborting The current instruction is aborted and the multi executed instruction is executed Buffered The buffered instruction is executed after the operation for the current instruction is normally finished Blending The buffered instruction is executed after the target position of the cur rent instruction is reached In this mode no stop is performed between the current instruction and the buffered instruction You can select from the following transit velocities for when the current instruction reaches the target position Blending Low low velocity The transit velocity is set to the target velocity of the current instruction or the buffered instruction whichever is lowest Blending Previous previous The target velocity of the current instruction is used as the transit velocity velocity Blending Next next velocity The target velocity of the buffered instruction is used as the transit velocity Blending High high velocity The transit velocity is set to the target velocity of th
241. click the Save Button e Editing CSV Files e Use spreadsheet software or other CSV compatible software to edit the CSV file e Transferring the CSV File to the CPU Unit e Right click the cam profile to download and select Transfer Cam Table File to Controller from the menu e The Open File Dialog Box is displayed Specify the file to transfer and then click the OK Button e To enable the cam table that you transferred reset the Controller or cycle the power supply to the Controller after the cam table is transferred NJ series CPU Unit Motion Control User s Manual W507 6 29 rji N O D 3 y E D N D 5 2 O D 3 J e D S D E D N 6 Motion Control Programming la Precautions for Correct Use e Synchronize the data with the Controller before you transfer a cam table from a file to the Con troller e f you transfer the cam table to the Controller during a synchronization operation after you transfer a cam table from a file to the Controller the cam table in the Controller is replaced with the data in the Cam Data Settings Either transfer the cam data from the file to the Controller again or do not include the Cam Data Settings in the synchronization data You can also export the Cam Data Settings that were entered from the Cam Editor to a CSV file Refer to the Sysmac Studio Version 1 Operation Manual Cat No W504 for information on the Cam Data Settings and the export procedure 6 30 NJ series CPU
242. control instructions In the following example the Axes Group Variable name for the axes group that was added for the system defined Axes Group Variable name of MC GHP 0 has been changed to MyGroup7 in the Sysmac Studio In out variable AxesGroup Dee Aes MC MoveLinear instance Group Variable N MC Movel mear name MyGroup1 AxesGroup AxesGroup I MyGroup1 Execute Done ke MyGroup1OnDone MovLStart Position Busy MyGroup1OnBusy Velocity Active ke MyGroup1OnActive Acceleration CommandAborted MyGroup1OnCA Deceleration Error E MyGroup1OnError Jerk ErrorlD MyGroup1OneErrorlD g do gt x N Q Oo c e a CoordSystem BufferMode TransitionMode MoveMode You can also use the _WC_GRPI 0 system defined variable in place of MyGroupf1 Refer to 6 2 Motion Control Instructions for details on motion control instructions Refer to the instruction descriptions in the NJ series Motion Control Instructions Reference Manual Cat No W508 for details on motion control instructions ueJ604g Joen 24 ui dnog sexy ue HulAjlioeds p e e NJ series CPU Unit Motion Control User s Manual W507 3 21 3 Configuring Axes and Axes Groups 3 4 Setting Procedures for Axes Groups This section gives the procedures to use the Sysmac Studio to set up an axes group No configuration is required if you are not going to use any axes group command instructions such as linear interpola tion or circular interpolation Tr
243. ctivez TRUE OR MC Axis001 MFaultLvl Active TRUE OR MC COM MFaultLvl Activez TRUE THEN FaultHandler END IF f the Servo is ON for axis O and home is not defined the MC Home instruction is executed for axis O IF Pwr1 Status TRUE AND MC Axis000 Details Homed FALSE THEN NJ series CPU Unit Motion Control User s Manual W507 10 83 10 Sample Programming 10 84 Hm1_Ex TRUE END_IF f the Servo is ON for axis 1 and home is not defined the MC_Home instruction is executed for axis 1 IF Pwr2_Status TRUE AND MC Axis001 Details Homed FALSE THEN Hm2_Ex TRUE END_IF H WriteCamData is TRUE and a cam table file is not being saved the values in the cam data variable are changed The displacements for phases of 0 to 180 are multiplied by 2 and the displacements for phases of 181 to 360 are multiplied by 0 5 When the changes are completed WriteDone is changed to TRUE IF WriteCamdata TRUE AND MC COM Status CamTableBusy zFALSE THEN FOR Index UINT 10 0 TO UINT 10 360 DO IF Index lt UINT 10 180 THEN CamProfileO Index Distance CamProfileO Index Distance REAL 22 0 ELSE CamProfileO Index Distance CamProfileO Index Distance REAL 0 5 END IF END FOR WriteDone TRUE WriteCamdata FALSE END_IF If homing is completed for axis 0 velocity control is executed IF Hm1_D TRUE THEN Vel_Ex TRUE END_IF f the changes to the cam data variable are completed SaveCamtable i
244. cute variable sees 6 10 MC Common Minor Fault Code 6 18 execution and E TEE 6 8 MC COM Obsr Active input parameters sssesesseseeeeeeee eene 6 8 MC Common Observation Occurrence 6 18 miulti executlort EE 9 41 9 56 MC COM Obsr Code operation of output variable Busy 6 9 MC Common Observation Code 6 18 operation of output variable CommandAborted 6 9 NJ series CPU Unit Motion Control User s Manual W507 Index 5 Index operation of output variable Done 6 9 EE eege 6 8 output variable Active cesses 6 9 FE OX CO CUMING snc E 9 35 9 56 timing chart for multi execution 6 13 timing chart for re execution ssusss 6 12 timing charts for enable type instructions 6 12 timing charts for execute type instructions 6 10 motion control Period si e aereo E 2 13 motion control programs ssseeeeeeereeenn 6 2 WMG term c pcc E 6 32 MOVING C RR I 6 25 multi axes coordinated control sssse 9 46 multi execution of instructions 9 41 9 56 N Negative Direction eeeeeeceeeeeeesse 6 20 Negative Limit Input SE 6 20
245. cution of the instruction will not end Latches are used by the following instructions MC TouchProbe Enable External Latch MC MoveFeed Interrupt Feeding MC MoveLink Synchronous Positioning and other instruc tions e Errors do not occur for immediate stop inputs or positive negative limit inputs because the input signals do not exist However there is sometimes calculation error because processing is performed with long reals in the MC Func tion Module e Encoder Axes and Virtual Encoder Axes Encoder and virtual encoder axes differ from servo and virtual servo axes in the following ways e They do not have command positions They have only actual positions e You cannot use motion type motion control instructions for them Node Addresses Input Devices and Output Devices For a servo or encoder axis the node address specifies the node address of the EtherCAT slave device that is assigned to the axis The Node Address parameter cannot be selected if the Axis Type parame ter is set to a virtual axis EN Additional Information e The following example shows the EtherCAT device s node address setting for an OMRON G5 series Servo Drive with built in EtherCAT communications Status indicators RUN ERR L A IN L A OUT Node address switches e The rotary switches in the display area on the Servo Drive are used to set the EtherCAT node address Node address setting range Rotary switch settin
246. d Gamm Ms Camin Ss Camin Mo Camin So Camin Ht Camin Dir gt Camin_InCam NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming e InSync gt Camin_InSync EndOfProfile gt Camin Eop D Index gt Camin Index o Busy gt Camin Bsy 3 Active gt Camin Act ns CommandAborted gt Camin Ca 53 Error gt Camin Err a ErrorlD gt Camin_ErrlD ed MC_Gearln GEARIN Master MC_Axis000 Slave MC_Axis001 Execute Gearin Ex HatioNumerator Gearin_RatN RatioDenominator Gearin RatD Reference Type Gearin_RefTyp Acceleration Gearin_Acc Deceleration Gearin_Dec InGear gt Gearin_InGear Busy gt Gearin_Bsy Active gt Gearin Act CommandAborted gt Gearin Ca Error gt Gearin Err ErrorlD gt Gearin_ErrlD IMC_CombineAxes uoisog HES DUAS eui 1994002 01 SAIND ej youg ure e Duen r z 0L COMBINE Master MC Axis001 Auxiliary MC Axis002 Slave MC Axis003 Execute Combine Ex CombineMode Combine CM Reference TypeMaster Combine_RefMas Reference TypeAuxiliary Combine_RefAux InCombination gt Combine_InComb Busy gt Combine_Bsy Active gt Combine Act CommandAborted gt Combine Ca Error gt Combine Err ErrorlD gt Combine ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 63 10 Sample Programming 10 2 14 Shifting the Phase
247. d Are you sure to start the operation OK Cancel The MC Test Run Tab Page is displayed Es Sysmac Studio Ele Edit View Insert Project Controller Simulation Tools Help a SAABA A Configurations and Setup tenis TIE c n Configurations and Setup d 3 eegal gt fig EtherCAT Status gt Sy CPU Expansion Racks Axis ready to execute Axis disabled I O Map Standstill Discrete motion Stopping Error stopping gt 3 Controller Setup wW i5 Motion Control Setup V 10t Axis Settings i MC_Axis000 0 Event LevellSourcelMessage Name 1 MC Axis001 1 d gt Axes Group Settings Motion error list lt Clearsearch gt search M Homing In home position amp Cam Data Settings gt Event Settings I Task Settings F Data Trace Settings Pe rrocrammng je rr v Pous 4 6 e and remedy EE PER HEEL Status Monitor ONLINE 192 168 250 1 ERR ALM RUN mode NJ series CPU Unit Motion Control User s Manual W507 4 Checking Wiring from the Sysmac Studio 4 2 Monitoring Sensor Signals You can use the input signal display to check sensor signal wiring 1 Select the axis to check on the MC Test Run Tab Page A Configurations and Setup 1 Q Axis selection MC_Axis000 0 Node 10 v Status EE 2 us ursabled Discrete motion Continuous motion Homing Error stopping Home defined In home position ww Motion Control Setup i Y 4 Axis Settings Motion
248. d Understand this Manual Application Considerations SUITABILITY FOR USE OMRON shall not be responsible for conformity with any standards codes or regulations that apply to the combination of products in the customer s application or use of the products At the customer s request OMRON will provide applicable third party certification documents identifying ratings and limitations of use that apply to the products This information by itself is not sufficient for a complete determination of the suitability of the products in combination with the end product machine system or other application or use The following are some examples of applications for which particular attention must be given This is not intended to be an exhaustive list of all possible uses of the products nor is it intended to imply that the uses listed may be suitable for the products e Outdoor use uses involving potential chemical contamination or electrical interference or conditions or uses not described in this manual e Nuclear energy control systems combustion systems railroad systems aviation systems medical equipment amusement machines vehicles safety equipment and installations subject to separate industry or government regulations e Systems machines and equipment that could present a risk to life or property Please know and observe all prohibitions of use applicable to the products NEVER USE THE PRODUCTS FOR AN APPLICATION INVOLVING SERIOU
249. d for positioning by the MC Function Module and motion control instructions Motion control instructions specify the target position as LREAL data However an instruction error will occur if the command position after conversion to pulses by the electronic gear exceeds 40 bits e Setting Example In this example an OMRON G5 series Servomotor with a 17 bit absolute encoder is used The reduction ratio of the reducer is 1 5 and the workpiece moves 10 mm for every rotation of the ball screw Workpiece Servomotor encoder resolution 17 bits rotation 131 072 pulses per rotation Reduction ratio 1 5 Ball screw pitch 10 mm The Unit of Display parameter is set to millimeters The Command Pulse Count Per Motor Rotation is set to the resolution of the encoder on the Servomotor A reducer with a reduction ratio of 1 5 is used so the ball screw turns 1 5 of a rotation for every Ser vomotor rotation The workpiece moves 2 mm 10 mm x 1 5 so the Work Travel Distance Per Motor Rotation is set to 2 Parameter name Setting Unit of Display mm Command Pulse Count Per Motor Rotation 131072 Work Travel Distance Per Motor Rotation 2 With these settings the command unit for positions in the user program is 1 mm For example to move to an absolute position of 100 5 mm the Position Target Position input vari able to the MC_MoveAbsolute Absolute Positioning instruction is set to 100 5 5 10 NJ series CPU Unit Motion Control User s Man
250. d methods to confirm errors Section 2 This section describes how to handle errors Error Troubleshooting Methods Section 3 This section lists all of the error events that can occur on NJ series Controllers Error Tables NJ series CPU Unit Motion Control User s Manual W507 5 Manual Configuration i Sysmac Studio Version 1 Operation Manual Cat No W504 Section Section 1 Introduction Section 2 Installation and Uninstallation Section 3 System Design Section 4 Programming Section 5 Online Connections to a Controller Section 6 Debugging Section 7 Other Functions Section 8 Reusing Programming Section 9 Support Software Provided with the Sysmac Studio Section 10 Troubleshooting Appendices Description This section provides an overview and lists the specifications of the Sysmac Studio and describes its features and components This section describes how to install and uninstall the Sysmac Studio This section describes the basic concepts for designing an NJ series System with the Sysmac Studio and the basic operating procedures This section describes how to create programs with the Sysmac Studio This section describes how to go online with a Controller This section describes how to debug the programs online on the Controller or debug it offline with the Simulator This section describes Sysmac Studio functions other than system design functions This section describes how to reuse the p
251. d on the value of bit A MC_Power_instance MC_Power A Axis1 Axis Axis Enable For details on the MC Power Power Servo instruction refer to the NJ series Motion Control Instruc tions Reference Manual Cat No W508 NJ series CPU Unit Motion Control User s Manual W507 7 Manual Operation 7 3 Jogging Use the motion control instruction MC MoveJog for jogging Body name ES Instance name In out variable MC MoveJog instance MC MoveJog A Axis 1 j Busy B CommandAborted Velocity Error Acceleration Input variables Output variables Specify the axis to jog with the Axis in out variable Change the PositiveEnable input variable to TRUE to start the axis with the specified positive Velocity Target Velocity and Acceleration Acceleration Hate Change PositiveEnable to FALSE to decelerate and stop the axis at the specified Deceleration Deceleration Rate Similarly if you change the NegativeEnable input variable to TRUE the axis will start in the negative direction Change NegativeEnable to FALSE to stop the axis You can perform jogging even if the home has not yet been defined 7 3 1 Jogging Procedure Adding and Setting an Axis Add and set an axis from the Sysmac Studio For details refer to 3 2 2 Setting Procedure Setting Axis Parameters Set the axis parameters from the Sysmac Studio For details refer to 3 2 2 Setting Procedure Writing the User Program Create the u
252. d other devices where both axes perform the same operation la Precautions for Correct Use Even if the permitted following error between axes is exceeded no error will occur in the MC Function Module Check the nvalid output variable to stop axis operation or to take some other action as appropriate in the user program For details on axis following error monitoring refer to the MC AxesObserve Monitor Axis Following Error instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 8 9 In position Check You can check to see if the actual current position has reached the specified range for the target posi tion during positioning or homing After command output of the target position is completed positioning is considered to be finished when the difference between the target position and the actual current posi tion is within the in position range An instruction error occurs if the position is not within the in position within the in position check time Positioning Monitoring Time Upon completion of a command after the command has been executed if in position status is not reached within the set time a positioning monitoring timeout error will occur Following error In position Range The following error absolute value is monitored after positioning finishes If the following error is within th
253. d output devices axes 0 Servo axis 1 Encoder axis 2 Virtual servo axes 3 Virtual encoder axis Specify the node address of the EtherCAT slave 0 to 192 0 device that is assigned to the axis The Node Address parameter cannot be selected if the Axis Type parameter is set to a virtual axis Busy Controlling changes to TRUE if you execute a motion control instruction for an undefined or unused axis Busy changes to FALSE when Execute or Enable changes to FALSE You can set axes as unused axes to enable using the same user program for different axis configurations without the need to delete programming for axes that are not used Axis Types The following table describes the different axis types that you can select in the Axis Type parameter Axis type Servo axis Virtual servo axis Encoder axis Virtual encoder axis Description These axes are used by the EtherCAT slave Servo Drives They are assigned to actual Servo Drives One Servomotor is used as one axis These virtual axes exist only inside the MC Function Module They are not used by actual Servo Drives For example they are used as master axes for synchronizing control An encoder axis is used for an EtherCAT slave encoder input terminal 2 An encoder axis is assigned to an actual encoder input terminal If one encoder input terminal contains two counters each counter will act as one axis These virtual axes are used for encoder operat
254. data communications are active and normal NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N s D I Ladder Diagram d OH y When StartPg is TRUE the status of process data communications is checked to see if communications g are active and normal E StartPg _EC_PDSlavTbl MC_Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress Lock S 3 po d The Servo for axis 0 is turned ON if process data communications are active and normal Lock MC Axis000 Axis Pwr Status Enable Pwr Bsy Pwr Err Pwr ErrlD If a minor fault level error occurs for axis O the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler MC Axis000 MFaultLvl Active I ST Programming When StartPg is TRUE the Servo is turned ON for axis O if process data communications are active and normal IF StartPg TRUE AND EC PDSIavTbI MC Axis000 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwr_En TRUE P N A I o 3 e O 2 e m e 2 D x x O c 3 C pe O 2 o pe 2 ok E x 2 e O Z LD D gt lt O o ELSE Pwr_En FALSE END_IF f a minor fault level error occurs for axis 0 the error handler for the device FaultHandler is executed Program the FaultHandler according to the device IF MC_AxisO00
255. dded for the sys tem defined Axis Variable name of MC AX 0 has been changed to MyAxis1 in the Sysmac Studio In out variable Axis SE an Axis MC Power instance Variable name N MC Power MyAxis1 0 Axis MyAxis1 Status E MyAxis1OnStatus ServoOn Busy MyAxis1OnBusy Error MyAxis1OnError ErrorlD MyAxis1OnErrorlD oo L gt x D o You can also use the MC AX 0 system defined variable in place of MyAxis 1 Refer to 6 2 Motion Control Instructions for details on motion control instructions Refer to the instruction descriptions in the NJ series Motion Control Instructions Reference Manual Cat No W508 for details on motion control instructions ueJ60Jg Joen eui ui sixy ue BuiAjoeds p L e NJ series CPU Unit Motion Control User s Manual W507 3 7 3 Configuring Axes and Axes Groups 3 2 Axis Setting Procedure This section gives the procedures to set servo axes that are newly created with the Sysmac Studio START This section describes how to set an axis I Starting the Sysmac Studio 1 Start the Sysmac Studio and click the New Project Button 2 Set the project properties and click the Create Button a Project Properties F New Project b animi Project name NE m PEE Create A new project is displayed 3 8 NJ series CPU Unit Motion Control User s Manual W507 3 Configuring Axes and Axes Groups y F Ka a 24 ees Eimogammig en Programmin
256. de NJ series CPU Unit Motion Control User s Manual W507 6 23 NEE E EE WS NLON NES WA po nem BOOL Cyclic Synchronous Enabled trol Mode 6 Motion Control Programming S Servo Encoder Variable name Data type f servo encoder axis axis axis axis Pos LREAL Command Current Enabled Enabled Position Vel LREAL Command Current Enabled Enabled Velocity AccDec LREAL Command Current Enabled Enabled Acceleration Decelera tion Jerk LREAL Command Current Enabled Enabled Jerk Trq LREAL Command Current Enabled Enabled Torque SAXIS REF ACT DATA Axis Current Value Pos LREAL Actual Current Position Enabled Enabled Enabled Enabled LREAL Actual Current Velocity Enabled Enabled Enabled Enabled Trq LREAL Actual Current Torque Enabled Enabled SMC REF EVENT Axis Minor Fault Active BOOL Axis Minor Fault Enabled Enabled Enabled Enabled Occurrence Code WORD Axis Minor Fault Code Enabled Enabled Enabled Enabled _sMC_REF_EVENT Axis Observation Active BOOL Axis Observation Enabled Enabled Enabled Enabled Occurrence pee Enabled Enabled Enabled Enabled Code _SAXIS_REF_CFG Axis Basic Settings UINT Enabled eMC AXIS USE Enabled ou AXIS TYPE Enabled UINT Node Address Enabled Enabled SAXIS REF SCALE Electronic Gear Ratio Num UDINT Command Pulse Enabled Enabled Enabled Enabled Count per Mot
257. de 10 Device R88D KNO1L ECT CH1 v 60BAh 00 0 Touch probe position 1 positive ve 42 Touch probe pos2 pos value Node 10 Device R88D KNO1L ECT CH1 v 60BCh 00 0 Touch probe position 2 positive vc 43 Error code Node 10 Device R88D KNO1L ECT CH1 v 603Fh 00 0 Error code 45 Status of Encoder s Input Slave 46 Reference Position for csp Node 10 Device R88D KNO1L ECT CH1 v lt Not assigned Digital inputs 28 Positive limit switch Node 10 Device R88D KNO1L ECT CH1 v 60FDh 00 1 Digital inputs 29 Negative limit switch Node 10 Device R88D KNO1L ECT CH1 v 60FDh 00 0 Digital inputs 30 Immediate Stop Input Node 10 Device R88D KNOIL ECT CHI v 60FDh 00 25 Digital inputs 32 Encoder Phase Z Detection Node 10 Device R88D KNO1L ECT CH1 v 60FDh 00 16 Digital inputs 33 Home switch Node 10 Device R88D KNO1L ECT CH1 v 60FDh 00 2 Digital inputs 37 External Latch Input 1 Node 10 Device R88D KNO1L ECT CH1 v 60FDh 00 17 Digital inputs 38 External Latch Input 2 Node 10 Device R88D KNOIL ECT CHI v 60FDh 00 i8 Digital inputs EN Additional Information If you use the recommended Encoder Input Terminals GX EC0211 EC0241 version 1 1 or higher then it is not necessary to change the default relationships between the functions and process data on the Sysmac Studio Output Settings Controller to Servo Drive The input settings apply to the command data that is sent from the MC Function Module to the Encoder Input Terminal The default set
258. de a portion of the axes group parameters as well as the command interpolation velocity error information and other monitor informa tion for the axes groups controlled by the MC Function Module Axes Group Variables are created when you add an axes group from the Multiview Explorer of the Sysmac Studio The names of sdnouc sexy oj uononpoJgu L the Axes Group Variables called the Axes Group Variable names are set here Specifying axes groups In the user program motion control is implemented with motion in the user program control instructions Motion control instructions that perform multi axis coordinated control are used to create axes group commands To control an axes group with axes group commands specify the axes group variable name of the system defined variable or the axes group variable name that was set with the Sysmac Studio for the AxesGroup in out variable of the instruction NJ series CPU Unit Motion Control User s Manual W507 3 17 3 Configuring Axes and Axes Groups 3 3 2 Introduction to Axes Group Parameters Axes Group Parameters Classification Parameter name Axes Group Basic Set Axes Group Number tings Axes Group Use Composition Composition Axes Axes Group Operation Maximum Interpolation Velocity Settings Maximum Interpolation Acceleration Maximum Interpolation Deceleration Interpolation Acceleration Deceleration Over Interpolation Velocity Warning Value Interpolation Acceleration W
259. deceleration rate makes it impossible to reach target velocity so a change is made to triangular control TExecuted TCommand position TExecuted TCommand position Changing the Torque Command The torque command value will change based on the torque ramp specification when you re execute a motion control instruction I Programming Example for Re execution This example demonstrates changing the target position from 1000 to 2000 for absolute positioning In this example the variable Axis1Pos is used as the input parameter to the target position Specify the target position to 1000 with the MOV instruction and change Axis1Execute to TRUE to begin position ing Specify the target position to 2000 during operation and change Axis Execute to TRUE again to switch to a positioning operation for the new target position of 2000 Axis1PosSet1 Move Axisipos 1000 Axis1PosSet2 Move Axis1pos 2000 Axis1MoveAbsolute MC MoveAbsolute Axis1Execute MC AX 0 4 Axis Axis MC AX 0 Execute Done Axis1Done P Wu O Oo 3 3 Oo 3 TI c 3 O Oo 3 o Oo o 3 e o 1 fo X o O Oo 3 mp Axis1Pos 1 Position Busy Axis1Busy Axis1Velo Velocity Active Axis1Active Axis1Acc 4 Acceleration Command Aborted Axis1CA Axis1Dec 1 Deceleration Error Axis1Error Axis1Jerk 4 Jerk ErrorlD Axis1ErrorlD O Direction 0 BufferMode suoionajsu jo41u02 uorno N Bunnoexe eu 9 S 6
260. defined the MC Home instruction is executed IF Pwr Giatus TRUE AND MC Axis000 Details Homed FALSE THEN Hm_Ex TRUE ELSE Hm_Ex FALSE END_IF If the Servo is ON and home is defined absolute positioning is executed IF Pwr_Status TRUE AND Hm_D TRUE THEN Mv_Abs_Ex TRUE END_IF MC_Power PWR Axis MC_Axis000 Enable Pwr En Status gt Pwr Status Busy gt Pwr Bsy Error gt Pwr Err ErrorlD gt Pwr_ErrlD AMC Home HM Axis MC Axis000 Execute Hm Ex Done gt Hm D Busy gt Hm BSsy CommandAborted gt Hm Ca Error gt Hm Em ErrorlD gt Hm Ermi NJ series CPU Unit Motion Control User s Manual W507 10 33 10 Sample Programming 10 34 MC MoveAbsolute MV ABS Axis Execute Position Velocity Acceleration Deceleration Direction Done Busy Active CommandAborted Error ErrorlD MC Axis000 Mv Abs Ex Mv Abs Pos Mv Abs Vel Mv Abs Acc Mv Abs Dec Mv Abs Dir gt Mv Abs D gt Mv Abs Dev gt Mv Abs Act gt Mv Abs Ca gt Mv Abs Err gt Mv Abs Ermi NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N u m m m m UJ 10 2 10 Changing the Target Position by Re execution of an Instruction S OH d This sample starts absolute positioning to a target position of 1000 and then uses the same instance of S the absolute positioning instruction to change the target
261. dicates that the axis is ready for operation Variable that indicates when the axis is disabled Level that indicates the axis control status Variable that indicates when the axis is idle Variable that indicates in position waiting Level that indicates the axis command values Variable that indicates the command current position Variable that indicates the command current velocity Variable that indicates the command current acceleration decelera tion rate in the axis monitor Level that indicates the axis current values Variable that indicates the actual current position Variable that indicates the actual current velocity Variable that indicates the actual current torque Level that indicates the axis basic settings Variable that indicates the axis number Variable that indicates when the axis is enabled Variable that indicates the axis type Variable that indicates the display unit Axis Variable to MyAxis then either MyAxis1 Act Pos or _MC_AX 0 Act Pos can be used as the variable that indicates the actual current posi tion Refer to Axis Variables on page 6 19 for details on Axis Variables 3 6 NJ series CPU Unit Motion Control User s Manual W507 3 Configuring Axes and Axes Groups 3 1 4 Specifying an Axis in the User Program In the user program an Axis Variable name is specified for the in out variable Axis in motion control instructions In the following example the Axis Variable name for the axis that was a
262. dio the Servomotor will operate at the set velocity Servo ON jogging relative positioning abso lute positioning or homing Always confirm that it is safe for the Servomotor to operate before executing any of these operations e When operating the Controller from the Sysmac Studio always install external emergency cir cuits so that the Servomotor can be stopped safely whenever necessary The Sysmac Studio may not be able to send commands under some circumstances e g if an error occurs in the computer e Set the EtherCAT communications and establish communications before you attempt to per form operation from the Sysmac Studio EN Additional Information Section 3 Configuring Axes and Axes Groups Section 4 Checking Wiring from the Sysmac Studio You can perform the following operations to end the MC test run function at any time e Select MC Test Run Stop from the Controller Menu of the Sysmac Studio e Right click the axis in the Multiview Explorer of the Sysmac Studio and select Stop MC Test Run from the menu e Close the MC Test Run Tab Page on the Sysmac Studio e Exit the Sysmac Studio Refer to the Sysmac Studio Version 1 Operation Manual Cat No W504 for specific procedures NJ series CPU Unit Motion Control User s Manual W507 4 1 3 4 Checking Wiring from the Sysmac Studio Axis Parameter Setting Example Set the following axis parameters before you execute the MC Test Run Mode in the Sysma
263. e Saving a cam table Saving a cam table to a file Save Error to a file failed failed 54770000 hex Cam Table The phases are not Data containing cam table Data Error in ascending order phases that are not in ascend during Cam in the cam table ing order was detected during Motion cam motion e The phase and displacement of the start point in the cam table were not 0 during cam opera tion e The phase of the end point in the cam table when converted to pulses was not 1 pulse or greater during cam operation page 11 25 page 11 25 54850000 hex Immediate An Immediate Stop An Immediate Stop instruction page 11 26 Stop Instruc MC ImmediateSto was executed tion Executed p instruction was executed 54860000 hex Axes Group An Axes Group e A Group Immediate Stop Immediate Immediate Stop instruction was executed Stop Instruc MC Grouplmmedi tion Executed ateStop instruc tion was executed page 11 26 64450000 hex Positive Soft The position e The position exceeded the posi page 11 27 ware Limit exceeded the posi tive software limit Exceeded tive software limit while the axis is in motion 64460000 hex Negative The position e The position exceeded the neg page 11 27 Software exceeded the nega ative software limit Limit tive software limit Exceeded while the axis is in motion NJ series CPU Unit Motion Control User s Manual W507 11 11 11 Troubleshooting e Time i
264. e T RUE SE AND ResetOn TRUE THEN sz Reset Ex TRUE Minor fault is reset ode ELSE Reset_Ex FALSE END_IF f the Failure output variable from the MC Reset instruction changes to TRUE processing is performed to read the cause of the error with GetFaultFactor Program GetFaultFactor according to the device IF MC Axis000 MFaultLvl Activez TRUE AND Reset Fail TRUE THEN GetFaultFactor END IF f a minor fault level error did not occur or was reset normal device processing RegularProcess is performed Program GetFaultFactor according to the device IF MC Axis000 MFaultLvl ActivezZ FALSE THEN RegularProcess END_IF P js Oo Q 2 D O A 2 m O LD D D h m x O EM o gt D JJ D e D m MC Reset RESET Axis MC_Axis000 Execute Reset_Ex Done gt Reset D Busy gt Reset Bsy Failure gt Reset Fail Error Heset Err ErrorlD gt Reset ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 19 10 Sample Programming 10 2 7 Stopping Axes during Single axis Operation In this sample the MC Stop instruction is executed to decelerate to a stop if an external button turns ON during execution of the MC MoveAbsolute Absolute Positioning instruction If there is a minor fault level error the CommandAborted output variable from the MC Stop instruction changes to TRUE In that case the MC ImmediateStop instruct
265. e axis operations There are a total of eight instruction buffers for axes groups Each axes group has one buffer for the instruction currently in operation and seven buffers for multi execution instructions Multi execution of instruction cannot be used from an axis operation instruction to an axes group operation instruction and vice versa NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions l Precautions for Correct Use e Up to seven instructions can be buffered at the same time for a single axes group If multi exe cution is performed for eight or more instructions an instruction error will occur e Multi execution of multi axes coordinated control instructions axes group instructions is not possible for axes operating as a single axis Similarly multi execution of single axis control instructions is not possible for axes operating under multi axes coordinated control axes group instructions An instruction error will occur if these rules are broken Aborting This is the default mode No buffering is performed in this mode The current command is aborted and the new instruction is executed Multi execution of motion control instructions that have no BufferMode input variable will operate in Aborting Mode Operation of the multi execution instruction starts at the current interpolation velocity when the multi execution instruction is executed With Aborting Mode you cannot combine single axis contr
266. e changes The output variable Error will not reset to FALSE and the output variable Erol Error Code will not reset to O until you execute one of the following instructions MC Reset MC GroupReset or ResetMCError If the Execute variable of the same instruction instance changes to TRUE again i e if the instruction is restarted during the execution of a motion control instruction the Com mandAborted variable will not change to TRUE For motion control instructions that are started with the input variable Execute the values of the input parameters when Execute changes to TRUE are used For motion control instructions that start for the input variable Enable the current values of the input param eters during each period when Enable is TRUE are used The default value applies if you omit an input parameter for an instruction instance 2 The input variable Position is defined as a value in the coordinate system The input vari able Distance is the relative length i e it is the difference between two positions The input variables Acceleration Deceleration and Jerk are non negative values Posi tion Target Position Distance Travel Distance and Velocity Target Velocity can be positive negative or O NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming Item Rule Error processing There are two output variables that represent an error when a problem occurs during the execution of
267. e current instruction or the buffered instruction whichever is highest The multi execution instruction is buffered in the MC Function Module and will be executed at the spec ified BufferMode timing and transit velocity for both buffered and blending modes There is one buffer for each axis If aborting is specified the instruction that was executed last is executed immediately so it is not buffered la Precautions for Correct Use e Only one multi execution instruction is buffered for each axis If multi execution is performed for two or more instructions an instruction error will occur e Multi execution of multi axes coordinated control instructions axes group instructions is not possible for axes operating as a single axis Similarly multi execution of single axis control instructions is not possible for axes operating under multi axes coordinated control axes group instructions An instruction error will occur if these rules are broken NJ series CPU Unit Motion Control User s Manual W507 9 41 epoIN Jeng suononuisu oJ1u02 Uoo jo uonnoexe n n N 2 9 6 P Wu O Oo 3 3 Oo 3 Tl c 3 O Oo 3 o Oo o gt e o 1 fo X o O Oo 3 mp 9 Motion Control Functions Aborting This is the default mode No buffering is performed in this mode The current command is aborted and the new instruction is executed Aborting Mode can be used for multi execution of instructions for motion control i
268. e gives the status of the external button that is used to reset errors GetFaultFactor This is the process to read the cause of the error Program it according to the device RegularProcess This is the normal processing Program it according to the device I Ladder Diagram In this sample the MC Reset Reset Axis Error instruction is executed if an external button turns ON i e if ResetOn changes to TRUE while there is a minor fault level error RESET MC Reset ResetOn MC Axis000 MFaultLvl Active MC Axis000 Axis Reset D l Reset_Bsy Reset_Fail Reset_Err Heset ErrlD If the Failure output variable from the MC Reset instruction changes to TRUE processing is performed to read the cause of the device error with GetFaultFactor Program GetFaultFactor according to the device MC Axis000 MFaultLvl Active Reset Fail GetFaultFactor GetFaultFactor EN If a minor fault level error did not occur or was reset normal device processing RegularProcess is performed Program GetFaultFactor according to the device MC Axis000 MFaultLvl Active RegularProcess EN RegularProcess NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming N D ST Programming 3 Oo f the external button is ON i e if ResetOn changes to TRUE while there is a minor fault level error 3 the MC Reset Reset Axis Error instruction is executed ns IF MC_AxisO00 MFaultLvl Activ
269. e home proximity input sensor turns ON OFF Countermeasure Wire all connections cor rectly Review and adjust the machine Perform auto tuning of the Servomotor Manually adjust the Servomotor gain Change to an optimal motor Replace the Servomotor Replace the Servomotor Set the rotation direction of the Servo Drive cor rectly Set the correct axis parameters Wire the home proximity input correctly NJ series CPU Unit Motion Control User s Manual W507 Problem Operation cannot be started positioning is not completed or positioning takes too much time to complete Abnormal noise Motor shaft shakes The in position range of the Servo Drive is too nar row and thus the current position does not enter the in position range The current operation does not complete until the current position enters the in posi tion range so you cannot start the next motion ee D uini IEEE The axis does not remain in the in position range due to an external force Mechanical vibration Insufficient adjustment of the Servo Drive gain high gain Incorrect Servomotor selection adjustment not possible Misalignment of the cou pling that connects the motor shaft and machine Insufficient adjustment of the gain low gain Gain cannot be adjusted due to low machine rigid ity Mechanical configuration prone to stick slip highly sticky static friction Incorrect S
270. e in position range positioning is considered finished Velocity Command bani ipsia EES Time e Axis Parameters That Are Related to In position Checks You can set the check conditions for the in position check by setting the appropriate axis parame ters Set the in position check time if you want to start any of the following operations only after con firming that axes are in position In position Range Set the in position width Non negative long Unit command units reals In position Check Set the in position check time in milliseconds 0 to 10 000 Time Set 0 to check for the end of positioning only when you define the home position during homing and not check positioning at other times Unit ms EN Additional Information Do not set an in position check time if you want to start the next operation as quickly as possible without waiting for positioning to finish NJ series CPU Unit Motion Control User s Manual W507 9 71 p co Oo gt D Tl c 5 ct O 5 0 y9 y49 uonisod u 6 8 6 9 Motion Control Functions Set the parameters from the Sysmac Studio You can use the MC Write Write MC Setting instruc tion to change the in position check time ES Additional Information The value set from the Sysmac Studio is restored if power to the CPU Unit is cycled or the user program is downloaded with the Synchronization menu command of the Sysmac Studio Use the MC Write Write
271. e movable range of the device The positive software limit is set to 50 cm 500 000 um The periodic range of the position is O to 1 m 1 000 000 um EN Additional Information You can select the axis type for the master axis according to the configuration of the device There are four axis types servo axes virtual servo axes encoder axes and virtual encoder axes In this example the axis type of the master axis is an encoder axis Specify the actual posi tion for the motion control instruction input variable Reference Type Position Type Selection NJ series CPU Unit Motion Control User s Manual W507 5 19 e N gt x 0 U 9 D 3 D D m ejduiex3 Buneg 1ejeurejeg SIXY OL c G 5 Motion Control Parameters 5 3 Axes Group Parameters Use the axes group parameters to set axes group operations related to axes groups that the MC Func tion Module controls such as the axis configuration maximum interpolation velocity and axes group stopping method There are axes group parameters for each of 32 groups for the NJ501 1300 NJ501 1400 or NJ501 1500 The same parameter settings are provided for each axes group This section describes only the parameters for axes group 1 5 3 1 Axes Group Parameters Use the Sysmac Studio to set the axes group parameters for each axes group Conposton o eege Maximum Interpolation Deceleration Interpolation Deceleration Maximum Interpolation Deceleration fm
272. e programs and I O refreshing in the speci fied task period The execution period for this task is longer than the execution period of the primary periodic task There fore periodic tasks are used to execute programs For exam ple synchronized control and control requiring a fast response time are placed in the primary periodic task Overall device control is placed in a periodic task The CPU Unit has some periodic tasks with an execution priority of 17 or 18 However you cannot use motion control instructions in these tasks These tasks also do not perform I O refreshing la Precautions for Correct Use e Motion control instructions can be used in the primary periodic task and in a priority 16 peri odic task e f motion control instructions are used in any other tasks an error will occur when the user pro gram is built on the Sysmac Studio 2 4 NJ series CPU Unit Motion Control User s Manual W507 2 Motion Control Configuration and Principles I Basic Operation of Tasks Overall Task Operation The primary periodic task and periodic tasks operate based on the task period of the primary peri odic task also known as the primary period The primary periodic task includes operations such as system common processing and motion control in addition to I O refreshing and user program exe cution Processing of motion control instructions in the programs is executed during the next motion control MC period after the END in
273. ed Mv_Abs_Ca LREAL 1000 0 Deceleration Error Mv_Abs_Err LREAL 0 0 Jerk ErrorlD Mv Abs ErrID eMC_DIRECTION _mcShortestWay 1Direction BufferMode 10 32 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming N D H ST Programming A OH f the input parameters for absolute positioning are not set the target values and other parameters are set 3 IF InitFlagZFALSE THEN ns The input parameters for the MC_MoveAbsolute Absolute Positioning instruction are set S 3 Mv Abs Pos LREAL 50000 0 sz Mv Abs Vel LREAL 10000 0 xin Mv Abs Acc LREAL 1000 0 Mv Abs Dec LREAL 1000 0 Mv Abs Dir _eMC_DIRECTION _mcShortestWay The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag TRUE END_IF When StartPg is TRUE the Servo is turned ON for axis O if process data communications are active and normal IF StartPg Z TRUE AND EC PDSIavTbI MC AxisO00 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwr_En TRUE ELSE Pwr_En FALSE END_IF sch Se jw co RE o 3 2 Di 2 CL 2 CH o 9 c m D U O o e o 2 f a minor fault level error occurs for axis O the error handler for the device FaultHandler is executed Program the FaultHandler according to the device IF MC Axis000 MFaultLvl Activez TRUE THEN FaultHandler END IF f the Servo is ON for axis O and home is not
274. ed instruction Time Multi execution of instructions In a blending mode you cannot combine single axis and synchronized control NJ series CPU Unit Motion Control User s Manual W507 9 43 spo iang SUOIONAJSU OJJUOD uono vN JO uonnoexe n n N 2 9 6 9 Motion Control Functions e Blending Low Low Velocity Operation is performed using the target position of the current instruction and the target velocity that is the slower of the target velocities for the current instruction and buffered instruction e Blending Previous Previous Velocity Operation is performed with the target velocity of the current instruction until the target position of the current instruction is reached Operation is performed after acceleration deceleration to the tar get velocity of the buffered instruction once the target position is reached When the Direction of Operation Does Not Change Cases Resulting in Acceleration The transit velocity is Multi execution the command velocity of of instruction the current instruction Velocity Current instruction Buffered instruction l Time Cases Resulting in Deceleration Multi execution of SES Velocity OO 4 Current instruction Buffered instruction Time When the Direction of Operation Changes Multi execution of instruction Velocity The transit velocity is the command velocity of the current inst
275. ed temporarily in place of an encoder axis when there is no physical encoder 3 1 The applicable Servo Drives are the OMRON G5 series Servo Drives with Built in EtherCAT Communications 2 The applicable Encoder Input Terminals are the OMRON GxX series GX EC0211 EC0241 Encoder I O Termi nals 8 Virtual encoder axes are used in combination with motion control instructions that update the actual position of the virtual encoder axis Counting cannot be used with versions of the MC Function Module that do not support these instructions The following elements are related to the axes of the MC Function Module These elements exist for each axis The NJ501 1300 has axis parameters for 16 axes the NJ501 1400 has axis parameters for 32 axes and the NJ501 1500 has axis parameters for 64 axes The axis parameters set the maximum velocity jogging homing 3 3 and other items for the axes operations controlled by the MC Func tion Module Use the Sysmac Studio to set the axis parameters Axis parameters Axis Variables Specifying axes in the user program Axis Variables are system defined variables for the actual position error information and other monitor information for axes controlled by the MC Function Module Axis Variables are created when you add an axis from the Multiview Explorer of the Sysmac Studio The names of the Axis Variables called the Axis Variable names are set here In the user program motion control is impleme
276. eeeeseees 6 20 Immediate Stop Input Stop Method 5 12 immediate stop of command value 9 8 immediate stop of command value and error reset 9 9 immediate stop of command value and servo OFF 9 9 In FIOI ELE 6 20 ais fore rele eU E vH MN TREE 11 3 infinite length axis ccceeeceeceeseseeeceeseeeeeceeaeeeeeseeeeees 5 13 IORI AON e NC RU 11 6 I POSITION GHOCK PEEL DT 9 71 In position Check Time ccccccseeeeeeeceeeeeeeceneeeeeeeeaees 5 12 IASDOSINION RANJE e 5 12 In position Waiting eeeeeeeeeeeeeeeee 6 20 6 25 input devices and output devices 5 6 Interpolation Acceleration Warning Value 5 23 Interpolation Acceleration Deceleration Over 5 22 Interpolation Deceleration Warning Value 5 23 Interpolation Velocity Warning Value 5 22 ENETRIER TEE E 9 5 Hvad en Ee su ido aadi Ec Momtesei a PELO PAP Satu erent 9 14 J ST Roc ERN 1 2 9 31 EE 9 31 JING rescue enc pcc er aosenst ang eceseae anne agiaeeee 7 5 K Kinematics Transformation Settings 6 27 L iege c M 9 66 Limit Input Stop Method eessessse 5 12 EMES SINGS iuc eati seo adeat ttr en ertet e Le seneeitus 5 13 linear interpolation E 9 48 PIMC AM EE 5 14 M Main e EE 6 20 aii
277. efined the difference between the command position and the absolute value data read from absolute encoder is saved to the battery backup memory in the CPU Unit as the absolute encoder home offset The Absolute Encoder Origin Position Offset axis parameter is also set to the difference i e the offset between the command position after defining home and the absolute value when the MC Home Hom ing instruction is executed The MC Function Module automatically saves the absolute value encoder home offset to the battery backup memory in the CPU Unit You do not have to perform a save opera tion from the Sysmac Studio l Precautions for Correct Use e f you replace the CPU Unit or the Battery in the CPU Unit make sure home is defined and back up the battery backup memory before you start the replacement procedure This ensures that the absolute encoder home offset is backed up e You can restore the backed up data after finishing the replacement procedure to use the home that was previously defined e Use the Sysmac Studio to back up and restore the data Refer to the Sysmac Studio Version 1 Operation Manual Cat No W504 for specific proce dures I Applicable Servomotors A list of Servomotors that can connect to the MC Function Module is provided below OMRON G5 Series R88D KNL IL IL ECT R88M KLILILILIL IS R88M KLIL TL TL TL TT R88M KLIL T TL TL IC Connecting the Servo Drive Connect the Servo Drive correctly according to
278. efined for this method Name Description High speed Homing The axis returns to home using an absolute position of O as the target position The MC Function Module can operate the motor even when home is undefined excluding MC MoveZeroPosition Function Operation Jogging and velocity control If home is not defined the position at startup is defined as O to control movement High speed homing High speed homing cannot be used If it is used an instruction error will occur Positioning If home is not defined the position at startup is defined as O to control movement Interrupt feeding Starting cam operation Starting gear operation Synchronous positioning Combining axes Torque control Zone monitoring Linear interpolation Interpolation cannot be used Circular interpolation If it is used an instruction error will occur EN Additional Information Software limits are not valid when home is not defined Changes in the home definition status for operations and events are listed in the following table e Operation or event Condition for change EE E change Servo turned ON or axis Incremental encoder No change enabled When absolute data is read normally from the Home is defined absolute encoder When absolute data cannot be read from the Home is undefined absolute encoder Changing the current position When starting Home is undefined Homing When starting Home is undefined When ending Home is defined Overflows and underflows
279. el_ Act Vel_Ca Vel_Err Vel_ErriD Master Slave Camln InCam InCam InSync Camln InSync Camln Eop Camln Index Camln Bsy Camln Act Camln Ca Camln Err Camln El Index Busy Active Error ErrorlD If StartOn is TRUE and cam motion is in sync shifting the phase of the master axis is started PHASING MC Phasing MC Axis000 MC_Axis001 LREAL 500 0 LREAL 1000 0 LREAL 0 0 LREAL 0 0 tartOn Camin_InSync z o 10 68 Master Slave Execute PhaseShift Velocity Acceleration Deceleration Jerk BufferMode CommandAborted Error ErrorlD Phasing_D Phasing_Bsy Phasing_Act Phasing_Ca Phasing_Err Phasing ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming 2 N D I ST Programming S OH f the input parameters for the motion instructions are not set the target values and other parameters are set 3 IF InitFlagZFALSE THEN ns The input parameters for the MC_MoveVelocity Velocity Control instruction are set S 3 Vel_Vel LREAL 1000 0 sz Vel Acc LREAL 100000 0 oS Vel_Dec LREAL 100000 0 Vel_ Dir eMC_DIRECTION _mcPositiveDirection The input parameters for the MC_Phasing Shift Master Axis Phase instruction are set Camin_Dir eMC DIRECTION mcNobDirection The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag TRUE END_IF Phasing_Ps LREAL 500 0 zx Phasing Vel LREAL 1000 0 D Phasing_Acc LREAL 0
280. elocity Interpolation Acceleration Interpolation Deceleration I O Map P F Controller Setup o Maximum interpolation velocity pulse s Interpolation velot w i2 Motion Control Setup V amp Axis Settings 3 MC Axis000 0 1 MC Axis001 1 VC Axes Group Settings Interpolation v MC_Group000 0 Correction allowance ratio O Axis A0 MC_Axis000 i Ais A1 MC_Axis001 Cam Data Settings Event Settings LAN F Data Trace Settings b Programming Maximum interpolation acceleration OfTTra Interpolation accelerat Maximum interpolation deceleration O Interpolation decelerat Interpolation acceleration deceleration over Use rapid acceleration deceleration Blending is changed ti Axes group stop method Immediate stop v EN Additional Information Changing Axes Group Variable Names in the User Program Perform the following two procedures to change Axes Group Variable names that are already used e Change the Axes Group Variable name in the variable table in the variable declarations e Change the Axes Group Variable name in the user program Even if you change the Axes Group Variable names in the variable table the Axes Group Vari able names in the user program do not change An error will occur if you use a variable name that is not declared in the variable table in the user program Always change the names in both places NJ series CPU Unit Motion Control User s Manual W507 3 Configu
281. elt tele green RR RO EY 3 17 specifying in user program 3 17 3 21 AXIS Basic Settings icone tue testo verentur 5 5 6 22 Axis Command Values eem 6 21 Axis Current Value x uscite de treten tette E qe ot 6 21 AXIS Disabled BEE 6 19 AXIS al e GE 11 6 AXIS Error Status ee Ee 11 4 axis following error monitoring 9 70 AXIS MiNOr Fault uote totus ots attt one 6 22 Axis Minor Fault Occurrence eene 6 22 AXIS le EE 5 5 6 22 AXIS ODSENVALION cease dae queues p 6 22 Axis Observation Code eeeeren 6 22 Axis Observation Occurrence eene 6 22 axis parametrs enice reete mua hg de 3 2 5 4 eidele Rei de WEE 3 9 a CER 5 4 Axis Ready to execute EEN 6 19 EMIS SIdIBS ele E SE 6 4 AXIS Disabled ME 6 5 Continuous MOON esensi aa ca oak ona vau 6 5 Coordinated Motion 6 5 Deceleration Stopping 6 5 Discrete Motion EE 6 5 Error Deceleration Stopping 6 5 FOMI WEE 6 5 DIOP DCG p Hr 6 5 Synchronized Motion 6 5 Eeer 6 19 EIS Type S eege 5 6 AXIS USO ec 5 5 6 22 Axis Variables eeeeeern mH 3 2 6 19 WEEN 3 5 relationship to axis types esesssssse 6 23 B Dasic cata tVDOS eege 6 16 DICA MEET EE ETE T 9 43 9 58 Sigg IOC Ci n a 9 41 STET si 20 2 RTT 9 42 9 58 C TIO MES RR m m ERE 9 14 Calm block end Re UE 9 14 cam bl
282. emove the cause of the warning Attached Attached information 1 Drive warning code information Precautions None Hemarks Event name Cannot Execute Save Cam Table Instruction 743C0000 hex Meaning You cannot save a cam table to a file when non volatile memory is being accessed by another operation Source Motion Control Function Module Source details MC Common Detection At instruction timing execution Effects Not affected CONGU An attempt was made to execute the Execute the MC SaveCamTable None MC SaveCamrTable instruction when instruction again another operation was accessing the non volatile memory e g transfer or data trace operation from the Sysmac Studio Attached None information Precautions None Hemarks 11 50 NJ series CPU Unit Motion Control User s Manual W507 Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks 11 Troubleshooting Notice of Insufficient Travel Distance to Achieve Blending Event code 94200000 hex Transit Velocity There is not sufficient travel distance to accelerate or decelerate to the transit velocity during blending operation Motion Control Function Module Source details Axis axes group Detection At multi executio
283. ended for the following personnel who must also have knowledge of electrical sys tems an electrical engineer or the equivalent e Personnel in charge of introducing FA systems e Personnel in charge of designing FA systems e Personnel in charge of installing and maintaining FA systems e Personnel in charge of managing FA systems and facilities For programming this manual is intended for personnel who understand the programming language specifications in international standard IEC 61131 3 or Japanese standard JIS B3503 Applicable Products This manual covers the following products e NJ series CPU Units e NJ501 1300 e NJ501 1400 e NJ501 1500 NJ series CPU Unit Motion Control User s Manual W507 1 Relevant Manuals Relevant Manuals There are three manuals that provide basic information on the NJ series CPU Units the NJ series CPU Unit Hardware User s Manual the NJ series CPU Unit Software User s Manual this manual and the NJ series Instructions Reference Manual Most operations are performed from the Sysmac Studio Automation Software Refer to the Sysmac Stu dio Version 1 Operation Manual Cat No W504 for information on the Sysmac Studio Other manuals are necessary for specific system configurations and applications Read all of the manuals that are relevant to your system configuration and application to make the most of the NJ series CPU Unit NJ series CPU Unit Hardware User s Manual NJ series CPU
284. ent Incorrect Servomotor selection adjustment not possible Damaged Servomotor bearings Broken Servomotor wind ing The Servo Drive is set to the opposite rotation direc tion During homing The axis parameters that set the polarity of the home proximity sensor and the polarity of the home proximity input do not match During homing Incorrect wiring of the home proximity input Check the wiring of the motor power line and encoder line Check the machine Turn the coupling under a no load condition with the mechanical part after the coupling removed Select another motor check the torque and inertia ratio Turn OFF the Servo Drive power supply and also turn ON the brake power supply and release the brake if the motor comes with a brake Then manu ally turn the motor output shaft with the motor power line disconnected because the dynamic brake may be applied Use a tester to check the resistance between phases U V and W of the motor power line If the balance is off there is a problem Jog the machine If the rotation direction of the Servo Drive is opposite the jogging direction the rotation direction of the Servo Drive is reversed Also check for reversed feedback signals phases A and B and reverse rota tion setting of the parame ter Check the axis parame ters and sensor polarity again Check the axis input infor mation in the Axis Vari ables to see if th
285. er s Manual W507 9 5 9 Motion Control Functions 9 1 5 Stopping Functions to stop axis operation include immediate stop input signal and limit input signals connected to the Servo Drive stop functions of motion control instructions in the user program and stopping due to errors I Stopping for Servo Drive Input Signals Axis motion is stopped for the immediate stop input signal or a limit input signal from the Servo Drive You can select the stop method with the Sysmac Studio e Immediate Stop Input Stop processing in the MC Function Module is executed according to the state of the Servo Drive input signals You can select one of the following stopping methods for the MC Function Module e Immediate stop e Immediate stop and error reset e Immediate stop and Servo OFF la Precautions for Correct Use The immediate stop input for the OMRON G5 series Servo Drive also causes an error and exe cutes stop processes in the Servo Drive itself Limit Inputs Positive Limit Input or Negative Limit Input Stop processing in the MC Function Module is executed according to the state of the Servo Drive input signals You can select one of the following stopping methods for the MC Function Module e Immediate stop e Deceleration stop e Immediate stop and error reset e Immediate stop and Servo OFF la Precautions for Correct Use e f the limit input signal is ON when a single axis operation instruction is executed you can start motion in t
286. eration Blending is changed to Buffered e Use rapid acceleration deceleration e Minor fault stop An example for an Acceleration Deceleration Over operation is given below eUse Rapid Acceleration Deceleration Blending Is Changed to Buffered Velocity MM When the current 4 instruction is completed N the buffered instruction AN is executed r Current instruction Multi execution of instructions Buffered instruction Time e Use Rapid Acceleration Deceleration Here BufferMode is set to blend with previous Velocity Transit velocity used P Wu O Oo 3 3 Oo 3 TI c 3 O Oo 3 o Oo o 3 e o 1 fo X o O Oo 3 mp Current instruction e Use Rapid Acceleration Deceleration Here BufferMode is set to blend with next Velocity The target velocity of the buffered instruction cannot be reached by the target position of the current l instruction with the acceleration rate of the current instruction di l Rapid acceleration is therefore used to reach the target velocity at the target position Current instruction Multi execution of instructions Stopping at the target position is not possible for the deceleration rate of the buffered instruction Rapid deceleration is therefore used to stop at the target position Time Buffered instruction Transit velocity used Pig Buffer
287. eration Settings 5 22 5 3 4 Enabling an Axes Group 5 23 NJ series CPU Unit Motion Control User s Manual W507 5 1 5 Motion Control Parameters 5 1 Introduction You can use motion control instructions to perform single axis operations and multi axis operations on axes used if you groups with the NJ series CPU Units MC Function Module Axis and axes group parameters are to set these operations Axis parameters must be set but axes group parameters are not required do not use multi axis operations for axes groups These parameters are called motion control parameter settings MC parameter settings YI S er 1 D EE EE Lg d Oo mu flea MC common parameter settings When power i MC common parameter settings Changes to some turned ON parameters Axis parameter settings rr Axis parameter settings Axes group parameter settings Transferred Sysmac Studio CPU Unit Ka omron ren Porm Non volatile memory e After the setting Main memory User program are downloaded Temporary AMC Write instruction Data movement or other instructions Axes group parameter settings Accessing some parameters as variables 1 There are no MC Common Parameter Settings for the current version of the MC Function Module 2 U se the Synchronization menu command of the Sysmac Studio to upload and down
288. erence Manual Cat No W508 9 8 3 Latching Latching is used to control positioning based on the position where a trigger signal occurs such as a signal from a sensor input The position of the axis is recorded i e latched when the trigger signal occurs You can set up to two trigger signals for each axis Use the MC TouchProbe Enable External Latch instruction to specify the trigger input condition a window and the stop method for the axis you want to latch In addition to signals that connect to the Servo Drive you can also specify variables in the user program to use as a trigger Use the MC AbortTrigger Disable External Latch instruction to abort latching You can use latching only with a Servo Drive that support latching touch probe such as the G5 series Servo Drives or a GX EC0211 EC0241 Encoder Input Terminal Use WindowOnly to detect only trigger signals within a specific start point and end point The following chart shows the ranges for different Count Modes e Linear Mode e The FirstPosition must be less than or equal to the LastPosition e An instruction error will occur if the FirstPosition is greater than the LastPosition e An instruction error will occur if a position beyond the position range of Linear Mode is specified FirstPosition LastPosition E ee Eo 0x8000000000 i 0 i Ox7FFFFFFFFF Window Latch enabled range 9 66 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functi
289. ers Modulo Maximum Position and Modulo Minimum Position Setting Values The settings of these parameters are enabled when the Count Mode is set to Rotary Mode Set the upper and lower limits of the ring counter l Precautions for Correct Use e f you set the Count Mode to Rotary Mode make sure that the value for only cycle of the ring counter converts to an integer in pulses If the number of pulses for one cycle of the ring counter is not an integer position offset occurs because the decimal portion is truncated The command current position will also not be displayed correctly e f O is not included between the upper and lower limits of the ring counter an error occurs when the MC MoveZeroPosition High speed Home instruction is executed e When you perform absolute positioning with a MC MoveAbsolute or MC Move instruction make sure that the target position is within the range of the ring counter An error occurs if the target position is not within the range of the ring counter If the Direction input variable to the instruction is set to No direction specified you can set a target position that is not within the range of the ring counter If that occurs relative positioning is performed using the difference between the target position and the command current position as the target distance I Encoder Type Set the type of encoder to use for feedback input The setting of this parameter is disabled for a virtual axis 5 2 8
290. ervo The Servo is turned ON and OFF ON OFF Resetting The errors in the MC Function Module are errors reset Jogging Jogging is performed in the positive or negative Target Velocity direction Acceleration Deceleration Absolute posi Absolute positioning is performed Target Position tioning Target Velocity Acceleration Deceleration Jerk Relative posi Relative positioning is performed Travel Distance tioning Target Velocity Acceleration Deceleration Jerk Homing Homing is performed using the homing parame Homing Parameters ter settings 4 2 NJ series CPU Unit Motion Control User s Manual W507 4 Checking Wiring from the Sysmac Studio Monitoring Error list The errors in the MC Function Module are mon MC Common Errors itored Axis Errors Axes Group Errors Axis status The status of the axes is monitored Axis Ready to execute Standstill Discrete Motion Continuous Motion Homing Stopping Home Defined In Home Position Actual posi The actual position is monitored Command and Actual Cur tion monitor rent Positions Actual velocity The actual velocity is monitored Command and Actual Cur monitor rent Velocities Servo Drive The status of the Servo Drive is monitored Servo ON OFF status Servo Ready Main Power Input signals The status of the input signals are monitored Positive Limit Input Negative Limit Input Immediate Stop Input Home Proximity Input Home Input External Latch Inputs 1 to 2
291. ervomotor selection adjustment not possible DS m NJ series CPU Unit Motion Control User s Manual W507 Check the axis input infor mation for the Axis Vari ables to see if the difference between the command current position and the actual current position is within the in position range Check the moving parts of the machine for intrusion of foreign matter dam age deformation and loosening Select another motor check the torque and inertia ratio In particular this condi tion occurs on vertical axes SCARA robots pal letizers and other sys tems whose axes are subject to bending or ten sional loads Select an appropriate motor check the torque and inertia ratio 11 Troubleshooting Countermeasure Increase the in position range Adjust the Servo Drive gain If you stop the axis so that a position inside the in position range is not achieved such as holding control you can use the following error reset output to forcibly achieve the in position range Correct the problem Perform auto tuning Man ually lower the gain Change to an optimal motor Adjust the motor and machine installation Perform auto tuning Man ually increase the gain Increase the machine rigidity Readjust the gain Perform auto tuning Man ually adjust the gain Change to an optimal motor Replace the Servo Drive Replace the Servomotor 11 57 mmh I N
292. es This section describes troubleshooting when the MC Function Module is used in combination with an OMRON G5 series Servo Drive If an unexpected operation is performed data such as parameter set tings or cam data may not have been transferred properly to the CPU Unit from the Sysmac Studio Fur thermore variables may not be working properly between the user program and the MC Function Module Use the data tracing function of Sysmac Studio to check if variables are exchanged at the cor rect timings Problem Motor does not lock Motor does not run 11 54 The MC Function Module does not output operation commands to the Servo Drive Countermeasure Make sure that you exe cute the MC Power instruction Correct the program Servo Drive setting error Check the Servo Drive Set the Servo Drives cor settings rectly The drive prohibit input of the Servo Drive is enabled Servo Drive error Mechanical axis is locked Use the Servo Drive soft ware to check the drive prohibit input Cancel the drive prohibit input of the Servo Drive Change the setting so that you do not use the drive prohibit input of the Servo Drive Check for a Servo Drive If there is an error follow error troubleshooting proce dures for it Check for contact with mechanical limits and Manually release the locked mechanical axis check to see if mechanical parts are caught on some thing CPU Unit failure
293. es the torque command value from the MC Function Module in the torque control loop and to control the torque You can specify the velocity limit value for the Servo Drive in the Velocity Velocity Limit input variable to the motion control instruction You can use this to limit high speed revolution of the motor when the load on the motor is low in Torque Control Mode la Precautions for Correct Use To be safe always set a velocity limit value for torque control For details refer to the MC TorqueControl instruction in the NJ series Motion Control Instructions Ref erence Manual Cat No W508 p I o 3 e D 1 D cal 0 e D O fe 5 p o NJ series CPU Unit Motion Control User s Manual W507 9 25 9 Motion Control Functions 9 5 Common Functions for Single axis Control 9 5 1 9 26 This section describes the common functions used for single axis control Positions I Types of Positions The MC Function Module uses the following two types of positions Type of position Definition Command position This is the position that the MC Function Module outputs to control an axis Actual position The actual position as input from the Servo Drive or encoder input The following figure shows the relationship between the command position and the actual position User program Motion control instruction MC Function Module Command position Servo Drive ulses p Command C Following Position loo
294. es to TRUE it remains TRUE until the operation is completed or canceled Gamm InCam 1 BOOL FALSE This variable is assigned to the nCam out put variable from the CAMIN instance of the MC Camln instruction It is TRUE during cam motion for CamProfile1 After this vari able changes to TRUE it remains TRUE until the operation is completed or canceled Mv Abs Act BOOL FALSE This variable is assigned to the Active out put variable from the MV ABS instance of the MC MoveAbsolute instruction Hm1 Ex BOOL FALSE This variable is used to re execute the MC Home instruction for axis O Hm2 Ex BOOL FALSE This variable is used to re execute the MC Home instruction for axis 1 Mv Abs Ex BOOL FALSE This variable is used to execute the MC MoveAbsolute Absolute Positioning instruction Camin Ex BOOL FALSE This variable is used to execute the MC Camln Start Cam instruction It is used in ST programming StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communica tions are active and normal The array elements ARRAY O N are set with the Cam Editor in the Sysmac Studio The range of the array is O to 109 in this sample sch e fe NO O 2 Di 2 a 2 mE 2 D eO Di 3 e o D oO lt JU P D X D O c o 2 O Ge H Di 2 2 o ct c O ze o 2 NJ series CPU Unit Motion Control User s Manual W507 10 45 10 Sample Programming I Timing Chart e L
295. escribes the operations that are performed when the MC Function Module is combined with an OMRON G5 series Servo Drive To perform positioning to absolute positions in a positioning system you must first define the home For example if you want to perform positioning to the position axis 1 axis 2 100 mm 200 mm in the XY plane shown below you must define the position of home 0 0 The process of defining home is called homing Axis 2 A 100 200 Axis 1 In the MC Function Module use the motion control instruction MC_Home to define home Name Description Homing Home is defined by actually moving the motor and using the limit sensors home prox imity sensor and home input signal to determine the position of home Use a proximity sensor or the encoder s Z phase signal as the home input signal l Precautions for Correct Use The defined home is lost in the following situations e When MC SetPosition is executed e When an overflow or underflow occurs in Linear Mode e When homing is started e The control state of EtherCAT communications is not Operational state ES Additional Information If you are using an OMRON G5 series Servomotor with an absolute encoder home is defined when the MC Power input variable Enable changes to TRUE NJ series CPU Unit Motion Control User s Manual W507 8 Homing The MC MoveZeroPosition High speed Home instruction is also provided to perform positioning to home as d
296. eshooting Level Error name Observation e Following Error Warning e Command Position Overflow e Velocity Warning e Command Position Underflow e Acceleration Warning e Actual Position Overflow e Deceleration Warning e Actual Position Underflow e Positive Torque Warning e Slave Observation Detected Notice of Insufficient Travel Distance to Achieve Blending Transit Velocity Negative Torque Warning Information e Slave Error Code Report Axes Group Errors Level Error name Major fault e None Partial fault e None Minor fault e Axes Group Immediate Stop Instruction Executed e Home Undefined during Coordinated Motion e Axes Group Composition Axis Error e Other execution errors for motion control instructions Velocity Warning Acceleration Warning Deceleration Warning Notice of Insufficient Travel Distance to Achieve Blending Transit Velocity Information e None Observation e Errors without Source Classifications Level Error name Major Fault User Program Controller Configurations and Setup Transfer Error Partial Fault e None Minor Fault e None Observation e None Information e None EtherCAT Communications and EtherCAT Slave Errors The following Motion Control Function Module error can occur due to errors in EtherCAT communica tions or EtherCAT slaves Error name Event code Cause Operation for error EtherCAT Slave 8440 0000 hex A communications error occurred The Servo is turned OFF for the Communications for
297. evel error for the axes group the axes group is disabled IF MC Group000 MFaultLvl Activez TRUE THEN Grp_Dis_Ex TRUE END_IF lf ResetON is TRUE i e if the external button is ON and the axes group is stopped the error is reset IF ResetON TRUE AND MC_Group000 Status ErrorStop TRUE AND MC GroupOOO Details IdleZ TRUE THEN Grp Reset Ex TRUE END IF NJ series CPU Unit Motion Control User s Manual W507 10 13 10 Sample Programming 10 14 AMC Power PWR1 Axis MC_Axis000 Enable Pwr1 En Status gt Pwr1 Status Busy gt Pwr1 Bsy Error gt Pwr1 Err ErrorlD gt Pwr1 Ei MC_Power2 PWR2 MC_Axis001 Pwr2_En gt Pwr2_ Status Busy gt Pwr2 Bsy Error gt Pwr2_Err ErrorlD gt Pwr2_ErrlD Axis Enable Status MC_Home1 HM 1 Axis Execute Done Busy CommandAborted Error ErrorlD MC_Home2 HM2 Axis Execute Done Busy CommandAborted Error ErrorlD MC_GroupEnable GRP_EN AxesGroup Execute Done Busy CommandAborted Error ErrorlD MC_GroupDisable GRP_DIS AxesGroup Execute Done Busy CommandAborted Error ErrorlD MC Axis000 Hm1 Ex gt Hm D gt Hm1 Bsy gt Hm1 Ca gt Hm Err gt Hm1 ErrlD MC Axis001 Hm2 Ex gt Hm2 D gt Hm2_Bsy gt Hm2_Ca gt Hm2_Err gt Hm2_ErrlD MC_Group0oo Grp En Ex gt Grp En D gt Grp En Bsy gt G
298. f Insufficient Travel Dis tance to Achieve Blending Transit Veloc ity Error Clear from MC Test Run Tab Page Slave Error Code Report There is not suffi cient travel distance to accelerate or decelerate to the transit velocity dur ing blending opera tion An error was cleared from the MC Test Run Pane of the Sysmac Stu dio The error code was reported by the slave when a Slave Error Detected error occurred e When the Acceleration Decel page 11 51 eration Over parameter was set to Use rapid acceleration decel eration Blending is changed to Buffered the results of profile creation caused the accelera tion deceleration rate to be exceeded when blending was specified so buffered was used Blending was specified but the target position was already reached so it was changed to Buffered because the profile could not be created Blending was specified for an interpolation instruction but based on the results of profile creation this was changed to Buffered because the execution time of the instruction before the transition was four control periods or less An error was cleared from the MC Test Run Pane of the Sys mac Studio ALT NN The error code was reported by the slave when a Slave Error Detected error 742F0000 hex occurred NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting 11 2 2 Error Descriptions This section describes the information
299. fault level error occurs for axis 0 the error handler for the device FaultHandler is executed Program the FaultHandler according to the device IF MC Axis000 MFaultLvl Activez TRUE THEN FaultHandler END IF f the Servo is ON for axis O velocity control is executed for axis O IF Pwr_Status TRUE THEN Vel_Ex TRUE END_IF f StartSetPos is TRUE while the Servo is ON the Set Position instruction is executed IF Pwr_Status TRUE AND StartSetPos TRUE THEN Set_Pos_Ex TRUE END IF IMC Power PWR Axis MC_Axis000 Enable Pwr_En Status gt Pwr Status Busy gt Pwr BSy Error gt Pwr Er ErrorlD gt Pwr_ErrlD MC_MC_MoveVelocity VEL Axis MC Axis000 Execute Vel Ex 10 76 NJ series CPU Unit Motion Control User s Manual W507 Velocity Acceleration Deceleration Jerk In Velocity Busy Active CommandAborted Error ErrorlD E MC_SetPosition SET_POS Axis Execute Position Done Busy CommandAborted Error ErrorlD Vel Vel Vel Acc Vel Dec Vel Jrk Vel InVel gt Vel Bsy Vel Act Vel Ca gt Vel Er gt Vel Ermi MC Axis000 Set Pos Ex Set Pos Pos gt Set Pos D Set Pos Bsy gt Set Pos Ca Set Pos Err gt Set Pos ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming 10 77 Duuuugiboid oIseg Z OL so duieg sch e
300. fe c1 O 2 Di 2 a 2 mE 2 D 2 O p c v U O 2 mE O 2 CL c 2 2 d o o mE lt O O 2 mE o 10 Sample Programming 10 2 16 Changing a Cam Data Variable and Saving the Cam Table This sample uses the user program to change a cam data variable that was created on Cam Editor of the Sysmac Studio The displacements for phases of 0 to 180 are multiplied by 2 and the displace ments for phases of 181 to 360 are multiplied by 0 5 If the changes to the cam data are completed the motion control instruction MC SaveCamrTable is used to save the cam data variable to non volatile memory in the CPU Unit When saving the data is completed the MC Camln Start Cam Operation instruction is executed to start cam motion la Precautions for Correct Use e f the phases are not in ascending order an error occurs when the MC Camliln Start Cam Operation instruction is executed The order of the phases are not checked in this sample To check the order of the phases execute the MC SetCamTableProperty Set Cam Table Proper ties instruction e There is a limit to the number of times that you can write non volatile memory in the CPU Unit Save cam table data only when necessary e f the power supply to the Controller is turned OFF before the data is saved with the MC SaveCamrTable instruction the cam data variable will revert to the contents from before it was changed by the user program I Main Variables
301. ference with the command current velocity A plus sign is added for acceleration and a minus sign is added for deceleration The value is 0 when the command acceleration deceleration rate of the instruction under execution is O Jerk LREAL Command Current Contains the current value of the command jerk Jerk command units s9 A plus sign is added when the absolute value of acceleration deceleration is increasing and a minus sign is added when it is decreasing The value is 0 when the command acceleration decel eration rate and command jerk of the instruction under execution is O LREAL Command Current Contains the current value of the command Torque torque Unit 96 A plus sign is added during travel in the positive direction and a minus sign during travel in the negative direction Contains the same value as the actual current torque except in torque control mode SAXIS REF ACT Axis Current Value DATA P o o lt o mr OD SZ Q it h 3 o S m fo 2 o o Oo Oo E Oo 3 O Oo 3 mp 2 A plus sign is added during travel in the positive LREAL Actual Current Position Contains the actual current position Unit com mand units LREAL Actual Current Velocity Contains the actual current velocity Unit com mand units s direction and a minus sign during travel in the negative direction LREAL Actual Current Torque Contains the current value of the actual torque Unit A plus
302. figurations and Setup T EtherCAT gt 3 Controller Setup W i2 Motion Control Setup V i Axis Settings Axes Group Settings e Cam Data Settings Event Settings E Task Settings F Data Trace Settings Master E001 R88D KNO1H ECT Rev 2 1 E002 R88D KNO1H ECT Rev 2 1 Copying an Axis Item name Model Product name Revision Node Address Enable Disable Settings Serial Number PDO Map Settings Distributed Clock Enable Reference Clock Setting Parameters Backup Parameter Settings Device name Set a name for the slave All vendors Groups Servo Drives E Frequency Inverter Digital IO Analog 10 Encoder Input Um iinn Cannne Input Keyword Show hidden slaves R88D KN30F ECT Rev 2 1 R88D KN30F ECT G5 Series ServoDri R88D KN30H ECT Rev 2 1 RB8D KN30H ECT G5 Series ServoDri R88D KNSOF ECT Rev 2 1 R88D KNSOF ECT G5 Series ServoDri R88D KNSOH ECT Rev 2 1 RB88D KN5OH ECT G5 Series ServoDri R88D KN75F ECT Rev 2 1 RB88D KN75F ECT G5 Series ServoDrh R88D KN75H ECT Rev 2 1 R88D KN75H ECT G5 Series ServoDri R88D KNASL ECT Rev 2 1 RBSD KNASL ECT GS Series ServoDri IX2 ECT Rev 1 1 X MX2 ECT EtherCAT Communic a GX ID1611 XWT IDOB 2 tier termin Model GX ID1611 ID08 Product name GX ID1611 XM sel Revision 1 1 Vendor OMRON Corporation Comment 2 tier terminal block You can also add an axis by copying the axis settings for an existing axis the Add
303. figuring Axes and Axes Groups I Downloading to the CPU Unit Use the Synchronization menu command of the Sysmac Studio to download the project to the CPU Unit 1 Select Online from the Controller Menu The Sysmac Studio goes online with the Controller 2 Select Synchronization from the Controller Menu and then click the Transfer to Controller Button Legend Synchronized Clear the present values of variables with Retain attribute Valid for Transfer to Controller lE Do not transfer the program source Valid for Transfer to Controller All data will be re transferred when this option is changed Ej Do not transfer Special Unit parameters and backup parameters of EtherCAT slaves out of synchronization scope D All data will be transferred because the projects in the computer and the controller are different Transfer From Controller EN Additional Information Introduction to Servo Drive Settings The MC Function Module connects to OMRON G5 series Servo Drives with built in EtherCAT communications Compatible Models The applicable model numbers are R88D KN L I I ECT The R88D KNL IL IL ECT R Servo Drives support only Position Control Mode Cyclic Syn chronous Position Control Mode Therefore any functions that use Velocity Control Mode Cyclic Synchronous Velocity Control Mode or Torque Control Mode Cyclic Synchronous Torque Control Mode cannot be used Servo Drive Settings The MC Function Module uses
304. for acceleration and deceleration Jerk is also called jolt surge and lurch A 3 3 EtherCAT Communications Term Description CAN application protocol over Ether A CAN application protocol service implemented on EtherCAT CAT CoE CAN in Automation CiA EtherCAT Technology Group Object Object Dictionary Process Data Process Data Object Service Data Object Receive PDO Transmit PDO Device Profile NJ series CPU Unit Motion Control User s Manual W507 CiA is the international users and manufacturers group that develops and supports higher layer protocols The ETG is a global organization in which OEM End Users and Technology Provid ers join forces to support and promote the further technology development An abstract representation of a particular component within a device which consists of data parameters and methods A data structure addressed by Index and Subindex that contains description of data type objects communications objects and application objects Collection of application objects designated to be transferred cyclically or acyclically for the purpose of measurement and control A process data I O data object that exchanges data at regular periods with CoE CoE asynchronous mailbox communications where all objects in the object dictionary can be read and written A process data object received by an EtherCAT slave A process data object sent from an EtherCAT slave A
305. g the built in EtherCAT port on an NJ series CPU Unit Using the built in Ether Net IP port on an NJ series CPU Unit Learning about the errors that may be detected in an NJ series Controller Learning about the operat ing procedures and func tions of the Sysmac Studio Learning how to configure networks data links rout ing tables Communica tions Unit settings etc Learning to create screen data for NS series Pro grammable Terminals Creating data transfer pro tocols for general purpose devices connected to CJ series Serial Communica tions Units Description Information on the built in EtherCAT port is pro vided This manual provides an introduction and provides information on the configuration fea tures and setup Use this manual together with the NJ series CPU Unit Hardware User s Manual Cat No W500 and NJ series CPU Unit Software User s Manual Cat No W501 Information on the built in EtherNet IP port is provided Information is provided on the basic setup tag data links and other features Use this manual together with the NJ series CPU Unit Hardware User s Manual Cat No W500 and NJ series CPU Unit Software User s Manual Cat No W501 Concepts on managing errors that may be detected in an NJ series Controller and informa tion on individual errors are described Use this manual together with the NJ series CPU Unit Hardware User s Manual Cat No W500 and NJ series
306. g the product Please consult your OMRON representative if you have any questions or comments Warranty and Limitations of Liability WARRANTY OMRONS s exclusive warranty is that the products are free from defects in materials and workmanship for a period of one year or other period if specified from date of sale by OMRON OMRON MAKES NO WARRANTY OR REPRESENTATION EXPRESS OR IMPLIED REGARDING NON INFRINGEMENT MERCHANTABILITY OR FITNESS FOR PARTICULAR PURPOSE OF THE PRODUCTS ANY BUYER OR USER ACKNOWLEDGES THAT THE BUYER OR USER ALONE HAS DETERMINED THAT THE PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR INTENDED USE OMRON DISCLAIMS ALL OTHER WARRANTIES EXPRESS OR IMPLIED LIMITATIONS OF LIABILITY OMRON SHALL NOT BE RESPONSIBLE FOR SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES LOSS OF PROFITS OR COMMERCIAL LOSS IN ANY WAY CONNECTED WITH THE PRODUCTS WHETHER SUCH CLAIM IS BASED ON CONTRACT WARRANTY NEGLIGENCE OR STRICT LIABILITY In no event shall the responsibility of OMRON for any act exceed the individual price of the product on which liability is asserted IN NO EVENT SHALL OMRON BE RESPONSIBLE FOR WARRANTY REPAIR OR OTHER CLAIMS REGARDING THE PRODUCTS UNLESS OMRON S ANALYSIS CONFIRMS THAT THE PRODUCTS WERE PROPERLY HANDLED STORED INSTALLED AND MAINTAINED AND NOT SUBJECT TO CONTAMINATION ABUSE MISUSE OR INAPPROPRIATE MODIFICATION OR REPAIR NJ series CPU Unit Motion Control User s Manual W507 17 Head an
307. ge e Create Axis Variables in Motion Control Setup View and assign the EtherCAT slaves for which motion control is performed e Perform motion control through motion control instructions There are two types of EtherCAT slaves that can be assigned to Axis Variables Servo Drive slaves and encoder input terminal slaves User program in PLC Function Module L CJ series Units Instructions other than Executed ineo central ies M instructions Executed ES Special Units oO ed i EtherCAT slaves Basic UC Units V V Variables UO ports MC Function Module 125K Peto EtherCAT EtherCAT Servo Drive or Q Master BEEN encoder input terminal Profile processing Function EtherCAT slaves Synchronization processing Task period Other processing L Axis Variables I l l l Module l l l l EN Additional Information e Commands are not sent directly through PDO communications to an EtherCAT slave that is assigned to an Axis Variable for instructions other than motion control instructions However the status of such an EtherCAT slave can be accessed indirectly through the Axis Variables e You can use SDO communications to read and write the objects of EtherCAT slaves that are assigned to axes variables However do not use SDO communications to write objects that are mapped to PDO communications If you do the
308. ge in CPU Unit Operating Mode All axes will decelerate to a stop at their maximum deceleration when the CPU Unit operating mode changes EN Additional Information e If you execute the MC_GroupDisable Disable Axes Group instruction during axes group operation the axes in the group will decelerate to a stop at their maximum deceleration rates e f you execute the MC Stop instruction while an axes group is in operation an error will occur for the axes and axes group and the axes group operation will decelerate to a stop with inter polation The interpolation deceleration rate is determined by the deceleration rate that is specified for the controlling instruction e When the input variable Enable to the MC Power Servo ON instruction changes to FALSE during axes group motion the MC Function Module immediately stops the command value for that axis and turns OFF the Servo When the Servo is turned OFF the Servo Drive will operate according to the settings in the Servo Drive Other axes in that axes group will stop with the stop method that is set in the Axes Group Stop Method axes group parameter An error will occur for the axes group if this happens e When RUN mode changes to PROGRAM mode any motion control instructions for current motions are aborted The CommandAborted output variable from the instructions remain TRUE and the Servo remains ON e f the operating mode returns to RUN mode while a deceleration stop is in progress after
309. gram so that the axis operates within ranges that do not cause overflows or underflows in the command position or actual position None Do not disconnect slaves for logical axes from the network during axes group motions or while decelerating to a stop None None Servo Main Circuit Power OFF 74210000 hex The main circuit power of the Servo Drive turned OFF while the Servo was ON Motion Control Function Module Source details Axis Detection Whenever Servo timing is ON The Servo for the axis turns OFF The main circuit power of the Servo Turn ON the main circuit power of the Turn OFF the Servo then turn OFF Drive was interrupted while the Servo Servo Drive for the axis where the the main circuit power of the Servo was ON error occurred reset the error and Drive then turn ON the Servo None None NJ series CPU Unit Motion Control User s Manual W507 Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects 11 Troubleshooting Interrupt Feeding Interrupt Signal Missing 74230000 hex An interrupt input was not received during execution of an MC MoveFeed Interrupt Feeding instruction Motion Control Function Module Source details Axis Detection During instruc timing tion execution The relevant axis decelerates to a stop The latch enabled
310. h 00 0 Max profile velocity 11 Modes of operation Node 10 Device R88D KNO1L ECT CH1 v 6060h 00 0 Modes of operation 15 Positive torque limit value Node 10 Device R88D KNO1L ECT CH1 v 60E0h 00 0 Positive torque limit value 16 Negative torque limit value Node 10 Device R88D KNO1L ECT CHi v 60E1h 00 0 Negative torque limit value 21 Touch probe function Node 10 Device R88D KNO1L ECT CH1 v 60B8h 00 0 Touch probe function 44 Software Switch of Encoder s Input Slave Input Drive to Controller O 22 Status word Node 10 Device R88D KNO1L ECT CH1 v 6041h 00 0 Status word O 23 Position actual value Node 10 Device R88D KNO1L ECT CH1 v 6064h 00 0 Position actual value 24 Velocity actual value Node 10 Device R88D KNO1L ECT CH1 v lt Not assigned 25 Torque actual value Node 10 Device R88D KNO1L ECT CH1 v 6077h 00 0 Torque actual value 27 Modes of operation display Node 10 Device R88D KNO1L ECT CH1 v 6061h 00 0 Modes of operation display 40 Touch probe status Node 10 Device R88D KNO1L ECT CH1 v 60B9h 00 0 Touch probe status 41 Touch probe posi pos value Node 10 Device R88D KNO1L ECT CH1 v 60BAh 00 0 Touch probe position 1 positive v 42 Touch probe pos2 pos value 43 Error code Node 10 Device R88D KNO1L ECT CH1 v 603Fh 00 0 Error code 45 Status of Encoder s Input Slave 46 Reference Position for csp Node 10 Device R88D KNO1L ECT CH1 v lt Not assigned Digital inputs 28 Positive limit switch Node 10 Device R88D KNO1L ECT CH1
311. hat exceeds the maximum velocity is specified for an axis motion instruc tion the axis will move at the maximum veloc ity Maximum Jog Velocity Specify the maximum jog velocity for the axis If Positive long reals 1 000 000 a target velocity that exceeds the maximum jog velocity is set for a jog instruction the axis will move at the maximum jog velocity Velocity Warning Value Set the percentage of the maximum velocity at O to 100 0 which to output a velocity warning for the axis No velocity warning is output if O is set Unit 26 Actual Velocity Filter Set the time period to calculate the average 0 to 100 0 Time Constant travel of the actual velocity in milliseconds The average travel is not calculated if O is set Unit ms Use this to reduce variations in the actual cur rent velocity when axis velocity is slow Specifying Target Velocities for Axis Operations The velocity used in an actual positioning motion is specified by the Velocity Target Velocity input vari able to the motion control instruction 9 28 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions Monitoring Velocities You can read Axis Variables in the user program to monitor velocities Variable name Data type Meaning Function MC AX 0 63 Cmd Vel LREAL Command Current This is the current value of the command Velocity velocity A plus sign is added during travel in the positive directio
312. he direction opposite to the limit input signal but if you attempt a motion in the same direction an error will occur and the instruction is not executed e f the limit input for any of the axes in an axes group is ON an axes group operation instruction cannot be executed for that axes group EN Additional Information e You must set up the Servo Drive in order to use the input signals from the Servo Drive An OMRON G5 series Servo Drive with built in EtherCAT communications has an immediate stop input and limit input assigned in its default settings e Refer to A 1 Connecting the Servo Drive for setting examples for connection to an OMRON G5 series Servo Drive 9 6 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions I Stopping with Motion Control Instructions Use the MC Stop or MC ImmediateStop instruction to stop single axis operation e MC Stop Instruction You can specify the deceleration rate and jerk for single axis control and synchronized control to decelerate to a stop Specify a deceleration rate of O to send a command that immediately stops the Servo Drive Other operation commands are not acknowledged while decelerating to a stop for this instruction and while the input variable Execute is TRUE e MC_ImmediateStop Instruction You can perform an immediate stop for single axis control or synchronized control functions You can also execute this instruction on axes that are enabled in an a
313. heck is performed when positioning for the in position check 1 This also includes states where processing is performed while in motion at a velocity of O 2 This variable is FALSE when all composition axes in the axes group are within the in position ranges set in the axis parameters For details on writing MC settings refer to the MC Write Write MC Setting instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 9 72 NJ series CPU Unit Motion Control User s Manual W507 Sample Programming SS This section describes basic application methods for homing error monitoring and other functions and provides programming samples for absolute positioning cam oper ation and other axis operations 10 1 Overview of Sample Programming 0000ee eee e eee eee 10 2 101e Re 10 2 10 1 2 Installation and Wiring sell RRR 10 2 god I c 10 3 10 2 Basic Programming Samples LL 10 4 10 2 1 Monitoring EtherCAT Communications and Turning ON Servos 10 4 10 2 2 Interlocking Axis Operation with Master Control Instructions 10 6 10 2 3 Error Monitoring and Error Resetting for Single axis Operation and Synchronized Operation 10 8 10 2 4 Error Monitoring and Error Resetting for Multi axes Coordinated Operation 0 000 cece eee 10 10 10 2 5 Monitoring for Instruction Errors 0 2 0 es 10 16 10 2 6 Checking
314. iate axis parameters Set the Following Error Warning Value so that it is less than the Following Error Over Value Set the axis parameters from the Sysmac Studio p co Oo gt D Tl c 5 ct O 5 0 Following Error Set the excessive following error check Non negative long 0 Over Value value Set 0 to disable the excessive follow reals ing error check Unit command units Following Error Set the following error warning check value Non negative long 0 Warning Value Set 0 to disable the following error warning reals that are less check Unit command units than or equal to the Following Error Over Value Buuoyuo N 10413 6uiwo o4 9 8 6 NJ series CPU Unit Motion Control User s Manual W507 9 69 9 Motion Control Functions 9 8 7 Following Error Counter Reset Resetting the following error counter resets the following error to O Use the MC ResetFollowingError instruction in the user program to reset the following error counter You can use the MC ResetFollowingError instruction for each axis during positioning or during homing If you execute a following error counter reset while the axis is in motion the current motion control instruction will be aborted and the command position will be set to the same value as the actual posi tion The home will remain defined even after executing a following error counter reset For details on resetting the following error counter refer to the MC ResetFollowingErro
315. ical specifications The following figure shows linear interpolation of 2 axes from point A to point B Y Fal LaO Axis A1 motion rao Axis AO motion Ta d For details on linear interpolation refer to the MC MoveLinear Linear Interpolation MC MoveLinearAbsolute Absolute Linear Interpolation and MC_MoveLinearRelative Relative Linear Interpolation instructions in the NJ series Motion Control Instructions Reference Manual Cat No W508 9 48 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 6 3 Circular Interpolation Circular interpolation is used to move two of the logical axes AO to A3 in a circular motion on a 2D plane Either absolute or relative positioning is possible You can specify the circular interpolation mode path direction interpolation velocity interpolation acceleration interpolation deceleration and com bined jerk for the two axes CCW Y coordinate CW CW Clockwise rotation CCW Counterclockwise rotation X coordinate With the MC Function Module you can specify the following three kinds of circular interpolation meth ods with the input variable CircMode Circular Interpolation Mode e Border point e Center e Radius la Precautions for Correct Use Set the Count Mode to Linear Mode for the axis that you use for circular interpolation If the instruction is executed with this axis in Rotary Mode an instruction error will occ
316. ifications eesseeeeeeeeeeeee 1 7 G gear operation a ento icm cni Exe E i Ac 9 11 Get Motion Control Error Status instruction 11 4 GetMCError Get Motion Control Error Status 11 4 H high speed homing ENEE 8 15 alise 8 2 Home Dellli amp cl testet note b ree tent nec et bea e 6 20 gender cT 6 20 Home Input Detection Direction 5 16 8 8 Home Input Mask Distance 5 16 8 8 Home Input SIghal ossis eterne reor aeta 5 16 8 9 Home Offset 4n n e erre 5 16 8 9 Home Proximity le 6 20 HOMINO casee 6 19 KOMING orei 8 2 Homing Acceleration sseesusesss 5 16 8 9 Index 3 Index Homing Approach Velocity 5 16 8 9 Homing Compensation Value 5 17 8 8 Homing Compensation Velocity 5 17 8 9 Homing Deceleration 5 16 8 9 Homing Holding Time 5 16 8 8 misisse VI n cR C 5 16 8 9 Homing Method i25 s resection eae add epo seruo asta ierra cet 5 16 8 6 homing parameters eeeeeseeeeee eere nennen 8 5 Bleift er 5 16 Homing Start Direction ssseeesssss 5 16 8 7 Homing Veloci M T DDR 5 16 8 9 el 6 25 Immediate Stop Input cceccseseeeceeesseeeseeeee
317. in Axis A1 Not assigned Y O 06 MC_Group000 0 S amp Cam Data Settings Jan F Event Settings Pr Task Settings F7 Data Trace Settings 4 Assign the axis to use in the Logical axes Box kel ysmac Studio Fille Edit View Insert Project Controller Simulation Tools Help New Project new NJ501 0 v Y Configurations and Setup gt 58 EtherCAT gt 53 CPU Expansion Racks 4 I O Map gt 3 Controller Setup W i Motion Control Setup w i Axis Settings 3 MC Axis000 0 1 MC Axis001 1 AN eie MC GroupoO0 0 amp Cam Data Settings Event Settings E Task Settings F Data Trace Settings es LS A Configurations and Setup iQ dE MC GroupoO0 0 WES M Loi Axes Gro p Basic Settings Axes group murber lll Dad Axes group use Used axes group v S7 Composition 2 axes M Select the axes composing an interpolation axes group Logical axes Composition axes Axis AO lt Not assigned e AisAl Lazio MC Axis001 1 lt Not assigned NJ series CPU Unit Motion Control User s Manual W507 3 25 3 Configuring Axes and Axes Groups 3 26 5 Click the bottom icon The Axes Group Operation Settings Tab Page is displayed Set appropriate values for the settings based on the operating conditions of the device Es Sysmac Studio e Ia P f BE SEE CS d Z ge A New Project new_NJ501_0 v gt oa EtherCAT gt Si CPU Expansion Racks v Interpolation V
318. ined variables Cause and correction Attached information Precautions Remarks NJ series CPU Unit Motion Control User s Manual W507 Level Partial fault Hecovery Cycle the power supply or reset the Controller Level Partial fault Hecovery Cycle the power supply or reset the Controller 11 Troubleshooting Axis Slave Disabled 34630000 hex The slave to which the axis is assigned is disabled At power ON at Controller reset or when down loading Detection timing Source details MC Common Motion Control Function Module Log category System MC COM PFaultLvl Active BOOL MC Common Partial Fault Occur rence Assumed cause Correction Prevention The slave to which the axis is assigned is disabled Enable the slaves to which axes are assigned in the EtherCAT settings If there are no slaves set the axis type to a virtual axis when using an axis in the program Enable the slave to which the axis is assigned in the EtherCAT settings If there is no slave set the axis type to a virtual axis None None Network Configuration Information Missing for Axis Slave 34640000 hex The network configuration information is not registered for the slave to which the axis is assigned At power ON at Controller reset or when down loading Detection timing Motion Control Function Module Source details MC Common Log category System Data type Name Variable MC COM PFa
319. information in the NJ series CPU Unit Built in EtherCAT Port User s Manual Cat No W505 id I T o 3 3 e Lem 5 em 5 gt Er o c mp D m 5 o O o D 8 4 2 Setting Procedure uonounJ Jo euiino L p 9 This section describes the procedure to set the home of an absolute encoder system 1 Absolute Encoder Setup Refer to the OMRON G5 series AC Servomotors Servo Drives with Built in EtherCAT Communi cations User s Manual Cat No 1576 for the setup procedure 2 Setting Axis Parameters Set encoder type for the Count Mode axis parameter of the MC Function Module For details refer to 5 2 7 Position Count Settings NJ series CPU Unit Motion Control User s Manual W507 8 13 8 Homing 8 14 3 Execute Homing Execute homing Set the Homing Method in the Homing Settings axis parameters of the MC Function Module After home is defined the difference between the command position and the absolute value data read from the absolute encoder is automatically saved to the battery backup memory in the CPU Unit as the absolute encoder home offset I Absolute Encoder Setup The absolute encoder must be set up the first time it is used to initialize the rotation data to O when the absolute encoder is stored for an extended period of time without a battery connected etc Refer to the OMRON G5 series AC Servomotors Servo Drives with Built in EtherCAT Communications User s Man ual Cat No
320. ing con ditions Home defined Actual current position is within the zero position range of home This variable is also TRUE when the zero position is passed by while the axis is moving for a command MC AX 0 63 DrvStatus P OT BOOL Positive Limit TRUE when the positive limit input is Input enabled MC AX 0 63 DrvStatus N OT BOOL Negative Limit TRUE when the negative limit input is Input enabled MC AX 0 63 DrvStatus HomeSw BOOL Home Proxim TRUE when the home proximity input is ity Input enabled MC AX 0 63 DrvStatus Home BOOL Home Input TRUE when the home input is enabled 8 10 NJ series CPU Unit Motion Control User s Manual W507 8 Homing 8 3 Homing Operation Select the home definition method based on the configuration of the positioning system and its pur pose There are 10 Homing Operation Modes supported by the MC Function Module You can also fine tune the home that is detected with a homing compensation value EN Additional Information e The most suitable mode depends on the configuration of the positioning system and the appli cation In linear mode finite length Proximity Reverse Turn and Home Proximity Input OFF is normally used if there is a home proximity sensor positive limit input and negative limit input e The override factors are ignored for homing e The in position check will follow the in position check settings only for the completion of the home definition and homing com
321. ing precautions on the operation direction of the previous operation 9 34 If the MC Home instruction exceeds the point where the home input was detected and reverses operation the opposite direction of the home input detection direction is used If a homing compensation value is set for the MC Home instruction the direction moved for the compensation value is used If an immediate stop is specified for the MC TouchProbe Enable External Latch instruction the latch position may be exceeded and the direction may be reversed The direction may be reversed for the MC MoveFeed Interrupt Feeding instruction When the MC ResetFollowingError instruction is executed the error is set to zero so the command direction is used If an immediate stop is specified for an external input signal or resetting the error counter is specified for stopping for a limit input the operation may reverse direction toward the position where the external input signal was received NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions Example for No Direction Specification The following example illustrates when positioning is performed towards a target position of 20 when the command current position is 50 Modulo maximum position setting ee value 100 Command current position 50 Target position 20 Target position 20 Modulo
322. io Mi Built in EtherCAT port EtherCAT EtherCAT z m T R slaves i i SE en General purpose slaves Error management range for NJ series Controller You can use the troubleshooting functions of the Sysmac Studio or the Troubleshooter on an NS series PT to quickly check for errors that have occurred and find corrections for them This manual describes the errors that originate in the Motion Control Function Module Refer to the NJ series Troubleshooting Manual Cat No W503 for specific corrections when errors occur and for trou bleshooting information on the entire NJ series Controller For information on errors that occur when motion control instructions are executed refer to each instruction in the NJ series Motion Control Instruction Reference Manual Cat No W508 11 2 NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting 11 1 1 How to Check for Errors You can check to see if an error has occurred with the following methods m e o Checking method What you can check Checking the indicators CPU Unit operating status S Troubleshooter of the Sysmac Studio You can check for current Controller errors a log of past Controller o errors error sources error causes and corrections m Checking with the Troubleshooter of an NS You can check for current Controller errors a log of past Controller S series PT errors
323. ion Camin_StPos MasterStartDistance Camin_MStDis MasterScaling Camin MSc SlaveScaling Camin_SSc MasterOffset Camin MO SlaveOffset Lamm SO Reference Type Camin_RT Direction Camin Dir InCam gt Camin_InCam1 InSync gt Camin_InSync EndOfProfile gt Camin EOP Index gt Camin Index Busy gt Camin Bsy Active gt Camin Act CommandAborted gt Camin Ca Error gt Camin Err ErrorlD gt Camin ErrlD MC Power for axis O PWR1 Axis MC Axis000 Enable Pwr1 En Status gt Pwr1 S Busy gt Pwr1 Bsy Error gt Pwrl Em ErrorlD gt Pwr1 Ei MC Power for axis 1 PWR2 Axis MC Axis001 Enable Pwr2 En Status gt Pwr2 S Busy gt Pwr2 Bsy Error gt Pwr2 Em ErrorID gt Pwr2 ErrlD MC Home for axis O HM1 Axis Execute Done Busy CommandAborted MC Axis000 Hm1 Ex gt Hm1 D gt Hm1 Bsy gt Hm1 Ca NJ series CPU Unit Motion Control User s Manual W507 Error ErrorlD MC Home for axis 1 HM2 Axis Execute Done Busy CommandAborted Error ErrorlD MC_MoveAbsolute MV_ABS Axis Execute Position Velocity Acceleration Deceleration Direction Done Busy Active CommandAborted Error ErrorlD gt Hm Er gt Hm1 ErrlD MC Axis001 Hm2 Ex gt Hm2 D gt Hm2_Bsy gt Hm2_Ca gt Hma2 Err gt Hm2_ErrlD MC Axis000 Mv Abs
324. ion A virtual encoder axis is used temporarily in place of an encoder axis when there is no physical encoder 3 1 The applicable Servo Drives are the OMRON G5 series Servo Drives with Built in EtherCAT Communications 2 The applicable Encoder Input Terminals are the OMRON GX series GX EC0211 EC0241 Encoder I O Termi nals 8 Virtual encoder axes are used in combination with motion control instructions that update the actual position of the virtual encoder axis They cannot be used in place of encoder axes for versions of the MC Function Module that do not support such instructions e Virtual Servo Axes A virtual servo axis does not have a physical encoder or external I O signals Therefore virtual servo axes differ from servo axes in the following ways e They are always in Servo ON state e The actual current position equals the command current position e The actual current velocity equals the command current velocity e External input signals cannot be used If the MC Home instruction is executed the instruction is processed as a zero position preset regardless of the setting of the Homing Method axis parameter 5 6 NJ series CPU Unit Motion Control User s Manual W507 5 Motion Control Parameters e f a motion control instruction that uses a latch function is executed you must set the trigger input condition to Controller Mode An error does not occur if you set it to Drive Mode but a latch trigger will not occur so exe
325. ion is executed to stop immediately If for any reason the Error output variable from the MC Stop instruction changes to TRUE the MC ImmediateStop instruc tion is executed to stop immediately If the MC ImmediateStop instruction is executed the axis status is Error Deceleration Stopping Samples are provided for both ladder diagram and ST programming Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 _SAXIS_REF This is the Axis Variable for axis O MC Axis000 MFaultLvl Active mS uml TRUE when there is a minor fault level error for 1 0 MC Axis000 Details Homed e TRUE when home is defined for axis O Pwr Status BOOL FALSE This variable is assigned to the Status output variable from the PWR instance of the MC Power instruction It is TRUE when the Servo is ON Stp Ca BOOL FALSE This variable is assigned to the Command Aborted output variable from the STP instance of the MC Stop instruction Stp_Err BOOL FALSE This variable is assigned to the Error output variable from the STP instance of the MC_Stop instruction StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communications are active and normal StopOn BOOL FALSE This variable gives the status of the external button that is used to stop The MC_Stop instruction is executed to stop the axis if this variable is TRUE Ladder Diagram When StartPg is TRUE the
326. ion is given below Previous Instruction MC MoveLinear Execute Busy I 1 Active Done CommandAborted i Current Instruction Enable I I I I I I I i r1 I I LI I I I I Enabled Busy 50 200 VelFactor 100 When overrides are disabled with MC GroupSetOverride the target velocity returns to 100 Interpolation velocity Override factor 20096 Override factor 100 dBalnotnisihesd Bs rect ee rre Se Override factor 5096 Time For details refer to the MC GroupSetOverride Set Group Overrides instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 9 52 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 7 Common Functions for Multi axes Coordinated Control This section describes the common functions for multi axes coordinated control 9 7 1 Velocity Under Multi axes Coordinated Control To specify the velocity for multi axes coordinated control specify the interpolation velocity on the path The unit is the same as for single axes command units s T Types of Velocities The following is the only type of interpolation velocity for axes groups supported by the MC Function Module Velocity type Definition Command interpolation velocity This is the actual value of the command interpolation velocity output by the MC Functi
327. ion opposite to the homing direc tion were detected during a homing operation The home proxim ity input and the limit signal in the homing direction were detected at the same time dur ing a homing opera tion The home input and the limit signal in the direction oppo site to the homing direction were detected at the same time during a homing operation The home input and the limit signal in the homing direc tion were detected at the same time during a homing operation The setting of the home input mask distance is not suit able for the MC Home instruc tion There was no home signal input during the homing opera tion Or a limit sig nal was detected before there was a home input There was no home proximity signal input during the homing operation e The wiring of the home proxim ity signal or limit signal is incor rect The home proximity sensor or limit sensor is installed in the wrong location The contact logic of the home proximity signal or limit signal is not correct The home proximity sensor or limit sensor failed The wiring of the home proxim ity signal or limit signal is incor rect The home proximity sensor or limit sensor is installed in the wrong location The contact logic of the home proximity signal or limit signal is not correct The home proximity sensor or limit sensor failed The wiring of the home input signal or limit signal is incorrect
328. ioning is completed it may be executed as a new instruction rather than as a re execution of the same instruction Re execution Instruction during Motion Re execution Just Before End of Positioning Velocit Velocit y J Command re executed y JCommand re executed TExecuted TInitial T Travel distance TExecuted iti Travel distance 7 travel specified when travel specified when distance instruction was distance instruction was re executed re executed If the instruction is re executed just before the end of positioning positioning for the travel distance that is specified when the instruction is re executed is sometimes based on the position to which the axis was moved for the initial travel distance la Precautions for Correct Use Do not change the travel distance and re execute the instruction just before the end of position ing I Changing the Target Velocity The operation is changed only during acceleration including acceleration for triangular control and constant velocity motion Changes are also accepted when the axis is decelerating but operation is not affected Changing the Acceleration Rate The operation is changed only during acceleration and acceleration during triangular control If it is changed when moving at a constant speed the changed rate applies to acceleration for an override Changes are also accepted when the axis is decelerating but operation is not affected I Changing the Deceleration
329. is 13 1 048 576 4 10 0004 Enabled for actual position um Linear Mode 500 000 5 50 0006 5 000 000 7 5 000 000 7 1 If there is more than one axis a different variable name is set for each axis 2 If there is more than one axis a different value is set for each axis 3 Set the node address to the same value as the node address that is set on the Servo Drive If there is more than one axis a different value is set for each axis 4 The position command unit will be 1 um 5 The maximum velocity will be 3 000 r min 30 m min 0 5 m s 500 000 um s 6 The maximum jog velocity will be 10 of the maximum velocity i e 0 05 m s 50 000 um s 7 The maximum acceleration and the maximum deceleration are 5 m s2 The acceleration time to the maximum velocity 3 000 r min is 0 1 s 7 3 3 Setting Example for Input Variables This section describes the settings for the MC MoveJog input variables Velocity Target Velocity Acceleration Acceleration Rate and Deceleration Deceleration Rate e For example set Velocity to 30 000 to jog at a velocity of 0 03 m s e Set Acceleration and Deceleration to 3 000 000 to accelerate and decelerate at 3 m s2 NJ series CPU Unit Motion Control User s Manual W507 7 Manual Operation 7 3 4 Programming Example The following programming example jogs an axis named Axis7 in the positive direction for the value of bit A and in the negative direction for the value of bit B
330. is 3 the error handler for the device FaultHandler is executed Program the FaultHandler according to the device IF MC Axis000 MFaultLvl Activez TRUE OR MC Axis001 MFaultLvl Activez TRUE OR MC_Axis002 MFaultLvl Active T RUE OR MC_Axis003 MFaultLvl Active TRUE THEN FaultHandler END IF If the Servo is ON for axis O and home is not defined the MC Home instruction is executed for axis O IF Pwr1 Status TRUE AND MC Axis000 Details Homed FALSE THEN Hm1_Ex TRUE END_IF If the Servo is ON for axis 3 and home is not defined the MC Home instruction is executed for axis 3 IF Pwr4 Status TRUE AND MC Axis003 Details Homed FALSE THEN Hm4_Ex TRUE END_IF If homing is completed for axis O velocity control is executed IF Hm1_D TRUE THEN Vel Ex TRUE END IF sch Ge NO A Co C o 2 Di eO Di 3 U O Zh D O c M lt D mE O O O my D O p mE 2 D LD lt 2 O CD mE Di U O e E O 2 When axis 0 reaches the target velocity gear operation is executed IF Vel InVelz TRUE THEN Gearin Ex TRUE END IF When axis O reaches the target velocity cam operation is executed IF Vel InVelz TRUE THEN Camin_Ex TRUE END_IF f both gear and cam operation are in progress the Combine Axes instruction is executed IF Gearin ActZTRUE AND Camin_Act TRUE THEN Combine Ex ZTRUE END IF MC Power for axis O PWR1 Axis MC_Axis00
331. is O and axis 1 and the axes group is disabled the axes group is enabled IF MC GroupOOO Status Disabled TRUE AND Hm1 DZTRUE AND Hm2_D TRUE THEN Grp En Ex TRUE END IF If the axes group is enabled absolute linear interpolation is executed IF MC GroupOOO0 Status Readyz TRUE THEN Mv Lin Abs Ex ZTRUE END JE f the external button turns ON e StopOn changes to TRUE during execution of absolute linear interpolation the axes group is stopped IF MC GroupOOO Status Moving TRUE AND StopOnz TRUE THEN Grp Stp Ex TRUE END JE f the CommandAborted or Error output variable from the Group Stop instruction are TRUE the axes group is stopped immediately IF Grp Stp Ca TRUE OR Grp Gm Err TRUE THEN Grp Imd Gm Ex ZTRUE END IFE AMC Power PWR1 Axis MC_Axis000 Enable Pwr1 En Status gt Pwr1 Status Busy gt Pwr1 Bsy Error gt Pwr1 Err ErrorlD gt Pwr1 ErrlD PWR2 Axis MC Axis001 Enable Pwr2 En Status gt Pwr2_ Status Busy gt Pwr2 Bsy Error gt Pwr2 Err ErrorlD 2 Pwr2 ErrlD MC_Home HM 1 Axis Execute Done Busy CommandAborted Error ErrorlD HM2 Axis Execute Done Busy CommandAborted Error ErrorlD 10 28 MC Axis000 Hm1 Ex gt Hm D gt Hm1 Bsy gt Hm1 Ca gt Hm Err gt Hm1 ErrlD MC Axis001 Hm2 Ex gt Hm2 D gt Hm2 Bsy gt Hm2 Ca gt Hma2 Err gt
332. it to actual application requirements Actual performance is subject to the OMRON Warranty and Limitations of Liability ERRORS AND OMISSIONS The information in this manual has been carefully checked and is believed to be accurate however no responsibility is assumed for clerical typographical or proofreading errors or omissions NJ series CPU Unit Motion Control User s Manual W507 19 Head and Understand this Manual 20 NJ series CPU Unit Motion Control User s Manual W507 Safety Precautions Safety Precautions Definition of Precautionary Information Refer to the following manuals for safety precautions e NJ series CPU Unit Hardware User s Manual Cat No W500 e NJ series CPU Unit Software Users Manual Cat No W501 NJ series CPU Unit Motion Control User s Manual W507 21 Precautions for Safe Use Precautions for Safe Use Refer to the following manuals for precautions for safe use e NJ series CPU Unit Hardware User s Manual Cat No W500 e NJ series CPU Unit Software User s Manual Cat No W501 22 NJ series CPU Unit Motion Control User s Manual W507 Precautions for Correct Use Refer to the following manuals for precautions for correct use e NJ series CPU Unit Hardware User s Manual Cat No W500 e NJ series CPU Unit Software Users Manual Cat No W501 NJ series CPU Unit Motion Control User s Manual W507 Precautions for Correct Use 23 Hegulations and Standards Regul
333. itch for each cam block Displacement SR i BER E NN DEE E E End point displacement BI for block 1 E End point for block 1 st Start EISES LOE DIOS block 2 Gamm 1 BE Pen 2 NN End point Cam start point E Cam end point for block 2 z block start point block start point End phase for block 2 block 2 025 0 025 05 075 425 45 475 Phase End phase fot for block 1 block 1 N o 5 e D 1 fo X 0 o lt 3 o O N 2 O le 5 e o Cam Tables The MC Function Module defines a single element of data consisting of the phase of the master axis and the displacement of the slave axis as one cam data A cam table is defined as the combination of multiple sets of cam data The cam table is created with the Cam Editor in the Sysmac Studio You can modify cam data in the cam table from the user program The phases and displacements in the cam data that makes up the cam table are represented as rela tive distances from the start point 0 0 During cam operation the command position sent to the slave axis is the displacement determined by interpolating linearly between the two cam data elements adja cent to the phase of the master axis The more cam data there is in the cam table the more accurate the trajectory and the smoother the cam profile curve will be Se qe WED G c 6 NJ series CPU Unit Motion Control User s Manual W507 9 15 9 Motion Control Functions 1 cycle Com
334. itionMode TMNone and BufferMode Buffered The axis moves to position End1 stops and then moves to position End2 Y coordinate e End2 Multi execution of instruction End1 Start2 Start X coordinate Operation Pattern for X Axis Codrdinates Velocity Y Start1 End1 Time Operation Pattern for Y Axis Coordinates Velocity Start 2 End2 Time P N O Oo 3 3 Oo 3 TI c 3 O EE Oo 3 o Oo c DC fo X D o O Oo Oo 2 fo mp o o O Oo 3 mp 9 O1JUOD pejeuipJoo sexe n n N 10 suononJisu 03007 uono N Jo OPON Jejgng uonnoexe ninIWw S 7 6 NJ series CPU Unit Motion Control User s Manual W507 9 61 9 Motion Control Functions TransitionMode TMNone and BufferMode Blending The axis moves to position End1 and then moves to position End2 Y coordinate e End2 Multi execution of instruction End1 Start2 X coordinate Operation Pattern for X Axis Coordinates Velocity Y Start Start End Time Operation Pattern for Y Axis Coordinates BufferMode BlendingPrevious Velocity d Start2 End2 Time 9 62 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions TransitionMode TMNone and BufferMode Aborting The axis moves from End1 multi execution of instruction to End Y coordinate End2 Multi execution of instruction X coordinate Operation P
335. itions Variable name Data type Meaning Function MC AX 0 63 Cmd Pos LREAL Command Current This is the current value of the command posi Position tion When the Servo is OFF and the mode is not the position control mode the actual cur rent position is output MC AX 0 63 Act Pos LREAL Actual Current Posi This is the actual current position tion NJ series CPU Unit Motion Control User s Manual W507 9 27 Wu O Oo 3 3 Oo 3 Tl c 3 O Oo 3 o Oo o gt e o 1 fo 23 o O Oo 3 mp Q Suonisog G 6 9 Motion Control Functions 9 5 2 Velocity Types of Velocities The following two types of axis velocities are used in the MC Function Module Velocity type Definition Command velocity This is the velocity that the MC Function Module outputs to control an axis Actual velocity This is the velocity calculated in the MC Function Module based on the actual posi tion input from the Servo Drive or encoder input This value is given if the Velocity actual value 606C hex is mapped in the PDOs and assigned to the Actual Cur rent Velocity Velocity Unit A velocity is given in command units s The command unit is the value obtained from unit conversion of the position display unit and the electronic gear Axis Parameters That Are Related to Velocities Maximum Velocity Specify the maximum velocity for the axis Ifa Positive long reals 400 000 000 target velocity t
336. ity 10 36 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o e ST Programming x Di o Pwr_Status d E a Hm Ex Qa e E C Hm_D i o a Hm Bsy Mv Abs Ex Mv Abs D Mv_Abs_Bsy Mv Abs Act ReExeSw Command position Command velocity ch P i5 ch O 2 pe 2 Q 2 e 2 D m x D m U O o o 2 O lt JU T D X D CH c o 2 o scha pa 2 3 o e x c O o 2 NJ series CPU Unit Motion Control User s Manual W507 10 37 10 Sample Programming I Ladder Diagram When StartPg is TRUE the status of process data communications of axis 0 is checked to see if communications are active and normal StartPg EC PDSlavTbI MC_Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress Lock I 4 The Servo for axis O is turned ON if process data communications for axis O are active and normal PWR MC Power Lock MC Axis000 4 Axis Axis Pwr Status Enable Status Busy Pwr_Bsy Error Pwr Er ErrorlD Pwr_ErrlD If a minor fault level error occurs for axis 0 the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler If the Servo is ON for axis O and home is not defined the MC Home instruction is executed MC Axis000 MFaultLvl Active
337. ject that is required for the axis type is not allocated to PDO Source Motion Control Function Module Source details MC Common Detection At power ON at timing Controller reset or when down loading Error attributes Level Partial fault Hecovery Cycle the power Log category System supply or reset the Controller Effects It will not be possible to perform axis control lees MC COM PFaultLvl Active BOOL MC Common Partial Fault Occur rence Cause and Assumed cause Correction Prevention SENI The required PDOs are not mapped Map the PDOs that are required for Map the PDOs that are required for when the axis type is set to a servo the relevant axis type Refer to A 7 2 the axis types that are used Refer to axis or encoder axis Servo Drive Settings for the required A 1 2 Servo Drive Settings for the PDOs required PDOs Non volatile memory failure If the error occurs even after the None above correction is performed non volatile memory has failed After you replace the CPU Unit download all settings including the Axis Parameter Settings from the Sysmac Studio Attached None information Precautions None Hemarks 11 22 NJ series CPU Unit Motion Control User s Manual W507 Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System def
338. l Cosel Co Ltd TAH 06 683 Trademarks e Sysmac and SYSMAC are trademarks or registered trademarks of OMRON Corporation in Japan and other countries for OMRON factory automation products Windows Windows 98 Windows XP Windows Vista and Windows 7 are registered trademarks of Microsoft Corporation in the USA and other countries e EtherCAT is a registered trademark of Beckhoff Automation GmbH for their patented technology e The SD logo is a trademark of SD 3C LLC C adf Other company names and product names in this document are the trademarks or registered trade marks of their respective companies Software Licenses and Copyrights This product incorporates certain third party software The license and copyright information associ ated with this software is available at http www fa omron co jp nj info ei NJ series CPU Unit Motion Control User s Manual W507 25 Unit Versions Unit Versions Unit Versions A unit version has been introduced to manage CPU Units in the NJ Series according to differences in functionality accompanying Unit upgrades I Notation of Unit Versions on Products The unit version is given on the ID information label of the products for which unit versions are man aged as shown below Example for NJ series NJ501 I CPU Unit ID information label Unit model Unit version NJ501 1500 Vert Ly PORT1 MAC ADDRESS IEEESSRRERRSet PORT2 See ADDRESS A unen MEE
339. l Programming 6 2 Motion Control Instructions Motion control instructions are used in the user program to execute motion controls for an NJ series Controller These instructions are defined as function blocks FBs The motion control instructions of the MC Function Module are based on the technical specifications of function blocks for PL Copen motion control There are two types of motion control instructions PLCopen defined instructions and instructions that are unique to the MC Function Module This section provides an overview of the PL Copen motion control function blocks and gives the specifications of the MC Function Module Refer to the NJ series CPU Unit Software User s Manual Cat No W501 for basic information on the NJ series function blocks FBs 6 2 1 Function Blocks for PLCopen Motion Control PLCopen standardizes motion control function blocks to define a program interface for the languages specified in IEC 61131 3 JIS B 3503 Single axis positioning electronic cams and multi axis coordi nated control are defined along with basic procedures for executing instructions By using PLCopen motion control function blocks the user program can be more easily reused without hardware dependence Costs for training and support are also reduced e N O et O 5 O Oo 5 9 5 o c O et Oo 5 o EN Additional Information PLCopen PLCopen is an association that promotes IEC 61131 3 It has its headquarter
340. le are changed The displacements for phases from 0 to 180 are multiplied by 2 and the displacements for phases from 181 to 360 are multiplied by 0 5 When the changes to the displacements are completed WriteDone is changed to TRUE WriteCamdata MC COM Status CamTableBusy FOR Index UINT 10 0 TO UINT 10 360 DO IF Index lt UINT 10 180 THEN CamProfileO INDEX Distance CamProfileO Index Distance REAL 2 0 ELSE CamProfileO INDEX Distance CamProfileO Index Distance REAL 0 5 END_IF END_FOR WriteDone TRUE WriteCamData FALSE O Oo JO Om C rnm If the changes to the cam data variable are completed SaveCamtable is TRUE and a cam table file save operation is not in progress Sv Cam Ex is changed to TRUE IF WriteDonezZ TRUE AND SaveCamtable TRUE AND MC COM Status CamTableBusy FALSE THEN Sv Cam Ex TRUE o a o O D gt ei Q D O D J D D S o D D 2 Q LO D lt 2 Q D O D 3 mi END IF m D If Sv Ca TimeUp is TRUE Sv Cam Exis changed to FALSE If Sv Cam Ex changes to FALSE Sv Ca TimeUp changes to FALSE and Sv Cam Ex changes to TRUE The MC SaveCamTable instruction is executed again Sv Cam Ex Gu Ca TimeUp Sv Cam Ex If Sv Cam Ex changes to TRUE the MC SaveCamrTable instruction is executed SV CAM MC SaveCamrTable Sv Cam Ex CamProfileO 4CamTable CamTable Sv Cam D Execute Done Busy Sv Cam Bsy CommandAborted Sv Cam Ca
341. licable Encoder Input Terminals for the MC Function Module Refer to the GX series EtherCAT Slave User s Manual Cat No W488 for detailed information on the Encoder Input Terminals Recommended Encoder Input Terminals All of the functions of an encoder axis of the MC Function Module can be used for Encoder Input Termi nals with the unit versions that are given in the following table Manufacturer Compatible models Applicable unit versions OMRON GX ECO21 1 Unit version 1 1 or later OMRON GX EC0241 Unit version 1 1 or later EN Additional Information e Only the OMRON GX EC0211 EC0241 can be used for encoder axes of EtherCAT slaves e Unit version 1 0 of the GX EC0211 EC0241 can also be used for encoder axes but they do not support the Sysmac device functions When you use unit version 1 0 do not set the node address switches to OO If you set them to 00 a network configuration error occurs Refer to the GX series EtherCAT Slave User s Manual Cat No W488 for detailed information on functions I External Input Signals When all of the functions of an encoder axis are used for an Encoder Input Terminal the following input signals are used at the Encoder Input Terminal e Counter A phase e Counter B phase e Counter Z phase e Latch Inputs A B There are two counter channels and there are two external latches for each channel Wire the input signals that are required for your application Refer to the GX series EtherCAT
342. load the project e Data Flow for Setting MC Parameters Download your MC Parameter Settings to the CPU Unit using the Sysmac Studio to save those settings in the CPU Unit s non volatile memory Saved settings are applied to the main memory after you download them or when the power is turned ON If there are no problems with the saved settings the MC Function Module executes control based on the settings in the main memory The settings of some of the parameters can be accessed as system defined variables for motion control You can upload and download MC parameter settings regardless of the CPU Unit s mode or the status of the MC Function Module When you start the download process all axes in motion will stop immediately and the Servo will turn OFF Overwriting Parameters with the MC Write Write MC Setting Instruction You can use the MC Write Write MC Setting motion control instruction to change the settings of some parameters in the main memory while the user program is running If the specified setting value is outside the allowed range the output variable Error from the instruction changes to TRUE and the parameter setting is not changed Parameter settings become valid in either of the following two situations e The axis or axes group is stopped and you execute an instruction for an axis command or axes group command e You set the Buffer Mode Selection for the instruction to Aborting and execute more than one in
343. locity MC Axis000 u AMAA Time 10 66 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N s D I Ladder Diagram 2 OH ug When StartPg is TRUE the status of process data communications of axis O is checked to see if communications 2 are active and normal Qs 3 8 o2 o qc m EE EC PDSIlavTbI MC Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress Lock0 When StartPg is TRUE the status of process data communications of axis 1 is checked to see if communications are active and normal SE EC PDSIavTbI MC Axis001 Cfg NodeAddress EC CommErrTbI MC Axis001 Cfg NodeAddress Loch The Servo for axis 0 is turned ON if process data communications for axis O are active and normal MC Power Pwr1 Status Pwr1_Bsy Pwr1 Err Pwri_ErrlD Pwr2 Status Es ho un A CD 2 e ul 2 D U 2 Q o D o A fb lt D o em D mn 2 A o 5 C o I o o 2 Pwr2 Bsy Pwra Err Pwr2_ErrlD If a minor fault level error occurs for any of the composition axes in the axes group the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler MC Axis000 MFaultLvl Active MC Axis001 MFaultLvl Active 4 If the Servo is ON for axis O and home is not defined the MC Home instruction is executed HM1 Pwr1 Sta
344. lowing Error Over Value This function is enabled only when the Count Mode is Linear Mode and the home is defined Refer to 9 8 5 Software Limits for details on software limits 5 2 7 Position Count Settings Set the count mode for the position Count Mode Set the count mode for the position 0 to 1 0 0 Linear Mode finite length 1 Rotary Mode infinite length Modulo Maximum Set the modulo maximum position when the Long reals 2 147 483 647 Position Setting Count Mode is set to Rotary Mode Unit Value command units Modulo Minimum Set the modulo minimum position when the Long reals 2 147 483 648 Position Setting Count Mode is set to Rotary Mode Unit Value command units Encoder Type Set the encoder type 0 to 1 0 0 Incremental encoder INC 1 Absolute encoder ABS NJ series CPU Unit Motion Control User s Manual W507 5 13 5 Motion Control Parameters I Count Modes The Count Mode is the feed mode for the axis Select the count mode for the command positions for each axis There are two Count Modes Linear Mode which has a finite axis feed range and Rotary Mode which has an infinite axis feed range e Linear Mode Finite length Axis The linear mode is centered around O This mode is used for devices with a mechanically limited range of motion such as an XY stage The setting range when the value is converted to pulses is 40 bits signed integer 0xX8000000000 to OX7FFFFFFFFF You cannot specify a
345. lue Following Error Warning Value Position Count Count Mode Settings Modulo Maximum Position Setting Value Modulo Minimum Position Setting Value Encoder Type Servo Drive Modulo Maximum Position Setting Value Settings Modulo Minimum Position Setting Value NJ series CPU Unit Motion Control User s Manual W507 3 3 w L P X SIOJOWEICY SIXY 0 uononpoJu Z L 3 Configuring Axes and Axes Groups Classification Parameter name Homing Settings Homing Method Home Input Signal Homing Start Direction Home Input Detection Direction Operation Selection at Positive Limit Input Operation Selection at Negative Limit Input Homing Velocity Homing Approach Velocity Homing Acceleration Homing Deceleration Homing Jerk Home Input Mask Distance Home Offset Homing Holding Time Homing Compensation Value Homing Compensation Velocity Hefer to 5 2 Axis Parameters for details on axis parameters e Settings Required to Use Axes The following settings must be made to use the axes that are created with the Sysmac Studio Axis Basic Axis Number Axis numbers are automatically set in the order Settings that the axes are created Axis Type Select the type of axis to control Node Address input Specify the node address of the EtherCAT slave devices and output device that is assigned to the axis The Node devices Address parameter cannot be selected if the Axis Type parameter is set to use a virtual axis e Required Se
346. lustrates when positioning is performed towards a target position of 20 when the command current position is 50 Modulo maximum position setting amu ia e M See value 100 Command current position 50 Target position 20 i v Target position 20 Ol CH o 3 3 O 3 TI c 3 O O 3 o A O d 3 a D I Q x o0 CH o 3 e S Modulo minimum position setting value 70 Moves in negative direction uonoeJiq uonejedo eui BuiAioedgs G 9 6 NJ series CPU Unit Motion Control User s Manual W507 9 33 9 Motion Control Functions Example for Current Direction The following example illustrates when positioning is performed towards a target position of 20 when the command current position is 50 Modulo maximum position setting value 100 Command current position 50 Target position 20 Target position 20 VA VA VA position setting value 70 H a M pt DEP in the negative direction the positive direction motion is in e M If the previous operation was If the previous operation was in motion is in the negative the positive direction direction The direction of the previous operation is given in the Command Direction in the Axis Variable Lal Precautions for Correct Use Observe the follow
347. lute Encoder Home Offset Read Error 14610000 hex Motion Con trol Parame ter Setting Error 11 10 The user program or Controller Con figurations and Setup were not transferred cor rectly The absolute encoder current position that is retained during power interruptions was lost The MC parameters that were saved in non volatile mem ory are missing e The user program or Controller page 11 20 Configurations and Setup are not correct because the power supply to the Controller was interrupted or communications with the Sysmac Studio were disconnected during a down load of the user program or the Controller Configurations and Setup The user program or Controller Configurations and Setup are not correct because the power supply to the Controller was interrupted during online edit ing The user program or Controller Configurations and Setup are not correct because the power supply to the Controller was interrupted during a Clear All Memory operation Non volatile memory failed The life of the Battery in the CPU Unit has expired Backup memory failure Ml B The power supply to the Con d page 11 21 troller was interrupted or com munications with the Sysmac Studio were disconnected while downloading the motion control parameter settings or clearing memory Non volatile memory failure NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Lwa 14620000
348. mand position during 4 Cam operation Cam table b 3 Displacement Cam data index Cam start point of ol 0 250 Cam data amp 0 200 The phase is calculated from the master axis position each cycle The linear interpolation of cam data is used to calculate the displacement from the phase These are the red dots on the line Displacement Cam end point 360 o O oa A W N 180 Phase 240 300 360 Cam data black dots on the line A Precautions for Correct Use e Make sure that the cam data is arranged in the cam table so that the phases are in ascending order An instruction error occurs if a cam operation instruction is executed when the phases are not in ascending order e Cam data variables are global variables You can therefore access or change the values of cam data variables from more than one task If you change the values of cam data variables from more than one task program the changes so that there is no competition in writing the value from more than one task e f you use exclusive control of global variables between tasks for a cam data variable do not use the cam data variable for motion control instructions in a task that does not control the variable An Incorrect Cam Table Specification error error code 5439 hex will occur I Cam Table Specifications Item Description Maximum number of cam data per 65 535 points cam table Maximum size of all cam data 1 048 560 points
349. master ing axis Master axis phase shift The phase of the master axis currently in synchronized con trol is shifted Combining axes The sum or difference of the command positions of two axes is output as the command position Single axis Powering the Servo The Servo for the Servo Drive is turned ON to enable opera manual tion operation Jogging Jogging is performed according to the specified target veloc ity NJ series CPU Unit Motion Control User s Manual W507 1 7 1 A o Kei D O Oo 9 Oo gt o suoneoiyiooedg uonounJ e p L 1 Introduction to the Motion Control Function Module Item Description Single Auxiliary axes functions for single axis control Resetting axis errors Axis errors are cleared Homing The motor is operated to determine the home using the limit signals home proximity signal and home signal High speed homing The axis returns to home using an absolute position of 0 as the target position Stopping The axis is forced to stop Immediate stop The axis is stopped immediately Setting override factors The target velocity for an axis is changed Changing the current The command current position or the actual current position position is changed as required for an axis Enabling external The position of an axis is recorded when a trigger occurs latches Disabling external The current latch is disabled latches Zone monitoring The system determines if the comma
350. me is defined relative positioning is performed at the set value to adjust the position of home This homing compensation is performed at the homing compensation velocity Adjusting the workpiece is sometimes difficult after home is defined The homing compensation can be used to fine tune the position of home after it is determined This is useful when you cannot easily replace the home proximity sensor or when home has moved after a motor replacement 8 8 NJ series CPU Unit Motion Control User s Manual W507 8 Homing I Home Offset After home is defined the operation for the homing compensation value is completed if a homing com pensation value is set and then the actual value is preset to the set value This means that you can set home to any specified value rather than to 0 For systems with absolute encoders also the absolute encoder home offset value is calculated and saved to the battery backup memory in the CPU Unit Homing Velocity Set the homing velocity in command units p Homing Approach Velocity Set the velocity after the home proximity input turns ON in command units per second command units s Homing Compensation Velocity If you set a homing compensation value set the velocity to use for the compensation in command units per second command units s I Homing Acceleration Set the homing acceleration rate in command units per seconds squared command units s If the homing acceleration is set to O
351. ming The array elements ARRAY O N are set with the Cam Editor in the Sysmac Studio The range of the array is O to 360 in this sample 10 78 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o d m m D Timing Chart o O id e Ladder Diagram g E Write Camdata o3 Ze WriteDone SaveCamtable MC COM Status CamTableBusy eg SV CAM Sv Cam Ex BIN Sv Cam Bsy TT ov Cam D BM CAMIN Camin Ex Lamm Bsy up ooo s Camin Act Camin InCam Camin InSync e ST Programming Write Camdata WriteDone SaveCamtable BEN ST MC COM Status CamTableBusy lem n SV CAM Sv Cam Ex T Sv Cam Bsy TT ov Cam D BM CAMIN Camin Ex Lamm Bsy Lamm Ac Camin InCam Camin InSync jqeL uie eui Bulnes pue ejqeueA geq Wey e Bulbueud 91 72 01 NJ series CPU Unit Motion Control User s Manual W507 10 79 10 Sample Programming I Ladder Diagram When StartPg is TRUE the status of process data communications of axis O is checked to see if communications are active and normal SE EC PDSIavTbI MC Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress LockO When StartPg is TRUE the status of process data communications of axis 1 is checked to see if communications are active and normal RES SE EC PDSlavTbI MC Axis001 Cfg NodeAddress EC CommErrTbI MC Axis001 Cfg NodeAddress Loch The Servo for axis 0 is turned ON if process data communications for axis O are ac
352. mmErrTbI MC Axis000 Cfg NodeAddress Lock Led The Servo for axis 0 is turned ON if process data communications are active and normal Lock MC Axis000 Pwr Status Pwr Bsy Pwr Err Pwr ErrlD If a minor fault level error occurs for axis O the error handler for the device FaultHandler is executed Program the FaultHandler according to the device MC Axis000 MFaultL vl Active FaultHandler FaultHandler EN NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o If HesetON is TRUE i e when the external button is ON and the command current velocity is zero the error is reset i O 2 MC Reset 3 MC Axis000 Status ErrorStop MC Axis000 i Axis SES w L 4 ko Done SE B Reset Bs SE ResetON MC Axis000 Details Idle usy Ley o2 Failure Reset Fail Error Reset Err ErrorlD Reset_ErrlD ST Programming When StartPg is TRUE the status of process data communications is checked to see if communications are active and normal The Servo is turned ON for axis O if process data communications for axis O are active and normal f process data communications are not active the Servo for axis O is turned OFF IF StartPg TRUE AND EC PDSIavTbI MC Axis000 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwr_En TRUE ELSE Pwr_En FALSE END IF f a minor fault level error occurs for axis
353. motion instructions are not executed while decelerating to a stop CommandAborted is TRUE ErrorStop BOOL Error Deceleration This status exists when the axis is stopping or Stopping stopped for execution of the MC ImmdediateStop instruction or a minor fault while MC AX XX MFaultLvl Active is TRUE Axis Minor Fault Occurrence Axis motion instructions are not executed in this state CommandAborted is TRUE Coordinated BOOL Coordinated Motion TRUE when an axes group is enabled by a multi axis coordinated control instruction o o o lt o ona OD 3 Q gt a S F fo o o O O E O 3 O Oo 3 mp 2 O1JUOD uono N 10 sejqeueA peurjep uejs S Jo Sale 9 9 NJ series CPU Unit Motion Control User s Manual W507 6 19 6 Motion Control Programming Variable name Datatype Datatype Function SAXIS REF DET Axis M oi EE Status Gives the control status of the command BOOL Standstill TRUE when processing is not currently performed for the command value except when waiting for in position state Idle and InPosWaiting are mutually exclusive They cannot both be TRUE at the same time InPosWaiting BOOL In position Waiting TRUE when waiting for in position state The in position check performed when positioning for the in position check Homed BOOL Home Defined TRUE when home is defined FALSE Home not defined TRUE Home is defined InHome BOOL In Home Posi
354. movable range of the device The positive software limit is set to 50 cm 500 000 um NJ series CPU Unit Motion Control User s Manual W507 4 5 I L TI c 3 O H Oo 3 o O mp gt o o lt o 3 fo OH o mp c 2 O e duiex3 Bunes 1ejeureJeg SIXY L p 4 Checking Wiring from the Sysmac Studio 4 1 4 Starting the MC Test Run Function The MC Test Run Mode is started from the Sysmac Studio 1 Start the Sysmac Studio and open a project in which the axis settings are completed 2 Select Online from the Controller Menu The Sysmac Studio goes online with the Controller 3 Select MC Test Run Start from the Controller Menu Es Sysmac Studio DIS File Edit View Insert Project Simulation Tools Help Ctri Ww Offline Ctrl Shift W New Project Synchronization Ctri M Mode Monitor Y Configurations and Setu Set Reset Forced Refreshing MC Monitor Table SD Memory Card Controller Clock Release Access Right Update CPU Unit Name Security Clear All Memory Reset Controller gt Event Settings Pr Task Settings F Data Trace Settings v E Pous V 2 Programs Y F3 Program0 ZZ Section0 18 Functions 8 Function Blocks IL Filter Toolbox Clearseach search M BCD Conversion Comme Bit String Processing Communications Comparison Conversion Counter Data Type Conversion FCS Ladder Tools Math Motion Control Other gt g
355. mpleted and axis O is at the target velocity the cam operation is executed MC Axis000 MC Axis001 WriteDone Vel InVel Sv Cam D camprofileo BOOL True _eMC_STARTMODE _mcRelativePosition LREAL 0 0 LREAL 0 0 LREAL 1 0 LREAL 1 0 LREAL 0 0 LREAL 0 0 eMC REFERENCE TYPE 4 mcCommand eMC DIRECTION mcNobDirection 10 82 CAMIN MC Camln Master Slave CamTable InCam InSync EndOfProfile Index Master Slave CamrTable Execute Periodic StartMode StartPosition MasterStartDistance MasterScalling SlaveScalling MasterOffset SlaveOffset HeferenceType Direction CamrTransition BufferMode Busy Active CommandAborted Error ErrorlD CamlIin_InCam Camln InSync Camln Eop Camln Index Camln Bsy Camln Act Camln Ca Camln Err Camln ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming 2 N D I ST Programming S OH If the input parameters for the instructions are not set the target values and other parameters are set 3 IF InitFlagZFALSE THEN ns The input parameters for the MC_MoveVelocity Velocity Control instruction are set S 3 Vel_Vel LREAL 1000 0 sz Vel Acc LREAL 0 0 oS Vel_Dec LREAL 0 0 Vel_ Dir eMC_DIRECTION _mcPositiveDirection The input parameters for the MC Camln Start Cam Operation instruction are set Camin Em TRUE Camin Sm eMC START MODE mchRelativePosition Camin Sp LREAL 0 0 Camin_Msd
356. n NJ series CPU Unit Motion Control User s Manual Cat No W507 This Manual Section Section 1 Introduction to the Motion Control Function Module Section 2 Motion Control Configuration and Principles Section 3 Configuring Axes and Axes Groups Section 4 Checking Wiring from the Sysmac Studio Section 5 Motion Control Parameters Section 6 Motion Control Programming Section 7 Manual Operation Section 8 Homing Section 9 Motion Control Functions Section 10 Sample Programming Section 11 Troubleshooting Appendices Description This section describes the features system configuration and application flow for the Motion Control Function Module This section outlines the internal structure of the CPU Unit and describes the config uration and principles of the MC Function Module This section describes the concept of axes and axes groups the settings for axes that are required for the MC Test Run operations to function on the Sysmac Studio and the instructions for creating and configuring axes and axes groups using the Sys mac Studio This section describes the MC Test Run operations of the Sysmac Studio You can use the MC Test Run operations to monitor sensor signals check Servomotor wiring and more all without any programming This section provides information on the axis parameters and axes group parameters that are used for motion control This section provides the specifications of a
357. n nected or replaced while the Servo was ON The target position after the interrupt input was received for the MC MoveFeed Interrupt Feeding instruction exceeded the range of signed 40 bit data when converted to pulses NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting tee NUM ME UI page 11 39 page 11 39 page 11 40 page 11 40 page 11 40 page 11 41 page 11 41 11 15 I N zi Oo c za 0 gt O Oo m 5 SOT 104 L ck 11 Troubleshooting Changing the Con trol Mode was not completed within the specified time 74390000 hex 743A0000 hex 743B0000 hex 84400000 hex 644C0000 hex 644D0000 hex 644E0000 hex 11 16 Error in Changing Servo Drive Control Mode Master Axis Position Read Error Auxiliary Axis Position Read Error EtherCAT Slave Com munications Error Following Error Warn ing Velocity Warning Acceleration Warning The synchronized instruction was not executed because an error occurred in the position of the master axis of the synchronized instruction The synchronized instruction was not executed because an error occurred in the position of the auxiliary axis of the synchronized instruction A communications error occurred for the EtherCAT slave that is allocated to an axis The following error exceeded the Fol lowing Error Warn ing Value The command velocity
358. n and a minus sign is added during travel in the negative direction MC AX 0 63 Act Vel LREAL Actual Current This is the actual current velocity A plus Velocity sign is added during travel in the positive direction and a minus sign is added dur ing travel in the negative direction 9 5 3 Acceleration and Deceleration Unit of Acceleration and Deceleration Rates Acceleration rates and deceleration rates are given in command units s The command unit is the value obtained from unit conversion of the position display unit and the electronic gear Axis Parameters That Are Related to Acceleration and Deceleration Maximum Acceleration Set the maximum acceleration rate for an axis Non negative long 0 operation command There will be no limit to reals the acceleration rate if O is set Unit command units s Maximum Deceleration Set the maximum deceleration rate for an axis Non negative long operation command There will be no limit to reals the deceleration rate if O is set Unit command units s Acceleration Decelera Set the operation for when the maximum accel 0 to 2 0 tion Over eration deceleration rate would be exceeded after excessive acceleration deceleration dur ing acceleration deceleration control of the axis because stopping at the target position is given priority 0 Use rapid acceleration deceleration Blend ing is changed to Buffered 1 Use rapid acceleration deceleration 2
359. n display Shows the status of the touch probe func tion This object is required for the touch probe function for the MC Home MC MoveFeed Interrupt Feeding MC TouchProbe Enable External Latch MC MoveLink Synchronous Positioning and other instructions Normally set 60B9 hex Touch probe sta tus The latched position for touch probe 1 This object is required for the touch probe function for the MC Home MC MoveFeed Interrupt Feeding MC TouchProbe Enable External Latch MC MoveLink Synchronous Positioning and other instructions Normally set 60BA hex Touch probe pos1 pos value A 7 P OH o 5 2 D O 2 e mp gt o Qo o lt o g lt o sBumeg eAug oAJegS z L V Appendices A 8 Touch probe position 2 posi 60BC hex 00 0 Touch probe The latched position for touch probe 2 tion value pos2 pos value This object is required for the touch probe function for the MC Home MC MoveFeed Interrupt Feeding MC TouchProbe Enable External Latch MC MoveLink Synchronous Positioning and other instructions Normally set 60BC hex Touchprobe pos2 pos value Error code 603F hex 00 0 Error code The error code in the Servo Drive Normally set 603F hex Error code Reference position for csp Not set 2 The reference position for changing the csp mode This object can be used with OMRON G5 series Servo Drives with unit version 2 1 or later Set 4020 hex Refer
360. n timing of instructions Axes Group Observation Occurrence When the Acceleration Deceleration Over parameter was set to Use rapid acceleration deceleration Blending is changed to Buffered the results of profile creation caused the accelera tion deceleration rate to be exceeded when blending was specified so buff ered was used Blending was specified but the target position was already reached so it was changed to Buffered because the profile could not be created Blending was specified for an interpo lation instruction but based on the results of profile creation this was changed to Buffered because the execution time of the instruction before the transition was four control periods or less None None Set the Acceleration Deceleration Over parameter to a value other than Use rapid acceleration deceleration Blending is changed to Buffered if you do not want to change to Buffered operation If unanticipated operation occurs from the switch to Buffered operation cor rect the program so that the causes given at the left do not occur Set the Acceleration Deceleration Over parameter to a value other than Use rapid acceleration deceleration Blending is changed to Buffered if you do not want to change to Buffered operation If unanticipated operation would occur from the switch to Buffered operation write the program so that the causes given at the left do not occur Error Clear from MC Test Ru
361. n Module Source details Continuously timing Error attributes Minor fault Log category System Effects According to the Limit Input Stop Method variables _MC_AX MFaultLvl Active BOOL Axis Minor Fault Occurrence EE A positive limit input signal was Reset the error and move the axis The goal is to detect the positive limit detected back in the negative direction before it input Preventative measures are not exceeds the limit in the positive direc required However be sure not to tion Find the reason the limit was exceed the positive limit input when exceeded and make suitable correc making programs tions The positive limit input signal is not If a positive limit input signal does not Make sure that the positive limit signal connected correctly or the logic set occur correct the connection of the connection and logic setting for the ting for the positive limit input is positive limit signal and the logic set positive limit input are correct wrong ting for the positive limit input Attached None information Precautions None Remarks NJ series CPU Unit Motion Control User s Manual W507 11 29 11 Troubleshooting Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precau
362. n OFF An immediate stop is performed if an error occurs that causes the Servo to turn OFF When the Servo is turned OFF the Servo Drive will operate according to the settings in the Servo Drive e Stopping Due to Start of MC Test Run All axes will decelerate to a stop at their maximum deceleration if a MC Test Run is started from the oysmac Studio NJ series CPU Unit Motion Control User s Manual W507 9 7 d o 5 e D 1 D X 0 U fe O o 5 O fe 5 9 Duddoe 6 9 Motion Control Functions e Stopping Due to End of MC Test Run All axes will decelerate to a stop at their maximum deceleration if a MC Test Run is stopped from the oysmac Studio e Click the Stop MC Test Run Button on the MC Test Run Tab Page of the Sysmac Studio e Close the MC Test Run Tab Page on the Sysmac Studio e Exit the Sysmac Studio e Stopping Due to Change in CPU Unit Operating Mode All axes will decelerate to a stop at their maximum deceleration if the CPU Unit operating mode changes EN Additional Information e When RUN mode changes to PROGRAM mode any motion control instructions for current motions are aborted The CommandAborted output variable from the instructions remains FALSE The Servo remains ON even after changing to PROGRAM mode e f the operating mode returns to RUN mode while a deceleration stop is in progress after the operating mode changes from RUN to PROGRAM mode the output variables from motion c
363. n Selection at Positive Limit Input parameter is set to No reverse turn The location of the homing input signal sensors homing settings and homing start posi tion cause a limit input to be reached The input signal sensor wiring is incorrect or the sensor is faulty The Operation Selection at d page 11 34 Negative Limit Input or Opera tion Selection at Positive Limit Input parameter is set to No reverse turn The location of the homing input signal sensors homing settings and homing start posi tion cause a limit input to be reached The input signal sensor wiring is incorrect or the sensor is faulty The wiring of the limit signal is HI page 11 34 incorrect The limit sensor is installed in the wrong location The contact logic of the limit signal is not correct The limit sensor failed 11 13 mmh I N Oo c 0 gt O Oo Gei 5 SOT 104 L ck 11 Troubleshooting Home Prox imity Homing Opposite Direction Limit Input Detected 74270000 hex 74280000 hex 74290000 hex 742A0000 hex 742B0000 hex 742C0000 hex 742D0000 hex 11 14 Home Prox imity Homing Direction Limit Input Detected Home Input Hom ing Opposite Direction Limit Input Detected Home Input Hom ing Direction Limit Input Detected Invalid Home Input Mask Distance No Home Input No Home Proximity Input The home proxim ity input and the limit signal in the direct
364. n Tab Page 94210000 hex An error was cleared from the MC Test Run Pane of the Sysmac Studio Motion Control Function Module Source details MC common Detection When MC Test timing Run error is reset Attached information 1 Execution results 0000 0000 hex All errors reset 0000 0001 hex Resetting all errors failed Variable Assumed cause An error was cleared from the MC Test Run Pane of the Sysmac Studio None NJ series CPU Unit Motion Control User s Manual W507 11 51 I N zi Oo c 0 gt O Oo m 5 suonduoseq 1043 Z Z 11 Troubleshooting Event name Slave Error Code Report 94220000 hex Meaning The error code was reported by the slave when a Slave Error Detected error occurred Source Motion Control Function Module Source details Axis Detection After Slave Error timing Detected error 742F0000 hex Effects Not affected Sets euien The error code was reported by the This error accompanies a Slave Error None slave when a Slave Error Detected Detected error 742F0000 hex error 742F0000 hex occurred Check the slave error code in the attached information and make the required corrections Attached Attached information 1 Slave error code information Precautions None Remarks 11 52 NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting 11 2 3 Error Causes and Remedies This section describes remedial actions to take when problems occu
365. n after the None above correction is performed non volatile memory has failed After you replace the CPU Unit download all settings including the Axis Settings from the Sysmac Studio Attached None information Precautions None Remarks NJ series CPU Unit Motion Control User s Manual W507 11 21 11 Troubleshooting Event name Cam Data Read Error 14620000 hex Meaning The cam data that was saved in non volatile memory is missing Source Motion Control Function Module Source details MC Common Detection At power ON at timing Controller reset or when down loading Error attributes Level Partial fault Hecovery Cycle the power Log category System supply or reset the Controller Effects It will not be possible to perform axis control fen MC COM PFaultLvl Active BOOL MC Common Partial Fault Occur rence Cause and Assumed cause Correction Prevention correction Power was interrupted during save Download the cam data from the Sys Do not turn OFF the power supply processing for cam data mac Studio during save processing for the cam data Non volatile memory failure If the error occurs even after the None above correction is performed non volatile memory has failed After you replace the CPU Unit download all settings including the Axis Settings from the Sysmac Studio Attached None information Precautions None Hemarks Event name Required Process Data Object Not Set 34600000 hex Meaning The ob
366. n control is not required and or your user program is too large place motion control instructions in a priority 16 periodic task e Timing of Processing Motion control processing MC for the motion control instructions FB that are executed in the same task period as the priority 16 periodic task are performed at the same time Therefore pro cessing for multiple axes can be simultaneously executed or stopped IN Execution command Primary period Primary UPG MC UPG MC periodic task Priority 16 periodic task Execution of motion control instructions Task period primary period x 3 IN Execution command Primary period Primary UPG MC UPG MC UPG MC UPG MC periodic task Priority 16 O J periodic task p i ree Execution of motion c trol instructions Task period primary period x 3 1 Loading Data The input data from the EtherCAT slaves slave A is loaded during the I O refresh IO 2 Instruction Execution The motion control instructions FB are executed based on the data that was loaded during user program execution UPG in the priority 16 periodic task The output variables of the motion control instructions are refreshed at this point 3 Command Generation Motion control instructions FB are executed in the task period of the priority 16 periodic task according to the motion control instructions FB that were executed Motion processing is per formed during motion control processi
367. n describes the event codes error confirmation methods and corrections for errors that can occur for EtherCAT communications It also describes how to replace slaves Section 9 Troubleshooting The appendices describe the relation of EtherCAT communications to overall CPU Appendices Unit status packet monitoring functions and multi vendor application NJ series Motion Control Instructions Reference Manual Cat No W508 Section Description Section 1 This section gives an introduction to motion control instructions supported by NJ Introduction to Motion Control series CPU Units Instructions Section 2 This section describes the variables and instructions for the Motion Control Function Variables and Instructions Module Section 3 This section describes the instructions that are used to perform single axis control for Axis Command Instructions the MC Function Module Section 4 This section describes the instructions to perform multi axes coordinated control for Axes Group Instructions the MC Function Module Section 5 This section describes the instructions that are used for both axes and axes groups Common Command Instructions Appendices The appendices describe the error codes that are generated by the instructions i NJ series Troubleshooting Manual Cat No W503 Section Description Section 1 This section describes the errors that can occur on an NJ series Controller the oper Overview of Errors ation that occurs for errors an
368. n nnn nnn n nnn 6 28 Programming Motion Controls iecore eiat e Nee EENS de 6 32 Creating Cam Table ect c 6 34 Manual Operation OUUIDG contri o am OT emer ne SSOP Ie Sec eter cM e ED NC Se om cee EPR M ee UU SEP EE Lei 7 2 Turning ON tHe SON jor 7 3 7 2 1 TUBING NETS SEVO EE 7 3 7 2 2 Setting Axis le E 7 4 7 2 3 Programming minis 7 4 OG Le Un Le amt 7 5 7 3 1 JOC OUNG elen E 7 5 7 3 2 Seting AXIS I en 7 6 7 3 3 Setting Example for Input Varables esses nennen nns 7 6 7 3 4 Programming Example EE 7 7 Homing GI iT Mee EU 8 2 FIOMING Ge c r T 8 5 8 2 1 Seung Homing Ge NEE 8 5 8 2 2 Monitoring the Homing Cperaton nennen nnne nennen nena nnns nn nn nnn nnns 8 10 FIOMING R81 3 iio ec 8 11 Homing with an Absolute Encoder E 8 12 8 4 1 CUTS Ol PUA CTO EE 8 13 8 4 2 CUMING Giele EE 8 13 FIGN SPCCC_FOMING E S 8 15 NJ series CPU Unit Motion Control User s Manual W507 13 CONTENTS Section 9 Motion Control Functions 9 T Single axis POSMON CORIFOL ss oues iui nha Deva coni av UE au Eos EYR E Ee28 EUrba ka cba d D xat eee a vUa Ex cudu ova rusa EE EUN EE 9 3 9 1 1 EIERE EE 9 3 9 1 2 PD SOIMMCsOSINONING imeem 9 4 9 1 3 misi seio Nie E TE 9 4 9 1 4 Halts aU 810g ele Le e E M Tn 9 5 9 1 5 OPIN cero bruciisui III Um di i Mi cp mercer 9 6 9 1 6 Override Factos mem iw seo ee ae ee eee eee ele ee ee 9 9 9 2 Single axis Synchronized Con
369. n the CPU Unit Periodically replace the Battery in the has expired reset the error and perform homing to CPU Unit Refer to the NJ series CPU define home Unit Hardware User s Manual Cat No W500 for information on the Bat os tery life m Backup memory failure If the error occurs even after the None O above correction is performed CPU C i D backup memory has failed Replace o the CPU Unit and perform homing to define home o Attached None D information Precautions None Hemarks Event name Motion Control Parameter Setting Error 14610000 hex Meaning The MC parameters that were saved in non volatile memory are missing Source Motion Control Function Module Source details MC common Detection At power ON at timing Controller reset or when down loading Error attributes Level Partial fault Recovery Cycle the power Log category System supply or reset the Controller Effects It will not be possible to perform axis control TEE MC COM PFaultLvl Active BOOL MC Common Partial Fault Occur rence Cause and Assumed cause Correction Prevention TENSION The power supply to the Controller Download the MC parameters from Do not turn OFF the power supply was interrupted or communications the Sysmac Studio during save processing for the param with the Sysmac Studio were discon eters nected while downloading the motion control parameter settings or clearing memory Non volatile memory failure If the error occurs eve
370. nce Perform periodic maintenance END NJ series CPU Unit Motion Control User s Manual W507 1 5 1 Introduction to the Motion Control Function Module 1 4 Specifications This section gives the specifications of the MC Function Module 1 4 1 General Specifications 1 6 General specifications conform to the general specifications of the CPU Unit Refer to the NJ series CPU Unit Hardware User s Manual Cat No W500 for details 1 4 2 Performance Specifications Specification ltem NJ501 1300 NJ501 1400 NJ501 1500 Applicable Servo Drives OMRON G5 series Servo Drives with Built in EtherCAT Communica tions 1 Applicable Encoder Input Terminals OMRON GxX series GX EC0211 EC0241 Encoder I O Terminals 2 Control method Control commands using EtherCAT communications Control modes Position control Cyclic Synchronous Position Control Mode Velocity control Cyclic Synchronous Velocity Control Mode Torque control Cyclic Synchronous Torque Control Mode Number of con Maximum number of 16 axes 32 axes 64 axes trolled axes controlled axes Single axis control 16 axes max 32 axes max 64 axes max Linear interpolation 4 axes max per axes group control Circular interpolation 2 axes per axes group control Number of axes groups 32 axes groups max Unit conversions Pulses millimeters micrometers nanometers degrees or inches Pulses per motor rotation travel distance per motor rotation Positions that can be administered
371. nchronized Operation You can monitor error status by monitoring the status of Axis Minor Fault Occurrence in the Axis Vari able If a minor fault level error occurs in this sample the Enable input variable for the MC Power instruction changes to FALSE to turn OFF the Servo If the external button is ON and the command cur rent velocity is zero the error is reset with the MC Reset Reset Axis Error instruction Samples are provided for both ladder diagram and ST programming I Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 SAXIS REF EM This is the Axis Variable for axis O MC Axis000 MFaultL vl Active BOOL FALSE TRUE when there is a minor fault level error for axis O MC Axis000 Status ErrorStop BOOL FALSE TRUE while there is a minor fault level error for axis O and the axis is decelerating to a stop or stopped MC Axis000 Details ldle BOOL FALSE TRUE when the command current velocity for axis 0 is zero except when waiting for in posi tion state StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communications are active and normal ResetON BOOL FALSE This variable gives the status of the external button that is used to reset errors I Ladder Diagram When StartPg is TRUE the status of process data communications is checked to see if communications are active and normal StartPg EC PDSIavTbI MC Axis000 Cfg NodeAddress EC Co
372. nd cam operation with the MC_CamOut End Cam Operation instruction or the MC Stop instruction Create a cam table using the Cam Editor in the Sysmac Studio and download it to the CPU Unit Use the Synchronization menu command of the Sysmac Studio to download the project to the CPU Unit Command position Specify with HeferenceType Actual position Command position Cam Operation Cam processing Most recent command position Cam table i Ph Displ t Cam Operation EX Cam Master axis Displacement SSES Cam Profile Curve J Phase Number of valid cam data Displacement p pU Slave Maximum number NEN X Cam of cam data axis end point One period For details on cam operation refer to the MC Camln Start Cam Operation MC CamOut End Cam Operation and MC Stop instructions in the NJ series Motion Control Instructions Reference Manual Cat No W508 For details on the Cam Editor refer to the Sysmac Studio Version 1 Operation Manual Cat No W504 NO d 3 a o I Q x o o lt 3 Oo bet O 3 N o Q O o 3 e S uonejedo ule 4 2 6 NJ series CPU Unit Motion Control User s Manual W507 9 13 9 Motion Control Functions 9 2 5 Cam Tables 9 14 This section describes the cam tables that are used for cam operation i Cam Table Terminology Term cam operation cam profile curve cam block cam Curve cam data cam data variable cam table
373. nd other parameters are set IF InitFlag FALSE THEN The input parameters for the MC MoveAbsolute Absolute Positioning instruction are set Mv Abs Pos LREAL 10000 0 Mv Abs Vel LREAL 2000 0 Mv Abs Acc LREAL 2000 0 Mv_Abs Dec LREAL 2000 0 The input parameters for the MC_CamIn Start Cam Operation instruction are set Camin EM ze TRUE Camin StMode eMC START MODE s mcAbsolutePosition Camin StPos LREAL 1 0 Gamm MStDis LREAL 1 0 Gamm MSc LREAL 1 0 Camin_SSc LREAL 1 0 Camin_MO LREAL 0 0 Camin_SO LREAL 0 0 Camin_RT eMC HREFERENCE TYPE24 mcCommand Camin Dir eMC DIRECTIONZ mocNobDirection The cam table is selected CamrTableO BOOLZTRUE CamrTable1 BOOLZFALSE The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag TRUE END IF When StartPg is TRUE the Servo is turned ON for axis O if process data communications are active and normal IF StartPg TRUE AND EC PDSIavTbI MC Axis000 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwr_En TRUE ELSE Pwr_En FALSE END_IF When StartPg is TRUE the Servo is turned ON for axis 1 if process data communications are active and normal IF StartPg TRUE AND EC PDSIavTbI MC Axis001 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis001 Cfg NodeAddress FALSE THEN Pwr2_En TRUE ELSE Pwr2_En FALSE END_IF f
374. nd position or actual current position of an axis is within a specified zone Axis following error The following error between the command positions or actual monitoring positions of two specified axes is monitored to see if it exceeds the allowed value Following error counter The error between the command current position and the reset actual current position is set to zero Torque limit The output torque is limited by enabling and disabling the torque limit function of the Servo Drive and by setting the torque limit value Axes Multi axes groups coordi nated con trol Absolute linear interpo An absolute position is specified and linear interpolation is lation performed Relative linear interpola A relative position is specified and linear interpolation is per tion formed Circular 2D interpolation Circular interpolation is performed for two axes Auxiliary functions for multi axes coor dinated Resetting axes group Axes group errors and axis errors are cleared errors Enabling an axes group An axes group is enabled Disabling an axes group An axes group is disabled control Stopping an axes group All axes in interpolated movement are decelerated to a stop Immediately stopping an All axes in interpolated movement are stopped immediately axes group Setting axes group over The blended target velocity is changed during interpolated ride factors movement Com Cams Setting cam ta
375. nd the User Program Download the axis parameters and user program to the CPU Unit Use the Synchronization menu command of the Sysmac Studio to download the project to the CPU Unit For details refer to 3 2 2 Setting Procedure 5 Executing the User Program Execute the user program and change the Enable input variable for MC Power to TRUE The Servo Drive will change to the Servo ON state NJ series CPU Unit Motion Control User s Manual W507 7 3 7 Manual Operation 7 2 2 Setting Axis Parameters Only the following axis parameter settings are required if you want only to change to the Servo ON state The following table provides examples of the settings Parameter name Setting Axis Variable Name Axis1 1 Axis Number 4 2 Axis Use Used axis Axis Type Servo axis Node Address 1 3 1 If there is more than one axis a different variable name is set for each axis 2 If there is more than one axis a different value is set for each axis 3 Set the node address to the same value as the node address that is set on the Servo Drive If there is more than one axis a different value is set for each axis EN Additional Information If the OMRON G5 series Servo Drive is connected properly you can use the network scan func tion of the Sysmac Studio to automatically set all axis parameters not listed in the previous table 7 2 3 Programming Example The following sample programming turns the Servo ON and OFF for an axis named Axis base
376. ng MC in the next primary periodic task after the peri odic task During this processing execution commands for the Servo Drives are generated 4 Sending Commands The execution commands that were generated are sent to the Servo Drive during the I O refresh IO in the next period 2 8 NJ series CPU Unit Motion Control User s Manual W507 2 Motion Control Configuration and Principles Axis Variable Update Timing Axis Variables are system defined variables for some of the axis parameters and for the monitor information such as the actual position and error information for the axes controlled by the MC Function Module o If you access an Axis Variable during the priority 16 periodic task the values of the variable that O were read at the start of the periodic task are used S Also the values of an Axis Variable are not written when a motion control instruction FB is exe S cuted They are written in motion control processing MC at the start of the next periodic task i Oo OUT Execution Primary period command Primary UPG MC UPG MC periodic task e Valuesof Ii boana Priority 1 6 Axis UPG periodic task Vatiable It are read Execution of motion control instructions Task period primary period x 3 1 The values of an Axis Variable are read at the start of user program execution for the periodic task 2 The values of an Axis Variable are not written when a motion control instruction FB
377. ng dialog box is displayed configurations ana Setup Me Axis selection Mc Axis000 0 Node 10 v Status Axis ready to execute Axis disabled Standstill Discrete motion Continuous motion Homing Stopping Error stopping Home defined In home position v Configurations and Setup w Motion Control Setup Motion error list Ww amp Axis Settings MC_Axis000 0 Event LevellSourcelMessage Namel Message details 1 MC Axis001 1 LEN ec TE S amp Cam Data Settings Countermeasur fr Task Settings gt do O gt D O L3 3 e Oo Oo oO o D D et Oo 5 F Data Trace Settings rive Command current ee 5 5 53 use Positive limit input ON Home input r Actual current position ulse Negative limit input ON posi P lega D Command current E 5 OWNE7E Immediate stop input OFF Main power Actual current velocity OO Home proximity input OFF Drive error input Latch input 1 OFF Drive warning input OFF Latch input 2 OFF Homing is performed according to axis parameter settings on the Homing page Homing Settings Duo r Select the axis to home Click the Servo ON Button to turn ON the Servo Click the Apply homing parameters Button OG KR Lo Click the r3 Button Check to see if the homing operation agrees with the settings ES Additional Information e When you click the Homing Settings Button the Homing Settings are displayed on the Axis Pa
378. nging a Cam Data Variable and Saving the Cam Table nannnnnnnnnennnnennnnnnnnnnnnnnnnnnnnnnne 10 78 10 2 17 Temporarily Changing Axis Parameter 10 87 10 2 18 Updating the Cam Table End Point Index 0c eccececceeeeeeeeee eee eeeeeeeeeeeeeeaeeeeeeeeeeaaaneeeeeeeeaaaas 10 90 Section 11 Troubleshooting 11 A Overview Of EITOIS a EE EE 11 2 11 1 1 How to Check for Error 11 3 11 1 2 Errors Related to the Motion Control Function Module 11 5 Ti TOUDICSMOOUING Diet pP 11 10 11 2 1 EH OP e EE 11 10 R EE ele Re dl de e c ees 11 19 RE GE ele EE and En REENEN 11 53 Appendices Index A 1 A 2 A 3 Connecting the Servo DEE ee A 2 A 1 1 Wirmo the Servo Bg cbr m A 2 A 1 2 Servo Drive Settings EE A 2 Connecting to Encoder Input Terminals eeeee eese eere nennen nennen A 11 A 2 1 Wiring to Encoder Input Inia Succ catsclercosshnt ses catatesonesarenciantnedhasitoesanattecncedentsenscsaremiaecaacecaesia A 11 A 2 2 Settings for Encoder Input Terminals AA A 11 e vu le Le e VE A 15 A 3 1 Meri Em A 15 A 3 2 MOOS ONTO EN ELLE DET A 16 A 3 3 ElherGCAT CoritmblBlcallOliS E A 17 NJ series CPU Unit Motion Control User s Manual W507 15 CONTENTS 16 NJ series CPU Unit Motion Control User s Manual W507 Head and Understand this Manual Read and Understand this Manual Please read and understand this manual before usin
379. ns in the user program are interpreted and motion con trol is performed You can set the MC Run Mode state regard less of the operating mode of the CPU Unit MC Test Mode In this state you can execute a test run from the Sysmac Studio Saving Cam Table File 3 This state exists while the system performs save or wait pro cessing for a cam table file 1 This state can be monitored with the MC Common Variable MC COM Status RHunMode 2 This state can be monitored with the MC Common Variable MC COM Status TestMode 8 This state can be monitored with the MC Common Variable MC COM Status CamTableBusy 6 3 2 Axis States The operation of an axis when motion control instructions are executed for it is shown in the following figure Motion control instructions are executed in sequence and axes enter one of the states listed in the following table MC Gearln slave axis MC Move MC GearlnPos slave axis MC MoveAbsolute MC Camln slave axis MC Movehelative MC CombineAxes slave axis MC MoveFeed 8 MC MoveLink slave axis MC SyncMoveVelocity MC MoveZeroPosition MC MoveVelocity MC Gear ut MC TorqueControl MC CamOut Synchronized MC_MoveJog Discrete Motion Discrete E MC Stop Continuous Motion Continuous Deceleration Stopping Stopping MC ImmediateStop MC Home Homing Stopped Axis Disabled 2 Homing Standstill Disabled Coordinated Motion Coordinated 7 MC ResetFollowingError G A NJ series CPU Unit Motion
380. nstructions for both single axis control and synchronized control e When a Reverse Turn Does Not Occur for the Command Position of the Multi execution Instruction Executing More than One Instruction Re executing Instruction during during Constant velocity Motion Acceleration Deceleration Velocity lMulti execution timing Velocity Multi execution timing TExecuted TInitial TBuffered TExecuted TInitial TBuffered command command command command position position position position e When a Reverse Turn Occurs for the Multi execution Instruction Command Value Decelerating to a Stop after Reversing Stopping Immediately after Reversing Velocity Velocity VMulti execution timing V Multi execution timing If the travel distance upon reverse turn is L small triangular control is performed as it was for the first execution of the instruction Unitial command position s TInitial TExecuted TBuffered TExecuted New command command command position position position If an instruction is executed with If the travel distance upon If the instruction is executed with multi multi execution of instructions reverse turn is small triangular execution of instructions during acceleration during acceleration the axis control is performed as it was for or deceleration the axis stops immediately starts deceleration according to the first execution of the according to the multi execution timing the multi execution timing
381. nstructions in the NJ series Motion Control Instructions Reference Manual Cat No W508 d Stopping Due to Errors or Other Problems e Stopping for Errors during Axes Group Motion If an error that results in a deceleration stop occurs for any composition axis in the axes group during an axes group motion all of the axes will decelerate to a stop on the interpolation path at the inter polation deceleration rate The interpolation deceleration rate is determined by the deceleration rate that is specified for the controlling instruction If an error that results in an immediate stop occurs for any composition axis in the axes group during an axes group motion the other axes in the axes group will stop according to the setting of the Axes Group Stop Method parameter in the axes group parameters You can select one of the following stop methods for axes groups e Immediate stop e Decelerate axes to a stop at maximum deceleration rate of the axes e Immediate stop and Servo OFF e Stopping Due to Excessively Long Control Period If motion control processing does not end within two periods it is considered to be an excessive control period Control will be stopped immediately e Stopping Due to Start of MC Test Run All axes will decelerate to a stop at their maximum deceleration if a MC Test Run is started from the oysmac Studio NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions e Stopping Due to Chan
382. nt and other than data where the phase is 0 The cam data other than the cam start point where the phase is O The number of sets of cam data The maximum number of sets of cam data that the cam table can contain The number of the cam data that is executed NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions Term Description cam table start position The absolute position of the master axis that corresponds to the cam start point phase 0 master sync start posi The master start distance where the slave axis starts cam operation represented as tion either an absolute position or relative position The relative position is based on the cam start point position start mode A specification of whether to represent the master sync start position as an absolute position or relative position null cam data Cam data that can be set after the end point where the phase and displacement are O connecting velocity The connecting velocity that is used to connect cam profile curves The connecting velocity cannot be specified for some curves connecting acceleration The acceleration rate that is used to connect cam profile curves The connecting acceleration cannot be specified for some curves phase pitch The width when dividing the cam profile curve by phases horizontal axis The points after dividing the curve into the phase pitch correspond to the cam data in the cam table You must specify the phase p
383. nted with motion con trol instructions Motion control instructions that perform single axis control are used to create axis commands To control an axis with axis commands specify the Axis Variable name of the system defined variable or the Axis Variable name that was set with the Sys mac Studio for the Axis in out variable of the instruction NJ series CPU Unit Motion Control User s Manual W507 3 Configuring Axes and Axes Groups 3 1 2 Introduction to Axis Parameters e Axis Parameters Classification Parameter name Axis Basic Axis Number Settings Aic sa Axis Type Node Address input devices and output devices Unit Conversion Unit of Display settings Command Pulse Count Per Motor Rotation Work Travel Distance Per Motor Rotation Operation Settings Maximum Velocity Maximum Jog Velocity Maximum Acceleration Maximum Deceleration Acceleration Deceleration Over Operation Selection at Reversing Velocity Warning Value Acceleration Warning Value Deceleration Warning Value Positive Torque Warning Value Negative Torque Warning Value Actual Velocity Filter Time Constant In position Range In position Check Time Zero Position Range Other Immediate Stop Input Stop Method Operation Settings Limit Input Stop Method Drive Error Reset Monitoring Time Maximum Positive Torque Limit Maximum Negative Torque Limit Limit Settings Software Limits Positive Software Limit Negative Software Limit Following Error Over Va
384. ntrol instructions the timing of updates for system defined variables for motion control and the output timing of command values e f you use system defined variables for motion control for the same axis in multiple tasks pay close attention to the differences in timing for updating system defined variables for motion control when you develop your user program EN Additional Information For information on multi execution of instructions refer to 9 5 7 Multi execution of Motion Control Instructions Buffer Mode 2 10 NJ series CPU Unit Motion Control User s Manual W507 2 Motion Control Configuration and Principles 2 1 EtherCAT Communications and Motion Control The MC Function Module controls Servo Drive and encoder input slaves through the PDO communica tions of the EtherCAT Master Function Module in the CPU Unit This section describes EtherCAT com munications and other items related to the MC Function Module UOIJO N pue suomneoiunululo9 Ivo r c O o 3 2 2 4 1 CAN Application Protocol over EtherCAT CoE The MC Function Module exchanges data with the slaves on EtherCAT using the CAN application pro tocol over EtherCAT CoE With CoE the parameters and control information held by the slaves are specified according to data specifications of the object dictionary OD To communicate the data between the Controller communications master and slaves two methods are used process data objects PDOs which peri
385. nual Cat No 1576 sch vi sch I LO LD D m c O NJ series CPU Unit Motion Control User s Manual W507 10 3 10 Sample Programming 10 2 Basic Programming Samples This section provides programming samples for the basic functions of the MC Function Module la Precautions for Correct Use e When you use these programming samples for reference be sure to add programming for suit able interlocks that suit the operating conditions of the devices e Enter the variables that are used in the programming samples from the Programming Layer in the Edit Pane of the Sysmac Studio 10 2 1 Monitoring EtherCAT Communications and Turning ON Servos 10 4 In this sample the MC Power Power Servo instruction is executed to turn ON the Servo for the Servo Drive when EtherCAT process data communications are established with the Servo Drive Samples are provided for both ladder diagram and ST programming Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 SAS REF This is the Axis Variable for axis O MC Axis000 MFaultL vl Active BOOL FALSE TRUE when there is a minor fault level error for axis O MC Axis000 Cfg NodeAdadress UINT This is the node address EC PDSIavTbI N BOOL FALSE TRUE when EtherCAT process data communi cations for node address N are in Operational state StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process
386. o e g with the synchro nization operation of the Sysmac Studio An error for which all control operations from the NJ series Controller are not possible The CPU Unit stops user program execution immediately and turns OFF the loads for all slaves and Units including remote 1 0 An error for which all control operations for one of the function modules in the NJ series Controller are stopped The NJ series CPU Unit continues operation even after a partial fault level Controller error occurs An error for which some of the control operations for one of the function modules in the NJ series Controller are stopped The NJ series CPU Unit continues oper ation even after a minor fault level Controller error occurs One of the event levels for Controller information and user defined information Observations represent minor errors that do not affect operation They are recorded in an event log to inform the use NJ series CPU Unit Motion Control User s Manual W507 A 15 T e o 3 5 9 Oo e lt 1 014U0V seues pN L v Appendices A 3 2 Term Motion Control Function Module motion control instruction single axis position control single axis velocity control single axis torque control single axis synchronized control single axis manual operation auxiliary functions for single axis control multi axes coordinated control auxiliary functions for multi axes coordinated control motion control parameters
387. o an axis was disconnected while the servo was ON Source Motion Control Function Module Source details Axis Detection Whenever Servo timing is ON em gt variables MC AX MFaultL vl Active BOOL Axis Minor Fault Occurrence 9 Seton An EtherCAT slave that is allocated to Reconnect the EtherCAT slave that is Turn OFF the Servo before you dis an axis was disconnected or replaced allocated to the axis to the network connect or replace a slave while the Servo was ON Attached None information EN Precautions None Ki Hemarks B m S J Event name Feed Distance Overflow 74380000 hex D O Meaning The target position after the interrupt input was received for the MC_MoveFeed Interrupt Feeding instruction over flowed or underflowed o o Source Error attributes Effects System defined Motion Control Function Module Source details Axis Detection During instruc timing tion execution variables MC AX MFaultLvl Active BOOL Axis Minor Fault Occurrence Cause and Prevention eMC EN The target position after the interrupt Correct the input value for the com Write the program correctly The input input was received for the mand position in the program The value for the command position must MC_MoveFeed Interrupt Feeding target value after the interrupt input is not cause the target value after the instruction exceeded the range of received must not exceed the valid interrupt input is received to exceed signed 40 bit data when c
388. o set the axis parameters for each axis Temporar Readin Classification Parameter name P E E Page changes variables Node Address input devices and output devices ST Unit Conver Unit of Display ioc ies sion Settings Command Pulse Count Per Motor Rotation 0K Work Travel Distance Per Motor Rotation OK Operation Set Maximum Velocity DEED 5 11 MemmAeemn JI MeimamDeswmn e WwewemionDeeminOwr ER Operation SelecionatRevering JI WisyWannVaw o WwesembnWamnjVaus o 7 DecminWanm Vd ER Posive Torque Warning Vane J f WegaweToweWanngWdus J r mosis Si moso J Actual Velooy Fiter Time Consiant ZeroPosiion Range SS Other Opera Immediate Stop Input Stop Method DEDE 5 12 Dive Enor Reset Montorng Tine EE EIERE ER EE EIERE Limit Settings Software Limits OK J 5 13 Peesowae mt f Weieen OK F FoowmEmwOwrWds OK o FolwmgtmorWammWdus OK F NJ series CPU Unit Motion Control User s Manual W507 5 Motion Control Parameters Meduio Minimum Postion Seting Vaue mee OSS e e WewmSanbidon e 7 Home input Detecion Dren o Operation Selection at Postive tmi Operation Selection at Negative tmtm WewwWdy SSS e m Homing Approach e 7 Homing Acceleration ER EIERE Weien ll Home mpumaskosane SSS Womoms SSS S o y y e WewwHedTme S Homing Compensation Vas e 7
389. oa Value A 4012 hex 01 hex and Channel 2 Latch Value A 4012 TxPDO 1B02 hex a Value B 4013 hex 01 hex and Channel 2 Latch Value B 4013 TxPDO 1B03 hex aa 1 Status Bits 4030 hex 01 hex and Channel 2 Status Bits 4030 hex TxPDO 1BFF hex Sysmac Error Status 2002 hex 01 hex EN Additional Information If you use the recommended Encoder Input Terminals GX EC0211 EC0241 version 1 1 or higher then it is not necessary to change the default PDO map on the Sysmac Studio A 12 NJ series CPU Unit Motion Control User s Manual W507 Appendices I Relationships between MC Function Module and Process Data The functions of the MC Function Module are related to the information in the process data objects Depending on the EtherCAT slave configuration and functions that are used by the MC Function Mod ule you sometimes must change the relationships between the MC Function Module and the PDOs To access the settings click the Detailed Settings Button on the Axis Basic Settings Tab Page in the oysmac Studio e A A 3 New Proje t new NJ501 0 Axis number DR Axis use Used axis M Axistype Servo axis v Feedback control No control loop e Input device Node 10 Device R88D KNO1L ECT v Output device Detailed Settings Reset to Defaul v amp Motion Control Setup Ww amp Axis Settings 40 MC Axis000 0 3 MC Axis001 1 Channel Channel Function Name Device Process Data Output Controller to Drive 0 1 Controlwo
390. ock start point eege 9 14 else Pin EE 9 14 canm dala EE 9 14 loading and saving WEE 9 18 cam data Nex srna TT 9 14 cam data variables 6 28 9 14 NJ series CPU Unit Motion Control User s Manual W507 ERT Bee UE 9 14 cam operation PN 9 13 9 14 cam profile curves eseeeeereeeeeeee 6 28 9 14 Wlan 6 31 CAM STAM DOIN s diosa doo eoa ese ise ea o MEE Tar adips oat 9 14 EE DEOR TP 9 14 Cam Table BUSY uiii rone HI bei nase eee ed 6 18 cam table start position seeeseseeesseeeeeess 9 15 Gam tables ces pci EE 6 28 9 15 SE EE 9 17 alc eR 6 31 SAVING P RE 9 18 Specificalh nS PER RR cht euaracueae eed i 9 16 specifying in user program sseeeese 6 31 SWITCHING Mem D 9 17 updating properties seeseeeeseeeeeeee 9 18 CAN application protocol over EtherCAT CoE 2 11 circular interpolation eeseeeeeseeeeeeeeeeeeee 9 49 COMDINING AXCS e c 9 21 Command Current Acceleration Deceleration 6 21 Command Current Jerk cccccesssseeeeeeeseeeeeseeeeeeees 6 21 Command Current Position seessssssse 6 21 Command Current Torque cccssseeeeeeseseeeeeeeeeeeeens 6 21 Command Current Velocity 6 21 Command DIrectlofi gebeten c iaa ee beet ertet oes 6 20 Command Interpolation Acceleration Deceleration 6 26 Command Interpolation Velocity
391. ode BOOL MC Test Run TRUE during test mode operation from the Sysmac Studio Ech TRUE while the Cam Table is being saved or on standby Fault Sec TRUE while there is an MC common Fault Occurrence partial fault WORD MC Common Partial Contains the code for an MC com Fault Code mon partial fault The upper four dig its of the event code have the same value sSsMC REF EVENT MC Common Minor Fault Active BOOL MC Common Minor TRUE while there is an MC common Fault Occurrence minor fault Code WORD MC Common Minor Contains the code for an MC com Fault Code mon minor fault The upper four digits of the event code have the same value sSsMC REF EVENT MC Common Obser vation Active BOOL MC Common Obser TRUE while there is an MC common vation Occurrence observation Code WORD MC Common Obser Contains the code for an MC com vation Code mon observation The upper four dig its of the event code have the same value 6 18 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming Axis Variables MC AX O to MC AX 63 are the Axis Variables in the system defined variables The data type is SAXIS REF which is a structure variable This section describes the configuration of the Axis Vari ables and provides details on the members Variable name Data type Meaning Function MC AX 0 63 SAXIS REF Axis Variable SAXIS REF STA Axis Status This variable indicates the same status a
392. odically exchange data in realtime and service data objects SDOs which exchange data when required The MC Function Module uses PDO communications for commands to refresh I O data such as data for Servomotor position control on a fixed control period It uses SDO communications for commands to read and write data at specified times such as for parameter transfers Controller communications master EtherCAT Slaves communications lines Executed periodically Output data 302 1V9194 3 Jon 0001044 uoneoiddy NYO Lb em em em em em em em o em wm mm em em em em em em em Pd SDO communications i au em em em em em em Executed for requests NJ series CPU Unit Motion Control User s Manual W507 2 11 2 Motion Control Configuration and Principles 2 4 2 Relationship between EtherCAT Master Function Module and MC Sequence control Motion control Function Module The NJ series CPU Unit can perform sequence control and motion control through connections to EtherCAT slaves e Sequence Control e O ports for configuration slaves are automatically created when you create the EtherCAT Config uration in EtherCAT Edit Tab Page e Perform sequence control through instructions other than motion control instructions e Motion Control e O ports for configuration slaves are automatically created when you create the EtherCAT Config uration in EtherCAT Edit Tab Pa
393. odule There are two input variables that you use to execute motion control instruction functions Execute and Enable The following output vari ables indicate the execution status of an instruction Busy Done CommandAborted and Error 6 4 1 Basic Rules for Execution of Instructions The basic rules for the MC Function Module are listed in the following table You can find execution examples in 6 4 2 Execution Timing Charts Refer to these examples as well Item Exclusiveness of out puts Output status Input parameters Omitting input param eters Position Target Posi tion and Distance Travel Distance Sign rules 6 8 Rule The following output variables are exclusively controlled and only one of them can be TRUE at the same time Busy Done Error and CommandAborted Similarly only one of the following output variables can be TRUE at the same time Active Done Error and CommandAborted Busy and Active may be TRUE at the same time in some cases The output variables Done InGear Gear Ratio Achieved nSync InVelocity Target Velocity Reached and CommandAborted change to FALSE when the input variable Execute changes to FALSE The actual execution of a motion control instruction is not stopped when Execute changes to FALSE Even if Execute changes to FALSE before the instruction finishes execution the corresponding output variable will be TRUE for at least one period if the status of the instruction instanc
394. oes not exceed the range of signed 40 bit data Allow some lee way Actual Position Underflow 64550000 hex The number of pulses for the actual position underflowed Motion Control Function Module Source details Continuously timing The position is not updated but motion continues The actual position when converted to Correct the program so that the target position is well within the pulse num ber limit so that the actual position does not exceed the pulse number pulses exceeded the lower limit of signed 40 bit data limit for the instruction Or change the electronic gear ratio settings To recover from the underflow change the current position or perform the homing operation None None NJ series CPU Unit Motion Control User s Manual W507 Check the gear ratio setting and the target position setting value and make sure that the converted number of pulses does not exceed the range of signed 40 bit data Allow some lee way 11 49 I N zi Oo c za 0 gt O Oo m 5 suonduoseq 1043 Z Z 11 Troubleshooting Event name Slave Observation Detected 74320000 hex Meaning A warning has been detected for an EtherCAT slave Source Motion Control Function Module Source details Continuously timing Effects Not affected Sen A warning was detected for the Ether Check the warning code for the Ether None CAT slave that is allocated to the axis CAT slave and r
395. of a Master Axis in Cam Motion This sample synchronizes a slave axis in cam motion with a master axis in velocity control If StartOn is TRUE the phase of the master axis is shifted with the MC Phasing Shift Master Axis Phase instruc tion The slave axis is synchronized with the shifted phase Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 SAXIS REF This is the Axis Variable for axis O MC Axis000 Details Homed FALSE TRUE when home is defined for axis O MC Axis000 MFaultLvl Active BOOL TRUE when there is a minor fault level error for axis O MC Axis001 sAXIS REF This is the Axis Variable for axis 1 MC Axis001 Details Homed FALSE TRUE when home is defined for axis 1 MC Axis001 MFaultLvl Active BOOL TRUE when there is a minor fault level error for axis 1 CamProfileO ARRAY 0 360 OF This is the cam data variable sMC CAM REF Pwr1 Status BOOL FALSE This variable is assigned to the Status output variable from the PWR 1 instance of the MC Power instruction It is TRUE when the Servo is ON Pwr2 Status BOOL FALSE This variable is assigned to the Status output variable from the PWR2 instance of the MC Power instruction It is TRUE when the Servo is ON StartOn BOOL FALSE This variable is used to start shifting the phase of the master axis StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communica
396. of the function modules in the NJ series Controller stop for errors in this event level If a minor fault level error occurs in the Motion Control Function Module the relevant axis or axes group stops Observation Errors in the observation level do not affect NJ series Controller control opera tions Observations are reported in order to prevent them from developing into errors at the minor fault level or higher Information Events that are classified as information provide information that do not indicate errors 11 6 NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting i MC Function Module Errors by Source The following tables list the errors in each event level that can occur for each source e MC Common Errors Level Error name Major fault e None Partial fault e Motion Control Parameter Setting Error e Cam Data Read Error e Required Process Data Object Not Set e Axis Slave Disabled e Network Configuration Information Missing for Axis Slave e Motion Control Initialization Error e Motion Control Period Exceeded Error e Absolute Encoder Home Offset Read Error Minor fault e Cam Table Save Error e Other execution errors for motion control instructions Observation e Cannot Execute Save Cam Table Instruction Information e Error Clear from MC Test Run Tab Page e Axis Errors Level Major fault e None Partial fault e None Minor fault e Cam Table Data Error during Cam Motion Immediate Stop Instruction Execu
397. ogramming Motion Controls 4 Downloading Axis Parameters and the User Program Download the axis parameters and user program to the CPU Unit Use the Synchronization menu command of the Sysmac Studio to download the project to the CPU Unit For details refer to 3 2 2 Setting Procedure 5 Executing the User Program Execute the user program and change the Enable input variable for MC Power to TRUE to change the Servo Drive to the Servo ON state Homing is performed when the Execute input variable to the MC Home instruction changes to TRUE 8 2 1 Setting Homing Parameters Set the homing parameters to specify the homing procedure Parameter name Homing Method Home Input Signal Homing Start Direction Home Input Detection Direction Operation Selection at Positive Limit Input Operation Selection at Negative Limit Input Homing Velocity Homing Approach Velocity Homing Acceleration Homing Deceleration Homing Jerk Home Input Mask Distance Home Offset Description Set the homing operation Select the input to use for the home input signal Set the start direction for when homing is started Set the home input detection direction for homing Set the stopping method when the positive limit input turns ON during homing Set the stopping method when the negative limit input turns ON during homing Set the homing velocity Unit command units s Set the velocity to use after the home proximity input turns ON Unit
398. ol including synchronized single axis control and axes group control An instruction error will occur at the time of multi execution if you execute an axes group operation on an axis currently in a single axis motion This will stop both the axes group and the single axis Multi execution during Constant velocity Motion Multi execution during Acceleration Deceleration Multi instruction timing Multi instruction timing Executed Initial command position Buffered command Executed Initial command position Buffered command position position Multi execution for axes groups is done so that the interpolation velocity remains continuous between instructions If continuous operation is performed with an instruction with a travel distance of O the velocity changes for the axes will not be continuous P N O Oo 3 3 Oo 3 TI c 3 O Oo 3 o Oo c fo X D o O Oo Oo 2 fo mp o o O Oo 3 mp 9 O1JUOD pejeuipJoo sexe Hn n N 10 suononuisu O4JUOD UOROWN Jo OPON Jong uonnoexe ninIWw S 7 6 NJ series CPU Unit Motion Control User s Manual W507 9 57 9 Motion Control Functions Example Interpolation Velocity and Velocities of Axes for Two axis Cartesian Coordinates Y coordinate X coordinate Y axis motion X axis motion I Buffered The multi execution instruction remains in the buffer until the current operation is finished The buffered instruction is executed afte
399. on Control User s Manual W507 10 85 10 Sample Programming 10 86 Error gt Camin Err ErrorlD gt Camin ErrlD MC Power for axis O PWR1 Axis MC_Axis000 Enable Pwr1 En Status gt Pwr1 Status Busy gt Pwr1 Bsy Error gt Pwrl Em ErrorlD gt Pwr1 ErrlD MC Power for axis 1 PWR2 Axis MC_Axis001 Enable Pwr2 En Status gt Pwr2_ Status Busy gt Pwr2 Bsy Error gt Pwr2 Err ErrorlD 2 Pwr2 ErrlD MC Home for axis O HM1 Axis MC Axis000 Execute Hm1 Ex Done gt Hm D Busy gt Hm1 Bsy CommandAborted gt Hm1 Ca Error gt Hm Err ErrorlD gt Hm1_ErrlD MC Home for axis 1 HM2 Axis MC_Axis001 Execute Hm2_ Ex Done gt Hm2_D Busy gt Hm2_Bsy CommandAborted gt Hm2_Ca Error gt Hm2_ Err ErrorlD gt Hm2_ErrlD MC_MoveVelocity VEL Axis MC Axis000 Execute Vel Ex Velocity Vel Vel Acceleration Vel Acc Deceleration Vel Dec Direction Vel Dir InVelocity gt Vel InVel Busy gt Vel Bsy Active Vel Act CommandAborted gt Vel Ca Error Vel Err ErrorlD gt Vel_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N m m m D 10 2 17 Temporarily Changing Axis Parameters id OH d This sample uses the MC Write Write MC Setting instruction to change the settings of the In Posi
400. on Module to control an axes group i Axis Parameters That Are Related to Velocities Maximum Interpolation Set the maximum interpolation velocity for Non negative long 800 000 000 Velocity the path Set 0 for no interpolation velocity limit If a target velocity that exceeds the maximum interpolation velocity is specified for an axes group operation instruction the axis will move at the maximum interpolation velocity Interpolation Velocity Set the percentage of the maximum inter O to 100 0 Warning Value polation velocity at which to output an inter polation velocity warning No interpolation velocity warning is output if O is set Unit 96 Specifying Target Velocities for Axis Operations The interpolation velocity used in an actual positioning motion is specified by the Velocity Target Veloc ity input variable to the motion control instruction Monitoring Velocities You can read Axes Group Variables from the user program to monitor the interpolation velocity Variable name Data type Meaning Function MC GHRP 0 31 Cmd Vel LREAL Command Interpo This is the current value of the com lation Velocity mand interpolation velocity A plus sign is added during travel in the pos itive direction and a minus sign is added during travel in the negative direction NJ series CPU Unit Motion Control User s Manual W507 9 53 P N O Oo 3 3 Oo 3 Tl c gt O G Oo 3 o Oo
401. on con trol instruction This value is used for both acceleration and deceleration and can be set for all opera tions except for synchronized control operations Use the following formula to calculate the value to set for the jerk Jerk Acceleration rate Time of acceleration x Ratio of time to apply jerk during acceleration 2 Jerk is applied in two sections at the start of acceleration and at the end of acceleration The time that jerk is applied is therefore divided by 2 e Example of Velocity Control When Jerk Is Specified The acceleration will change at a constant rate over the range where jerk is specified The command velocity will form a smooth S curve A fixed acceleration rate is used in areas where the jerk is set to 0 This command velocity will form a straight line Example Acceleration of 25 000 mm s Acceleration Time of 0 1 s and a Jerk Application Rate of 5096 Jerk 25 000 0 1 x 0 5 2 1 000 000 mm s3 P Wu O Oo 3 3 Oo 3 Tl c 3 O Oo 3 o Oo o 3 e o 1 fo X o O Oo 3 mp Velocity Target velocity at startup er v S 6 Time Acceleration Acceleration rate rate i m PEN l Time Jerk Jerk een MEM i ee JI l El NJ series CPU Unit Motion Control User s Manual W507 9 31 9 Motion Control Functions I Monitoring Jerk You can read Axis Variables in the user program to monitor jerk Variable name Data type Meaning
402. on selection at positive limit input Reverse turn immediate stop Home input detection direction Positive direction Operation selection at negative limit input Reverse turn immediate stop Homing velocity 10000 pulse s Homing approach velocity 1000 pulse s H rs k S ol jomisis SS SS elo o ois omsis N ol fo o S lel o e cj IS ele olo al j kl b Mele o fo oO IC c a la fe 3 3 3 g jojo olw olw a o a Z 2 la a o e gt lo gt le o Mills o AJA ele SSS r or 8 le lt l lt V Precautions for Correct Use ejnpeoojgd Dunes Z Z When making operation settings such as the display unit electronic gear unit conversion for mula maximum velocity or maximum acceleration deceleration be sure to use appropriate val ues for the operating conditions of the device EN Additional Information Changing Axis Variable Names in the User Program Perform the following two procedures to change Axis Variable names that are already used e Change the Axis Variable name in the variable table in the variable declarations e Change the Axis Variable name in the user program Even if you change the Axis Variable names in the variable table the Axis Variable names in the user program do not change An error will occur if you use a variable name that is not declared in the variable table in the user program Always change the names in both places NJ series CPU Unit Motion Control User s Manual W507 3 15 3 Con
403. ons e Rotary Mode e The FirstPosition can be less than equal to or greater than the LastPosition If the FirstPosition is greater than the LastPosition the setting will straddle the modulo minimum position setting value e An instruction error will occur if a position beyond the upper and lower limits of the ring counter is specified First Position x Last Position First Position Last Position Valid range FirstPosition to LastPosition LastPosition to FirstPosition Count value OxYFFFFFFFFF Modulo maximum P E position setting value Modulo minimum position I I setting value 0 l 0 I I I I I Auen Al Ue Latch enabled range Latch enabled range LastPosition 330 _94 FirstPosition 3300 _ 0 Range in which latching is enabled The border values are included Range in which latching is enabled The border values are not included FirstPosition 210 LastPosition 210 For details on latching refer to the MC_TouchProbe Enable External Latch and MC_AbortTrigger Disable External Latch instructions in the NJ series Motion Control Instructions Reference Manual Cat No W508 9 8 4 Zone Monitoring This function detects whether the command position or actual position of an axis is in the specified range zone Use the MC_ZoneSwitch Zone Monitor instruction to specify the first position and l
404. ons timeout detection c Bistro hidden slaves Programmin Revision Check Method g g Serial Number Check Method CT G5 Series ServoDri KUSU KNULL ECT Rev 2 1 RBSD KNO1L ECT G5 Series ServoDri R88D KNO2H ECT Rev 2 1 RB8D KNO2H ECT G5 Series ServoDri R88D KNO2L ECT Rev 2 1 RB8D KNO2L ECT G5 Series ServoDri R88D KNO4H ECT Rev 2 1 RBSD KNO4H ECT G5 Series ServoDri R88D KNO4L ECT Rev 2 1 RBSD KNO4L ECT G5 Series ServoDris R88D KNOGF ECT Rev 2 1 RB8D KNOGF ECT G5 Series ServoDrin R88D KNOBH ECT Rev 2 1 RBSD KNOBH ECT G5 Series ServoDri R88D KN10F ECT 1 RBSD KN10F ECT G5 Series ServoDrh R88D KN10H ECT Rev 2 1 RBSD KN10H ECT G5 Series ServoDri R88D KN150F ECT Rev 2 1 RBSD KN150F ECT GS Series ServoDr R88D KN150H ECT Rev 2 1 RBSD KN150H ECT G5 Series ServoD R88D KN15F ECT Rev 2 1 RBSD KN15F ECT G5 Series ServoDrin R88D KN15H ECT Rev 2 1 RBSD KN15H ECT G5 Series ServoDri R88D KN20F ECT Rev 2 1 RBSD KN20F ECT G5 Series ServoDrh H R88D KN20H ECT Rev 2 1 RBSD KN20H ECT G5 Series ServoDri Model R88D KNO1H ECT Product name R88D KNO1H EC Revision 2 1 Vendor OMRON Corporation 1 Comment 200V 100W ServoDri Device name URL Set a name for the master NJ series CPU Unit Motion Control User s Manual W507 The slave is inserted on the display Fs Sysmac Studio a 3 Configuring Axes and Axes Groups New Project A Configurations and Setup D new NJ501 0 v gt Node1 R88D
405. ontinuous velocities Adjust the tim ing for switching the cam table to avoid excessive velocity discontinuity I camLoading Saving Cam Data and Saving Cam Tables Cam data can be loaded and saved from the user program just like any other variables For example you can use MyCam 1 0 Phase to specify the phase and MyCam1 0 Distance to specify the displace ment in the first array elements of a cam table named MyCam1 Cam data overwritten from the user program can be saved to the non volatile memory in the CPU Unit as a cam table by executing the MC SaveCamTable instruction Precautions for Correct Use e Overwritten cam data will be lost if the CPU Unit is turned OFF or the cam data is downloaded from the Sysmac Studio before the Save Cam Table instruction is executed or if the instruction fails to save the data for any reason Overwritten cam data will be lost if the CPU Unit is turned OFF before the Save Cam Table instruction is executed or if the instruction fails to save the data for any reason Be careful not to lose the overwritten data when overwriting cam data from the user program in the CPU Unit e Cam data saved to non volatile memory can be loaded by using the upload function of the oysmac Studio e Use the Synchronization menu command of the Sysmac Studio to upload and download the project For details on arrays refer to the NJ series CPU Unit Software User s Manual Cat No W501 For details on the Save Cam Table inst
406. ontrol ity This object is necessary to output to the Servo Drive in Cyclic Synchronous Velocity Control Mode by the MC_SyncMoveVelocity Cyclic Syn chronous Velocity Control and other instructions Normally set 60FF hex Target velocity NJ series CPU Unit Motion Control User s Manual W507 A 5 T b e O gt o O 5 Q Lem gt o Qo o lt o g lt o sBumeg eAug oAJeg z L V Appendices Function name Description Target torque 6071 hex 00 0 Target torque The target torque for torque control This object is necessary to output to the Servo Drive in Cyclic Synchronous Torque Control Mode by the MC TorqueControl Torque Control and other instructions Normally set 6071 hex Target torque Maximum profile 607F hex 00 0 Max profile The velocity limit value for torque control velocity velocity This object is necessary for velocity control in Cyclic Synchronous Torque Control Mode by the MC TorqueControl Torque Control and other instructions Normally set 607F hex Max profile velocity Modes of operation 6060 hex 00 0 Modes of This data is required to change the control mode operation This object is necessary to change to a control mode other than Cyclic Synchronous Position Control Mode for the MC SyncMoveVelocity Cyclic Synchronous Velocity Control MC TorqueControl and other instructions Normally set 606C hex Modes of operation Positive torque limit 60E0 hex 00 0
407. ontrol Programming 6 1 Introduction The NJ series CPU Unit can perform both sequence control and motion control Write motion control instructions into the user program to perform motion control with EtherCAT slave Servo Drives and other devices Programs that contain motion control instructions are called motion control programs User program in PLC CPU Unit Function Module SS SSeS eae ee Se EL iC cixicl uiia aS CJ series Units than moton oo instructions l Basic I O Units l a Special Units l l l EtherCAT slaves Instructions other Executed User created Executed function block J EN E E Sequence control Variables I O ports Every cycle EtherCAT EtherCAT l MC Function Module Servo Drive or l D Master pos encoder input terminal e Profile processing Function EtherCAT slaves e Synchronization Module Other processing i a l l Normally you must assign Axis Variables to EtherCAT slave Servo Drives If you do not assign Axis Variables assign device variables in the same way as for a general purpose slave Motion control instructions can be used in the primary periodic task and in a periodic task with an execution priority of 16 i e a priority 16 periodic task Motion control instructions Motion control Motion control instructions Axis Variables 6 2 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Contro
408. ontrol User s Manual W507 8 Homing I Homing Start Direction Set the start direction for when homing is started To describe the relationship between the home input detection direction and the definition pattern we will use the proximity reverse turn with home proximity input OFF specification The difference in operation when the homing start direction and the home input detection direction are the same and when they are not the same is shown below e Homing Start Direction Same as Home Input Detection Direction Homing start direction and home input detection direction Home proximity ON input signal OFF Home input signal On OFF Command output Negative direction Positive direction Start Negative direction Positive direction Start e Homing Start Direction Different from Home Input Detection Direction Homing start direction Home input detection direction Home proximity ON input signal OFF Home input signal ON OF l l Negative direction i Positive direction l l When the home proximity input is ON at start the start direction is determined only by the home input detection direction setting Positive direction AN Negative direction i Positive direction Star Negative direction NJ series CPU Unit Motion Control User s Manual W507 8 7 Vi N zL O 3 5 U O Q D Q c C SJojeurejeg PulwoH Dua L Z 8 8 Homing I Home
409. ontrol User s Manual W507 Description This section provides an introduction to the NJ series Controllers and their features and gives the NJ series Controller specifications This section describes the variables and control systems of the CPU Unit and CPU Unit status This section describes how to use I O ports how to create the slave configuration and unit configuration and how to assign functions This section describes the initial settings of the function modules This section describes the task system and types of tasks This section describes programming including the programming languages and the variables and instructions that are used in programming This section describes simulation of Controller operation and how to use the results of simulation This section describes CPU Unit status This section describes the functionality provided by the CPU Unit This section describes how to go online with the CPU Unit and how to connect to other devices This section describes the procedures that are used to actually operate an NJ series Controller This section describes the event codes error confirmation methods and corrections for errors that can occur The appendices provide the CPU Unit specifications task execution times system defined variable lists data attribute lists CJ series Unit memory information CJ series Unit memory allocation methods and data type conversion information Manual Configuratio
410. ontrol instructions are cleared The CommandAborted output variables from the motion con trol instructions therefore remain FALSE e The save process will continue during a save for the MC SaveCamrTable Instruction I Stop Method e Deceleration Stop Velocity S Axis stops at the deceleration rate that is specified for the instruction or at the maximum deceleration rate Time e Immediate Stop Velocity The command is no longer updated The LA axis moves only for the pulses remaining in the Servo Drive and then stops The stop position is the command position when the cause of the immediate stop occurred Time 9 8 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions e Immediate Stop and Error Reset Velocity The actual position when the cause of the S immediate stop occurred is used as the command position Inertia will take the axis past this position but it will return to the actual position when the cause of the immediate stop occurred and stop there Time e Immediate Stop and Servo OFF Velocity The command is no longer updated When 1 the Servo is turned OFF the axis stops using the method that is specified by the Disable V Operation Option Code object 605C hex N hat is set in the Servo Drive aan Time I Stop Priorities The priorities for each stop method are listed in the following table If a stop with a
411. onverted to range for the number of pulses when the valid range The valid range is pulses it is converted to pulses signed 40 bit data for the number of pulses when the target value is con verted to pulses Attached None information Precautions None Remarks Event name Error in Changing Servo Drive Control Mode 74390000 hex Meaning Changing the Control Mode was not completed within the specified time Source Error attributes Effects System defined variables NJ series CPU Unit Motion Control User s Manual W507 timing tion execution The Servo for the axis turns OFF 11 41 11 Troubleshooting Cause and correction Attached information Precautions Remarks 11 42 When the MC SyncMovevVelocity instruction was stopped the actual current velocity was not reduced to 10 or less of the maximum velocity within 10 seconds for three consecu tive periods after a command velocity of O was output For an OMRON G5 series Servo Drive the actual current velocity was not reduced to 10 or less of the maximum velocity within 10 seconds for three consecutive periods when the MC TorqueControl instruction was stopped Changing the Control Mode of the Servo Drive between CSP CSV and CST was not completed within one second after the command was exe cuted None None Adjust the commands and load so that an error does not occur Check to see if there is an error in the Servo Drive and to see if settings
412. or Multi axes Coordinated Control 9 53 9 7 1 Velocity Under Multi axes Coordinated Control 9 53 9 7 2 Acceleration and Deceleration Under Multi axes Coordinated Control 9 54 9 7 3 Jerk for Multi axes Coordinated Control 9 55 9 7 4 Re executing Motion Control Instructions for Multi axes Coordinated Control 9 56 9 7 5 Multi execution Buffer Mode of Motion Control Instructions for Multi axes Coordinated Control 9 56 cene 9 65 9 8 1 Changing the Current FOSON EE 9 65 9 8 2 Tornu IEW ee 9 66 9 8 3 ell Le c 9 66 9 8 4 ZONE leste ous am ote vacseaes pcdaaeioe as 9 67 9 8 5 SE EE 9 68 9 8 6 FOIlOwWNO ENOF MONNONN O E EE LUIS OT a e 9 69 9 8 7 Following Error Counter E 9 70 9 8 8 Axis Following Error Monitoring E 9 70 9 8 9 Eelere Re EE 9 71 Section 10 Sample Programming 10 1 Overview of Sample Programming 11 1 elee e eeeeecieeelieeen inen nennen nana naa sana nana aman 10 2 rs EMEPDU C 10 2 14 NJ series CPU Unit Motion Control User s Manual W507 CONTENTS TOSTS2 dnstalladon ard VVIFIBIO eege ae 10 2 WORMS SOU tt M M 10 3 10
413. or Rota uu tion n nul Den LREAL Work Travel Distance Enabled Enabled Enabled Enabled per Motor Rotation Units 1 eMC UNITS Unit of Display Enabled Enabled Enabled Enabled 6 24 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming Axes Group Variables MC GHPT 0 31 are the system defined Axes Group Variables The data type is sGROUP REF which is a structure This section describes the configuration of the Axes Group Variables and provides details on the members Variable name Data type Meaning Function MC GHRPJ O 31 SGHOUP REF Axes Group Variable SGHOUP REF STA Axes Group Status Ready BOOL Ready to Execute TRUE when the axes group is stopped and is ready to execute The condition for being ready to execute is an AND of the following conditions e Execution of the MC_Stop instruction is not in progress for any composition axis e MC GHP XX Status Standby is TRUE stopped e The Servo is ON for the composition axes e MC AX XX Details Homed is TRUE home is defined for the composition axis Disabled BOOL Axes Group Disabled TRUE when the axes group is disabled and stopped The following axes group status are mutually exclusive Only one of them can be TRUE at a time Disable Standby Moving Stopping ErrorStop Standby BOOL Stopped TRUE when the axes group motion instruction is stopped This is independent of the Servo ON OFF status of the composition a
414. or the FeedDistance input vari able when the motion was in the negative direction before the interrupt input feeding is performed in the negative direction If a negative value is specified for the FeedDistance input variable feeding is performed in the positive direction Velocity Velocity control Interrupt feeding I Axis Parameter Settings Parameter name Setting Description Count Mode Rotary Mode Rotary Mode is set as the count mode for the position Modulo Maximum Position 360 The Modulo Maximum Position is set to 360 Setting Value Modulo Minimum Position The Modulo Minimum Position is set to O Setting Value Homing Method A zero position preset is performed to define home Main Variables Used in the Programming Samples Variable name Data type Default Comment MC Axis000 SAXIS REF I This is the Axis Variable for axis O MC Axis000 MFaultL vl Active BOOL FALSE TRUE when there is a minor fault level error for axis O MC Axis000 Details Homed BOOL FALSE TRUE when home is defined for axis O StartPg BOOL FALSE When StartPg is TRUE the Servo is turned ON if EtherCAT process data communica tions are active and normal Pwr Status BOOL FALSE This variable is assigned to the Status output variable from the PWR instance of the MC Power instruction It is TRUE when the Servo is ON TrigRef STHIGGER REF This parameter specifies the trigger input condition to use for the interrupt input Latch
415. or the command position overflowed Source Motion Control Function Module Source details Continuously timing Effects The position is not updated but motion continues len In Linear Mode the command posi Correct the program so that the input Check the gear ratio setting and the tion when converted to pulses value for the command position does target position setting value and exceeded the upper limit of signed not exceed the range for the number make sure that the converted number 40 bit data of pulses for the instruction Or of pulses does not exceed the range change the electronic gear ratio set of signed 40 bit data tings To recover from the overflow change the current position or per form the homing operation Attached None information Precautions None Hemarks Event name Command Position Underflow 64530000 hex Meaning The number of pulses for the command position exceeded the valid range It underflowed Source Motion Control Function Module Source details Continuously timing Error attributes eee Ocon SSS o WE Log category System Effects The position is not updated but motion continues SES In Linear Mode the command posi Correct the program so that the input Check the gear ratio setting and the tion when converted to pulses value for the command position does target position setting value and exceeded the lower limit of signed 40 not exceed the pulse number limit for make sure that the converted
416. orm motion processing for instructions in the primary periodic task first For example the MC MoveAbsolute instruction is executed in the priority 16 periodic task Then the MC Movehelative is executed for the same axis in the primary periodic task The operation for this is shown below e The MC Function Module will execute MC MovehRelative first MC MoveAbsolute is executed with multi execution of instructions Execution command for MC MoveRelative N EQ Ti Ti Tir i A FB2 MC Movehelative The instruction is buffered for multi execution of instructions Primary period Primary UPG MC periodic task Priority 16 periodic task D A FB1 MC MoveAbsolute Task period primary period x 3 The values of output variables for a motion control instruction and the values of system defined vari ables for motion control will change during the I O refresh of the task that executed the instruction Therefore you may notice different behavior depending on the task if you use motion control instruc tions for the same axis in different tasks Make sure that you thoroughly understand the processes of each task before you start to develop your user program la Precautions for Correct Use e f you include motion control instructions for the same axis in both the primary periodic task and the priority 16 periodic task pay close attention to the following when you develop your user program the execution order of the motion co
417. ors If an error occurs in an axes group you can use the MC_GroupReset instruction to remove the error once you have eliminated the cause For details on resetting axes group errors refer to the MC_GroupReset Group Reset instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 uoneJedo JO euiino 1 9 6 NJ series CPU Unit Motion Control User s Manual W507 9 47 9 Motion Control Functions 9 6 2 Linear Interpolation Linear interpolation is used to move 2 to 4 of the logical axes AO to A3 in a straight line between a start point and an end point Either absolute or relative positioning is possible You can specify the interpola tion velocity interpolation acceleration interpolation deceleration and jerk The MC Function Modules uses the following three kinds of linear interpolation instructions e MC MoveLinear Linear Interpolation You can specify the MoveMode input variable to select between linear interpolation to an absolute value or linear interpolation to a relative value This instruction is unique to the MC Function Module e MC MoveLinearAbsolute Absolute Linear Interpolation This instruction performs linear interpolation to an absolute value This instruction is defined in the PLCopen technical specifications e MC MoveLinearHRelative Relative Linear Interpolation This instruction performs linear interpolation to a relative value This instruction is defined in the PLCopen techn
418. ou can monitor the overall status of the MC Function Module with the MC Common Variable The variable name is MC COM e Axis Variables Use these variables to handle EtherCAT slaves Servo Drives encoder input terminals virtual Servo Drives and virtual encoder input terminals You can use either the system defined variables or the variables that are set on the Sysmac Studio to specify the Axis Variables in the user program You can change any of the Axis Variables that you create on the Sysmac Studio e Axis Variables in the system defined variables MC AX O to MC AX 63 e Default Axis Variables when axes are created on Sysmac Studio MC Axis000 to MC Axis063 Axes Group Variables O1JUOD UOIl1O A JO SejJqeuueA peuiep ule1s S JO MelAJOAQ L 9 9 Use these variables to handle multiple axes as a single group You can use either the system defined variables or the variables that are set on the Sysmac Studio to specify the Axes Group Variables in the user program You can change any of the Axes Group Variables that you create on the Sysmac Studio e Axes Group Variables in the system defined variables MC GHP O to MC GHP 31 e Default Axes Group Variables when axes groups are created on Sysmac Studio MC_Group000 to MC GroupOS31 Hefer to the NJ series CPU Unit Software User s Manual Cat No W501 for details on the variables that are used by an NJ series Controller NJ series CPU Unit Motion Control User s Manual W507 6
419. ou change an input variable that cannot be changed and attempt to re execute the instruction If you re execute an instruction that has been buffered due to multi execution of instructions the input variables for the instruction in the buffer will change For details on input variables that can be changed refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 suononaisu oJ1u02 uono Bunnoexe eH 9 9 6 NJ series CPU Unit Motion Control User s Manual W507 9 35 9 Motion Control Functions I Changing the Target Position If you change the target position with re execution the operation may change depending on the timing of the change and the new target position If the direction of motion reverses due to a change in the tar get position you can choose to decelerate to a stop after a reverse turn or stop immediately after reversing with the Operation selection at Reversing axis parameter e When a Reverse Turn Does Not Occur for the New Command Value Re executing Instruction during Re executing Instruction during Constant velocity Motion Acceleration deceleration Velocity Velocity Command re executed Command re executed TExecuted TInitial TNew TExecuted TInitial command command command command position position position position If you re execute an instruction during triangular control or during deceleration acceleration to the target velocity will occur again This may result in a constant
420. oup Variable 6 25 Immediate Stop Input ssssse 6 20 MC GHP 0 31 Cfg GrpEnable Axes Group Use 6 27 MC AX 0 63 DrvStatus Latch1 MC GHP 0 31 Cfg GrpNo Axes Group Number 6 27 External Latch Input 1 seussss 6 20 MC GRP 0 31 Cmd AccDec MC AX 0 63 DrvStatus Latch2 Command Interpolation Acceleration Deceleration 6 26 External Latch Input 21 6 20 MC GRP 0 31 Cmd Vel MC AX 0 63 DrvStatus MainPower Main Power 6 20 Command Interpolation Velocity 6 26 MC AX 0 63 DrvStatus N OT _MC_GRP 0 31 Details Idle Idle 6 25 Negative Limit Input eeseeeeseeeeessse 6 20 MC GHP 0 31 Details InPosWaiting MC AX 0 63 DrvStatus P OT Positive Limit Input 6 20 In Position Waiting 6 25 _MC_AX 0 63 DrvStatus Ready Servo Ready 6 20 _MC_GRP 0 31 Kinematics Axis 0 _MC_AX 0 63 DrvStatus ServoOn Servo ON 6 20 Composition Axis for Axis AO 6 27 _MC_AX 0 63 MFaultLvl Active _MC_GRP 0 31 Kinematics Axis 1 Axis Minor Fault Occurrence 6 22 Composition Axis for Axis A1 6 27 MC AX 0 63 MFaultLvl Code MC GHPIO 31 Kinematics Axis 2 MC Common Minor Fault Code 6 22 Composition Axis for Axis A2
421. p Dis Bsy CommandAborted r Grp Dis Ca Error Grp Dis Err ErrorlD Grp_Dis_ErrlD If the external button is ON the status of ResetON and the status of axes group motion is checked ReserON MC GroupOOO Status ErrorStop MC_Group000 Details ldle Lock4 M bd If ResetON is TRUE and the axes group is stopped the error is GHP RESET MC Groupheset Lock4 MC Group000 AxesGroup Grp Reset D Done Busy Grp Reset Bsy Failure Grp Reset Failure Error Grp Reset Er ErrorlD Grp_Reset_ErrlD 10 12 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N D ST Programming 3 Oo When StartPg is TRUE the status of process data communications is checked to see if communications are 3 active and normal ns The Servo is turned ON for axis O if process data communications for axis O are active and normal S 3 f process data communications are not active the Servo for axis O is turned OFF a odo IF StartPg TRUE AND EC PDSIavTbI MC Axis000 Cfg NodeAddress TRUE AND EC CommErrTbI MC AxisO00 Cfg NodeAddress FALSE THEN Pwr1 En TRUE Turn ON the Servo for axis O ELSE Pwr1 En FALSE Turn OFF the Servo for axis O END IF When StartPg is TRUE the status of process data communications is checked to see if communications are active and normal The Servo is turned ON for axis 1 if process data communications for axis 1 are active and normal f process d
422. p M mu D position error Vistaeitvi counter counter erocity OO Remainder Actual position Current loop Electronic pulses gear Feedback Motion Command control position processing command units In position check Actual position command units Remainder The command position and actual position share the following items Item Command position Actual position Count Mode You can set Linear Mode or Rotary The same Count Mode is used as Mode for the command position Position increment You can set one of the following The unit is the same as the unit of mm um nm inch degree or pulse the command position Software limits You can set the range of operation The range is the same as the range of the software for the command position Changing the current position You can change the actual position This value will be set to the same to any desired position position as the command position Defining home Home is either defined or The status of home is the same as undefined the command position f there is any following error before the change the following error value is maintained in the actual position NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions Axis Parameters That Are Related to Positions In position Range Set the in position width Unit command Non negative long units reals In position Check Set
423. p 1 V 1 Axis Settings LI 2 MC Axis000 0 iz MC Axis001 1 EX Ier e Unit of display pulse amp Cam Data Settings Command pulse count per motor rotation 10000 pulse rev gt Event Settings Work travel distance per motor rotation 10000 pulse rev I Task Settings Operation Settings FA Data Trace Settings Maximum velocity 400000000 pulse s Velocity warming value 0 Maximum jog velocity 1000000 pulse s Maximum acceleration 0 pulse s 2 Acceleration warning value 0 Maximum deceleration 0 pulse s 2 Deceleration warning value 0 Acceleration deceleration over pe ee ee IUse rapid acceleration deceleration Blending is cr Operation selection at Reversing Dec i Deceleration stop Positive torque warning value 9 Negative torque warning value In position range 10 pulse In position check time Actual velocity filter time constant Zero position range 10 pulse Y Other Operation Settings Immediate stop input stop method Immediate stop Immediate stop Limit input stop method Immediate stop Immediate stop Drive error reset monitoring time 200 msec Maximum positive torque limit 300 0 300 0 300 0 300 0 96 T N gt x o o D 5 ae U O D Q c D Disabled Disabled Positive software limit 2147483647 pulse Negative software limit 2147483648 pulse Following error over value 0 pulse 0 pulse Zero ition preset Zero position preset Home input signal Use Z phase input as home Homing start direction Positive direction Operati
424. pensation motions e Buffering and blending are not performed if you use multi execution of other motion control instructions during homing For details on homing refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 e e Sg Oo 3 5 O e D D ct O 5 NJ series CPU Unit Motion Control User s Manual W507 8 11 8 Homing 8 4 Homing with an Absolute Encoder This section describes how to use the absolute encoder of the G5 series Servo Drive with built in Ether Cat communications Servo Drives that use EtherCAT communications have their own position control loop Therefore the actual position from the encoder is not used in the MC Function Module for control Actual position infor mation is received via EtherCAT communications This means that you can access the actual position in the user program and or monitor it from the Sysmac Studio If you use an absolute encoder the absolute data can be retained by the battery backup in the encoder even when the power supply to the CPU Unit is turned OFF When you execute the MC Power Power Servo instruction the position is determined by reading the actual position from the absolute encoder Unlike when using an incremental encoder after home is defined you do not need to perform the hom ing operation again Motor absolute encoder CPU Unit MC Power executed Servo Drive p q Battery backup Absolute data Battery B
425. r s Manual W507 Axis MC Axis000 Enable Pwr En Status gt Pwr Status Busy gt Pwr Bsy Error gt Pwr Err ErrorlD gt Pwr_ErrlD MC_Home HM Axis Execute Done Busy CommandAborted Error ErrorlD MC_MoveAbsolute MV_ABS Axis Execute Position Velocity Acceleration Deceleration Direction Done Busy Active CommandAborted Error ErrorlD MC Stop STP Axis Execute Deceleration Done Busy Active CommandAborted Error ErrorlD MC_ImmediateStop IMD_STP Axis Execute StopMode Done Busy CommandAborted Error ErrorlD 10 Sample Programming MC_Axis000 Hm Ex gt Hm D gt Hm Bsy gt Hm Ca gt Hm Err gt Hm Ermi MC Axis000 Mv Abs Ex Mv Abs Pos Mv Abs Vel Mv Abs Acc Mv Abs Dec Mv Abs Dir gt Mv Abs D gt Mv Abs Bsy gt Mv Abs Act gt Mv Abs Ca gt Mv Abs Err gt Mv Abs ErrlD MC Axis000 Stp Ex Dip Dec gt Dip D gt Stp Bsy gt Stp Act gt Stp Ca gt Stp_Err gt Stp_ErrlD MC Axis000 Imd Gm Ex Imd Gm SM gt md Stp D gt md Stp Bsy gt Imd Gm Ca gt I md Gm Er gt Imd_Stp_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 23 Duuuugiboid d1Seg Z OL so duieg eo n N op m O CH 9 z Q gt Ka D o Q c 2 Q o 2 a D D x o O CH D q
426. r Command position Most recent command position You can set the gear ratio numerator gear ratio denominator position type acceleration rate and deceleration rate for the slave axis to operate For the master axis you can specify the command posi tion actual position or most recent command position After operation starts the slave axis uses the velocity of the master axis times the gear ratio for its tar get velocity and accelerates decelerates accordingly The slave axis is in the catching phase until it reaches the slave axis sync start position The slave axis enters the nGear phase after it reaches the slave sync start position For either the position of the slave axis is synchronized with the master axis Position l g Catching Phase InSync phase l l Master Travel distance of slave axis RatioNumerator Travel distance of master axis x vn RatioDenominator Slave Execute Time For details on positioning gear operation refer to the MC GearlnPos Positioning Gear Operation the MC GearOut End Gear Operation and the MC Stop instructions in the NJ series Motion Control Instructions Reference Manual Cat No W508 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 2 4 Cam Operation Cam operation synchronizes the position of the slave axis with the master axis according to a cam table Start cam operation with the MC Camln Start Cam Operation instruction E
427. r an axis motion or axes group motion You can select a trapezoidal curve or you can set the jerk for an S curve You can change the acceleration or deceleration rate even during acceleration or deceleration You can set an in position range and in position check time to confirm when positioning is completed You can set the stop method to determine when the immedi ate stop input signal or limit input signal is valid You can change the input variables for a motion control instruction during execution and execute the instruction again to change the target values during operation You can specify when to start execution and how to connect the velocities between operations when another motion con trol instruction is executed during operation You can specify the Transition Mode for multi execution of instructions for axes group operation Software limits are set for each axis You can detect when a range is exceeded during axis motion and when the target position is outside the range when a motion control instruction is executed You can also set warning values The following error between the command current value and the actual current value is monitored for each axis and an error is created to stop motion if a set value is exceeded You can set warning values for each axis and each axes group You can use an OMRON G5 series Servomotor with an Absolute Encoder to eliminate the need to perform homing at startup Servo Drive
428. r instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 Axis Parameters That Are Related to Resetting the Following Error Counter You can choose to reset the following error counter on an immediate stop on a limit input stop or after homing is completed by setting the appropriate axis parameters Set the axis parameters from the Sysmac Studio Immediate Stop Set the stopping method in the MC Function 0 2 or 3 0 Input Stop Method Module when the immediate stop input is enabled 0 Immediate stop 2 Immediate stop and error reset 3 Immediate stop and Servo OFF Limit Input Stop Set the stopping method in the MC Function Oto 3 0 Method Module when the positive limit input or nega tive limit input is enabled 0 Immediate stop 1 Deceleration stop 2 Immediate stop and error reset 3 Immediate stop and Servo OFF 9 8 8 Axis Following Error Monitoring 9 70 You can monitor the amount of following error for the command position or the actual position between two axes Use the MC AxesObserve Monitor Axis Following Error instruction to specify the permitted following error and the two axes to monitor If the permitted following error is exceeded the nvalid out put variable for the Monitor Axis Following Error instruction will change to TRUE You can use this monitoring function to program the actions to take when the following error between axes grows too large for gantry control an
429. r later EN Additional Information e You can also use unit versions of the OMRON G5 series Servo Drives with Built in EtherCAT Communications other than the recommended unit versions e The R88D KNL I IL ECT R unit version 1 0 Servo Drives support only position control Cyclic Synchronous Position Control Mode You can use them for applications that do not require velocity control Cyclic Synchronous Velocity Control Mode or torque control Cyclic Synchro nous Torque Control Mode Hefer to the G5 series AC Servomotors Servo Drives with Built in EtherCAT Communications User s Manual Cat No 1573 for details on functions e When you use an OMRON G5 series Servo Drive with unit version 2 0 or earlier do not set the node address switches to OO If you set them to 00 a network configuration error occurs Refer to the G5 series AC Servomotors Servo Drives with Built in EtherCAT Communications User s Manual Cat No 1576 for details on the differences between the unit versions of the OMRON G5 series Servo Drives Assigning External Input Signals The MC Function Module uses the following input signals of the Servo Drives e Immediate stop input e Positive limit input e Negative limit input e Home proximity input e External latch trigger signals latch input 1 and latch input 2 NJ series CPU Unit Motion Control User s Manual W507 Appendices e Assigning Positive Limit Inputs Negative Limit Inputs and Home Proximity
430. r status variables for the Motion Control Function Module 2 For the Motion Control Function Module only MC ErrSta MC Error Status is used o lt it o z Oo m oO o e System defined Variables for Motion Control You can monitor the MC Common Variable Axes Variables and Axes Group Variables of the sys tem defined variables for motion control to see if errors have occurred in the Motion Control Function Module Refer to 6 6 System defined Variables for Motion Control for information on system defined vari ables for motion control 11 1 2 Errors Related to the Motion Control Function Module e npo N uonounJ OJ1UO2 UOI o N eui o1 pejejeH SJo4uJ3 c L LL This section describes the errors that are related to the Motion Control Function Module H Sources of Errors Related to the Motion Control Function Module Errors can occur internally in the Motion Control Function Module or they can occur in EtherCAT com munications which are used to connect to the Servo Drives and other slaves e Inside MC Function Module e EtherCAT Master Function Module e Built in EtherCAT communications port hardware e EtherCAT slaves NJ series CPU Unit Motion Control User s Manual W507 11 5 11 Troubleshooting CPU Unit Sysmac Studio NS series PT MC Function Module EtherCAT Master Function Module Error information Built in EtherCAT communications port EtherCAT slaves E i tL
431. r the first time you use the MC Function Module or after starting operation N Oo fi Preliminary Check Items a gt If an error occurs check the items below to investigate the problem 8 gt Category Item to check Installation conditions Is there dust in the ambient environment Are there conductive foreign matters metal carbon etc in the ambient environment that might enter the Controller Is the ambient temperature higher than the ambient operating temperature in the specifications Is the ambient area humid due to moisture in the air use of water etc Does the ambient air contain corrosive gases acid salt sulfur etc Are there sources of noise around the Controller welders inverters etc Wiring Are power supply lines wired in the same duct as the signal lines Is the Controller grounded properly Is there a noise filter in the power supply 1 hi Co m x x O pe c o D o pe 2 ok JU D 3 D e D o Changes Was any extension work welding work done lately Was any power supply facility added lately Was the system including its program modified in any way including addi tions Accidents Was there a lightning strike nearby Was there a ground fault accident or was the earth leakage breaker tripped Was there a power outage NJ series CPU Unit Motion Control User s Manual W507 11 53 11 Troubleshooting i Problems and Countermeasur
432. r the operation for the current instruction is normally ended The target position is reached and the next command is executed after the current Velocity Multi execution timing operation is normally finished Buffered instruction Time I Blending Blending for axes groups works in the same way as blending for single axis operations The buffered instruction remains in the buffer until the target position of the current instruction is reached The buff ered instruction is executed after the target position of the current instruction is reached The axes do not stop at the target position The two motions are blended together at the interpolation velocity speci fied with the BufferMode input variable The Interpolation Acceleration Deceleration Over axes group parameter is used to select one of the fol lowing operations for when the acceleration deceleration that is specified in the buffered instruction would exceed the target position e Use rapid acceleration deceleration Blending is changed to Buffered e Use rapid acceleration deceleration e Minor fault stop Treat blending operation as buffered operation 9 58 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions e Blending Low Low Velocity Operation is performed using the target position of the current instruction and the target velocity that is the slower of the target velocities for the current instruction and buffered instruction
433. rCAT Network Configuration Cat NC s i H t Software Users Manual Section 3 Configuring Axes and Axes Groups NJ series CPU Unit Software User s Manual Set the Controller Setup Cat No W501 Transferring Transfer the project to the Controller Section 4 Checking Wiring from the Sysmac Checking Wiring Open the MC Test Run Tab Page Studio Checking Operation Monitor input signals to check the wiring Perform jogging Continues to A on next page The EtherCAT Network Configuration can be set online if you are connected to the physical network The EtherCAT Network Configuration can be selected offline if the hardware is not available yet 1 4 NJ series CPU Unit Motion Control User s Manual W507 1 Introduction to the Motion Control Function Module Beete Writ OPENS f een Section 6 Motion Control Pro g g Ite a program to perform jogging gramming Manual operation Jog the axes with the user program Section 7 Manual Operation l Section 8 Homing Homing Define the homes of the Servomotor axes to control i Section 6 Motion Control Pro Programming Program the motion controls gramming Section 10 Sample Program ming 1 Go gt o 2 o D et o U o o D Q Debugging lt D o SEET KEE Section 11 Troubleshooting Remove the cause of the error and clear the error Section 9 Motion Control Operation Operate the Controller and the machine Functions Maintena
434. rameter Settings Tab Page Set the homing parameters e f the homing parameters were set in advance click the Apply homing parameters Button to apply those settings NJ series CPU Unit Motion Control User s Manual W507 4 9 4 Checking Wiring from the Sysmac Studio 4 3 4 Absolute Positioning 1 Click the Absolute positioning Tab on the MC Test Run Tab Page The following dialog box will appear ban iE L dee gt Dj EtherCAT Status Axis ready to execute Axis disabled Standstill Discrete motion Stopping Error stopping Motion error list w i4 Motion Control Setup vV i Anis Settings 4 MC Axis000 0 Event LevellSourcelMessage Name 1 MC Axis001 1 gt Axes Group Settings amp Cam Data Settings gt Event Settings E Task Settings F Data Trace Settings v Programming Test Run Servo ON Drive status Command current position pulse Actual current position OCH Negative limit input Command current MS pulse s Immediate stop input Actual current velocity 0o Home proximity input Latch input 1 Drive warning input OFF Latch input 2 Target position Target velocity Acceleration Jerk Select the axis to perform absolute positioning Click the Servo ON Button to turn ON the Servo Enter the target position target velocity acceleration rate deceleration rate and jerk and then click the Apply Button Q P Gah Click the n Button Absolute positioning will start
435. rameters are not Check the axis parame After setting the axis set correctly ters in the Sysmac Studio parameters correctly download them to the MC Function Module CPU Unit failure Replace the CPU Unit The position of home Loose mechanical parts Use a marker pen to mark Securely tighten the con defined with homing such as couplings the motor shafts cou nections that shifted changes occasionally plings and other mechani cal connections to check for shifting Insufficient leeway for Z If the value is close to the Remove the motor cou phase setting per Servomotor pling and shift the position rotation number of pulses by around one quarter of a per encoder rotation or turn so that the Z phase near zero the home may pulse occurs at around be shifted by one motor one half of a Servomotor rotation due to slight rotation number of pulses changes in the timing of per encoder rotation and reading the sensor input then perform homing again Insufficient leeway for home input signal NJ series CPU Unit Motion Control User s Manual W507 11 55 11 Troubleshooting 11 56 Problem Unstable motor rotation Rotation direction is reversed Incorrect wiring of Servo motor power line encoder line missing phase etc Load torque variation due to gear meshing or not tightening the coupling eccentric screw connect ing the motor axis with the mechanical system Insufficient gain adjust m
436. range specification is invalid There is a problem with the wiring of the interrupt signal The sensor that outputs the interrupt signal has failed None None If an invalid latch enabled range is specified to the instruction correct it Correct any problems with the wiring for the interrupt signal for the instruc tion If neither of the two causes listed above are applicable the sensor that outputs the interrupt signal has failed Replace the sensor that outputs the interrupt signal for the instruction where this error occurred Specify a correct latch enabled range based on the relationship between the motion and sensor position Make sure that the wiring of the inter rupt signal is correct None Homing Opposite Direction Limit Input Detected 74240000 hex The limit signal in the direction opposite to the homing direction was detected during a homing operation Motion Control Function Module Source details Axis Detection During instruc timing tion execution Level o tion status _MC_AX MFaultLvl Active BOOL Axis Minor Fault Occurrence variables Cause and correction Attached information Precautions Remarks The Operation Selection at Negative Limit Input or Operation Selection at Positive Limit Input parameter is set to No reverse turn The location of the homing input sig nal sensors homing settings and homing start position cause a limit input to be reached None
437. ransition BufferMode If CamTable7 is TRUE during absolute positioning then the instance that uses CamProfile 1 for the cam table is executed skipCamTableO CamTable1 SkipCamTable1 gt MC Axis000 MC AxisO01 Mv Abs Act CamTable1 CamProfile1 BOOL TRUE _eMC_STARTMODE _mcAbsolutePosition LREAL 1 0 LREAL 1 0 LREAL 1 0 LREAL 1 0 LREAL 0 0 LREAL 0 0 eMC REFERENCE TYPE4 amp mcCommand eMC DIRECTION mcNobDirection skipCamTable1 End EN ENO MC Camln Master Slave QCamTable InCam InSync EndOfProfile Master Slave CamrTable Execute Periodic StartMode StartPosition MasterStartDistance MasterScalling SlaveScalling MasterOffset SlaveOffset Reference Type Direction Camriransition BufferMode CommandAborted Error ErrorlD NJ series CPU Unit Motion Control User s Manual W507 CamlIn_InCamO Camln InSync Camln Eop Camln Index Camln Bsy Camln Act Camln Ca Camln Er Camln El Camln InCam1 Camln InSync Camln Eop Camln Index Camln Bay Camln Act Camln Ca Camln Err Camln El 10 49 Duuuugiboid 2Iseg Z 0L so duieg ch P ix N Q 2 pe 2 KC 2 e 2 D C pe 3 D o D oO lt JU P D X D Q c o 2 o R 0 2 3 o e c O o 2 10 Sample Programming 10 50 i ST Programming If the input parameters for absolute positioning and starting cam operation are not set the target values a
438. ration or stop settings when the motor is actually operated e OMRON G5 series Servo Drives can be set to specific node addresses by using the rotary switches on the front panels If the rotary switches are set to 00 the node address will be determined by the settings made in the EtherCAT Editor of the Sysmac Studio If the rotary switches are set to 00 for all connected Servo Drives errors will not occur even if the Servo Drive s connection position is changed Set the node addresses on the rotary switches to assign specific Servo Drives for each machine control SO qeJeA SIX 0 uononpoJu e L e 3 1 3 Introduction to Axis Variables Axis Variables are system defined variables for some of the axis parameters and for the monitor infor mation such as the actual position and error information for the axes controlled by the MC Function Module When you create axes with the Sysmac Studio Axis Variables are registered in the variable table in the order that the axes are created Axis variables are structures with a data type of SAXIS REF e Axis Variables Each Axis Variable in the MC Function Module has two variable names The Axis Variable name in the system defined variables and the Axis Variable name that is assigned when the axis is added on the Sysmac Studio The Axis Variable names in the system defined variables are MC AXI O to MC AX 63 When you add axes on the Sysmac Studio the MC Axis000 to MC Axis068 are set by default for
439. rd Node 10 Device R88D KNO1L ECT CH1 v 6040h 00 0 Controlword 0 3 Target position Node 10 Device R88D KNO1L ECT CH1 v 607Ah 00 0 Target position L 5 Target velocity Node 10 Device R88D KNO1L ECT CH1 v 60FFh 00 0 Target Velocity a 7 Target torque Node 10 Device R88D KNO1L ECT CH1 v 6071h 00 0 Target Torque 9 Max profile Velocity Node 10 Device R88D KNO1L ECT CH1 v 607Fh 00 0 Max profile velocity 11 Modes of operation Node 10 Device R88D KNO1L ECT CH1 v 6060h 00 0 Modes of operation 15 Positive torque limit value Node 10 Device R88D KNO1L ECT CH1 v 60E0h 00 0 Positive torque limit value 16 Negative torque limit value Node 10 Device R88D KNO1L ECT CH1 v 60E1h 00 0 Negative torque limit value 21 Touch probe function Node 10 Device R88D KNO1L ECT CH1 v 60B8h 00 0 Touch probe function 44 Software Switch of Encoder s Input Slave Input Drive to Controller O 22 Status word Node 10 Device R88D KNO1L ECT CH1 v 6041h 00 0 Status word O 23 Position actual value Node 10 Device R88D KNO1L ECT CH1 v 6064h 00 0 Position actual value 24 Velocity actual value Node 10 Device R88D KNO1L ECT CH1 v lt Not assigned 25 Torque actual value Node 10 Device R88D KNO1L ECT CH1 v 6077h 00 0 Torque actual value 27 Modes of operation display Node 10 Device R88D KNO1L ECT CH1 v 6061h 00 0 Modes of operation display 40 Touch probe status Node 10 Device R88D KNO1L ECT CH1 v 60B9h 00 0 Touch probe status 41 Touch probe posi pos value No
440. relevant axis Relevant axis decelerates to a stop if it is in motion BOOL Axis Minor Fault Occurrence variables _MC_AX MFaultLvl Active Cause and Prevention EE Time is required to complete position Determine the cause of the slow posi Remove the cause of poor following ing tioning and remove the cause of the performance or oscillation vibration in error Or adjust the Servo Drive or the positioning operation as much as adjust the In position Check Time or possible In position Range Increase the loop gain if you adjust the Servo Drive However make sure that you keep the loop gain low enough so that the control does not oscillate Attached None information Precautions None Hemarks Event name Following Error Limit Exceeded 64480000 hex Meaning The error between the command current position and actual current value exceeded the Following Error Over Limit Value Source Motion Control Function Module Source details Axis Detection During instruc timing tion execution Operation is not possible for relevant axis Relevant axis decelerates to a stop if it is in motion Error attributes Effects Name variables _MC_AX MFaultLvl Active BOOL Axis Minor Fault Occurrence SEM Le ei The positioning operation has poor Remove the cause of poor following Remove the cause of poor following following performance and the actual performance in the positioning opera performance in the positioning opera motion is slower th
441. ress A value of D indicates that there is no address mE DEE SCAL Unit Conversion Set Gives settings of the electronic gear ratio tings S Command Pulse Contains the number of pulses per motor rotation Count Per Motor Rota for command positions The command value is tion converted to the equivalent number of pulses based on the electronic gear ratio mom opti sal Travel Distance Contains the workpiece travel distance per motor e nee Motor Rotation rotation for command positions be eMC UNITS Unit of Display Contains the display unit for command positions 0 mcPls pulse 1 mcMm mm 2 mcUm um 3 mcNm nm 4 mcDeg degree 5 mcinch inch This also includes states where processing is performed while in motion at velocity 0 during following error resets during synchronized control and during coordinated motion The Detailed Settings Display on the Axis Basic Settings Tab Page of the Sysmac Studio gives the signal that is set for encoder Z phase detection digital input You may not be able to map a PDO to this signal for servo drives from other man ufacturers Refer to the manual for the connected servo drive for details This variable gives the status of bit 11 internal limit enabled in the Status Word 6041 hex that is mapped to a PDO The conditions for this variable changing to TRUE depend on the specifications of the Servo Drive Refer to the manual for the connected servo drive for de
442. ring Axes and Axes Groups I Downloading to the CPU Unit Use the Synchronization menu command of the Sysmac Studio to download the project to the CPU Unit 1 Select Online from the Controller Menu The Sysmac Studio goes online with the Controller 2 Select Synchronization from the Controller Menu and then click the Transfer to Controller Button Pe Edit View Insert Project Controller Simulation Tools Help ECHT New Proj i S ETUR Configurations and Setup emm Synchronization v Configurations and Computer Data Name Computer Update DateController Update Date Controller Data Name Compare e I o D mp 3 e U Oo D Q c D o Oo gt X D o Q oO c Ke o 4 z IE gt Programming i Legend Synchronized Clear the present values of variables with Retain attribute Valid for Transfer to Controller lE Do not transfer the program source Valid for Transfer to Controller All data will be re transferred when this option is changed Ej Do not transfer Special Unit parameters and backup parameters of EtherCAT slaves out of synchronization scope ejnpeoojgd Dunes Zz v e 0 All data will be transferred because the projects in the computer and the controller are different Transfer To Controller Transfer From Controller Status Monitor ONLINE 192 168 250 1 ERR ALM PROGRAM mode NJ series CPU Unit Motion Control User s Manu
443. rogram the FaultHandler according to the device MC COM MFaultLvl Active 4 FaultHandler EN FaultHandler If StartPg and WriteCamData are TRUE the values in the cam data variable are changed Phases and displacements are set for CamProfile 100 to CamProfile 109 When the changes to the cam data variable are completed WriteDone is changed to TRUE StartPg WriteCamData l FOR Index UINT 10 100 TO UINT 10 109 DO PhaseData PhaseData REAL 1 0 DistanceData DistanceData REAL 3 0 CamProfileO Index Phase PhaseData CamProfileO Index Distance DistanceData END_FOR WriteDone T RUE 10 90 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o If the changes to the cam data variable are completed the Set Cam Table Properties instruction is executed i SET CAM o MC_SetCamTableProperty 3 WriteDone CamProfileO CamTable CamrTable CamProfileO Set_Cam_D on 4 Execute Done 3 EndPointIndex Set Cam Epi EE Ve MaxDataNumber Set Cam Mdn Busy Set Cam B CommandAborted Set Cam Ca Error Set Cam Er ErrorlID Set Cam ErrlD I ST Programming The axis parameters are set When setting the parameters is completed nitFlag is changed to TRUE IF InitFlag FALSE THEN The phases and displacements for null cam data are set PhaseData REAL 99 0 DistanceData REAL 250 0 The Initialization Completed Flag is changed to TRUE InitFl
444. rograms that you create with the Sysmac Studio This section describes the Support Software that is provided with the Sysmac Studio This section describes the error messages that are displayed when you check a pro gram on the Sysmac Studio and how to correct those errors The appendices describe the following Driver Installation for Direct USB Cable Connection Specifying One of Multiple Ethernet Interface Cards Online Help Simulation Instructions NJ series CPU Unit Motion Control User s Manual W507 Manual Structure Manual Structure Page Structure The following page structure is used in this manual 4 Installation and Wiring Level 1 heading Level 2 heading Level 2 heading 4 3 Mounting Units Level 3 heading Gives the current Level 3 heading 4 3 1 Connecting Controller Components headings The Units that make up an NJ series Controller can be connected simply by pressing the Units together and locking the sliders by moving them toward the back of the Units The End Cover is connected in the same way to the Unit on the far right side of the Controller A step in a procedu re 1 Join the Units so that the connectors fit exactly Indicates a procedure eren holes ul LIH J Jd ams ULP Page tab Gives the number of the main section syun Bununo y Et 2 The yellow sliders at the top and bottom of each Unit lock the Units together Move the sliders toward the back of the Units as shown below until they click into
445. roller specifications This section describes the system configuration used for NJ series Controllers This section describes the parts and functions of the configuration devices in the NJ series Controller configuration including the CPU Unit and Configuration Units This section describes where and how to install the CPU Unit and Configuration Units and how to wire them This section describes the event codes error confirmation methods and corrections for errors that can occur This section describes the contents of periodic inspections the service life of the Bat tery and Power Supply Units and replacement methods for the Battery and Power Supply Units The appendices provide the specifications of the Basic I O Units Unit dimensions load short circuit protection detection line disconnection detection and measures for EMC Directives H NJ series CPU Unit Software User s Manual Cat No W501 Section Section 1 Introduction Section 2 CPU Unit Operation Section 3 UO Ports Slave Configuration and Unit Configuration Section 4 Controller Setup Section 5 Designing Tasks Section 6 Programming Section 7 Simulation Transferring Projects to the Physical CPU Unit and Opera tion Section 8 CPU Unit Status Section 9 CPU Unit Functions Section 10 Communications Setup Section 11 Example of Actual Application Pro cedures Section 12 Troubleshooting Appendices NJ series CPU Unit Motion C
446. ror occurs for any of the composition axes in the axes group the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler MC Axis000 MFaultL vl Active MC Axis001 MFaultLvl Active MC_Group000 MFaultLvl Active 4 If the Servo is ON for axis O and home is not defined the MC Home instruction is executed HM1 Pwr1 Status MC Axis000 Details Homed MC Axis000 i Axis Hm1_D Done Busy Hm1_Bsy CommandAborted Hm1 Ca Error Hm1 Err ErrorlD Hm1_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 11 10 Sample Programming If the Servo is ON for axis 1 and home is not defined the MC Home instruction is executed HM2 Pwr2 Status MC Axis001 Details Homed MC_Axis001 i Axis Hm2_D Done Busy Hm2_Bsy CommandAborted Hm2 Ca Error Hm Err ErrorlD Hm2_ErrlD The status of the axes group and the status of home for axis O and axis 1 are checked MC_Group000 Status Disabled Hm1_D Hm2_D Locks n kJ If home is defined for axis O and axis 1 the axes group is enabled MC GroupEnable Lock3 MC GroupOO0 AxesGroup Done Busy Grp En Bsy CommandAborted Grp En Ca Error amp En Err ErrorlD Grp_En_ErrlD If there is a minor fault level error for the axes group the axes group is disabled GRP_DIS MC_GroupDisable MC_Group000 MFaultLvl Active MC Group000 AxesGroup Grp Dis D Done Busy Gr
447. rors Controlling the motion of more than one axis such as linear interpolation and circular interpolation You specify an axes group to specify the axes to coordinate Functions that aid in controlling an axes group such as override factor settings and resetting errors Parameters that define the operation of the MC Function Module The motion control parameters include the MC common parameters axis parame ters and axes group parameters Parameters that apply to a single axis Parameters that apply to an axes group System defined variables that provide status information for the MC Function Mod ule The system defined variables for motion control include the MC Common Variable Axis Variables and Axes Group Variables A system defined variable that is defined as a structure and provides status informa tion for the overall operation of the MC Function Module System defined variables that are defined as structures and provide status informa tion and some of the axis parameters for individual axes System defined variables that are defined as structures and provide status informa tion and some of the axes group parameters for individual axes groups The process of defining home Homing is also called home positioning home searching calibration and datum The zero position of the mechanical system Home is determined by the home input signal during the homing operation The position that is based on home and is
448. rp En Ca gt Grp En Er gt Grp En ErrlD MC GroupO000 Grp Dis Ex gt Grp Dis D gt Grp Dis Bsy gt Grp Dis Ca gt Grp Dis Err gt Grp_Dis_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming e AMC GroupReset GRP_RESET D AxesGroup MC_Group000 o Execute Grp Reset Ex 3 Done gt Grp Reset D ns Busy gt Grp_Reset_Bsy SE Failure gt Grp Reset Fai E Error gt Grp Reset Er Dn ErrorlD gt Grp_Reset_ErrlD P e A m x x O I o pet O may 2 pe 2 ok m x O JJ D o D ct 2 h O c D X D o C Q O x e 2 pe m D ok O O D pe G O 2 NJ series CPU Unit Motion Control User s Manual W507 10 15 10 10 10 16 Sample Programming 2 5 Monitoring for Instruction Errors In this sample further processing is not performed if there is an error when the MC Power Power Servo instruction is executed Whether further processing is possible is indicated by the UpgOn vari able Samples are provided for both ladder diagram and ST programming Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 SAXIS REF This is the Axis Variable for axis O Pwr Status BOOL FALSE This variable is assigned to the Status output variable from the PWR instance of the MC Power instruction It is TRUE when the
449. rrect Use e When one of the following operations is performed for a command from the Sysmac Studio the Servomotor will operate at the set velocity Servo ON jogging relative positioning abso lute positioning or homing Always confirm that it is safe for the Servomotor to operate before executing any of these operations e When you operate the Controller from the Sysmac Studio always install external emergency circuits so that the Servomotor can be stopped safely whenever necessary The Sysmac Stu dio may not be able to send commands under some circumstances e g if an error occurs in the computer e Set the EtherCAT communications and establish communications before you attempt to per form operation from the Sysmac Studio 4 3 2 Jogging 1 Select the axis to jog on the Jogging Tab Page of the MC Test Run Tab Page 2 Click the Servo ON Button to turn ON the Servo 3 Enter the target velocity acceleration rate and deceleration rate and then press the Apply But ton d Click the or al Button The motor will operate in either the positive or negative direction while one of these buttons is clicked Check to see if the motor operates in the set direction 4 8 NJ series CPU Unit Motion Control User s Manual W507 4 Checking Wiring from the Sysmac Studio 4 3 3 Homing 1 Set the homing parameters in the Homing Settings on the Axis Parameter Settings Tab Page 2 Click the Homing Tab on the MC Test Run Tab Page The followi
450. rror The user program or Controller Configurations and Setup were not transferred correctly Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks 11 20 PLC Function Module Motion Control Function Module EtherCAT Master Function Module EtherNet IP Function Module un Source details Cycle the power supply or reset the Controller Detection At power ON or timing Controller reset Log category System The user program or Controller Con Clear all of memory and then down Do not turn OFF the power supply to figurations and Setup are not correct load the project from the Sysmac Stu the Controller or disconnect commu because the power supply to the Con dio If attached information is nications with the Sysmac Studio dur troller was interrupted or communica registered cycle the power supply to ing a download of the user program or tions with the Sysmac Studio were the Controller and then implement the the Controller Configurations and disconnected during a download of above correction Setup the user program or the Controller Configurations and Setup The user program or Controller Con figurations and Setup are not correct because the power supply to the Con troller was interrupted during online editing Do not interrupt the power supply to the Controller during online editing The
451. ruction Current instruction l I l I Buffered instruction e Blending Next Next Velocity Operation is performed using the target position of the current instruction and the target velocity of the buffered instruction 9 44 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions Multi execution of instruction Maele Velocity Cases Resulting in Acceleration The transit velocity is the command Current instruction l Buffered instruction Time Cases Resulting in Deceleration Multi execution of instruction i M Velocity Current instruction Buffered instruction Time e Blending High High Velocity Operation is performed using the target position of the current instruction and the target velocity that is the faster of the target velocities for the current instruction and buffered instruction P Wu O Oo 3 3 Oo 3 TI c 3 O Oo 3 o Oo o 3 e o 1 fo X o O Oo 3 mp spo iang SUOIONAJSU OJJUOD uono vN JO uonnoexe n n N 2 9 6 NJ series CPU Unit Motion Control User s Manual W507 9 45 9 Motion Control Functions 9 6 Multi axes Coordinated Control This section describes the operation of multi axes coordinated control With the MC Function Module you can set an axes group in advance from the Sysmac S
452. ruction refer to the MC SaveCamrTable instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 I Updating Cam Table Properties The MC Function Module must identify the cam end point of the cam table If an overwrite is performed from the user program during cam operation and the number of valid cam data changes you must update the number of valid cam data to the latest value Use the MC SetCamTableProperty instruction for this The cam end point is the data located one cam data before the first cam data with a phase of O after the start point in the cam table All cam data after phase O is detected will be invalid For example refer to the following cam table The EndPointindex End Point Index output variable is 999 and the MaxDataNumber Maximum Number of Cam Data output variable is 5 000 from the MC SetCamTableProperty instruction NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions Cam data structure array Phase Displacement MyCam 1 0 Cam start point Valid data MyCam 1 997 MyCam 1 998 Maximum number of data 5 000 MyCam 1 999 Cam end point MyCam 1 1000 Invalid data MyCam1 4999 Lal Precautions for Correct Use e You cannot change the maximum number of cam data from the user program e Execute this instruction after overwriting the cam data in any way that changes the number of valid cam data If the number of valid cam data is not upda
453. rvoDrih R88D KNOBH ECT Rev 2 1 RBSD K CT G5 Series ServoDri J R88D KN10F ECT Rev 2 1 R88D KN10F ECT G5 Series R88D KN10H ECT Rev 2 1 R8SD KN10H ECT G5 Series ServoDri J R88D KN150F ECT Rev 2 1 R88D KN150F ECT GS Series ServoDr Euni CEN RR UM ServoDrn SD KN20F ECT G5 Series ServoDri D R88D KN20H ECT Rev 2 1 RBSD KN20H ECT G5 Series ServoDri Model R88D KNO1H ECT oduct name R88D KNO1H EC Revision 2 1 Vendor OMRON ition 1 Comment 200V 100W ServoDri PDO Map Settings 34 URL The data are input output periodically by the process data PDO communications The following PDOs are mapped by default in the Sysmac Studio RxPDO 1704 hex TxPDO 1B02 hex Controlword 6040 hex Target Position 607A hex Target Velocity GOFF hex Target Torque 6071 hex Modes of Operation 6060 hex Touch Probe Function 60B8 hex Max Profile Velocity 607F hex Positive Torque Limit Value GOEO hex and Negative Torque Limit Value 60E1 hex Error Code 603F hex Status Word 6041 hex Position Actual Value 6064 hex Torque Actual Value 6077 hex Modes of Operation Display 6061 hex Touch Probe Status 60B9 hex Touch Probe Pos1 Pos Value 60BA hex Touch Probe Pos2 Pos Value 60BC hex and Digital Inputs GOFD hex EN Additional Information If you use the recommended Servo Drives OMRON R88D KNL I IL ECT version 2 1 or higher then it is no
454. rvos are turned OFF for an axes group error to interlock the axes so that the Servos cannot be turned ON with the MC Power Power Servo instruction This error occurs only when an immediate stop of the command value and turning OFF Servo at same time free run stop is specified for the Axes Group Stop Method Selection Absolute Encoder Current Position Calculation Failed 64580000 hex It was not possible to correctly restore the current position from the absolute encoder information that was saved when power was interrupted timing execution Operation is not possible for relevant axes e The ring counter setting in the Con Reset the error and perform homing Perform homing again if you changed troller or the ring counter setting in Perform homing near the position any parameters related to position the Servo Drive settings was where the absolute encoder is setup such as the modulo maximum posi changed so that the position to restore does tion setting value Perform homing The position to restore when con not exceed the range of signed 40 bit near the position where the absolute verted to pulses exceeded the data encoder is set up so that the position to restore does not exceed the range of signed 40 bit data Also do not execute the MC Power Power Servo instruction or cycle the power supply when the encoder position exceeds the range of signed 40 bit data range of signed 40 bit data None None 11 31
455. s Act gn MC Axis0O00 Status Standstill MC Axs000DtalsHomed Duiuonisog einjosqy pue Duo 6 z 0L NJ series CPU Unit Motion Control User s Manual W507 10 31 10 Sample Programming I Ladder Diagram When StartPg is TRUE the status of process data communications of axis O is checked to see if communications are active and normal StartPg EC PDSlavTbIMC Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress Lock The Servo for axis O is turned ON if process data communications for axis O are active and normal PWR MC_Power Lock MC Axis000 Axis Axis Pwr Status Enable Status Busy Pwr Bsy Error Pwr Err ErrorlD Pwr ErrlD If a minor fault level error occurs for axis 0 the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler If the Servo is ON for axis O and home is not defined the MC Home instruction is executed MC Axis000 MFaultLvl Active Pwr_Status MC Axis000 Details Homed MC Axis000 i Axis Hm_D Done E Busy Hm Bsy CommandAborted Hm Ca Error Hm Err ErrorlD Hm ErrlD If the Servo is ON and home is defined absolute positioning is executed MV ABS MC MoveAbsolute Pwr Status Hm D MC Axis000 7 Axis Mv_Abs_D d Done KE LREAL 50000 0 iti Busy Mv Abs Bsy LREAL 10000 0 i Active Mv_Abs_Act LREAL 1000 0 Acceleration CommandAbort
456. s TRUE and a cam table file save opera tion is not in progress 5v Cam Exis changed to TRUE f Sv Cam Exis TRUE the MC SaveCamTable instruction is executed IF WriteDonez TRUE AND SaveCamtable TRUE AND MC COM Status CamTableBusy zFALSE THEN Sv Cam Ex TRUE END IF f Sv Ca TimeUp is TRUE Sv Cam Ex is changed to FALSE f Sv Cam Exis FALSE Sv Ca TimeUp changes to FALSE and Sv Cam Ex changes to TRUE The MC SaveCamrTable instruction is executed again IF Sv Cam Ex TRUE AND Sv Ca TimeUp FALSE THEN Sv Cam Ex TRUE ELSE Sv Cam Ex FALSE END IF If Sv Ca CountUp is FALSE and a Cannot Execute Save Cam Table error occurs Sv Cam Disable is changed to TRUE IF Sv Ca CountUP FALSE AND Sv Cam Ca TRUE THEN Sv Cam Disable TRUE ELSE Sv Cam Disable FALSE END IF NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o One second after the Cannot Execute Save Cam Table error occurs Sv Ca TimeUp is changed to TRUE e f Sv Ca TimeUp changes to TRUE Sv Cam Exis changed to FALSE D Sv_Ca_TON e In Sv Cam Disable 3 PT T4s ns ta Q gt Sv_Ca_TimeUp SE J o2 odo Sv Ca CountLoad is changed to TRUE for one period when the cam table is saved UH Sv Ca CountLoad changes to TRUE the retry counter is reset R_TRIG1 SaveCamtable Sv Ca CountLoad If a Cannot Execute Save Cam Table error occurs three times Sv Ca CountUP is changed to TRU
457. s abbreviated to MC Function Module is a software function module that is built into the CPU Unit The MC Function Module can perform motion control for up to 64 axes through the EtherCAT port that is built into the CPU Unit Cyclic communications are per formed with Servo Drives that are connected to the EtherCAT port to enable high speed high precision machine control Motion Control Instructions Based on PLCopen The motion control instructions of the MC Function Module are based on motion control function blocks that are standardized by PLCopen These instructions allow you to program single axis PTP position ing interpolation control synchronized control e g of electronic cams velocity control and torque control You can set the velocity acceleration rate deceleration rate and jerk each time a motion con trol instruction is executed to flexibly control operation according to the application ES Additional Information e PLCopen PLCopen is an association that promotes IEC 61131 3 It has its headquarters in Europe and a world wide membership PLCopen standardizes function blocks for motion control to define a program interface for the languages specified in IEC 61131 3 JIS B 3503 e Jerk Jerk is the rate of change in the acceleration rate or deceleration rate If you specify the jerk the velocity graph will form an S curve for acceleration and deceleration Data Transmission Using EtherCAT Communications The MC
458. s and synchronized control There are three Control Modes for motion profile commands position control velocity control and torque control In synchronized control the slave axis i e the axis being controlled operates in a synchronized relationship to the master axis as expressed by a cam profile curve or a gear ratio Manual operations such as jogging and homing are also supported EtherCAT EtherCAT slave Feedback Synchronization slave processing Actual position N Position processing Led Velocity processing Torque processing External UO processing for EtherCAT slave External du output Note You can use the command position or actual position as the input to the synchronization processing Command position ji Command velocity d o 5 e D 1 D X 0 U fe O o 5 O fe 5 9 uoneJedo jo euiinO L 1 6 NJ series CPU Unit Motion Control User s Manual W507 9 3 9 Motion Control Functions 9 1 2 Absolute Positioning Absolute positioning specifies the absolute coordinates of the target position in relation to home You can perform positioning such as shortest way positioning on a rotary table by setting the Count Mode to Rotary Mode and specifying the operation direction Velocity 3 Deceleration velocity Acceleration 0 Command Target position current position For details refer to the MC MoveAbsolute Absolute Positioning
459. s assigned to axis A2 Contains the axis number that is assigned to axis A3 1 This also includes states where processing is performed while in motion at a velocity of O 2 This variable is FALSE when all composition axes in the axes group are within the in position ranges set in the axis parameters NJ series CPU Unit Motion Control User s Manual W507 6 27 o o o lt o ona OD 3 Q 3 o S F fo o o Oo O r Oo 3 O Oo 3 mp 2 O1JUOD uono N 10 sejqeueA peurjep uejs S Jo Sale 9 9 6 Motion Control Programming 6 Cam Tables and Cam Data Variables The MC Function Module uses the cam profile curves that you create on the Cam Editor of the Sysmac otudio as cam tables The cam table data is handled as cam data variables in the user program in the NJ series Controller I Creating and Saving Cam Tables e S amp S a era aye Uploaded Sysmac Studio Used to create cam profile curves Spreadsheet software Used to edit cam tables in CSV format CPU Unit e ines After cam data is downloaded When power is _ iur ned ON CGam data variables ja Data movement instructions MC SaveCamTable instruction Non volatile memory Cam Table User program Use the Synchronization menu command of the Sysmac Studio to upload and download the project e Cam Table Data Flow 6 28 Use the Sysmac Studio
460. s for PLCopen Motion Control 6 3 6 2 2 Motion Control Instructions of the MC Function Module 6 3 6 3 State Transitions ossu thee ects ote dt ne ors we drew a Se a 6 4 6 3 1 Status of the Motion Control Function Module 6 4 6 32 AXIS Eder eit Eder em eue tee ee nd 6 4 6 3 3 Axes Group States 0 oo hrs Bh bees Re bx HES Gh RARE EY 6 6 6 4 Execution and Status of Motion Control Instructions 6 8 6 4 1 Basic Rules for Execution of Instructions 0 0000 eee eee eee 6 8 6 4 2 Execution Timing Charts 6 10 6 4 3 Timing Chart for Re execution of Motion Control Instructions 6 12 6 4 4 Timing Chart for Multi execution of Motion Control Instructions 6 13 6 5 engl c C rmn 6 14 6 5 1 TVDSS OL POSIHOLIS 1i dora inca rie POE ie oO EEN 6 14 6 5 2 Valid Positions for Each Axis Ivpe llle 6 14 6 6 System defined Variables for Motion Control 6 15 6 6 1 Overview of System defined Variables for Motion Control 6 15 6 6 2 System for System defined Variables for Motion Control 6 17 6 6 3 Tables of System defined Variables for Motion Control 6 18 6 7 Cam Tables and Cam Data Variables 6 28 6 8 Programming Motion Controls Ll 6 32 6 9 Creating Cam Tables gege eege AE e Ee 6 34 NJ series CPU Unit Motion Control User s Manual W507 6 1 6 Motion C
461. s for the axes group the error handler for the device FaultHandler is executed Program the FaultHandler according to the device MC Axis000 MFaultL vl Active P d co CD mE O Kei 2 2 pe 2 D X D o G O c Kei zi C Q O m a 2 0 D ok I O r O 2 FaultHandler FaultHandler EN MC Axis001 MFaultLvl Active MC GroupOO00 MFaultLvl Active If the Servo is ON for axis O and home is not defined the MC Home instruction is executed HM1 Pwri Status MC Axis000 Details Homed MC Axis000 Axis Axis Execute Done Busy Hm Bsy CommandAborted Hm1 Ca Error Hm Er ErrorlD Hm1_ErrlD If the Servo is ON for axis 1 and home is not defined the MC_Home instruction is executed HM2 Pwr2 Status MC Axis001 Details Homed MC Axis001 Axis Axis Execute Done Busy Hm2 Bsy CommandAborted Hm2 Ca Error Hm2 Er ErrorlD Hm2_ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 25 10 Sample Programming 10 26 After home is defined for axis O and axis 1 the axes group is enabled GRP EN MC GroupEnable AxesGroup AxesGroup Execute Done Busy CommandAborted Error ErrorlD Hm1 D Hm2 D MC_Group000 I 34 MC_Group000 Status Disabled Grp_En_Bsy Grp_En_Ca Gm En Er Grp En ErrlD The input parameters for the MC MoveLinearAbsolute and MC GroupStop instructions are set Parameters for MC MoveLinearAbsol
462. s in Europe and a world wide membership IEC 61131 3 is an international standard for PLC programming e The website of headquarters of PLCopen in Europe is http www plcopen org 6 2 2 Motion Control Instructions of the MC Function Module There are three types of motion control instructions They are given in the following table Type Outline Common commands Common instructions for the MC Function Module Axis commands Instructions for MC Function Module to perform single axis control Axes group commands Instructions for MC Function Module to perform multi axis coordinated control For a list of the instructions that you can use with the MC Function Module refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 JOIJUOD UOUHOIN uedoo1dgd JO SYOO G uonoun Jj L c 9 NJ series CPU Unit Motion Control User s Manual W507 6 3 6 Motion Control Programming 6 3 State Transitions The states of axes and axes groups and state transitions caused by the execution of instructions are based on the technical specifications of function blocks for PLCopen motion control This section pro vides an overall description of the MC Function Module states and state transitions 6 3 1 Status of the Motion Control Function Module The overall states of the MC Function Module are described in the following table State name Definition MC Run Mode Motion control instructions are enabled The motion control instructio
463. s maximum velocity for the speci fied travel distance Performance of slave axis positioning operation is poor and the actual motion is slower than the command None None Correct the program or correct the electronic gear ratio so that the slave axis does not exceed the maximum velocity Remove the cause of poor slave axis following performance in the position ing operation Write the program or set the elec tronic gear ratio so that the slave axis does not exceed the maximum veloc ity Remove the cause of poor slave axis following performance in the position ing operation as best you can NJ series CPU Unit Motion Control User s Manual W507 Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Servo OFF Error 64570000 hex The Servo was turned OFF for an axis due to an axes group error Motion Control Function Module Source details Continuously timing The Servo for the axis turns OFF The Servo was turned OFF for an Find the cause of the error and take None axis due to an axes group error suitable measures None This error occurs for axes for which the Se
464. s required to complete positioning 64470000 hex 64480000 hex 64490000 hex 644A0000 hex 644B0000 hex 64560000 hex 64570000 hex 64580000 hex 11 12 In position Check Time Exceeded Following Error Limit Exceeded Immediate Stop Input Positive Limit Input Detected Negative Limit Input Detected Illegal Follow ing Error Servo OFF Error Absolute Encoder Cur rent Position Calculation Failed The in position check was not com pleted within the monitoring time The error between the command cur rent position and actual current value exceeded the Fol lowing Error Over Limit Value The immediate stop input turned ON The positive limit input turned ON The negative limit input turned ON The difference between the com mand position and the actual current position exceeds the range of 30 bit data when con verted to pulses The Servo was turned OFF for an axis due to an axes group error It was not possible to correctly restore the current position from the absolute encoder information that was saved when power was interrupted The positioning operation has poor following performance and the actual motion is slower than the command An immediate stop input signal was detected The immediate stop input signal is not connected correctly or the logic setting for the immedi ate stop input is wrong A positive limit input signal was detected The
465. s when Ready BOOL Axis Ready to execute TRUE when preparations for axis execution are finished and the axis is stopped _MC_AX XX Status Standstill is TRUE stopped Disabled BOOL Axis Disabled TRUE while the Servo is OFF for the axis The following axis states are mutually exclusive Only one can be TRUE at the same time Disabled Standstill Discrete Continuous Syn chronized Homing Stopping ErrorStop or Coor dinated Standstill BOOL Stopped TRUE while the Servo is OFF for the axis Discrete BOOL Discrete Motion TRUE while position control is executed toward the target position This includes when the velocity is O because the override factor was set to O dur ing a discrete motion Continuous BOOL Continuous Motion TRUE during continuous motion without a target position This state exists during velocity control or torque control This includes when the velocity is O because the target velocity is set to and when the velocity is O due to an override factor set to O during continu ous motion Synchronized BOOL Synchronized Motion TRUE during execution of synchronized control This includes waiting for synchronization after changing to synchronized control instructions BOOL TRUE when homing for the MC Home instruction Stopping BOOL Deceleration Stopping TRUE until the axis stops for a MC_Stop or MC_TouchProbe instruction This includes when Execute is TRUE after the axis stops for an MC_Stop instruction Axis
466. ser program from the Sysmac Studio For details refer to 6 8 Programming Motion Controls Downloading Axis Parameters and the User Program Download the axis parameters and user program to the CPU Unit Use the Synchronization menu command of the Sysmac Studio to download the project to the CPU Unit For details refer 3 2 2 Setting Procedure Executing the User Program Execute the user program and change the Enable input variable for MC_Power to TRUE to change the Servo Drive to the Servo ON state Change either the PositiveEnable or Nega tiveEnable input variable for the MC_MoveJog instruction to TRUE to jog NJ series CPU Unit Motion Control User s Manual W507 7 5 buibbof E Z 7 einpeooJg Hulbbor c 7 7 Manual Operation 7 3 2 Setting Axis Parameters Set the following axis parameters if you want to jog when home is not defined The following setting example is for a one axis device Servomotor Encoder resolution 20 bits rotation c Encoder output pulses per motor rotation 20 bits 1 048 576 Parameter name Axis Variable Name Axis Number Enabled Axes Axis Use Node Address Command Pulse Count Per Motor Rota tion Work Travel Distance Per Motor Rotation Software Limits Unit of Display Count Mode Maximum Velocity Maximum Jog Velocity Maximum Acceleration Maximum Deceleration 10mm 1 Ball screw pitch 10 mm h 1 rotation mm Ball screw Setting Axis1 1 Used axis Servo ax
467. ser s Manual W507 27 Unit Versions Unit Version Notation In this manual unit versions are specified as shown in the following table Product nameplate Ver 1 0 or later to the right of the lot number 28 Notation in this manual Unit version 1 0 or later Remarks Unless unit versions are specified the information in this manual applies to all unit versions NJ series CPU Unit Motion Control User s Manual W507 Related Manuals Related Manuals The following manuals are related to the NJ series Controllers Use these manuals for reference Manual name NJ series CPU Unit Hardware User s Manual W500 W501 NJ501 L IL TL JE W507 NJ501 L IL TL JE W502 NJ501 L IL TL JE W508 NJ501 L IL TL JE CJ1W L IL TL IE NJ501 L JL TL JE NJ series CPU Unit Soft ware User s Manual NJ series CPU Unit Motion Control User s Manual NJ series Instructions Reference Manual NJ series Motion Control Instructions Reference Manual CJ series Special Unit Manuals for NJ series CPU Unit NJ series CPU Unit Motion Control User s Manual W507 Model numbers Application Learning the basic specifi cations of the NJ series CPU Units including intro ductory information designing installation and maintenance Mainly hard ware information is pro vided Learning how to program and set up an NJ series CPU Unit Mainly software information is provided Learning about motion control se
468. sign is added during travel in the positive direction and a minus sign during travel in the negative direction O1JUOD uono N 10 sejqeueA peurjep uejs S Jo Sale 9 9 NJ series CPU Unit Motion Control User s Manual W507 6 21 6 Motion Control Programming 1 2 3 4 Variable name Data type Function _SMC_REF_EVENT EN CM Minor Fault Active BOOL Axis Minor Fault TRUE while there is an axis minor fault Occurrence Code WORD MC Common Minor Contains the code for an axis minor fault Fault Code The upper four digits of the event code have the same value SMC HREF EVENT Axis Axis Observation Active BOOL Axis E EN TRUE while there is an axis observation Occurrence Code WORD Axis Observation Contains the code for an axis observation Code The upper four digits of the event code have the same value SAXIS REF CFG Axis Basic Settings Gives the settings of the Axis Basic Settings parameters AxNo UNT Axis Number Contains the number of the axis AxEnable NT ees AXIS USE Axis Use Shows if the axis is enabled or disabled 0 mcNoneAxis Undefined Axis 1 mcUnusedAxis Unused Axis 2 mcUsedAxis Used Axis AxType eMC AXIS TYPE Axis Type Contains the axis type I O wiring is not required for variable axes 0 mcServo Servo axis 1 mcEncdr Encoder Axis 2 mcVirServo Virtual Servo Axis 3 mcVirEncdr Virtual Encoder Axis m 1 m Address Contains the EtherCAT slave add
469. sition for the value that is set after Long reals 0 homing Unit command units Homing Holding Set the holding time when you set the Homing Opera 0 to 10 000 100 Time tion Mode to a proximity reverse turn and holding time Unit ms NJ series CPU Unit Motion Control User s Manual W507 5 Motion Control Parameters Homing Compensa Set the homing compensation value that is applied Long reals 0 tion Value after the home is defined Unit command units Homing Compensa Set the velocity to use for homing compensation Positive long reals 1 000 tion Velocity Unit command units s 1 These parameters are for homing operation Refer to Section 8 Homing for details 2 This setting can be used for an OMRON G5 series Servo Drive with built in EtherCAT communications In the default setting of the OMRON Gs5 series Servo Drives the external home input is allocated to latch 1 The allo cation of latch 1 can be changed using a servo parameter object in the Servo Drive Refer to the OMRON G5 series AC Servomotors Servo Drives with Built in EtherCAT Communications User s Manual Cat No 1576 for details 5 2 10 Axis Parameter Setting Example This section provides examples of axis parameter settings related to positioning I Single axis Positioning The following example is for a device that performs single axis positioning separately for each of two axes e N gt x 0 U 9 D 3 D D m
470. sition using the new absolute coordinates However the travel distance will stay the same when you position to a relative value la Precautions for Correct Use e When the Count Mode is Rotary Mode an instruction error will occur if you specify a position outside the ring counter range e After changing the current position the home will be undefined and you will not be able to use the following functions and instructions Software limits High speed homing Interpolation instructions linear and circular interpolation e Timing Chart for Execution While Axis Is Stopped Execute Busy Active Done EN Additional Information p co Oo D Tl c 5 ct O 5 0 You can change the actual position while home is defined by specifying a zero position preset for the MC Home instruction For details on the MC SetPosition instruction refer to the NJ series Motion Control Instructions Refer ence Manual Cat No W508 uonisog uana y HuibueyyD 1 8 6 NJ series CPU Unit Motion Control User s Manual W507 9 65 9 Motion Control Functions 9 8 2 Torque Limit The output torque is limited by enabling and disabling the torque limit function of the Servo Drive and by setting the torque limit value Different limits can be specified for the positive torque limit and negative torque limit For details refer to the MC SetTorqueLimit instruction in the NJ series Motion Control Instructions Ref
471. sks are attributes of programs that determine the execution conditions and sequence of the pro grams The NJ series CPU Units support the following tasks Type of task Task name Tasks that execute programs at a fixed period Primary periodic task Periodic tasks execution priority 16 17 and 18 Refer to the NJ series CPU Unit Software User s Manual Cat No W501 for details on programs tasks and setting methods I Types of Tasks and Task Priority The NJ series CPU Unit can execute the user program with a single task or multiple tasks Tasks have an execution priority Tasks with the highest execution priority are executed first If the execution condi tions are met for another task with a higher execution priority while a task is under execution the task with the higher execution priority is given priority in execution The following table lists the tasks in which you can use motion control instructions and the task priorities for the NJ series CPU Unit Number of Primary 1 4 fixed This task executes UO refreshing programs and motion con periodic task trol in the specified task period This task has the highest exe cution priority of all tasks and can be executed quickly and precisely Therefore this task is best suited for situations when synchronized control or highly responsive control is required Use the primary periodic task to execute all control with a sin gle task Periodic tasks O or 1 16 These tasks execut
472. smac Studio Version 1 Operation Manual Cat No W504 for specific procedures NJ series CPU Unit Motion Control User s Manual W507 6 33 6 Motion Control Programming 6 9 Creating Cam Tables This section will explain how to use the Cam Editor of the Sysmac Studio to create a cam table Hefer to the Sysmac Studio Version 1 Operation Manual Cat No W504 for details on the Cam Editor Adding a Cam Profile Right click Cam Data Settings in the Multiview Explorer and select Cam Profile NJ Series from the Add Menu Fs Sysmac Studio US ES A gi 23 a d A 7 New Project A Configurations and Setup Y u new_NJ501_0 M w Configurations and Setup A cam profile is added to the Multiview Explorer You can change the name of the cam profile as required from the default name of CamProfileO New Project Ew Configurations E Setup VAE Toolbox new_NJ501_0 v l Y Configurations and Setup gt i Motion Control Setup YV amp Cam Data Settings Event Settings 2 Editing the Cam Profile Right click the cam profile in the Multiview Explorer and select Edit from the menu 6 34 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming Es Sysmac Studio DER File Edt view set Projet Controler simulation Tools Teen TT FN aleacxcaacp x A Configurations and Setup d Qu E new NJ501 0 idi T lt Clearsearch gt search gt M
473. so the same as the process data communications cycle for EtherCAT communications Periodic task execution is synchro nized with the primary period Set the task period of a periodic task as an integer multiple of the primary period For example if the primary period is 1 ms then you can set the task period of a priority 16 peri odic task to 4 ms In that case the start of the period for the primary periodic task and the periodic task will match once every four primary periods The following table lists the possible combinations of pri mary periodic task and periodic task periods Primary period 500 us 1 Valid task periods for periodic tasks ms 2 ms 3 ms 4 ms 5 ms 8 ms 10 ms 15 ms 20 ms 25 ms 30 ms 40 ms 50 ms 60 ms 75 ms or 100 ms 1 ms 1 ms 2 ms 3 ms 4 ms 5 ms 8 ms 10 ms 15 ms 20 ms 25 ms 30 ms 40 ms 50 ms 60 ms 75 ms or 100 ms 2 ms 2 4 ms 4 ms 4 ms 8 ms 10 ms 20 ms 30 ms 40 ms 50 ms 60 ms or 100 ms ms 8 ms 20 ms 40 ms 60 ms or 100 ms NJ series CPU Unit Motion Control User s Manual W507 2 Motion Control Configuration and Principles 2 3 2 Example of Task Operations for Motion Control Motion control instructions can be used in the primary periodic task or in a priority 16 periodic task This section provides examples of task operations I Using Motion Control Instructions in the Primary Periodic Task If high speed motion control is required place the motion control instr
474. sometimes abbreviated to MC Function Module Refer to the other NJ series user s manuals as required when using the MC Function Module in an application 2 2 NJ series CPU Unit Motion Control User s Manual W507 2 Motion Control Configuration and Principles 2 2 Motion Control Configuration A control system built with Servo Drives generally controls motor operation with a semi closed loop The semi closed loop uses an encoder attached to the motor to detect the amount of rotation that has been performed by the motor in response to the command value This is provided as feedback of the machine s travel distance The following error between the command value and actual motor rotation is calculated and control is performed to bring the following error to zero Y N O et Oo 5 O Oo p 9 O O 5 i amp c D ct Oo 5 In a machine configuration that uses the MC Function Module no feedback information is provided for the commands from the user program in the CPU Unit A feedback system is built into the Servo Drive NJ series CPU Unit Servo Drive i EtherCAT User program MC Function Communications Communica Module Master Module tions processing Command Motion Command i i interpretation control interpretation Instruction Data processing Status Position control Velocity FtherCAT control communications 1 1 A feedback system is not configured A feedback system is configured e When motion
475. ssrresrrrerrreen 5 12 defined home NJ series CPU Unit Motion Control User s Manual W507 Index LOOSING WEE 8 2 derivative data types ENEE 6 17 Discrete Moton BEE 6 19 GISDIACCINOINE agria ER 9 14 Dive Error Ip sion eee tore a ee ios pedit 6 20 Drive Error Reset Monitoring Time 5 12 Drive Internal Limiting eees eee 6 20 Big MN RN c 6 20 Drive Warning Input vs EE 6 20 E electronic gear ratio unit conversion formula 5 10 ENCOdEr PATE ee te altel che 3 2 5 6 Encoder Ke 5 13 5 15 enumerated data types ssessseseeeeseeeeeee 6 17 italien esiin EET QOO 11 3 Error Deceleration Stopping 6 19 6 25 error status variables uk 11 4 EE E UE MM M 1 2 EtherCAT communications and motion control 2 11 EtherCAT Master Function Module 2 2 EE EE 11 10 EENEG ween sau Les E duds 11 6 UR E 11 10 ET 11 2 11 10 External Latch Input T Eeer 6 20 External Latch Input 2 ee 6 20 F finite length axis E 5 13 following error counter reset ssssssssssss 9 70 following error monitoring eeeesereeeeees 9 69 Following Error Over Value seseeesss 5 13 Following Error Warning Value 5 13 function blocks for PLCopen motion control 6 3 function spec
476. stance obtains per mission to control the applicable axis The output variable Active may change slower than the Busy variable 4 suononJjsu JO uonnooex3 JO Sen siseg L p 9 1 Under the PLCopen specifications Error changes to FALSE and ErrorlD changes to 0 when Execute changes to FALSE When Error is TRUE the motion control instruction is not executed Instructions are not executed after an error is cleared even if Execute is TRUE Execute must change from FALSE to TRUE to execute the instruction Enable type motion control instructions are executed if their Enable variable is TRUE when an error is reset 2 When you program the instruction in a ladder diagram insert an input between the input variable Execute or Enable and the left bus bar If the instruction is connected directly to the left bus bar without an input an error occurs when the program is built Set the initial value for or omit any input variable that is reserved 3 If the condition expressions or set values for ST Structure instructions do not match the instructions in that statement are not executed For details refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 4 Refer to the NJ series Motion Control Instructions Reference Manual Cat No W508 for an output variable timing chart NJ series CPU Unit Motion Control User s Manual W507 6 9 6 Motion Control Programming la Precautions for Correct Use e Confirm that EtherCA
477. struction NJ series CPU Unit Motion Control User s Manual W507 5 Motion Control Parameters e For details on the MC Write Write MC Setting instruction refer to the NJ series Motion Instruc tions Reference Manual Cat No W508 la Precautions for Correct Use e Changes made using the MC Write Write MC Setting instruction will not be saved to non volatile memory in the CPU Unit If you cycle the power supply or download the settings from the Sysmac Studio the parameter settings in the non volatile memory are restored If you need to save settings to the non volatile memory use the Sysmac Studio to change the parameter settings and then download those settings to the CPU Unit The following sections provide details on the parameter settings that you can set from the Sysmac Stu dio o zech 1 mp Oo si O et Oo 5 NJ series CPU Unit Motion Control User s Manual W507 5 3 5 Motion Control Parameters 9 2 Axis Parameters 5 2 1 5 4 The axis parameters set the maximum velocity jerk homing and other items for the axes controlled by the MC Function Module There are axis parameters for each axis The NJ501 1300 has axis parame ters for 16 axes the NJ501 1400 has axis parameters for 32 axes and the NJ501 1500 has axis parameters for 64 axes The same parameter settings are provided for each axis This section describes only the parameters for axis 1 Axis Parameters Use the Sysmac Studio t
478. struction are set Stp_Dec LREAL 5000 0 The input parameters for the MC_Immediate Stop instruction are set Imd_Stp_SM eMC STOP MODE t mcFreeRunStop The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag TRUE END IF When StartPg is TRUE the Servo is turned ON for axis O if process data communications are active and normal IF StartPg TRUE AND EC PDSIlavTbI MC Axis000 Cfg NodeAddress TRUE AND EC CommErrTbI MC Axis000 Cfg NodeAddress FALSE THEN Pwr_En TRUE ELSE Pwr_En FALSE END_IF f a minor fault level error occurs for axis O the error handler for the device FaultHandler is executed Program the FaultHandler according to the device IF MC Axis000 MFaultL vl Activez TRUE THEN FaultHandler END IF If the Servo is ON for axis O and home is not defined the MC Home instruction is executed IF Pwr Status TRUE AND MC Axis000 Details Homed FALSE THEN Hm_Ex TRUE END_IF If homing is completed absolute positioning is executed IF Hm_D TRUE THEN Mv_Abs_Ex TRUE END_IF f StopOn is TRUE stopping is executed IF StopOn TRUE THEN Stp_Ex TRUE END_IF f the Error or CommandAborted output variable from the MC Stop instruction changes to TRUE the MC_ImmediateStop instruction is executed to stop immediately IF Stp_Err TRUE OR Stp_Ca TRUE THEN Imd_Stp_Ex TRUE END_IF AMC Power PWR NJ series CPU Unit Motion Control Use
479. struction is TRUE the MC GrouplmmediateStop instruction is executed to stop immediately GRP_IMD_STP Grp_Stp_Err Grp_Stp_Ca MC GrouplmmediateStop AxesGroup AxesGroup Execute Done Busy CommandAborted Error ErrorlD MC_Group000 Grp Imd Stp D Grp Imd Gm Bsy Grp Imd Gm Ca Grp Imd Stp Er Grp Imd Stp ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming N D H ST Programming 3 Oo f the input parameters for absolute linear interpolation and stopping the axes group are not set the target values 3 and other parameters are set ns IF InitFlag FALSE THEN S 3 33 o2 odo The input parameters for the MC MoveLinearAbsolute Absolute Linear Interpolation instruction are set Mv Lin Abs Pos 0 LREAL 3000 0 Mv Lin Abs Pos 1 LREAL 3000 0 Mv Lin Abs Vel LREAL 1000 0 Mv Lin Abs Acc LREAL 1000 0 Mv Lin Abs Dec LREAL 1000 0 Mv Lin Abs Jrk LREAL 1000 0 The input parameters for the MC_GroupStop instruction are set Grp Stp Dec LREAL 1000 0 Grp Stp Jrk LREAL 1000 0 The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag TRUE END IF When StartPg is TRUE the Servo is turned ON for axis O if process data communications are active and normal f process data communications are not active the Servo is turned OFF IF StartPg TRUE AND EC PDSIavTbI MC Axis000 Cfg Node
480. struction is executed in the task n do O et Oo O Oo p e U SR 3 Q S9 D N Primary period Primary period NS UPG MC UPG MC periodic task A double line means that E A dotted line e Ire all processing for that S Priority 16 represents a vansiio 10 ue ue task has been completed iX periodic task to another task jl c D D D c EE Peder A dashed dotted line means that processing for that task has been o interrupted 6 lO I O refreshing UPG User program execution MC Motion control Operation of the Primary Periodic Task Task period primary period Task execution time I O refresh Control processing D Col e E EIS 2 28 SI e GIS cje O Q O e el Refresh Sle User program Bice ml executed a S execution cl E d ole SIS sch 3 JE a O o P Processing Processing contents Output refresh data is created for Output Units that execute I O refreshing If forced refreshing is set the forced refreshing values are reflected in the output refresh data Output data processing Refresh execution This process exchanges data with I O Input data processing e Input refresh data is loaded from Input Units that execute I O refreshing If forced refreshing is set the forced refreshing values are reflected in the input refresh data that was read System common processing 1 e Variable refresh processing if there are accessing tasks is performed Motion inp
481. struction or the MC Stop instruction Command position Specify with Gear Operation Master Heference Numerator Actual position E Remainder Command position Most recent command position You can set the gear ratio numerator gear ratio denominator position type acceleration rate and deceleration rate for the slave axis to operate For the master axis you can specify the command posi tion actual position or most recent command position For details on gear operation refer to the MC Gearln Start Gear Operation MC GearOut End Gear Operation and MC Stop instructions in the NJ series Motion Control Instructions Reference Manual Cat No W508 NJ series CPU Unit Motion Control User s Manual W507 9 11 N d 3 a o I Q x o GA lt 3 Oo bet O 3 N o Q O o 3 e S O1 U0D POZIUOJUOUAS Jo Melo L Z 6 9 Motion Control Functions 9 2 3 Positioning Gear Operation This function specifies the gear ratio between the master axis and the slave axis and starts operation Positioning gear operation allows you to set the positions of the master and slave axes at which to start synchronization Start positioning gear operation with the MC GearlnPos instruction End synchroniza tion with the MC GearOut instruction or the MC Stop instruction Command position Specify with Reference Type Gear Operation Numerator Actual position Numerator Fenn Remainde
482. sures for the error Variable Assumed cause This is the attached information that is displayed by the Sysmac Studio or an NS series PT Provides precautions restrictions and supplemental information 1 One of the following Major fault Major fault level Partial fault Partial fault level Minor fault Minor fault level Observation Information 2 One of the following Automatic recovery Normal status is restored automatically when the cause of the error is removed Error reset Normal status is restored when the error is reset after the cause of the error is removed Cycle the power supply Normal status is restored when the power supply to the Controller is turned OFF and then back ON after the cause of the error is removed Controller reset Normal status is restored when the Controller is reset after the cause of the error is removed Depends on cause The recovery method depends on the cause of the error 8 One of the following System System event log Access Access event log 4 One of the following Continues Execution of the user program will continue Stops Execution of the user program stops Starts Execution of the user program starts NJ series CPU Unit Motion Control User s Manual W507 11 19 I N zi Oo c za 0 gt O Oo m 5 suonduoseq 1043 Z Z 11 Troubleshooting Error Descriptions User Program Controller Configurations and Setup Trans 10200000 hex fer E
483. t gt gt gt gt gt Data Movement gt gt gt gt gt gt gt SN Mamnry Card 192 168 250 1 PROGRAM mode When the following caution dialog box appears read the message carefully After you confirm safety click the OK Button FS Test Run x Caution Special care must be taken for this function because the motor rotates Be sure to carefully read the operation manual before executing this function Especially pay attention to the following When you press the Start operation button the motor will actually rotates at the specified velocity Carefully confirm that the motor operation does not cause any danger and then press the button The motors may not be stopped by the operations from the computer Install an external emergency stop device so that you can stop the motor immediately when required Perform the operation under the conditions where you can check the motor operation so that you can immediately take appropriate actions if motor operation causes a dangerous situation If you attempt to start the operation before establishing the EtherCAT communications a communications error will occur Be sure to establish the EtherCAT communications in advance During the operation only the commands from Sysmac Studio are accepted All commands from the CPU Unit will become invalid Before executing the operation confirm that the axis numbers of the target axes are correct Operation will be starte
484. t 0 0to 1000 0 300 0 Torque Limit Unit 96 f Positive Torque Limit 60EO hex and Negative Torque Limit 60E1 hex are mapped as PDOs the set values of these parameters are sent with EtherCAT process data communications If a torque limit is enabled with the MC SetTorqueLimit instruction the value that is specified with the input variable to the instruction is sent 5 2 6 Limit Settings Use the following parameters to select functions for limiting the following error and for software limits Software Limite Select the software limit function 0 to 4 0 0 Disabled Deceleration stop for command position Immediate stop for command position kA N P x 0 U 9 D j D D o Deceleration stop for actual position Immediate stop for actual position Positive Software Set the software limit in the positive direc Long reals 2 147 483 647 Limit tion Unit command units Negative Software Set the software limit in the negative direc Long reals 2 147 483 648 d Limit tion Unit command units no O Following Error Over Set the excessive following error check Non negative long r Value value Set 0 to disable the excessive follow reals 3 ing error check Unit command units o Following Error Set the following error warning check value Non negative long 2 Warning Value Set 0 to disable the following error warning reals that are less check Unit command units than or equal to the Fol
485. t necessary to change the default PDO map on the Sysmac Studio A 4 NJ series CPU Unit Motion Control User s Manual W507 Appendices I Relationships between MC Function Module and Process Data The functions of the MC Function Module are related to the information in the process data objects Depending on the EtherCAT slave configuration and functions that are used by the MC Function Mod ule you sometimes must change the relationships between the MC Function Module and the PDOs To access the settings click the Detailed Settings Button on the Axis Basic Settings Tab Page in the oysmac Studio A Configurations and Setup new_NJ501_0 M ME ES v Configurations and Setup Lei Axis Basic Settings uuy Axis use Used axis Axis type Servo axis Feedback control No control loop e Input device Node 10 Device R88D KNO1L ECT v Output device Detailed Settings Reset to Defaul w 42 Motion Control Setup vV amp Axis Settings 1 MC Axis000 0 ar 3 MC_Axis001 1 Function Name vice Process Data Output Controller to Drive O 1 Controlword Node 10 Device R88D KNO1L ECT CH1 v 6040h 00 0 Controlword L13 Target position Node 10 Device R88D KNO1L ECT CH1 v 607Ah 00 0 Target position 5 Target velocity Node 10 Device R88D KNO1L ECT CH1 v 60FFh 00 0 Target Velocity 7 Target torque Node 10 Device R88D KNO1L ECT CH1 v 6071h 00 0 Target Torque 9 Max profile Velocity Node 10 Device R88D KNO1L ECT CH1 v 607F
486. t the Servo Drive ee Position CSP and the current mode is CSP Mode 4 Control Mode CSV BOOL Cyclic Synchronous TRUE when the Servo is ON at the Servo Drive pe Velocity CSV and the current mode is CSV Mode 3 Control Mode CST BOOL Cyclic Synchronous TRUE when the Servo is ON at the Servo Drive IEEE Torque CST and the current mode is CST Mode 3 Control Mode 6 20 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming Variable name Data type Meaning Function SAXIS REF CMD Axis Command Values DATA LREAL Command Current Contains the current value of the command posi Position tion Unit command units When the Servo is OFF and the mode is not posi tion control mode this variable contains the actual current position LREAL Command Current Contains the current value of the command veloc Velocity ity Unit command units s A plus sign is added during travel in the positive direction and a minus sign during travel in the negative direction The velocity is calculated from the difference with the command current position When the Servo is OFF and the mode is not the position control mode the velocity is calculated based on the actual current position AccDec LREAL Command Current Contains the current value of the command accel Acceleration Decelera eration deceleration rate Unit command tion units s2 The acceleration deceleration rate is calculated from the dif
487. tails This variable gives the value of the Modes of Operation Display 6061 hex that is mapped to a PDO The conditions CSP CSV and CST changing to TRUE depend on the specifications of the Servo Drive Refer to the manual for the connected servo drive for details Always FALSE if Modes of Operation 6061 hex is not mapped in a PDO 6 22 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming e Relationship between Axis Variables and Axis Types Axis Variables are enabled or disabled according to the axis type Disabled members are FALSE or 0 The following table shows which members are enabled for each axis type Virtual Virtual Servo Encoder Variable name Data type servo encoder axis axis axis axis Kees Enabled Enabled BOOL ErrorStop asc Error Deceleration Enabled Enabled K Stopping Coordinated BOOL eerste Motion Enabled Enabled ide Boo Siandsi Enabled Enabled Enabled Enabled o o o lt o ona OD 3 Q SH gt 0 a S ent fo o o0 Oo Oo r O 3 O Oo 3 mp 2 Saturation eee 8 Nega BOOL Negative Direction Enabled Enabled Reay B00 SevoReay Embed 3j Dr ier BOOL Drive Errorinput Enabled 8 ILA CSP CSV BOOL Cyclic Synchronous Enabled Velocity CSV Control Mode CST BOOL Cyclic Synchronous Enabled Torque CST Control Mo
488. te Positioning 10 30 In this sample the starting point for homing is assumed to be where the home proximity input is ON The Homing Method is set to home proximity input OFF After homing is completed to define home absolute positioning is executed Home input detection direction Negative limit input signal egative limit input signa OFF B Q ON i ome proximity input signa OFF i H input signal M TUL ome input signa OFF Homing start direction Negative direction Positive direction Start Homing Absolute positioning completed completed Samples are provided for both ladder diagram and ST programming Axis Parameter Settings That Are Related to Homing Parameter name Seting Description Homing Method 4 Home proximity input OFF Home is defined where the home proximity input turns OFF Operation Selection at Posi 1 Reverse turn immediate The positive limit input is not used so the default tive Limit Input stop setting is used for this parameter Operation Selection at Neg 2 Reverse turn deceleration The axis decelerates to a stop and reverses direc ative Limit Input stop tion when the negative limit input is detected Homing Start Direction 2 Negative direction When homing is performed the axis starts moving in the negative direction Home Input Detection 1 Positive direction Home is detected while the axis moves in the pos Direction itive direction Main Varia
489. te1 Ca Error Write1 Err ErrorlD Write1_ErrlD If changing the setting of the In Position Check Time is completed he setting of the Positive Software Limit is changed WRITE2 MC_Write MC Axis000 Target Target Write1 D Write2 Sv SettingValue SettingValue Write2 D Execute Done Write2 Pn ParameterNumber Busy Write2 Bsy CommandAborted Write2 Ca Error Write2 Err ErrorlD Write2 ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 87 10 Sample Programming 10 88 If changing the setting of the Positive Software Limit is completed the setting of the Negative Software Limit is changed WRITES MC Write MC Axis000 Target Target Write2 D Write3 Sv SettingValue SettingValue Write3 D Execute Done Write3 Pn ParameterNumber Busy Write3 Bsy CommandAborted F Write3 Ca Error Write3 Err ErrorlD Write3 ErrID ST Programming The axis parameters are set When setting the parameters is completed nitFlag is changed to TRUE IF InitFlag FALSE THEN In position Check Time Write1 Sv UINT 10 10 Write Pn eMC PARAMETER NUMBER mclnPosTime Positive Software Limit Write2 Sv LREAL 10000 0 Write2 Pn eMC PARAMETER NUMBER 3t mcPosiSwLmt Negative Software Limit Write8 Sv LREAL 10000 0 Write3 Pn eMC PARAMETER NUMBER mcNegaSwLmt The Input Parameter Initialization Completed Flag is changed to TRUE InitFlag TRUE END_IF
490. ted Positive Software Limit Exceeded Negative Software Limit Exceeded In position Check Time Exceeded Following Error Limit Exceeded Immediate Stop Input Positive Limit Input Detected Negative Limit Input Detected Illegal Following Error Servo OFF Error Absolute Encoder Current Position Calculation Failed e Servo Main Circuit Power OFF Interrupt Feeding Interrupt Signal Missing Homing Opposite Direction Limit Input Detected e Homing Direction Limit Input Detected e Homing Limit Inputs Detected in Both Directions e Home Proximity Homing Opposite Direction Limit Input Detected e Home Proximity Homing Direction Limit Input Detected NJ series CPU Unit Motion Control User s Manual W507 Error name Home Input Homing Opposite Direc tion Limit Input Detected Home Input Homing Direction Limit Input Detected Invalid Home Input Mask Distance No Home Input No Home Proximity Input Slave Error Detected MC Common Error Occurrence Latch Position Overflow Latch Position Underflow Master Sync Direction Error Slave Disconnection during Servo ON Feed Distance Overflow Error in Changing Servo Drive Control Mode Master Axis Position Read Error Auxiliary Axis Position Read Error EtherCAT Slave Communications Error Other execution errors for motion con trol instructions 5 o lt it o z Oo m oO o e npo N uonounJ O4 UOD UOI o N eui 0 pay SJo4J3 c L LL 11 Troubl
491. ted the cam operation and the operation of the EndOfProfile End of Cam Cycle of the MC Camln instruction may not be as expected For details on the Set Cam Table Properties instruction refer to the MC SetCamrTableProperty Set Cam Table Properties instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 9 2 6 Synchronous Positioning This function performs positioning using a trapezoidal curve while synchronizing the specified slave axis to the specified master axis This is a type of electronic cam but it does not use cam tables created in the Cam Editor Operation starts when the MC_MoveLink Synchronous Positioning instruction is executed Use the MC_Stop instruction to stop the axes in motion Operation is performed for the Slave Slave Axis and the following are set Master Master Axis MasterDistance Master Distance Mas terDistancelnACC Master Distance In Acceleration MasterDistancelnDEC Master Distance In Decel eration SlaveDistance Slave Axis Travel Distance and MasterStartDistance Master Following Distance The command position or actual position can be specified for the master axis You can spec ify one of the following as the start condition for synchronous operation start of instruction when trigger is detected or when master axis reaches the master following distance N di a D I Q x o o lt O O 3 N D Q CH O e The velocity
492. ted to an OMRON G5 series Servo Drive with built in EtherCAT communications Item Description Single Single axis Absolute positioning The absolute target position is specified to perform position axes position ing control Relative positioning The travel distance from the command current position is specified to perform positioning Interrupt feeding Positioning is performed for the specified travel distance from the position where an external device triggers an interrupt input Single axis Velocity control Velocity control is implemented in Position Control Mode velocity Cyclic synchronous A velocity command is output each control period in Velocity control velocity control Control Mode Single axis Torque control The torque of the motor is controlled torque con trol Single axis Starting cam operation Cam operation is started using a specified cam table synchro Ending cam operation Cam operation is ended for the axis specified with the input ee SE parameter ro Starting gear operation The gear ratio between the master axis and the slave axis is specified and gear operation is started Positioning gear opera The gear ratio between the master axis and the slave axis tion and the position to synchronize are specified and gear oper ation is started Ending gear operation The current gear operation or positioning gear operation is stopped Synchronous position Positioning is performed in sync with the specified
493. ted will change to TRUE when another operation variable Command instruction interrupts the commanded operation For the MC Function Module this vari Aborted able will change to TRUE when a motion control instruction is executed and the target axis or axes group causes an error or is decelerating to a stop All other output variables change to FALSE when CommandAborted changes to TRUE Input variables out The instruction instance will output an error when it is executed with an input variable that side of valid range is outside of the valid range Operation of output The output variable Busy is TRUE when the instruction instance is executing Busy will variable Busy change to TRUE when the input variable Execute changes to TRUE Busy will change to FALSE when the output variable Done CommandAborted or Error changes to TRUE It is impossible to know when the above output variables will change Write your programs so that the instruction instance executes every period 3 while Busy is TRUE so that you can monitor for changes in the output variables For a single axis or single axes group the Busy variable of more than one instruction instance can be TRUE at the same time However the output variable Active of only one instruction instance can be TRUE at one time However the MC_Phasing Shift Master Axis Phase instruction is an exception to this rule Output variable Active The output variable Active changes to TRUE when the instruction in
494. ter Time Constant Set the percentage of the maximum decelera 0 to 100 0 tion rate at which to output a deceleration warning for the axis No deceleration warning is output if O is set Unit 96 Set the torque command value at which to out 0 to 1 000 0 put a positive torque warning No positive torque warning is output if O is set Unit 96 Set the torque command value at which to out 0 to 1 000 0 put a negative torque warning No negative torque warning is output if O is set Unit 96 Set the time period to calculate the average 0 to 100 0 travel of the actual velocity in milliseconds The average travel is not calculated if O is set Unit ms Use this to reduce variations in the actual cur rent velocity when axis velocity is slow In position Range Set the in position width Unit command Non negative long 10 units reals 0 In position Check Time Set the in position check time in milliseconds O to 10 000 Set 0 to check for the end of positioning only when you define the home position during homing and not check positioning at other times Unit ms Zero Position Range Set the home position detection width Unit Non negative long 10 command units reals 1 The maximum velocity is used as the command velocity if you specify a velocity command value that is greater than the maximum velocity This parameter also applies to interpolation control operation 2 The maximum jog velocity is
495. the EtherCAT slave that is allocated to an axis Performance of positioning operation is poor and the actual motion is slower than the com mand The command velocity exceeded the velocity warning value The command acceleration rate exceeded the acceleration warning value NJ series CPU Unit Motion Control User s Manual W507 p Level O Reference page 11 41 page 11 43 page 11 44 page 11 44 page 11 45 page 11 45 page 11 46 Deceleration Warning 644F0000 hex 64500000 hex 64510000 hex 64520000 hex 64530000 hex 64540000 hex 64550000 hex 74320000 hex 743C0000 hex Positive Torque Warn ing Negative Torque Warn ing Command Position Overflow Command Position Underflow Actual Posi tion Overflow Actual Posi tion Under flow Slave Obser vation Detected Cannot Exe cute Save Cam Table Instruction The command deceleration exceeded the deceleration warn ing value The torque com mand value exceeded the posi tive torque warning value The torque com mand value exceeded the nega tive torque warning value The number of pulses for the com mand position over flowed The number of pulses for the com mand position exceeded the valid range It under flowed The number of pulses for the actual position overflowed The number of pulses for the actual position under flowed A warning has been detected for
496. the axis is stopped and execution preparations are completed Error Deceleration In this state the Servo is OFF for the axis the axis is stopped and an axis error Stopping has occurred Servo ON In this state the Servo is ON for the axis Stopped In this state the Servo is ON for the axis and the axis is stopped Discrete Motion In this state positioning is performed for the specified target position This includes when waiting the in position status and when the velocity is 0 because the override factor was set to O during a discrete motion Continuous Motion In this state continuous motion control is executed with no specified target position This state exists during velocity control or torque control This includes when the velocity is O because the target velocity is set to and when the velocity is O due to an override factor set to O during continuous motion Synchronized Motion In this state the synchronized control is performed for the axis with synchro nized control commands This includes waiting for synchronization after chang ing to synchronized control instructions Deceleration Stopping In this state the axis is stopping due to a MC Stop or MC TouchProbe Enable External Latch instruction This includes when Execute is TRUE after stopping for the MC Stop instruction In this state it is not possible to execute axis oper ation commands If an attempt is made to execute one CommandAborted for the instruction changes
497. the in position check time in millisec O to 10 000 Time onds Set 0 to check for the end of position ing only when you define the home position during homing and not check positioning at other times Unit ms Software Limits Select the software limit function 0 to 4 0 0 Disabled 1 Deceleration stop for command position 2 Immediate stop for command position 3 Deceleration stop for actual position 4 Immediate stop for actual position Positive Software Set the software limit in the positive direc Long reals 2 147 483 647 Limit tion Unit command units Negative Software Set the software limit in the negative direc Long reals 2 147 483 648 Limit tion Unit command units Following Error Over Set the excessive following error check Non negative long Value value Set 0 to disable the excessive follow reals ing error check Unit command units Following Error Set the following error warning check value Non negative long Warning Value Set 0 to disable the following error warning reals that are less check Unit command units than or equal to the Following Error Over Value Specifying Target Positions for Axis Operations The actual position or distance for a positioning motion is specified with the Position Target Position and Distance Travel Distance input variables to the motion control instruction Monitoring Positions You can read Axis Variables in the user program to monitor pos
498. ti axes coordinated control is used to reduce shock on the machine by smoothing the inter polation acceleration deceleration rate along the interpolation path into an S curve The unit is the same as for single axes command units s3 Specifying Jerk for Axes Group Motion The jerk used in an actual interpolation is specified by the Jerk input variable to the motion control instruction Jerk Example Setting Other than 0 The acceleration deceleration rate will change at a constant rate over the range where jerk is specified The command interpolation velocity will form a smooth S curve A fixed interpolation acceleration rate is used in areas where the jerk is set to 0 This command interpolation velocity will form a straight line Interpolation velocity Oe P N O Oo 3 3 Oo 3 TI c 3 O Oo 3 o0 Oo c fo X D o O Oo Oo 2 gt fo mp o o O Oo 3 mp 9 Acceleration 4 een zm zm zm Ee zm zm zm zm E zm zm zm d zm zm zm zm zm zm zm zm zm zm zl zm zm zm zm pm zm zm zm zm em zm zm pm rm zm zm zm rm zm zm zm wm em wm ke wm wm wm eb ew ew wm wm em wm mm mm ewww wm mm mm wwe mm mm wm Deceleration i d e EE mg Time rate Ur pU ptt tat demm gege EE ee k a Vt Specified interpolation velocity At Specified acceleration rate Dt Specified deceleration rate Jt Specified jerk OJ1UO2 pe1euipJoo2 sexe nin N
499. ting the Program Right click a section in the new program and select Edit from the menu The Program Edit Tab Page is displayed 6 32 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming 5 Sysmac Studio BEE nee _ f fl Go E A i i New Project T H Programming LQ new NJ501 0 v Y Configurations and Setup pue Initial Value AT Retain Constant Comment gt Dj EtherCAT gt i Motion Control Setup amp Cam Data Settings gt Event Settings LA Settings H Data Trace Settings c i Programming Es Sysmac Studio Elle Edit View Insert Project Controller Simulation Zock Help a LM ILE New Project _ o Toolbox T T gt Math Y Motion Control new NJ501 0 Y Configurations and Setup mm Data Type Initial Value MC_AbortTrigger MC_AxesObserve gt i Motion Control Setup MC_CamIn amp Cam Data Settings MC_CamOut MC_CombineAxes MC GearIn MC GearInPos MC GearOut T Co U o e D 3 3 gt e O et o 3 O o gt e o o MC GroupDisable MC GroupEnable MC GroupImmediateStop MC GroupReset MC GroupSetOverride 88 8g a eis Bid Bid aia a L ale SH MC Camin Start Cam Operation The MC Camin instruction starts a cam operation by using a specified cam table Refer to the NJ series CPU Unit Software User s Manual Cat No W501 for details on programming Hefer to the Sy
500. tings in the Sysmac Studio are listed in the following table Required objects are marked with a star Function name Description Channel 1 Channel 2 Software Switch of 4020 hex 01 0 4020 hex 02 0 Set the instruction bits Set the Encoder s Input Slave Instruction Bits Instruction Bits objects given at the left for each channel Li Precautions for Correct Use e f you change the settings make sure that the desired operations are performed for the MC Function Module and process data settings NJ series CPU Unit Motion Control User s Manual W507 A 13 gt N O o 3 2 D 2 Q e o m 2 O o ch D 5 o c e ge 3 2 m 0 sjeuiuue Indu 19poou3 10 sbumegs Z Z Y Appendices Input Settings Servo Drive to Controller This is the status data from the Encoder Input Terminal to the MC Function Module The default set tings in the Sysmac Studio are listed in the following table Required objects are marked with a star Process data Channel 1 Channel 2 Function name Description Position actual 4010 hex 01 0 value Position Value Touch probe posi 4012 hex 01 0 tion 1 position value Latch Value A Touch probe posi 4013 hex 01 0 tion 2 position value Latch Value B Status of Encoder s 4030 hex 01 0 Input Slave Status Bits la Precautions for Correct Use 4010 hex 02 0 Position Value 4012 hex 02 0 Latch Value A 4013 hex 02 0 Latch Value
501. tinues Operation tion status BOOL Axis Minor Fault Occurrence MC AX MFaultLvl Active There was no home proximity signal input during the homing operation when a home proximity input signal was specified None None Check the home proximity input set tings and wiring and correct them so that the home proximity signal is input during homing based on the operation specifications of the MC Home instruction Name Set the system so that the home prox imity signal is input during the homing operation Also check to make sure there are no wiring problems with the home proximity input NJ series CPU Unit Motion Control User s Manual W507 Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks 11 Troubleshooting Slave Error Detected 742F0000 hex An alarm was detected for the EtherCAT slave that is allocated to an axis Motion Control Function Module Source details Continuously timing The Servo for the axis turns OFF An error was detected for the Ether Check the error at the slave
502. tion Control Function Module Source details Axis Detection During instruc timing tion execution User program Continues Operation The axis decelerates to a stop The Enable External Latch instruction cannot retrieve the latch position MC AX MFaultLvl Active BOOL Axis Minor Fault Occurrence An underflow occurred for the latched Correct the program so that the axis Write the program so that the axis position for the MC TouchProbe position does not underflow position does not underflow Enable External Latch instruction None None Master Sync Direction Error 74360000 hex The master axis continued to move in the direction opposite to the sync direction Motion Control Function Module Source details Axis Detection During instruc e tion execution The axis AM to a stop The master axis continued to move in Correct the program so that the move Write the program so that the move ment direction and travel distance of ment direction and travel distance of the master axis are in the sync direc the master axis is the sync direction tion after the start of synchronization after the start of synchronization the direction opposite to the sync direction of the master and slave axes resulting in an overflow None None NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Event name Slave Disconnection during Servo ON 74370000 hex Meaning An EtherCAT slave that is allocated t
503. tion Control Instructions If the values of the input variables to the same instance are changed while the motion control instruction is under execution and Execute is changed to TRUE FALSE and then back to TRUE again operation will follow the new values The following timing chart is for when the velocity is changed for MC MoveAbsolute Absolute Position ing instruction Execute Busy V Active Y Done Error Target velocity 2 Target velocity 1 Time 6 12 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming For details on re executing instructions for the MC Function Module refer to 9 5 6 Re executing Motion Control Instructions and 9 7 4 He executing Motion Control Instructions for Multi axes Coordinated Control 6 4 4 Timing Chart for Multi execution of Motion Control Instructions Another instance can be executed for an axis during axis motion Set the input variable BufferMode to specify when to start operation The following figure shows an example in which BufferMode Buffer Mode Selection is set to aborting when MC MoveAbsolute Absolute Positioning instructions are executed with multi execution of instructions FB1 and FB2 in the following figure are the instance names of the instructions FB1 Execute A a Busy Active Done CommandAborted Error ErrorlD 16 0000 FB2 Execute E E G Busy Active
504. tion S Check Time Positive Software Limit and Negative Software Limit WE 33 3a I Main Variables Used in the Programming Samples Variable name Datatype Default Comment MC Axis000 sAXIS REF This is the Axis Variable for axis O InitFlag BOOL FALSE This variable indicates the status of parameter settings FALSE while parameters are changed TRUE after the changes to the parameters are completed StartPg BOOL FALSE This variable is used to execute the MC Write instruction i Ladder Diagram The axis parameters are set When setting the parameters is completed nitFlag is changed to TRUE InitFlag In position Check Time Write1 Sv UINT 10 10 Write1 Pn eMC PARAMETER NUMBER t mclnPosTime Positive Software Limit Write2 Sv LREAL 10000 0 Write2 Pn eMC PARAMETER NUMBER xt mcPosiSwLmt P N A N o z o O 0 lt Q 2 0 2 2 D o U pe pe D m D o Negative Software Limit Write3 Sv LREAL 10000 0 Write3 Pn eMC PARAMETER NUMBER mcNegaSwLmt The Initialization Completed Flag is changed to TRUE InitFlag TRUE ch OON OO P ON If StartPg is TRUE the setting of the In position Check Time is changed WRITE1 MC_Write MC Axis000 Target Target StartPg Write1 Sv SettingValue SettingValue Write1 D Execute Done Write1 Pn ParameterNumber Busy Write1 Bsy CommandAborted Wri
505. tion TRUE when the axis is in the range for home It gives an AND of the following conditions e Home defined e The actual current position is in the zero posi tion range with home as the center TRUE also when the zero position is passed by while the axis is moving in command status m 1 Command TRUE while the command velocity is limited to the eae maximum velocity during synchronized control S ee Command Direction Gives the command travel direction TRUE when there is a command in the positive direction TRUE when there is a command in the negative direction Gives the status of the Servo Drive DRV TRUE when the Servomotor is powered TRUE when the Sero fs ready TRUE when the Servo Drive main power is ON TRUE when the positive limit input is enabled TRUE when the negative limit input is enabled TRUE when the home proximity input is enabled TRUE when the home input is enabled 2 TRUE when the immediate stop input is enabled TRUE when latch input 1 is enabled TRUE when latch input 2 is enabled Drive Error Input TRUE while there is a Servo Drive error TRUE while there is a Servo Drive warning ILA BOOL Drive Internal Limiting TRUE when the Servo Drive limiting function actu ally limits the axis This corresponds to one of the following limits in the G5 series Servo Drive 3 Torque limits velocity limit drive prohibit inputs software limits CSP BOOL Cyclic Synchronous TRUE when the Servo is ON a
506. tions Remarks 11 30 Negative Limit Input Detected 644B0000 hex The negative limit input turned ON Motion Control Function Module Source details Continuously timing According to the Limit Input Stop Method A negative limit input signal was detected The negative limit input signal is not connected correctly or the logic set ting for the negative limit input is wrong None None Illegal Following Error Heset the error and move the axis back in the positive direction before it exceeds the limit in the negative direction Find the reason the limit was exceeded and make suitable cor rections If a negative limit input signal does not occur correct the connection of the negative limit signal and the logic setting for the negative limit input The goal is to detect the negative limit input Preventative measures are not required However be sure not to exceed the negative limit input when making programs Make sure that the negative limit sig nal connection and logic setting for the negative limit input are correct The difference between the command position and the actual current position exceeds the range of 30 bit data when converted to pulses Motion Control Function Module Source details Continuously a Variable Logcategory System The Servo for the axis turns OFF The command current position was restricted so that the axis velocity of the slave axis would not exceed the axi
507. tive Software Limit cccceceeccsseeeeeeeeeeeeeeeseaaeees 5 13 Positive Torque Warning Value 5 12 primary DOMOO NEE 2 5 2 13 ejua un e elle 2 4 process data communications cycle 2 13 process data objects PDOSs 2 11 program modified cam data ccccccccseseeeceeeeeeeeeenees 9 14 H Ready to Execute ege ee 6 25 re executing instructions ENER 9 35 re execution of instructions seeeeeseeeeeseses 9 56 relative DOSITIONING EE 9 4 Rota Mode memet Naan S N 5 14 S ACUN ee 9 31 service data objects SDOS sesssssss 2 11 EE ENEE a C 3 2 5 6 Servo Drive Settings ccccccssscceecssseeeeeceeseeeeeseeeeeeees 5 15 SEVO ON M 6 20 7 3 SEENEN E 6 20 single axis control COMMON TURCHONS tees ted Oo pa ee teal a redet 9 26 DOSHION COMUO ERE EET o 9 3 synchronized Control 9 11 torgue CONU OM toe 9 25 velocity Control et 9 23 Slave AXIS itep oa ea 9 14 SONWaAre LIS Ee 5 13 EE un DE 9 68 lr 11 6 SE 6 20 E Bn ee 9 15 SIOD DHOTIIGS eege 9 9 DIOP DEE Ber m tK PN 6 19 6 25 HOPPIN RE 9 6 stopping due to errors or other problems 9 7 9 50 immediate stop input eeeeseeeee 9 6 MONDOT era aesan aa IN 9 6 MC GrouplmmediateStop instruction 9 50 MC GroupStop instruction
508. tive and normal PWR1 MC_Power LockO MC Axis000 Axis Axis Pwr1_ Status Enable Status G Busy Pwri_Bsy Error Pwr1 Err ErrorlD Pwr1 ErrlD The Servo for axis 1 is turned ON if process data communications for axis 1 are active and normal MC Power Lock1 MC Axis001 Axis Axis Pwr2 Status Enable Pwr2 Bsy Pwra Err Pwr2_ErrlD If a minor fault level error occurs in the MC Common Error Status Variable or for any of the axes the error handler for the device FaultHandler is executed Program the FaultHandler according to the device FaultHandler EN FaultHandler MC Axis000 MFaultLvl Active MC Axis001 MFaultLvl Active MC COM MFaultLvl Active 4 If the Servo is ON for axis O and home is not defined the MC Home instruction is executed HM1 Pwr1 Status MC Axis000 Details Homed MC Axis000 i Axis Hm1_D Done Busy Hm1_Bsy CommandAborted Hm1_Ca Error Hm1_Err ErrorlD Hm1_ErrlD 10 80 NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o If the Servo is ON for axis 1 and home is not defined the MC Home instruction is executed m HM2 0 Oo H e Pwrl1 Status MC Axis001 Details Homed MC Axis001 i Axis Hm2_D o8 Done 5 3 Busy Hm2 Bsy odo CommandAborted Hm2 Ca Error Hm Err ErrorlD Hm ErrID If WriteCamData is TRUE and a cam table file is not being saved the values in the cam data variab
509. to See If Errors Are Reset 0 0 cece eee ees 10 18 10 2 7 Stopping Axes during Single axis Operation llle 10 20 10 2 8 Stopping an Axes Group in Coordinated Motion 10 24 10 2 9 Homing and Absolute Positioning 10 30 10 2 10 Changing the Target Position by Re execution of an Instruction 10 35 IESSE Iriterrupt Feedlhng 224 s beoe des dot o don be UE wee ae ke 10 41 10 2 12 Changing the Cam Table by Re execution of an Instruction 10 45 10 2 13 Using a Cam Profile Curve to Correct the Sync Start Position 10 54 10 2 14 Shifting the Phase of a Master Axis in Cam Motion 10 64 10 2 15 Changing the Actual Position during Velocity Control 10 72 10 2 16 Changing a Cam Data Variable and Saving the Cam Table 10 78 10 2 17 Temporarily Changing Axis Parameters 0 00 cee ee eee 10 87 10 2 18 Updating the Cam Table End Point Index 10 90 NJ series CPU Unit Motion Control User s Manual W507 10 1 10 Sample Programming 10 1 Overview of Sample Programming I This section provides information that applies to all of the sample programming i Precautions for Correct Use e The sample programming that is provided includes only programming that uses the MC Func tion Module e When programming actual applications also program device interlocks I O with other devices and other control procedures e Create a user
510. to download the cam profile curves that you created in the Sysmac Studio to the CPU Unit to save them as cam tables in the non volatile memory in the CPU Unit The saved cam tables are implemented as cam data variables in the main memory after you download them or when the power is turned ON You can use the user program to edit cam data variables in the main memory Refer to 9 2 5 Cam Tables for information on cam data variables The motion control instruction MC SaveCamTable saves the cam data variables in the main memory to non volatile memory For details on the MC SaveCamrTable instruction refer to the NJ series Motion Control Instruc tions Reference Manual Cat No W508 You can upload and download cam tables regardless of the operating mode of the CPU Unit mode or the status of the MC Function Module You cannot upload cam data download cam data start online operation perform online editing or start data traces during a cam table save operation The MC SaveCamrTable instruction is not executed during online editing All axes in motion will decelerate at the maximum deceleration rate and the Servo will turn OFF when you start the download process NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming Vi Precautions for Correct Use e f you change any cam data in the user program those changes are lost and the cam table in non volatile memory is restored if you restart the power or download
511. topping 6 25 Error Deceleration Stopping 6 19 MC GRP 0 31 Status Moving Moving 6 25 MC AX 0 63 Status Homing Homing 6 19 MC GHP O0 31 Status Ready Ready to Execute 6 25 _MC_AX 0 63 Status Ready MC GHP 0 31 Status Standby Stopped 6 25 Axis Ready to execute eueeeeeeeessee 6 19 MC GHP 0 31 Status Stopping MC AX 0 63 Status Standstill Stopped 6 19 Deceleration Stopping 6 25 MC AX 0 63 Status Stopping MC GHRP ErrSta Axes Group Error Status 11 4 Deceleration Stopping essssssss 6 19 ga Lae et iu aec cn 11 6 MC AX 0 63 Status Synchronized Modulo Maximum Position Setting Value 5 13 5 15 Synchronized Motion ccccccsseseeeeeeeeeeeeeeeeeeeeens 6 19 Modulo Minimum Position Setting Value 5 13 5 15 MC AX ErrSta MC Error Status 11 4 Motion Control Function Module 2 2 MC COM MC Common Variable 6 18 motion control instructions 6 3 MC COM MFaultLvl Active ee E 6 10 MC Common Minor Fault Occurrence 6 18 exclusiveness of outputs seseeussss 6 8 MC COM MFaultLvl Code Exe
512. transferring data from the Sysmac Studio to the physical Controller and upload refers to transferring data from the physical Controller to the Sysmac Studio For the Sysmac Studio synchronization is used to both upload and download data Here synchronize means to automatically compare the data for the Sysmac Studio on the computer with the data in the physical Controller and transfer the data in the direction that is specified by the user 8 NJ series CPU Unit Motion Control User s Manual W507 Sections in this Manual Sections in this Manual Sample Programming Introduction to the Motion Control Function Module Motion Control Configuration and Principles Configuring Axes and Axes Groups Checking Wiring from the Sysmac Studio Motion Control Parameters Troubleshooting Appendices Motion Control Programming Manual Operation Motion Control Functions NJ series CPU Unit Motion Control User s Manual W507 9 Sections in this Manual 10 NJ series CPU Unit Motion Control User s Manual W507 CONTENTS CONTENTS EE NUEVO GUC HON EE 1 Relevan MAM UNS cisien a Eiaa 2 Mantial COnfiGuration BE 3 Manual Structure EE 7 Sections in this UE UE 9 Read and Understand this Manual 1 EEN RER EE rennen 17 Safety DE de e 21 Precautions Tor Sale RTE 22 Precautions Tor Ekel Eege eege 23 Regul
513. treated as the zero position in the user program This is the same position as home if the home position is not changed NJ series CPU Unit Motion Control User s Manual W507 Term following error following error reset cam profile curve cam data cam data variable cam table override jerk Appendices Description The difference between the command current position and actual current position There is a following error only in position control mode Other modes do not have a command current position The following error is also called the following error counter value and the remaining pulses Setting the following error to zero A curve that shows the relationship between phases and displacements in a cam operation The cam profile curve is created on the Sysmac Studio Data made up of phases master axis and displacements slave axis for cam oper ation A structure array variable for cam data It contains phases and displacements and is defined as a structure array A data table that contains cam data Use the Sysmac Studio to download the cam profile curves that you created with the Cam Editor to the CPU Unit to save them as cam tables in the non volatile memory in the CPU Unit A function that allows the operator to temporarily change programmed values during operation The rate of change in the acceleration or deceleration rate If you specify the jerk the velocity graph will form an S curve
514. trol cccccsessceseeseeeesseeeeaseeeeesseeeesseeeeaseeoeeseeeeeneeeeeaseesenseeneas 9 11 9 2 1 Overview of Synchronized Control 9 11 9 2 2 EE 9 11 9 2 3 Positioning Gear lee EE 9 12 9 2 4 EE 9 13 9 2 5 en Re 9 14 9 2 6 NEIEGKEETEN ee 9 19 9 2 7 CoOmMmbDINING AOS onson cc CR 9 21 9 2 8 Master Axis Phase ShiE EE 9 22 9 3 Single axis Velocity E a d E 9 23 9 3 1 Velocity CONO EE 9 23 9 3 2 Cyclic Synchronous Velocity Control 9 24 9 4 Smgle axis Torque Control 5 2 1 0012 aaa as ax Decreto egre ce en e eee bra eas E ce eoe Ea OE 9 25 9 5 Common Functions for Single axis Control eeeseeeee eere eren een 9 26 9 5 1 mores c x MHM ihaned 9 26 9 5 2 NOOC MEI IER 9 28 9 5 3 Acceleration and Deceleration kk 9 29 9 5 4 jj C 9 31 9 5 5 specifying bueden MRT ten DE 9 32 9 5 6 Re executing Motion Control Instructions REENEN REENEN 9 35 9 5 7 Multi execution of Motion Control Instructions Buffer Model 9 41 9 6 Multi axes Coordinated Control KEEN aaaea rese nenne nnne annnm n nnn 9 46 9 6 1 eiruMefGuruene c asec acts ea ne cece es hess bee ee eA 9 46 9 6 2 WIGAN MLCT DOIATOM EE 9 48 9 6 3 CiPGUlAR ag OLA OM EE 9 49 9 6 4 Stopping Under Multi axes Coordinated Control 9 50 9 6 5 Overrides for Multi axes Coordinated Control 9 51 9 7 Common Functions f
515. troller Setup w i Motion Control Setup t Axis Settings Axes Group Sef amp Cam Data Settings A A Configurations and Setup LC ped Node Address Network configuration _ Master E001 R88D KNO1H ECT Rev 2 1 E002 MC Monitor Table F Event Settings E Task Settings F Data Trace Settings Axis Setting Table ysmac Studio Item name Model Product name Revision Node Address Enable Disable Settings Serial Number PDO Map Settings Distributed Clock Enable Reference Clock Setting Parameters Backup Parameter Settings Device name Set a name for the slave DIS All vendors Groups Servo Drives EQ Frequency Inverter Digital 10 Analog 10 Encoder Input LM Input Keyword Show hidden slaves R88D KN30F ECT Rev 2 1 R88D KN30F ECT G5 Series ServoDrin R88D KN30H ECT Rev 2 1 R88D KN30H ECT GS Series ServoDri R88D KNSOF ECT Rev 2 1 RSSD KNSOF ECT G5 Series ServoDrh R88D KNSOH ECT Rev 2 1 R88D KN5OH ECT G5 Series ServoDri R88D KN75F ECT Rev 2 1 R88D KN75F ECT G5 Series ServoDri R88D KN75H ECT Rev 2 1 R88D KN75H ECT G5 Series ServoDri R88D KNASL ECT Rev 2 1 RB8D KNASL ECT G5 Series ServoDri 3G3AX MX2 ECT Rev 1 1 3G3AX MX2 ECT EtherCAT Communit E GX ID1611 XWT IDOB 2 tier termin Model GX ID1611 HID08 Product name GX ID1611 XM yong Revision 1 1 Vendor OMRON Corporation Comment 2 tier terminal block URL DIS V d m New Project new NJ501 0 Con
516. truction It is used in ST programming FALSE This variable is used to execute the GRP IMD STP instance of the MC GrouplmmediateStop instruction It is used in ST programming Grp Stp Ca BOOL Grp Stp Err BOOL StartPg BOOL StopOn BOOL InitFlag BOOL Grp En Ex BOOL Mv Lin Abs Ex BOOL Grp Stp Ex BOOL Grp Imd Stp Ex BOOL NJ series CPU Unit Motion Control User s Manual W507 10 Sample Programming o N e D I Ladder Diagram D Oo ug When StartPg is TRUE the status of process data communications of axis 0 is checked to see if communications are active and normal 2 StartPg _EC_PDSlavTblI MC_Axis000 Cfg NodeAddress EC CommErrTbI MC Axis000 Cfg NodeAddress Lock E 3 3 o gt odo When StartPg is TRUE the status of process data communications of axis 1 is checked to see if communications are active and normal StartPg EC PDSIavTbI MC Axis001 Cfg NodeAddress EC CommErrTbI MC Axis001 Cfg NodeAddress Loch E Led The Servo for axis O is turned ON if process data communications for axis O are active and normal PWR1 MC_Power LockO MC Axis000 Axis Axis Pwr1 Status Enable Status Busy Pwr1_Bsy Error Pwr1 Err ErrorlD Pwr1 ErrlD The Servo for axis 1 is turned ON if process data communications for axis 1 are active and normal PWR2 Lock1 MC Axis001 Axis Axis Pwr2 Status Enable Status Busy Pwr2 Bsy Error Pwra Er ErrorlD Pwr2_ErrlD If a minor fault level error occur
517. ts Unit of Display Set the unit for command positions 0 to 5 0 pulse mm um nm Command Pulse Set the number of pulses per motor rotation 1 to 4 294 967 295 10 000 Count Per Motor for command positions according to the Rotation encoder resolution 2 The command value is converted to a number of pulses based on the electronic gear ratio Work Travel Dis Set the workpiece travel distance per motor 0 000000001 to 10 000 tance Per Motor rotation for command positions 4 294 967 295 Rotation 9 This is the numerator of the electronic gear ratio unit conversion formula 2 For example if the encoder resolution is 10 000 pulses rotation set 10 000 8 This is the denominator of the electronic gear ratio unit conversion formula Positions are generally given in pulses between the MC Function Module and Servo Drives or encoder input terminals Use a display unit of millimeters or degrees for motion control instructions so that you can easily understand the operation Pulses Position Motion MC increment Control Function Module User program instructions Encoder Input Terminal Pulses You can use the Unit of Display parameter and electronic gear unit conversion formula settings to change from a pulse unit to millimeters or degrees Unit of Display You can use the Unit of Display parameter to set the unit to display on the Sysmac Studio The display shows the position s display unit The following ta
518. ts variables Cause and correction Attached information Precautions Remarks 11 38 No Home Input 742C0000 hex There was no home signal input during the homing operation Or a limit signal was detected before there was a home input Motion Control Function Module Source details Axis Detection During instruc timing tion execution tion status MC AX MFaultLvl Active BOOL The axis stops with the stop method for the homing execu Name Axis Minor Fault Occurrence Assumed cause Correction Prevention Check the home input settings and wiring and correct them so that the home signal is input during homing e There was no home signal input during the homing operation e A limit signal was detected before there was a home input None None based on the operation specifications of the MC Home instruction Also set the system so that the home signal is detected before the limit signals Set the system so that the home sig nal is input during the homing opera tion Make sure that the home signal is detected before a limit signal Also check to make sure there are no wir ing problems with the home input No Home Proximity Input 742D0000 hex There was no home proximity signal input during the homing operation Motion Control Function Module Source details Axis Detection During instruc timing tion execution The axis stops with the stop method for the homing execu User program Con
519. ttings and pro gramming concepts Learning about the specifi cations of the instruction set that is provided by OMRON Learning about the specifi cations of the motion con trol instructions that are provided by OMRON Learning how to use CJ series Units with an NJ series CPU Unit Description An introduction to the entire NJ series system is provided along with the following information on a Controller built with an NJ501 CPU Unit e Features and system configuration e Introduction e Part names and functions e General specifications e Installation and wiring e Maintenance and inspection Use this manual together with the NJ series CPU Unit Software User s Manual Cat No W501 The following information is provided on a Con troller built with an NJ501 CPU Unit e CPU Unit operation e CPU Unit features Initial settings e Programming based on IEC 61131 3 lan guage specifications Use this manual together with the NJ series CPU Unit Hardware User s Manual Cat No W500 The settings and operation of the CPU Unit and programming concepts for motion control are described Use this manual together with the NJ series CPU Unit Hardware User s Manual Cat No W500 and NJ series CPU Unit Soft ware User s Manual Cat No W501 The instructions in the instruction set IEC 61131 3 specifications are described When programming use this manual together with the NJ series CPU Unit Hardware User s
520. ttings to Perform a Servo Drive Test Run from the Sysmac Studio Make the following settings to operate an EtherCAT connected Servo Drive using the MC test run function of the Sysmac Studio Axis Basic Set Axis Number Axis numbers are set in order from the lowest tings number Node Address input Specify the node address of the EtherCAT slave devices and output device that is assigned to the axis The Node devices Address parameter cannot be selected if the Axis Type parameter is set to use a virtual axis 3 4 NJ series CPU Unit Motion Control User s Manual W507 3 Configuring Axes and Axes Groups Unit Conversion Unit of Display Select the display unit mm degrees etc 5 8 Settings Command Pulse Count Set the number of command pulses per motor Per Motor Rotation rotation according to the encoder resolution Work Travel Distance Set the workpiece travel distance per motor rota Per Motor Rotation tion according to the machine specifications Position Count Count Mode Set this parameter according to the machine 5 13 Settings specifications Limit Settings Software Limits Set this parameter according to the device speci 5 13 fications For example if the encoder resolution is 10 000 pulses rotation set 10 000 Go L gt x D o la Precautions for Correct Use e Select the appropriate values based on the machine s operating conditions for parameters such as the maximum velocity maximum acceleration decele
521. ttings used to perform motion control You can access system defined variables for motion control as variables in the user program and monitor them from the Sysmac Studio System defined variables for motion control are updated every primary period Sysmac Studio CPU Unit gt ay So gt So a A sae TP 1 omn on 1 d r clo Si j cu al 19 e S communi Servo Drive dii a cations Main memory System defined variables for motion control por soe posuer 1 MC Common Variable I ki Status Axis Variables EEEEEEEEEEEEEEEEEEEEEEEEEEE Axes Group Variables l Monitor display VM IOIDUOCH uono N JO sejqeueA DoUuap Uugis he 10 WAaISAS z 9 9 User program g UE SIE EtherCAT NJ series CPU Unit Motion Control User s Manual W507 6 17 6 Motion Control Programming 6 6 3 Tables of System defined Variables for Motion Control This section provides tables that describe the system defined variables for motion control MC Common Variable The variable name MC COM is used for the MC Common Variable The data type is SCOMMON REF which is a structure variable This section describes the configuration of the MC Common Variable and provides details on the members Variable name Data type Meaning Function MC COM SCOMMON REF MC Common Variable SCOMMON REF STA MC Common Status RunMode BOOL MC Run TRUE during MC Function Module operation TestM
522. tudio to perform interpolation control for mul tiple axes 9 6 1 Outline of Operation Multi axes coordinated control performs a motion with multiple related axes together as a single group to control the path of the target control object The MC Function Module treats all axes that perform coordinated operation as an axes group Axes groups are set from the Sysmac Studio In the user pro gram turn ON the Servo for each axis and then enable the axes group that is going to perform the multi axes coordinated control The purpose of multi axes coordinated control is the coordinated opera tion of all axes belonging to the target axes group Therefore you cannot execute any single axis oper ation motion control instructions on the axes in an enabled axes group Furthermore if any error occurs for any axis in an axes group all axes in the axes group will stop according to the setting of the Axis Group Stop Method group axes parameter The MC Function Module can perform linear interpolation with two to four axes or circular interpolation with two axes Coordinate conversion EtherCAT Feedback EtherCAT Actual Multi axes position Command position 1 H position 1 p position 2 position 2 Actual Command position 3 position 3 EN Additional Information For devices that require you to modify the grouping of axes in motion to perform interpolation control you must create multiple axes groups that include the axes to modify from the Sysmac St
523. tus MC Axis000 Details Homed MC Axis000 i Axis Hm1_D Done Busy Hm1_Bsy CommandAborted Hm1_Ca Error Hm1 Er ErrorlD Hm ErrlD NJ series CPU Unit Motion Control User s Manual W507 10 67 10 Sample Programming If the Servo is ON for axis 1 and home is not defined the MC Home instruction is executed HM2 Pwr1 Status MC Axis001 Details Homed MC Axis001 If homing is completed for axis O velocity control is executed CommandAborted MC MovevVelocity Axis Axis Hm2 D Done Busy Hm Bsy Hm2 Ca Error Hm2_Err ErrorlD Hm2 ErrlD Vel InVel In Velocity Hm1 D MC Axis000 Axis Execute LREAL 1000 0 Velocity LREAL 100000 0 Acceleration LREAL 100000 0 Deceleration Jerk eMC_DIRECTION _mcPositiveDirection Direction Continuous BufferMode When axis O reaches the target velocity cam operation is executed MC Axis000 MC_Axis001 Vel InVel MC_Axis001 Details Homed Camprofileo Pe Pp BOOL True eMC STARTMODEZ mchRelativePosition LREAL 20 0 LREAL 40 0 LREAL 1 0 LREAL 1 0 LREAL 0 0 LREAL 0 0 _eMC_REFERENCE_TYPE _mcCommand _eMC_DIRECTION _mcNoDirection Master Slave CamTable Execute Periodic StartMode StartPosition MasterStartDistance MasterScalling SlaveScalling MasterOffset SlaveOffset HeferenceType Direction Camrransition BufferMode MC Camln Busy Active CommandAborted Error ErrorlD QamTable EndOfProfile CommandAborted Vel_Bsy V
524. ual W507 5 Motion Control Parameters EN Additional Information Parameter Settings for a Reduction Ratio of 1 9 for the Setting Example The travel distance of the workpiece for one rotation of the Servomotor is 10 mm x 1 9 or 1 1111 mm a repeating decimal number For numbers that do not divide evenly multiply the command pulse count per motor rotation and the work travel distance per motor rotation by the same coefficient and set the parameters to the results Here the reduction ratio is 1 9 so we use 9 as our coefficient e Command Pulse Count Per Motor Rotation 1 179 648 131072 x 9 e Work Travel Distance Per Motor Rotation 10 10 x 1 9 x 9 5 2 4 Operation Settings These parameters set items for axis operation such as the maximum velocity and maximum accelera tion deceleration rate Set them according to the specifications of the device you are controlling Maximum Velocity Set the maximum velocity for each axis 1 Positive long reals 400 000 000 Unit command units s Maximum Jog Set the maximum jog velocity for each axis 2 Positive long reals 1 000 000 Velocity Unit command units s 0 Maximum Accelera Set the maximum acceleration rate for an axis Non negative long tion operation command There will be no limitto reals the acceleration rate if O is set Unit com mand units s2 Maximum Decelera Set the maximum deceleration rate for an axis Non negative long 0 tion operation command
525. uctions FB in the primary peri odic task Execution command Primary period A Execution of motion control instructions 1 Loading Data The input data from the EtherCAT slaves slave A is loaded during the I O refresh IO 2 Instruction Execution The motion control instructions FB are executed based on the data that was loaded during user program execution UPG The output variables of the motion control instructions are refreshed at this point 3 Command Generation Motion processing according to the motion control instructions FB that were executed is per formed during motion control MC immediately after user program execution in the primary periodic task During this processing execution commands for the Servo Drives are generated 4 Sending Commands The execution commands that were generated are sent to the Servo Drive during the I O refresh IO in the next period ES Additional Information All instructions from inputs to execution command outputs to the Servo Drive are processed quickly in this task We recommend placing all motion control instructions in the primary periodic task NJ series CPU Unit Motion Control User s Manual W507 2 7 n do O et Oo O Oo p e U SR 3 Q S9 D N O43u02 uono N JO suoneJedo ysel jo ajdwexg z e z 2 Motion Control Configuration and Principles I Using Motion Control Instructions in a Priority 16 Periodic Task If high speed motio
526. udio beforehand After completing this step you can execute by specifying the enabled axes groups from the user program during operation For details on axes groups refer to 3 3 Axes Groups 9 46 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions I Enabling and Disabling Axes Groups To enable an axes group specify the axes group for the MC GroupEnable Enable Axes Group instruction An instruction error will occur if you try to execute an axes group instruction when the axes group is still disabled To disable an axes group specify the axes group for the MC GroupDisable Dis able Axes Group instruction When you disable an axes group that is in operation all axes in that axes group will decelerate to a stop at the maximum deceleration rate that is specified in their axis parameter settings Turn ON Servo for each axis with MC Power Define home for all of the axes Enable axes group with MC GroupEnable Perform interpolation operation Y Disable axes group with MC GroupDisable Turn OFF Servo for each axis with MC Power For details on enabling and disabling axes groups refer to the MC GroupEnable Enable Axes Group and MC GroupDisable Disable Axes Group instructions in the NJ series Motion Control Instructions Reference Manual Cat No W508 Axes group enabled P o c D x 0 O o o 2 3 D D 2 O fe 5 e Resetting Axes Group Err
527. ultLvl Active BOOL MC Common Partial Fault Occur rence Assumed cause Correction Prevention The EtherCAT network configuration information is not registered for the Register the network configuration information for the slaves to which axes are assigned Register the EtherCAT network con figuration information for the slave to which the axis is assigned Or set the axis type to a virtual axis slave to which the axis is assigned None None 11 23 I N zi Oo c za 0 gt O Oo m 5 suonduoseq 1043 Z Z 11 Troubleshooting Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks Event name Meaning Source Error attributes Effects System defined variables Cause and correction Attached information Precautions Remarks 11 24 Motion Control Initialization Error 44200000 hex A fatal error occurred in the system and prevented initialization of the Motion Control Function Module Motion Control Function Module Detection timing Source details MC Common At power ON at Controller reset or when down loading Partial fault Cycle the power Log category System supply Variable It will not be possible to perform axis control It will not be possible to execute motion control instructions Datatype Datatype Name UL
528. ur P o c D x 0 O o o 2 3 D D 2 O fe 5 e uonejodje1u 1e n2Jl 9 6 NJ series CPU Unit Motion Control User s Manual W507 9 49 9 Motion Control Functions 9 6 4 Stopping Under Multi axes Coordinated Control 9 50 Multi axes coordinated control of axes groups will stop when you execute certain motion control instruc tions in the user program or when an error or some other problem occurs i Stopping with Motion Control Instructions Use the MC_GroupStop or MC GrouplmmediateStop instruction to stop axes group operation e MC_GroupStop Instruction For linear interpolation or circular interpolation performed on an axes group you can decelerate to a stop along the control path You specify the deceleration rate and jerk Specify a deceleration rate of O to send a command that immediately stops the Servo Drive Other operation commands are not acknowledged while decelerating to a stop for this instruction and while the input variable Execute is TRUE e MC GroupimmediateStop Instruction You can perform an immediate stop for all axes in the axes group The immediate stopping method is determined by the setting of the Immediate Stop Input Stop Method axis parameter for each axis The MC GrouplmmediateStop instruction can also be executed for an axes group that is decelerat ing to a stop for an MC GroupStop instruction For details refer to the MC GroupStop and MC GrouplmmediateStop i
529. urce Motion Control Function Module Source details Axis axes group Detection During instruc timing tion execution Effects Not affected Axes Group Observation Occurrence Secreta The command acceleration rate Find the reason the acceleration The goal is to enable detecting when exceeded the acceleration warning warning value was exceeded and the acceleration warning value is value make suitable corrections Or exceeded Preventative measures are increase the Acceleration Warning not required Value within the range that will not create problems Attached None information Precautions None Hemarks Event name Deceleration Warning 644F0000 hex Meaning The command deceleration exceeded the deceleration warning value Source Motion Control Function Module Source details Axis axes group Detection During instruc timing tion execution Effects Not affected Axes Group Observation Occurrence EEN The command deceleration rate Find the reason the deceleration The goal is to enable detecting when exceeded the deceleration warning warning value was exceeded and the deceleration warning value is value make suitable corrections Or exceeded Preventative measures are increase the Deceleration Warning not required Value within the range that will not create problems Attached None information Precautions None Remarks 11 46 NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Event name Positi
530. urrent position Auxiliary Auxiliary Axis command current position Master master axis Velocity Execute of MC CombineAxes changes to TRUE Position 200 Position 600 Auxiliary auxiliary axis Execute of MC CombineAxes Velocit d changes to TRUE Position 100 Position 110 Slave slave axis Execute of MC CombineAxes Velocity changes to TRUE Time Position O Position 390 For details on combining axes refer to the MC CombineAxes and MC Stop instructions in the NJ series Motion Control Instructions Reference Manual Cat No W508 NJ series CPU Unit Motion Control User s Manual W507 9 21 N d 3 a o I Q Ge o GA lt 3 Oo bet O 3 N o Q O o 3 e S sexy BululquUod 7 2 6 9 Motion Control Functions 9 2 8 Master Axis Phase Shift 9 22 The phase of the master axis as viewed from the slave axis can be shifted for the current instruction The shift amount as viewed from the slave axis is a relative amount During synchronization the slave axis will synchronize to the relative distance of the master axis You can execute the MC_Phasing Shift Master Axis Phase instruction to shift the phase for a synchronized control instruction You can specify the phase shift amount target velocity acceleration rate deceleration rate and jerk for the MC_Phasing Shift Master Axis Phase instruction Execute ee Lo Busy Active Done Command Aborted
531. user program or Controller Con figurations and Setup are not correct because the power supply to the Con ory operation troller was interrupted during a Clear All Memory operation Do not interrupt the power supply to the Controller during a Clear All Mem Non volatile memory failed If the error persists even after you None make the above correction replace the CPU Unit Attached Information 1 Cause Details None Power was interrupted or communications were disconnected during a download or power was interrupted dur ing online editing Downloading Predownloading For other causes the timing of error occurrence during download or during download preparations is given None NJ series CPU Unit Motion Control User s Manual W507 11 Troubleshooting Event name Absolute Encoder Home Offset Read Error 14600000 hex Meaning The absolute encoder current position that is retained during power interruptions was lost Source Motion Control Function Module Source details MC Common Detection At power ON at timing Controller reset or when down loading Error attributes Partial fault Log category System Effects It will not be possible to perform axis control pales _MC_COM PFaultLvl Active BOOL MC Common Partial Fault Occur rence Cause and Assumed cause Correction Prevention mmh I N zi Oo c 0 gt O Oo Gei 5 correction The life of the Battery in the CPU Unit Replace the Battery i
532. ut processing is performed Data tracing processing sampling and trigger checking is performed NJ series CPU Unit Motion Control User s Manual W507 2 5 2 Motion Control Configuration and Principles 2 6 Processing User program execution Motion control System common processing2 e Processing contents Programs assigned to tasks are executed in the order that they are assigned The motion control commands from the motion control instructions in the programs are executed Motion output processing is performed Variable refresh processing if there are refreshing tasks is performed Variable access processing is performed Operation of a Periodic Task with an Execution Priority of 16 You can refresh I O in the priority 16 periodic task UO refresh Control processing D D Gei ok e o ex c FE Co CH Se 5 ci 2 5 O Input data processing System common processing 1 Task execution time Task period Task processing time Task processing time Control processing s E C E O o D oS SIE as 65 3 5g 5g 28 SE GEIER DO 20ojna of a task in order to execute a task with a higher execution The CPU Unit will temporarily interrupt the execution priority I Task Period The primary period which is the task period for the primary periodic task is the standard period for exe cution The primary period is automatically used as the motion control period It is al
533. ute Mv Lin Abs Pos 0 LREAL 3000 Mv Lin Abs Pos 1 LREAL 3000 Mv_Lin_Vel LREAL 1000 Mv_Lin_Abs_Acc LREAL 1000 Mv_Lin_Abs_Dec LREAL 1000 0 Mv_Lin_Abs_Jrk LREAL 1000 0 Parameters for MC_GroupStop Grp_Stp_Dec LREAL 1000 0 Grp Stp Jrk LREAL 1000 0 InitFlag TRUE InitFlag is made TRUE InitFlag 1 2 3 4 5 6 7 8 9 1 1 If the axes group is enabled linear interpolation is executed MV LIN ABS MC MoveLinear AxesGroup AxesGroup Execute Done Position Busy Velocity Active Acceleration CommandAborted Deceleration Error Jerk ErrorlD CoordSystem BufferMode TransitionMode MC GroupOOO Status Ready MC_Group000 Mv Lin Abs Pos Mv Lin Abs Vel Mv Lin Abs Acc Mv Lin Abs Dec Mv Lin Abs Jrk Mv Lin Abs Cs Mv Lin Abs Bm Mv Lin Abs Tm H H H H Mv Lin Abs D Mv Lin Abs Bsy Mv Lin Abs Act Mv Lin Abs Ca Mv Lin Abs Err Mv Lin Abs ErrlD If the external button turns ON i e StopOn changes to TRUE during execution of linear interpolation the MC GroupStop instruction is executed to decelerate the axes to a stop GRP STP MC GroupStop AxesGroup AxesGroup Execute Done Deceleration Busy Active CommandAborted Error ErrorID StopOn MC_Group000 Status Moving MC Group000 n Grp_Stp_Dec Jerk BufferMode Grp_Stp_D Grp_Stp_Bsy Grp_Stp_Act Grp_Stp_Ca Grp Stp Err Grp Stp ErrlD If the Error or CommandAborted output variable of the MC GroupStop in
534. ve Function name Description Positive limit switch 60FD hex 00 1 Digital This signal is used for the positive limit input positive drive prohibit inputs Normally set Bit 1 Positive limit switch of GOFD input hex 00 Digital inputs Negative limit switch 60FD hex 00 0 Digital This signal is used for the negative limit input negative drive prohibit inputs Normally set Bit 0 Negative limit switch of GOFD input hex 00 Digital inputs Immediate stop input 60FD hex 00 25 Digital This signal is used for the immediate stop input inputs Set Bit 25 Immediate Stop Input of 60FD hex 00 Digital inputs for an OMRON G5 series Servo Drive Encoder Phase Z 60FD hex 00 10 Digital Shows the status of detecting the Z phase input Detection encoder Z inputs Set Bit 10 Encoder Phase Z Detection of 60FD phase detection hex 00 Digital inputs tor an OMRON G5 series Servo Drive NJ series CPU Unit Motion Control User s Manual W507 Appendices Function name Description Home switch home 60FD hex 00 2 Digital This signal is used for the home proximity input proximity input inputs Normally set Bit 2 Home switch of 60FD hex 00 Digital inputs External Latch Input 1 60FD hex 00 17 Digital Shows the status of the signal that is used for inputs external latch input 1 Set Bit 17 External Latch Input 1 of 60FD hex 00 Digital inputs tor an OMRON G5 series Servo Drive External Latch Input 2 60FD hex 00 18
535. ve Torque Warning 64500000 hex Meaning The torque command value exceeded the positive torque warning value timing tion execution Effects Not affected EISE The torque command value exceeded Find the reason the torque warning The goal is to enable detecting when the positive torque warning value value was exceeded and make suit the torque warning value is exceeded able corrections Or increase the Pos Preventative measures are not itive Torque Warning Value within the required range that will not create problems I N zi Oo c 0 gt O Oo m 5 Attached None E information no Precautions None 4 Remarks S w D o S Event name Negative Torque Warning 64510000 hex E 2 o Meaning The torque command value exceeded the negative torque warning value timing tion execution Effects Not affected GH The torque command value exceeded Find the reason the torque warning The goal is to enable detecting when the negative torque warning value value was exceeded and make suit the torque warning value is exceeded able corrections Or increase the Neg Preventative measures are not ative Torque Warning Value within the required range that will not create problems Attached None information Precautions None Remarks NJ series CPU Unit Motion Control User s Manual W507 11 47 11 Troubleshooting Event name Command Position Overflow 64520000 hex Meaning The number of pulses f
536. ve to Controller Appendices This is the status data from the Servo Drive to the MC Function Module The default settings in the Sysmac Studio are listed in the following table Required objects are marked with a star 6041 hex 00 0 Statusword 6064 hex 00 0 Position actual value 6077 hex Torque actual value Function name Status word Position actual value Velocity actual value Torque actual value 6061 hex 00 0 Modes of oper ation display Modes of operation display 60B9 hex 00 0 Touch probe status Touch probe status 60BA hex 00 0 Touch probe pos1 pos value Touch probe position 1 posi tion value NJ series CPU Unit Motion Control User s Manual W507 Description The status of the Servo Drive Set 6041 hex Statusword Shows the actual position Set 6064 hex Position actual value Shows the actual velocity Normally set 606C hex Velocity actual value Shows the actual torque This object is necessary to output to the Servo Drive in Cyclic Synchronous Torque Control Mode by the MC TorqueControl Torque Control and other instructions Normally set 6077 hex Torque actual value Shows the operation mode This object is necessary to change to a control mode other than Cyclic Synchro nous Position Control Mode for the MC SyncMoveVelocity Cyclic Synchro nous Velocity Control MC TorqueControl and other instructions Normally set 6061 hex Modes of operatio
537. ven entered if an error occurs when the axes group is disabled 8 The Standby state is entered when the MC_GroupReset or ResetMCError instruction is executed for an enabled axes group 4 The Disabled state is entered when the MC GroupReset or ResetMCError instruction is executed for a dis abled axes group 5 The same state is returned to if the MC GroupDisable is executed in ErrorStop state 6 Stopping state is entered when the Done output variable from the MC GroupStop instruction is TRUE and the Execute input variable to the same instruction is FALSE 7 Ready state is entered if all of the following conditions are met in Standby state e The Servo is ON for all composition axes e Execution of the MC Stop instruction is not in progress for any composition axis e Home is defined for all composition axes State name Definition Axes Group Disabled The axes group is disabled in this state When this state is entered the buffered status for multi execution of instructions is cleared Error Deceleration In this state an error occurred in an axes group that is disabled Stopping Axes Group Enabled The axes group is enabled in this state 6 6 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming State name Definition Group Standby In this state no instructions for axes group commands are executing This is independent of the Servo ON OFF status of the composition axes in the axes group Mo
538. very Error reset or Log category System cycling power supply User program Continues Operation This error may occur when you read a cam table because the cam data in non volatile memory may be corrupted Error attributes Effects I N zi Oo c 0 gt O Oo m 5 System defined EE MC COM MFaultL vl Active BOOL MC Common Minor Fault Occurrence SON Saving a cam table to a file failed Save the file again If the problem still None occurs non volatile memory has failed Replace the CPU Unit N Attached None V information I Precautions None S Remarks T WA Q Event name Cam Table Data Error during Cam Motion 54770000 hex gt Meaning The phases are not in ascending order in the cam table Source Error attributes Effects Motion Control Function Module Source details Axis Detection During instruc ame tion execution Log category System User program Continues Operation Operation is not possible for relevant axes Relevant axis decelerates to a stop if it is in motion variables MC AX MFaultL vl Active BOOL Axis Minor Fault Occurrence Cause and Prevention EEGEN Data containing cam table phases Correct the cam table data so that the Place the phase data into ascending that are not in ascending order was phases are in ascending order order in the cam table data detected during cam motion The phase and displacement of the Correct the cam table data so that the Set the
539. ving In this state positioning is performed for the specified target position due to a motion instruction for an axes group command This includes during the in posi tion check and when the velocity is O because the override factor was set to O while the group was in motion Deceleration Stopping In this state the MC GroupStop instruction is executing This includes when Execute is TRUE after stopping for the MC GroupStop instruction In this state itis not possible to execute a motion for an axes group command If one is exe cuted CommandAborted for the instruction will change to TRUE Error Deceleration In this state an axes group error has occurred This includes during execution Stopping of the MC GrouplmmediateStop Axes Group Immediate Stop instruction and during a deceleration stop for an axes group error If an attempt is made to exe cute one of them CommandAborted for the instruction will change to TRUE Note You can monitor the axes group status in the member variables of the Axes Group Variables MC GHP O Statusto _MC_GAP 31 Status p do o p D D zl D 5 o Oo 5 o Sojeis dnoid sexy e e 9 NJ series CPU Unit Motion Control User s Manual W507 6 7 6 Motion Control Programming 6 4 Execution and Status of Motion Control Instructions Variables that represent the execution status of instructions and variables that are used to execute motion control instructions are defined in the MC Function M
540. ween the target position and the command current position as the target distance This enables you to perform multi turn positioning on the ring counter I Example for Shortest Way The following example illustrates when positioning is performed towards a target position of 20 when the command current position is 50 Modulo maximum position setting C M value 100 Command current position 50 Target position 20 Target position 20 Modulo minimum position setting value 70 Moves in negative direction EN Additional Information Moves in the same direction as the Current Direction specification if the travel distance is the same in the positive and negative directions 9 32 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions Example for Positive Direction The following example illustrates when positioning is performed towards a target position of 20 when the command current position is 50 Modulo maximum position setting ee value 100 Command current position 50 Target position 20 7 Target position 20 Modulo minimum position setting value 70 i Jd Moves in positive direction Example for Negative Direction The following example il
541. wei lt O U f lt D CD D E 2 Q o Backlash Compensation The MC Function Module does not perform backlash compensation If you require backlash compensation use the compensation function of the Servo Drive The objects that must be set on the Servo Drive are listed in the following table 3704 hex Backlash Compensation This object is used to select whether to enable or disable back Selection lash compensation during position control and to set the com pensation direction The default value is to disable compensation 3705 hex Backlash Compensation Set the backlash compensation amount during position control Amount 3706 hex Backlash Compensation Set the backlash compensation time constant during position Time Constant control Hefer to the G5 series AC Servomotors Servo Drives with Built in EtherCAT Communications User s Manual Cat No 1576 for details on backlash compensation NJ series CPU Unit Motion Control User s Manual W507 A 3 Appendices I PDO Mapping This section describes mapping PDOs to control servo axes from the MC Function Module To use motion control functions you must map the objects that are required for those functions to PDOs The PDO map is a list of required objects that is prepared in advance You select the PDOs to use in the Edit PDO Map Settings Dialog Box of the EtherCAT Edit Tab Page in the Sysmac Studio Ej Sysmac Studio l lex File Edit ven Insert Project
542. wing example is for a device that uses the actual position of axis 2 an encoder which is attached to a conveyor as the master axis The Servo Drive on axis 1 is synchronized within a finite range MC Function Module e Command position Axis 1 Servo axis slave axis Actual position L I L I L I Actual position Axis 2 Encoder axis master axis zl Encoder Settings Parameter name Axis Variable Name Axis2 Enabled Axes Used Axis Axis Type Encoder axis Node Address input device 2 Command Pulse Count Per Motor Rota 1 048 576 tion Work Travel Distance Per Motor Rotation 10 000 Maximum Velocity Ges Maximum Jog Velocity ER Maximum Acceleration Maximum Deceleration Software Limits Disabled position 5 18 NJ series CPU Unit Motion Control User s Manual W507 5 Motion Control Parameters Settings Parameter name Positive Software Limit Negative Software Limit 0 5 Count Mode Rotary Mode Modulo Maximum Position KH 1 000 000 6 Modulo Minimum Position BS 0 6 1 2 SS 4 5 6 The position command unit will be 1 um The maximum velocity will be 3 000 r min 30 m min 0 5 m s 500 000 um s The maximum jog velocity will be 10 of the maximum velocity i e 0 05 m s 50 000 um s The maximum acceleration and the maximum deceleration are 5 m s2 The acceleration time to the maximum velocity 3 000 r min is 0 1 s Set a positioning that is within th
543. x Output turns ON for the torque limit value Setting excluding the torque command value Software Limit 0003 hex Disable the software limits in both directions Function Latch Trigger 0100 hex Touch probe External latch signal 1 Selection Touch probe2 External latch signal 2 Encoder Home Off 00000000 An offset value of O is used by the Servo Drive set hex Electronic Gear 00000001 The gear ratio on the Servo Drive is 1 1 A simi Ratio Numerator hex lar function is set in the MC Function Module Electronic Gear 00000001 Ratio Denominator hex Positive Torque 1388 hex Default setting 500 0 Limit Negative Torque Limit Warning Hold 0000 hex The warnings are automatically cleared when Selection the cause of the warning is eliminated 1388 hex Default setting 500 0 NJ series CPU Unit Motion Control User s Manual W507 Appendices A 2 Connecting to Encoder Input Terminals This appendix describes connections to an OMRON GxX series EtherCAT Slave Encoder Input Termi nals A 2 1 Wiring to Encoder Input Terminals Encoder Input Terminals are connected using EtherCAT communications Refer to the NJ series CPU Unit Built in EtherCAT Port User s Manual Cat No W505 for information on the connection methods A 2 2 Settings for Encoder Input Terminals This section outlines the Encoder Input Terminal settings that are used when connected to OMRON GX series GX EC0211 EC0241 Encoder Input Terminals i e the app
544. xecuted MC Axis000 Vel InVel MC Axis001 UINT 10 1 UINT 10 1 eMC_REFERENCE_TYPE mcCommand LREAL 0 0 LREAL 0 0 Axis InVelocity Busy Active CommandAborted Error ErrorlD GEARIN MC_GearlIn Master Slave Execute RatioNimerator RatioDenominator Reference Type Acceleration Deceleration Jerk BufferMode When axis 0 reaches the target velocity cam operation is executed MC Axis000 MC Axis002 Vel InVel CamProfileO BOOL TRUE _eMC_STARTMODE _mcRelativePosition LREAL 20 0 LREAL 40 0 LREAL 1 0 LREAL 1 0 LREAL 0 0 LREAL 0 0 eMC REFERENCE TYPE 4 mcCommand eMC DIRECTION mcNobDirection NJ series CPU Unit Motion Control User s Manual W507 Master Slave InGear Busy Active CommandAborted Error ErrorlD CAMIN Master Slave CamrTable Execute Periodic StartMode StartPosition MasterStartDistance MasterScalling SlaveScalling MasterOffset SlaveOffset HeferenceType Direction Camriransition BufferMode Master Slave CamrTable InCam InSync EndOfProfile Index Busy Active CommandAborted Error ErrorlD Vel InVel Vel Bsy Vel Act Vel Ca Vel Err Vel ErrID Gearln InGear Gearln Bsy Gearln Act Gearln Ca Gearln Err Gearln El Camln InCam Camln InSync Camln Eop Camln Index Camln Bsy Camiln Act Camln Ca Camln Err Camln ErrlD 10 59 P N zi Co c D 2 pe pe 3 U lt O p D O c m lt D gt O C
545. xes group For details refer to the MC Stop and MC ImmediateStop instructions in the NJ series Motion Control Instructions Reference Manual Cat No W508 EN Additional Information When the input variable Enable to the MC_Power Servo ON instruction changes to FALSE the MC Function Module immediately stops the command value and turns OFF the Servo When the Servo is turned OFF the Servo Drive will operate according to the settings in the Servo Drive I Stopping Due to Errors or Other Problems e Stopping for Errors during Single axis Operation When an error occurs during single axis operation the axis will stop immediately or decelerate to a stop depending on the error Refer to 11 2 2 Error Descriptions for details on the stop method for each error e Stopping for a Software Limit To stop for a software limit set the Software Limits axis parameter You can select from the following stop methods for the software limits e Enabled for command position Decelerate to a stop e Enabled for command position Immediate stop e Enabled for actual position Decelerate to a stop e Enabled for actual position Immediate stop Refer to 9 8 5 Software Limits for details on software limits e Stopping Due to Excessively Long Motion Control Period If motion control processing does not end within two periods it is considered to be an excessive control period Control will be stopped immediately e Errors That Cause the Servo to Tur
546. xes group if you create more than one axes group You can also set the same axis number in more than one axes group Axis composition setting Settings in Composition Axes parameter 2 axes Set Axis Variable names axis numbers for axis AO and axis A1 3 axes Set Axis Variable names axis numbers for axis AO axis A1 and axis A2 4 axes Set Axis Variable names axis numbers for axis AO axis A1 axis A2 and axis A3 NJ series CPU Unit Motion Control User s Manual W507 5 21 2 e gt x N Q O c o U 9 D j D D o sBulles oiseg dnojo sexy z e S 5 Motion Control Parameters e Composition Axes Setting Examples e Example 1 Assigning Four Axes with Axis Numbers 1 2 5 and 8 to an Axes Group Logical axis Axis AO Axis A1 Axis A2 Axis A3 Axis number Axis 1 Axis 2 Axis 5 Axis 8 e Example 2 Assigning Three Axes with Axis Numbers 1 8 and 2 to an Axes Group Logical axis Axis AO Axis A1 Axis A2 Axis A3 Axis number Axis 1 Axis 8 Axis 2 None 5 3 3 Axes Group Operation Settings These parameters set items for axes group operation such as the maximum interpolation velocity and axes group stopping method Set them according to the specifications of the device you are controlling Maximum Interpola tion Velocity Maximum Interpola tion Acceleration Maximum Interpola tion Deceleration Interpolation Accel eration Decelera tion Over Interpolation Veloc
547. xes in the axes group Moving BOOL Moving TRUE while an axes group motion instruction is executed toward the target position This includes in position waiting status and when the velocity is O for an override Stopping BOOL Deceleration Stopping TRUE until the axes group stops for an MC GroupStop instruction This includes when Execute is TRUE after the axes stop for an MC GroupStop instruction Axes group motion instructions are not executed in this state CommandAborted is TRUE ErrorStop BOOL Error Deceleration TRUE while the axes group is stopping or Stopping stopped for the MC GrouplmmediateStop instruction or for an axes group minor fault when MC GHRP XX MFaultLvl Active is TRUE Axes group motion instructions are not executed in this state CommandAborted is TRUE Details sGHOUP REF DET Axes Group Control Gives the control status of the instruction Status BOOL TRUE when processing is not currently per formed for the command value except when waiting for in position state 1 Idle and InPosWaiting are mutually exclusive They cannot both be TRUE at the same time InPosWaiting BOOL In position Waiting TRUE when waiting for in position state for any composition axis TRUE during positioning operations during the in position check 2 NJ series CPU Unit Motion Control User s Manual W507 6 25 o o o lt o ona OD 3 Q gt a S F fo o o O O E O 3 O Oo 3 mp
548. y Bag Active Velocity Deceleration stop performed for the Target velocity Time Target velocity is changed Target velocity is not every primary period changed Control Mode CSP CSV CSP CSV Changed Changed Changed The Servo Drive will receive commands in the velocity control loop Therefore if any disturbance causes the velocity to decrease below the command velocity no change in velocity will occur to remove the following error For details refer to the MC_SyncMoveVelocity Cyclic Synchronous Velocity Control instruction in the NJ series Motion Control Instructions Reference Manual Cat No W508 9 24 NJ series CPU Unit Motion Control User s Manual W507 9 Motion Control Functions 9 4 Single axis Torque Control Torque control continuously applies the specified amount of torque You can use TorqueHamp to spec ify the rate of change of the torque until the Torque Target Torque is reached To stop an axis use the MC Stop instruction or execute another motion instruction If you specify a Torque Target Torque of 0 the axis will not move but the axis status will indicate that it is moving Example 1 Direction Designation Example 2 Direction Designation Positive Direction Negative Direction Torque Torque Torque e e eee Time TorqueRamp P Time Torque 6 ees The MC Function Module uses the Torque Control Mode of the Servo Drive The Servo Drive receiv
549. y Acceleration and Deceleration are an exception to this rule The values when Posi tiveEnable or NegativeEnable changes to TRUE are used for these input variables la Precautions for Correct Use The timing in the timing charts that are given in this manual may not necessarily be the same as the timing displayed for data traces on the Sysmac Studio Refer to the NJ series CPU Unit Soft ware User s Manual Cat No W501 for details on data tracing I Timing Charts for Execute type Instructions e The following timing chart shows the operation of the instruction when it is completed while the input variable Execute is TRUE The following timing chart is for when an error does not occur through when Execute changes to FALSE Execute Busy Done CommandAborted Error e The following timing chart is for when an error occurs while input variable Execute is TRUE After completion the output variable Error will remain TRUE even if Execute changes to FALSE 6 10 NJ series CPU Unit Motion Control User s Manual W507 6 Motion Control Programming Execute Busy Done CommandAborted Error e The following timing chart is for when the instruction is interrupted during execution while input vari able Execute is TRUE Execute Busy Done CommandAborted Error e The following timing chart is for when the input variable Execute is TRUE for only one period and an error does not
550. you can check for current Controller errors and the log of past Controller errors You can also check the cause of the error and corrections Refer to the NJ series Troubleshooting Manual Cat No W503 for the procedures to check for errors with an NS series PT i Checking with Instructions That Read Error Status You can use instructions in the user program to check the error status of each function module The fol lowing table gives the instruction that is used to get error information for the Motion Control Function Module Instruction Name Outline of function GetMCError Get Motion Control Error The GetMCError instruction gets the highest level status par Status tial fault or minor fault and highest level event code of the cur rent Controller errors in the Motion Control Function Module For details on the instructions that get error status refer to the NJ series Instructions Reference Manual Cat No W502 i Checking with System defined Variables You can use the error status variables in the system defined variables and the system defined variables for motion control to check for errors that have occurred in the Motion Control Function Module e Error Status Variables You can check for errors in each function module of the NJ series Controller with error status vari ables The following variables show the error status of the Motion Control Function Module Variable name Data type Meaning Function MC Err
Download Pdf Manuals
Related Search
Related Contents
大豆・麦の収量アップへ向けて(5.6MB) C`est chaud ! N61Vn Series Notebook PC ANNUAIRE DES URBANISTES QUALIFIS Installation Manual Philips Coaxial cable SWV2835W User Manual Bosch GSB 19-2 RE Professional Copyright © All rights reserved.
Failed to retrieve file