Home

I55E-EN-03 CJ1W-MCH72 Motion Control Unit

image

Contents

1. cut_counter 0 line axis 2 shear _axis 0 flying axis 1 SERVO AXIS line axis ON SERVO AXIS flying axis ON SERVO AXIS shear axis ON WDOG ON FIRST CYCL Gl Make a first material cut MOVEABS end_pos AXIS shear_axis WAIT UNTIL MTYPE AXIS shear_ axis 2 WAIT IDLE AXIS shear axis First time we have a certain wait time because th material has been just been cut wait distance cut_lenght 1l_acc 2 MOVELINK 0 wait_distance 0 0 line axis AXIS flying axis WAIT UNTIL MTYPE AXIS flying axis 22 H We start the line FORWARD AXIS line axis loop Update the line speed every cycle SPEED AXIS line_axis line_speed T Cutting movement at synchronized speed line cut synch dist l_ acct l dec shear cut synch dist l_ acc 2 l dec 2 MOVELINK shear _cut line cut l_acc 1 dec line axis AXIS flying axis WAIT UNTIL MPOS AXIS flying _axis gt l_acc 2 Activate the shear when it is in synchronization with the line Slow speed to cut Practical examples Section 5 2 SPEED AXIS shear _axis cut_speed MOVEABS end_pos AXIS shear_ axis MOVEABS 0 AXIS shear axis WAIT UNTIL NTYPE AXIS shear axis 2 Fast speed to return WAIT LOADED AXIS shear axis SPEED AXIS shear_axis return_speed cut_counter cut_countertlinch Return back synchronized with the master in such a way that
2. Dimensions of the CJ1W MCH72 2 4 2 Unit specifications Item Specification Ambient operating temperature 0 C to 55 C When all digital inputs are on max 45 C When max 8 digital inputs are on max 55 C Ambient storage temperature 20 C to 70 C Ambient operating humidity 10 to 90 RH Ambient storage humidity 90 max without condensation Atmosphere No corrosive gases Vibration resistance 10 to 57 Hz 0 075 mm amplitude 57 to 100 Hz Acceleration 9 8 m s2 in X Y and Z directions for 80 minutes Shock resistance 143 m s2 3 times each X Y and Z directions Insulation resistance 20 MQ Dielectric strength 500 V Protective structure IP20 International standards CE EN61131 2 ROHS compliant Power supply 5 V Supplied via PLC bus Current consumption 450 mA max without external load 680 mA max with maximum external load 55 Specifications Section 2 4 Item Specification Maximum current ratings Incremental 150 mA 2 4 3 System specifications Encoder Interface 5 V output SSI 100 mA EnDat 80 mA Stepper 80 mA Weight 180 gr Item Specification Number of axes 32 Number of inverters Max 8 Cycle time Selectable 0 5 ms 1 ms 2 ms 4 ms Programming language BASIC like motion language Multi tasking Max 14 tasks running simultaneously Built in digital I O 16 Inputs 2
3. 15 Trajexia system architecture Section 1 5 1 5 1 5 1 1 5 2 1 5 3 1 5 4 1 5 5 16 Trajexia system architecture The system architecture of the Trajexia is dependant upon these concepts e Program control e Motion Sequence e Motion buffers e Communication e Peripherals These concepts depend upon the value set in the SERVO PERIOD parameter The relationship between the value of SERVO_PERIOD and the different concepts of the system architecture are describes as follows Program control Programs make the system work in a defined way The programs are written in a language similar to BASIC and control the application of the axes and modules 14 Programs can be executed in parallel The programs can be set to run at system power up started and stopped from other programs and executed from Trajexia Studio Programs execute commands to move the axes control inputs and outputs and make communication via BASIC commands Motion sequence The motion sequence controls the position of all 32 axes with the actions as follows e Reading the Motion buffer e Reading the current Measured Position MPOS e Calculating the next Demanded Position DPOS e Executing the Position loop e Sending the Axis reference e Error handling Motion buffers Motion buffers are the link between the BASIC commands and the Axis control loop When a BASIC motion command is executed the command is stored in one of the b
4. FL Unit IF COMMSTYPE SLOT 1 lt gt 33 THEN PRINT Error Comms Type for unit 1 is not FL SET BIT 1 diag03 Start Mechatrolink Section MECHATROLINK device detection for MLO4 unit 0 IF READ BIT 0 diag03 0 THEN Initialise Mechatrolink MECHATROLINK 0 0 Device count IF NOT MECHATROLINK 0 3 system01 THEN PRINT Error getting device count for MLO4 unit 0 SET BIT 0 diag01 ELSEIF VR system01 lt gt 2 THEN PRINT Incorrect device count for MLO4 unit 0 SET BIT 1 diag01 ENDIF Check SJDE O2ANA OY address IF NOT MECHATROLINK 0 4 0 system01 THEN PRINT Error getting address for MLO4 unit 0 station 0 SET BIT 0 diag02 ELSEIF VR system01 lt gt 43 THEN PRINT Incorrect address for MLO4 unit 0 station 0 SET BIT 0 diag02 ENDIF Check SJDE O2ANA OY address IF NOT MECHATROLINK 0 4 1 system01 THEN PRINT Error getting address for MLO4 unit 0 station 1 SET BIT 1 diag02 ELSEIF VR system01 lt gt 44 THEN PRINT Incorrect address for MLO4 unit 0 station 1 SET BIT 1 diag02 ENDIF 328 Practical examples Section 5 2 ENDIF Stop Mechatrolink Section Detection OK IF VR diag01 0 AND VR diag02 0 AND VR diag03 0 THEN ET BIT 15 diag01 n Invert input channels INVERT IN 16 OFF POT INVERT IN 17 OFF NOT Omron Auto Generated Units End Sta
5. The value of the parameter P_GAIN is set to the value in example 1 The value of VFF_GAIN is increased The Following Error is reduced without a reduction to the stability The Following Error is not proportional to the speed The parameter values for the example are Motion Parameter values P_Gain 131072 VFF_GAIN 1400000 Fn001 6 How to s Section 5 1 Example 6 Trace1 Device1 Sas Soe tv ik I 4 Q 9 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms Offset Change o L L L C 0 0 0 With this value of VFF_GAIN the Following Error is proportional to the acceleration and smaller than with just proportional gain the scaling is 20 units division The Following Error approaches zero during constant speed The negative effect of this set of values is the overshoot and undershoot when the acceleration changes this can be reduced but not eliminated by increasing the speed loop gain if the mechanical system can cope with a high gain The parameter values for the example are Motion Parameter values P_Gain 131072 VFF_GAIN 1573500 Fn001 6 277 Section 5 1 J How to s Example 7 Trace1 Device1 X x A EIERE AE 10 9 8 7 6 5 44 3 2 4 1 4 o 1 1 1 1 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms Display Plot Parameter
6. MARK This example shows the use of RAPIDSTOP to cancel a MOVE on the main axis and a FORWARD on the second axis When the axes have stopped a MOVEABS is applied to re position the main axis BASE 0 REGIST 3 FORWARD AXIS 1 MOVE 100000 apply a long move WAIT UNTIL MARK RAPIDSTOP WAIT IDLE for MOVEABS to be accurate the axis must stop MOVEABS 3000 150 AXISO AXIS 1 50 SPEED 1 SECOND 50 100 150 223 All BASIC commands Section 4 2 Example This example shows the use of RAPIDSTOP to break a CONNECT and stop the motion The connected axis stops immediately on the RAPIDSTOP command The forward axis decelerates at the DECEL value BASE 0 CONNECT 1 1 FORWARD AXIS 1 WAIT UNTIL VPSPEED SPEED let the axis get to full speed WA 1000 RAPIDSTOP WAIT IDLE AXIS 1 wait for axis 1 to decel CONNECT 1 1 re connect axis 0 REVERSE AXIS 1 WAIT UNTIL VPSPEED SPEED WA 1000 RAPIDSTOP WAIT IDLE AXIS 1 See also CANCEL MTYPE NTYPE 4 2 196 READ_BIT Type System command Syntax READ _BIT bit_number vr_number Description The READ_BIT command returns the value of the specified bit in the specified VR variable either O or 1 Arguments bit_number The number of the bit to be read Range 0 23 vr_number The number of the VR variable for which the bit is read Range 0 1023 Example No example See also CLE
7. Pin Signal Clock Clock 5V Data Data o CO N OD WwW N OV The CJ1W MCH 72 encoder interface does not have a termination inside In case of long distances or disturbed communication add an external termination to the inter face The table below and the figure give an example of the connection of the Heidenhain ROC 425 2048 5XS08 C4 encoder to the CJ1W MCH72 Encoder CJ1W MCH72 encoder interface Pin Signal Wire color Pin Signal 3 Data Grey Data 4 Data Pink Data 7 Clock Violet Clock Wiring Section 2 2 Encoder CJ1W MCH72 encoder interface Pin Signal Wire color Pin Signal 6 Clock Yellow 3 Clock 5 GND White green 9 0 V Encoder ground 2 OV White See footnote 1 Up Blue 1 Use an external power supply CJ1W MCH72 5 VDC Power Supply Heidenhain ROC 425 2048 5XS08 C4 connection 2 2 4 3 Stepper The CJ1W MCH 72 can generate pulses to drive an external stepper motor amplifier You can use single step half step and microstepping drivers with this interface The applicable signals are Enable e Step Direction ENABLE arer UUU SUHUL DIRECTION WDOG ON MOVE 4 MOVE 4 The applicable signals when a MOVE operation is performed 49 Installation Section 2 3 2 3 Installation 2 3 1 Hardware installation N Caution Obey the following precaution
8. The table below shows the digital input specifications of input O to input 3 for the I O Item Specification Type NPN PNP Maximum voltage 24 VDC 10 See footnote Input current 8 mA at 24 VDC ON voltage 17 VDC min OFF voltage 5 VDC max Maximum response time 1250 us if the servo period equals 0 5 ms or 1 0 ms 2500 us if the servo period equals 2 0 ms Registration response time 1 us typical Inputs 0 and 1 Ambient operating temperature 0 C to 55 C When all digital inputs are on max 45 C When max 8 digital inputs are on max 55 C 1 For UL certified applications always use for external power supply a Class 2 power supply External power 7 supply 24V CJ1W MCH72 eer Common for Input circuits Circuit configuration for input 0 to input 3 The table below shows the digital input specifications of input 4 to input 15 for the I O Item Specification Type NPN PNP Maximum voltage 24 VDC 10 See footnote Input current 3 2 mA at 24 VDC ON voltage 12 VDC min OFF voltage 5 VDC max Maximum response time 1250 us if the servo period equals 0 5 ms or 1 0 ms 2500 us if the servo period equals 2 0 ms 41 Wiring Section 2 2 Item Specification Ambient operating temperature 0 C to 55 C When all digital inputs are on max 45 C When max 8
9. Troubleshooting Errors Section 6 3 Problem Solution When this error occurs the WDOG goes automatically off and all current motion is stopped If necessary a user can take additional actions in BASIC programs when this error happen The occurrence of this error can be checked for by reading bit 2 of the value returned by the PLC_STATUS 0 BASIC command see section 4 2 185 for more details on PLC_STATUS BASIC command 352 Troubleshooting Errors Section 6 3 6 3 10 CPU Non Fatal Error FAL Problem Solution A non fatal error FAL generated by the PLC CPU either by the system or programmatically from a PLC ladder program Remove the cause of the problem in the PLC if it wasn t generated programmatically on purpose Additional actions to take When this error occurs the unit continues operation normally as no error has occurred If any action on this error is necessary a user can take additional actions in BASIC programs when this error happen The occurrence of this error can be checked for by reading bit 3 of the value returned by the PLC_STATUS 0 BASIC command see section 4 2 185 for more details on PLC_STATUS BASIC command 6 3 11 MECHATROLINK II Bus Error Problem Solution Cable failure on the MECHATROLINK II bus Check MECHATROLINK II cables between stations connected to the unit for interruptions and irregularities short circuit between c
10. Communication 1ms The SERVO_PERIOD has a value of ims and the motion sequence is executed every 1ms As the motion sequence is not executed during CPU task 3 there is more time for the program execution High priority programs run faster 1 6 1 3 Servo period 2 ms CPU task 1 Motion sequence Low priority task 0 1 2 3 CPU task 2 CPU task 3 CPU task 4 High priority task 13 14 LED refresh High priority task 13 14 Communication L 2ms The SERVO_PERIOD has a value of 2ms and the motion sequence is executed every 2 0ms 18 Cycle time Section 1 6 1 6 1 4 Servo period 4 ms CPU task 1 Motion sequence Low priority task 0 1 2 3 CPU task 2 High priority task 13 14 CPU task 3 LED refresh sms High priority task 13 14 CPU task 4 Communication ke i a 5 a si ai The SERVO_PERIOD has a value of 4ms and the motion sequence is executed every 4 0ms 1 6 1 5 Servo period rules The number of axes and MECHATROLINK II slaves in the Trajexia system determines the value of the SERVO_PERIOD system parameter There are 2 types of MECHATROLINK II slaves that are supported by the CJ1W MCH72 units e Servo Drivers The CJ1W MCH72 considers Servo Drivers as axes e Inverters The CJ1W MCH72 does not consider Inverters as axes You should comply with the most restrictive rules when you set the SERVO_PERIOD parameter An incorrect value of the SERVO_PE
11. 69 FINS commands Section 3 4 3 4 5 Run 0401 The FINS Run command starts or stops a BASIC program The FINS Run command has these formats e To start a BASIC program 04 01 00 01 command_code process mode program_name e To stop a BASIC program 04 01 00 00 command_code process mode The parameters can have the following values Parameter Values mode e 00 Stop e 01 Start process 01 0E Process number program_name A string that represents the program name The string does not have zero termination The CJ1W MCH 72 responds with these codes Condition Response code Description hex All elements valid 0000 OK process invalid 1106 Process number does not exist or invalid mode mode invalid program_name invalid 2402 Program name does not exist Start BASIC program that is already 2201 Wrong mode executing running Stop BASIC program that is not run 2202 Wrong mode stopped ning 70 If the response code is 0000 the program is started or stopped FINS commands Section 3 4 3 4 6 Stop 0402 The FINS Stop command stops a BASIC program It has this format 04 02 00 command_code process The parameters can have the following values Parameter Values process 01 0E Process number The CJ1W MCH 72 responds with these codes Condition Response code
12. In the middle example there is only one high priority process 14 Both HT periods are reserved for this process The low priority processes 3 2 1 and 0 are executed in the LT period one process per cycle time In the lower example there are no high priority processes Therefore the HT periods can be used for the low priority processes The LT period is also used for the low priority processes 1 8 Motion sequence and axes AXIS PARAMETER Servo Drive Position loop OFF i i oe Speed loop Torque loop f ff ON Ly M sa a Demanded i command B O i ji Motion sequence is the part of the CJ1W MCH72 that controls the axes The actual way that the motion sequence operates depends on the axis type The axis type can be set and read by the parameter ATYPE At start up the Trajexia system automatically detects the configuration of the axes e The default value for the parameter ATYPE for MECHATROLINK II axes is 40 MECHATROLINK II position e The default value for the parameter ATYPE for the Encoder Interface is 44 incremental encoder Profile generator Linn Measured _ v position 23 Motion sequence and axes Section 1 8 1 8 1 All non allocated axes are set as a virtual axis The value for the parameter ATYPE is 0 Every axis has the general structure as shown in the illustration above The motion sequence which wil
13. Individual characters are defined as a sequence of moves relative to a start point Therefore the same commands can be used regardless of the plot origin The command subroutine for the letter M is write_m MOVE 0 12 move A gt B MOVE 3 6 move B gt C MOVE 3 6 move C gt D MOVE 0 12 move D gt E RETURN 192 All BASIC commands Section 4 2 See also AXIS MOVEABS UNITS 4 2 160 MOVEABS Type Axis command Syntax MOVEABS distance_1 distance_2 distance_3 distance_4 J MA distance_1 distance_2 distance_3 distance_4 Description The MOVEABS command moves one or more axes at the demand speed acceleration and deceleration to a position specified as absolute position i e in reference to the origin In multi axis moves the move ment is interpolated and the speed acceleration and deceleration are taken from the base axis The specified distances are scaled using the unit conversion factor in the UNITS axis parameter If for example an axis has 4 000 encoder edges mm then the number of units for that axis would be set to 4000 and MOVEABS 12 5 would move to a position 12 5 mm from the ori gin MOVEABS works on the default basis axis group set with BASE unless AXIS is used to specify a temporary base axis Argument distance_1 is applied to the base axis distance_2 is applied to the next axis etc By changing the axis between individual MOVE com mands uninterpolated unsyn
14. Section 4 2 4 2 201 REMAIN Type Syntax Description Arguments Example See also 4 2 202 REMOTE_ERROR Type Syntax Description Arguments Example See also 232 Axis parameter read only REMAIN The REMAIN parameter contains the distance remaining to the end of the current move It can be checked to see how much of the move has been completed The units in which REMAIN is expressed depends on the type of the motion command Ifa master axis is moved by MOVELINK or CAMBOX REMAIN is expressed in user units set by UNITS e Ifa slave axis is moved by MOVELINK or CAMBOX REMAIN is expressed in encoder counts Ifa master or a slave axis is moved by a motion command that is not MOVELINK or CAMBOX REMAIN is expressed in user units set by UNITS The CONNECT command moves an axis without a defined end For this command REMAIN has the fixed value of 1000 N A To change the speed to a slower value 5mm from the end of a move start SPEED 10 MOVE 45 WAIT UNTIL REMAIN lt 5 SPEED 1 WAIT IDLE AXIS UNITS Axis parameter REMOTE_ERROR Returns the number of errors on the MECHATROLINK II communica tion link of a driver N A gt gt PRINT REMOTE_ERROR 1 0000 N A All BASIC commands Section 4 2 4 2 203 RENAME Type Program command Syntax RENAME old_program_name new_program_name Description The RENAME command changes the name of a program in the CJ1W MCH
15. 1 3 4 3 Print registration The CJ1W MCH 72 can capture the position of an axis in a register when an event occurs The event is referred to as the print registration input On the rising or falling edge of an input signal which is either the Z marker or an input the CJ1W MCH 72 captures the position of an axis in hardware This position can then be used to correct possible error between the actual position and the desired position The print registration is set up by using the REGIST command The position is captured in hardware and therefore there is no software overhead and no interrupt service routines eliminating the need to deal with the associated timing issues 1 3 4 4 Merging moves MERGE 0 MERGE 1 A If the MERGE axis parameter is set to 1 a movement is always followed by a subsequent movement without stopping The figures show the transitions of two moves with MERGE value 0 and value 1 In the figure A is the time axis and B is the speed axis 1 3 4 5 Jogging Jogging moves the axes at a constant speed forward or reverse by manual operation of the digital inputs Different speeds are also selectable by input Refer to the FWD_JOG REV_JOG and FAST_JOG axis parameters 12 Servo system principles Section 1 4 1 4 Servo system principles The servo system used by and the internal operation of the CJ1W MCH 72 are briefly described in this section 1 4 1 Semi closed loop system The servo system of the CJ1W M
16. 1 8 4 Type of axis more information on the BASE command and the definition of the axis sequence in an axis array refer to the Trajexia Programming Manual chapter 3 BASIC commands ignored FELIMIT the next action occurs WDOG is set to OFF and all axes stop SERVO for the axis that causes the error goes to OFF The current move is cancelled and removed from the buffer If SERVO OFF for one axis the motion commands for that axis are If the Following Error FE in one axis exceeds the parameter value ATYPE Applicable to Name Description All axes Virtual axis Internal axis with no physical out put It is the only valid setting for non allocated axes That is those that are not MECHATROLINK II Servo Drivers 40 MECHATROLINK II Servo Drivers MECHATROLINK II Position default Position loop in the Servo Driver CJ1W MCH 72 sends position ref erence to the Servo Driver via MECHATROLINK II 41 MECHATROLINK II Position loop in the Trajexia Speed CJ1W MCH 72 sends speed refer ence to the Servo Driver via MECHATROLINK II 42 MECHATROLINK II Position loop in the Trajexia Torque CJ1W MCH72 sends torque refer ence to the Servo Driver via MECHATROLINK II 43 External driver con Stepper output Pulse and direction outputs Posi nected to encoder tion loop is in the driver CJ1W input MCH72 sends pulses and receives no feed back 44
17. 288 How to s Section 5 1 5 1 3 4 Example 2 called limited axis or finite axis A typical example of a limited axis is a ball screw as shown in When the mechanical system always moves in the same direction it reaches the overflow of the multiturn counter In this case the value of Pn205 must guarantee that the overflow always occurs in the same position with respect to the machine This is called unlimited axis and a typical example of it is a turntable shown in It can be achieved with the following equation the smallest value of m such that n machine_cycles m motor_revolution Because n and mare integers Pn205 m 1 This setting is explained in the following example Full turn 360 M 16 bit absolute 1 10 Gear encoder The mechanical system consists of simple rotary table shown in the figure A servo motor with 16 bit absolute encoder is used The gear ratio of the gearbox is 1 10 The desired user units are degree of angle The rotary table is divided in six sections of 60 degrees each Therefore the machine_cycle is 60 degrees When we apply the last equation to the above we get 10 motor_revolution 1 machine_revolution 6 machine_cycle Simplification of this equation gives 5 motor_revolution 3 machine_cycle This results in Pn205 5 1 4 We calculate the parameters as we did in example 1 This gives UNITS 2 2048 Pn202 32 Pn203 36 289 How t
18. Code Description 2 Following error this is the real FE when ATYPE 40 is used 8 Feedback speed With ATYPE 41 Units Max Speed 40000000H with other ATYPE Units reference units s 9 Command speed units same as in Feedback Speed 10 Target speed units same as in Feedback Speed 11 Torque Force reference With ATYPE 42 Units Max Torque 40000000H with other ATYPE Units over nominal Torque 14 Monitor selected with Pn813 0 Useful to monitor servo monitors Unxxx 15 Monitor selected with Pn813 1 Useful to monitor servo monitors Unxxx When applied to an axis driven by the Servo Driver connected to the system via the Encoder Interface this parameter sets outputs of the Encoder Interface Set bit 8 of this parameter to switch on OUT 0 for an axis Set bit 9 of this parameter to switch on OUT 1 for an axis Keep in mind that the same outputs are used by the HW_PSWITCH command The command is executed on the driver for the base axis set by BASE The base axis can be changed with the AXIS modifier as with all the other axis commands and parameters Arguments N A Example DRIVE_CONTROL AXIS 2 256 In this example OUT 0 is switched on for axis 2 connected using the Encoder Interface See also N A 4 2 77 DRIVE_INPUTS 140 Type Syntax Description Axis parameter DRIVE_INPUTS This parameter monitors the status of the inputs of the Servo Driver connected via the MECHATROLINK II bus The parameter value is updated each SE
19. D E 0 1 12 13 14 i516 7 i7 16 i5 4 13 12 4 i0 C Encoder edges The figure shows phase A A phase B B and the number of counts C for forward or clockwise rotation D and reverse or counterclockwise rotation E The signals A B and Z appear physically as A and A B and B and Z and Z They appear as differential signals on twisted pair wire inputs This makes sure that common mode noise is rejected When you use an encoder from other manufacturers check the encoder specification for the phase Wiring Section 2 2 Note 2 2 3 2 Registration advancement carefully If the phase definition is different from the phase definition of the standard OMRON equipment reverse the B phase wiring between the CJ1W MCH 72 and the encoder The encoder interface of the CJ1W MCH72 does not have termination inside In case of long distances or disturbed communication add external termination to the interface When using the incremental encoder interface of the CJ1W MCH 72 the CJ1W MCH 72 can capture the position of the Flexible Axis in a register when an event occurs The event is called the print registration input On the rising or falling edge of an input signal either the Z marker or one of the first 2 digital inputs the CJ1W MCH 72 captures the position of the axis in the hardware You can use this position to correct possible errors between the actual position and the desired position To set up the print registrati
20. DATUM 0 CLEAR BIT 0 status_ bits MECHATROLINK devices reset sequenc 326 Practical examples Section 5 2 IF SYSTEM ERROR AND 40000 lt gt 0 THEN Omron Auto Generated ML IO Warning Automated code section any manual code changes will be lost Omron Auto Generated ML IO End Same with the other IO devices ELSEIF SYSTEM ERROR lt gt 0 THEN Other system error needs initialisation of the system EX warning seq IF READ BIT 15 diag01 THEN Clear servodrive warning if any IF res bit 1 THEN FOR i 0 TO max axis BASE i IF ATYPE gt 40 AND ATYPE lt 42 THEN IF DRIVE STATUS AND 2 gt 0 THEN DRIVE CLEAR T ENDIF NEXT i ENDIF ENDIF RETURN Mao EE DLEE EEE E SEE EEE E ETOP EEE EE LE EEEE E E SE EEEE E E E EENET ES E PE EE ES monitoring Add monitoring depending on the application RETURN absencoder To be implemented in the future RETURN system detection status_word 0 action 0 VR status bits 0 327 Practical examples Section 5 2 Omron Auto Generated Units Warning Automated code section any manual code changes will be lost Unit Variables reset R diag01 0 R diag02 0 R diag03 0 R system01 0 Unit Detection MLO4 Unit IF COMMSTYPE SLOT 0 lt gt 36 THEN PRINT Error Comms Type for unit 0 is not MLO4 SET BIT 0 diag03 ENDIF
21. In this example the program waits until the measured position on axis 0 exceeds 150 and then starts a movement on axis 1 WAIT UNTIL MPOS AXIS 0 gt 150 MOVE 100 AXIS 1 The expressions evaluated can be as complex as you like provided they follow BASIC syntax for example WAIT UNTIL DPOS AXIS 2 lt 0 OR IN 1 ON The above line would wait until the demand position of axis 2 is less than or equal to 0 or input 1 is on N A 263 All BASIC commands Section 4 2 4 2 263 WDOG Type System parameter Syntax WDOG Description The WDOG parameter contains the software switch which enables the Servo Driver using the RUN Servo on input signal The enabled Servo Driver will control the servo motor depending on the speed and torque reference values WDOG can be turned on and off under program con trol on Command Line Terminal The WDOG is also controlled by the PLC CPU The WDOG can only be switched on when the Enable Watchdog bit control word n bit 1 is set The Servo Driver will automatically be disabled when a MOTION_ERROR occurs A motion error occurs when the AXISSTATUS state for one of the axes matches the ERRORMASK set ting In this case the software switch WDOG will be turned off the MOTION_ERROR parameter will have value different than O and the ERROR_AXIS parameter will contain the number of the first axis to have the error Also when the Enable Watchdog bit control word n bit 1 is reset the WDOG will be swi
22. Note Communications Channels greater than 3 will only be used when running the Trajexia Studio software Arguments N A Example PRINT 5 Communication port 1 See also N A 4 2 17 ABS Type Mathematical function Syntax ABS expression Description The ABS function returns the absolute value of an expression Arguments expression Any valid BASIC expression Example IF ABS A gt 100 THEN PRINT A is outside range 100 100 See also N A 4 2 18 ACC Type Axis command Syntax ACC rate Description Sets the acceleration and deceleration at the same time This command gives a quick method to set both ACCEL and DECEL Acceleration and deceleration rates are recommended to be set with the ACCEL and DECEL axis parameters Arguments rate The acceleration deceleration rate in units s2 You can define the units with the UNITS axis parameter Example ACC 100 Sets ACCEL and DECEL to 100 units s See also ACCEL DECEL UNITS 89 All BASIC commands Section 4 2 4 2 19 ACCEL 4 2 20 ACOS 4 2 21 ADD_DAC 90 Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also Type Syntax Axis parameter ACCEL expression The ACCEL axis parameter contains the axis acceleration rate The rate is set in units s The parameter can have any positive value includ ing zero N A BASE 0 ACCEL 100 Set acceleration rate PRINT Acce
23. Program control command GOSUB label RETURN The GOSUB structure enables a subroutine jump GOSUB stores the position of the line after the GOSUB command and then jumps to the specified label Upon reaching the RETURN statement program execu tion is returned to the stored position Note Subroutines on each task can be nested up to 8 levels deep label A valid label that occurs in the program An invalid label will give a compilation error before execution Labels can be character strings of any length but only the first 15 characters are significant Alternatively line numbers may be used as labels 169 All BASIC commands Section 4 2 4 2 127 GOTO 4 2 128 HALT 4 2 129 HEX 170 Example See also Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also Type Syntax Description Arguments main GOSUB routine GOTO main routine PRINT Measured position MPOS CHR 13 RETURN GOTO Program control command GOTO label The GOTO structure enables a jump of program execution GOTO jumps program execution to the line of the program containing the label e label A valid label that occurs in the program An invalid label will give a compilation error before execution Labels can be character strings of any length but only the first 15 characters are significant Alternatively line numbers may be used as labels loop PRINT
24. The speed profile in this figure shows a simple MOVE operation Axis A is the time axis B is the speed The UNITS parameter for this axis has been defined for example as meters The required maximum speed has been set to 10 m s In order to reach this speed in one second and also to decelerate to zero speed again in one second both the acceleration as the deceleration rate have been set to 10 m s The total distance travelled is the sum of distances travelled during the acceleration constant speed and deceleration segments Suppose the distance moved by the MOVE command is 40 m the speed profile is given by the figure ACCEL 5 40 gt OE DECEL 10 SPEED 10 MOVE 40 The two speed profiles in these figures show the same movement with an acceleration time respectively a deceleration time of 2 seconds Again Axis A is the time axis B is the speed ACCEL 10 DECEL 5 SPEED 10 MOVE 40 Move calculations The following equations are used to calculate the total time for the motion of the axes e The moved distance for the MOVE command is D e The demand speed is V e The acceleration rate is a e The deceleration rate is d Acceleration time y a 2 Acceleration distance vV 2a Deceleration time t Motion control concepts Section 1 3 2 Deceleration distance v 2d 2 Constant speed distance D V a d 2ad Total time DP V a d V 2ad 1 3 1 2 Continuous moves 1 3 2 CP control The FORWARD
25. Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also This parameter works in conjunction with D_ZONE_MIN to clamp the S_REF output to zero when the demand movement is complete and the magnitude of the Following Error is less than the D_ZONE_MIN value The servo loop will be reactivated when either the Following Error rises above the D_ZONE_MAX value or a fresh movement is started N A D_ZONE_MIN 3 D_ZONE_MAX 10 With these 2 parameters set as above the S_REF output will be clamped at zero when the movement is complete and the Following Error falls below 3 When a movement is restarted or if the Following Error rises above a value of 10 the servo loop will be reactivated D_ZONE_MIN System parameter D_ZONE_MIN value This parameter works in conjunction with D_LZONE_MAX to clamp the S_REF output to zero when the demand movement is complete and the magnitude of the Following Error is less than the D_ZONE_MIN value The servo loop will be reactivated when either the Following Error rises above the D_ZONE_MAX value or a fresh movement is started N A D_ZONE_MIN 3 D_ZONE_MAX 10 With these 2 parameters set as above the S_REF output will be clamped at zero when the movement is complete and the Following Error falls below 3 When a movement is restarted or if the Following Error rises above a value of 10 the servo loop will be reactivated D_ZONE_MAX
26. from device ence data outside current block 125 Disk error Invalid MBR 126 Disk error Invalid boot sector 127 Disk error Invalid sector clus 128 File error Disk full ter reference 129 File error File not found 130 File error Filename already exists 131 File error Invalid filename 132 File error Directory full 133 Command only allowed when 134 expected running Trajexia Studio 135 FOR expected 136 INPUT OUTPUT APPEND expected 137 File not open 138 End of file Arguments N A Example gt gt PRINT RUN_ERROR PROC 5 9 0000 See also BASICERROR ERROR_LINE PROC 242 All BASIC commands Section 4 2 4 2 215 RUNTYPE 4 2 216 S_REF Type Syntax Description Arguments Example Example See also Type Syntax Description Arguments Example Program command RUNTYPE program_name auto_run task_number The RUNTYPE command determines whether the program specified by program_name is run automatically at start up or not and which task it is to run on The task number is optional if omitted the program will run at the highest available task The current RUNTYPE status of each programs is displayed when a DIR command is executed If any program has compilation errors no programs will be started at power up To set the RUNTYPE using Tra jexia Studio set the Priority property of the program program_name The name of the program whose RUNTYP
27. n 12 0 13 Process Error flags for processes 1 14 14 15 Always 0 n 13 0 7 Configurable data block transfer error Each bit corresponds to a block transferred from PLC CPU to CJW MCH 72 A bit being on indicates a transfer error See 3 3 2 8 15 Configurable data block transfer error Each bit corresponds to a block transferred from CJW MCH 72 to PLC CPU A bit being on indicates a transfer error See 3 3 2 3 3 2 Configurable data The amount of configurable data that is exchanged between the PLC CPU and the CJ1W MCH72 each PLC cycle is 8 blocks from the PLC CPU to the CJ1W MCH72 and 8 blocks vice versa Thus 16 blocks of data are exchanged in one PLC cycle A block is a continuous memory area or array area The total size of all 16 blocks must be less than or equal to 2000 words The configurable data can be exchanged between the VR IN OP AIN AOUT and Axis Status memory areas of the CJ1W MCH 72 and the ClO DM and EM memory areas of the PLC CPU Because the PLC CPU and the CJ1W MCH72 use different numeric formats the data that is exchanged must be cast The table below lists the casting of numeric data per memory area PLC data format CJ1W MCH72 Memory area Data format 32 bit IEEE float VR floating point 16 bit word VR floating point IN bit array OP bit array AIN floating point AOUT floating point Digital and analogue inputs and outputs may not be physically p
28. 35 37 52 Stepper output 28 System architecture 16 T Torque control 27 Tracing and monitoring example 314 U Unit components 35 Unit number 37 Create I O table 52 Setting 51 Units example 285 V Virtual axis 26 Index Word allocations 37 359 Index 360 Revision History Revision history A manual revision code appears as a suffix to the catalog number on the front cover of the manual Cat No I55E EN 01 Revision code The following table outlines the changes made to the manual during each revision Revision code Date Revised content 01 August 2008 First version 02 February 2009 Specified additional command bits and status bits in the Data Exchange section specified additional bits in the PLC_STATUS command Added the BASIC com mands FLASHVR and INTEGER_READ and added servo driver I O mapping and registration for G Series Servo Drivers The section troubleshooting is improved 03 April 2009 For UL certified applications an external Class 2 power supply is required see section 2 2 1 1 361 362 OMRON Authorized Distributor Cat No I55E EN 03 Note Specifications subject to change without notice Printed in Europe
29. 53 Inverter as axis 29 Position control 26 Specifications 56 Speed control 27 Torque control 27 MECHATROLINK II connector 39 Modifier Slot 80 Motion buffers 16 31 Index Motion control 4 Continuous path 7 Electronic gearing 9 Point to point 4 Motion sequence 2 16 MTYPE 31 Multi tasking example 23 N NTYPE 31 O Operand 78 Mathematical 78 Origin search example 300 P Parameter Axis 74 Communication 77 T O 78 Slot 80 System 82 Task 83 Peripherals 16 Position control 26 Position loop algorithm 24 Position mode example 280 Position on a grid example 337 Position reference 28 Position with product detection example 336 Priority Program control 22 Process 3 Process 0 22 Process buffer 31 Profile generator 24 Program control 16 Program control priority 22 R Registration example 305 Resonant frequency 33 Rigidity 33 S Servo axis 28 Servo Driver characteristics example 295 Servo period 2 Examples 18 Rules 19 Servo system 13 CJ1W MCH72 operation 13 Motion control algorithm 14 Semi closed loop 13 Shell example 320 Single axis example 335 Specifications Dimensions 55 Encoder connector 43 Encoder interface 57 T O connector 41 MECHATROLINK II 56 System 56 Unit 55 Speed control 27 Speed mode example 271 Speed reference 28 29 EnDat 28 SSI 28 SSI 28 Startup example 268 Status LEDs
30. 8 S FFFFFO 2 TABLE 16 515 800 SFFFOFF 2 TABLE 20 1 MECHATROLINK 0 20 44 SJDE O2ANA OY REGIST 1 VR system01 0 i r W HILE TABLE i lt gt 1 IF NOT DRIVE READ TABLE i TABLE it 3 system01 THEN SET BIT 0 diag02 ELSE IF TABLE it t2 SFFFFFF THEN IF VR system01 lt gt TABLE it 1 TH IF NOT DRIVE WRITE TABLE i TABLE i 3 TABLE i 1 1 THEN SET BIT 1 diag02 eal Z E 5 H res 1 ENDIF ENDIF ELSE Parameter set using Mask IF VR system01 AND NOT TABLE i 2 lt gt TABLE i 1 THEN VR system01 VR system01 AND TABLE i 2 OR TABLE i 1 IF NOT DRIVE WRITE TABLE i TABLE i 3 VR system01 1 THEN SET BIT 1 diag02 ELSE res 1 ENDIF ENDIF ENDIF ENDIF i it4 WEND Reset drive if necessary IF res 1 THEN IF NOT DRIVE RESET THEN SET BIT 0 diag02 NDIF m Axis Parameters BASE 0 Axis Name Flex00 ATYPE 44 Axis Type Flexible Servo UNITS 1024 0000 330 Practical examples Section 5 2 EP_DIST 5000000 0000 EP OPTION 0 RRORMASK 2 68 XIS_ENABLE 0 RIVE CONTROL 0 _GAIN 1 0000 I_GAIN 0 0000 D_GAIN 0 0000 OV_GAIN 0 0000 VEF_GAIN 0 0000 PEED 50 0000 CEL 100 0000 EL 100 0000 REEP 100 0000 PEED 100 0000 E LIMIT 10 0000 0 D_IN 1 0
31. 9 32 UNITS 2 2 2 Pn203 360 36 36 This gives us the solution UNITS 2 256 Pn202 32 Pn203 36 With these values the command MOVE 28 rotates the table 28 degrees in positive direction 5 1 3 3 Absolute encoder setting The absolute encoder keeps the current motor position even if there is no power supplied The absolute encoder gives the position within one turn that is a fraction from 0 to and excluding 1 and it has a multiturn counter You can set the multiturn behaviour of the absolute encoder with the parameter Pn205 of the Sigma ll Servo Driver This parameter adjusts the maximum number of turns that the counter counts before it has an overflow For more information on Servo Driver parameter Pn205 see the Sigma ll Servo Driver manual Taking this parameter value into account the maximum position value the encoder can signal is max_encoder_count_value Pn205 1 encoder_counts 1 which makes it Pn205 complete turns plus the position within one turn the fraction from 0 to and excluding 1 When the MECHATROLINK II connection is established with the drive the absolute encoder position is read from the drive and the value is written in MPOS after the conversion UNITS x Pn202 Pn203 When the mechanical system has a limited travel distance to move like in a ball screw the value of the parameter Pn205 should be set large enough to have an overflow of the counter out of the effective position This is
32. All BASIC commands Section 4 2 4 2 50 CLEAR_PARAMS Type Syntax Description Arguments Example See also 4 2 51 CLOSE_WIN Type Syntax Description Arguments Example See also 4 2 52 CLUTCH_RATE Type Syntax Description Arguments Example See also 120 System command CLEAR_PARAMS Clears all variables and parameters stored in flash EPROM to their default values The CLEAR_PARAM will erase set to 0 all the VRs stored using FLASHVR command This command cannot be performed if the controller is locked N A No example N A Axis parameter CLOSE_WIN CW The CLOSE_WIN axis parameter defines the end of the window inside or outside which a registration mark is expected The value is in user units N A CLOSE_WIN 10 AXIS OPEN_WIN REGIST UNITS Axis parameter CLUTCH_RATE The CLUTCH_RATE axis parameter defines the change in connection ratio when using the CONNECT command The rate is defined as amount of ratio per second The default value is set to a high value 1000000 in order to ensure compatibility with other units Note The operation using CLUTCH_RATE is not deterministic in posi tion If required use the MOVELINK command instead to avoid unnec essary phase difference between base axis and linked axis N A CLUTCH_RATE 4 This setting will imply that when giving CONNECT 4 1 it will take one second to reach the full connection AXIS CONNECT MOVELINK All
33. Arguments Example See also 4 2 11 lt Is less than Type Syntax Description Arguments Example See also Mathematical function expression1 gt expression2 The operator gt returns TRUE if expression1 is greater than or equal to expression2 otherwise it returns FALSE expression1 Any valid BASIC expression expression2 Any valid BASIC expression IF a gt 10 THEN GOTO label1 If variable a contains a value greater than or equal to 10 program exe cution continues at label label1 Otherwise program execution contin ues with the next statement N A Mathematical function expression1 lt expression2 The operator lt returns TRUE if expression1 is less than expression2 otherwise it returns FALSE expression1 Any valid BASIC expression expression2 Any valid BASIC expression IF a lt 10 THEN GOTO label1 If variable a contains a value less than 10 program execution continues at label label1 Otherwise program execution continues with the next statement N A 4 2 12 lt Is less than or equal to Type Syntax Description Arguments Example See also Mathematical function expression1 lt expression2 The operator lt returns TRUE if expression1 is less than or equal to expression2 otherwise it returns FALSE expression1 Any valid BASIC expression expression2 Any valid BASIC expression IF a lt 10 THEN GOTO label1 If variable a contains
34. N4 9 e Inverter F7 G7 V1000 B1 01 3 B1 02 3 Make sure that the Inverter firmware supports the MECHATROLINK II board The command returns 1 if successfully executed and 0 if failed The command sent to the Inverter corresponds with the bits given in the table below Bit Value Command Description 0 Hex 1 Run forward 1 Hex 2 Run reverse 2 Hex 4 Inverter multifunction Input 3 3 Hex 8 Inverter multifunction Input 4 4 Hex 10 Inverter multifunction Input 5 5 Hex 20 Inverter multifunction Input 6 6 Hex 40 Inverter multifunction Input 7 7 Hex 80 Inverter multifunction Input 8 Only G7 8 Hex 100 External fault 9 Hex 200 Fault reset 10 Hex 400 Inverter multifunction Input 9 only G7 11 Hex 800 Inverter multifunction Input 10 only G7 12 Hex 1000 Inverter multifunction Input 11 only G7 13 Hex 2000 Inverter multifunction Input 12 only G7 14 Hex 4000 Fault history data clear 15 Hex 8000 External BB command 177 All BASIC commands Section 4 2 If with function 8 the mode parameter is set to 1 the Inverter is set into servo axis mode The corresponding axis number is assigned by the CJ1W MCH 72 using the formula AxisNo MECHATROLINK II Station Number 0x21 Therefore the calculated AxisNo must not be occupied by another axis connected If with function 8 the mode parameter is set to 0 which is the default value at power up the Inverter is set into normal Inverter mode Arguments station The
35. The number of the alarm to read See the Inverter manual from The start address of the input to read length The length of the input to read Example No example See also N A Type Syntax Description Arguments System command INVERTER_WRITE 0 station 0 param_number param_size VR mode INVERTER_WRITE 0 station 2 value INVERTER_WRITE 0 station 3 value INVERTER_WRITE writes the parameter speed reference or torque reference from the Inverter connected to the system via the MECHA TROLINK II bus There are three INVERTER_WRITE functions e 0 Writes an Inverter parameter e 2 Writes the speed reference e 3 Writes the torque reference To use an Inverter via MECHATROLINK II you should put the command and the reference via communication option Inverter MV V7 N3 3 N4 9 e Inverter F7 G7 V1000 B1 01 3 B1 02 3 Make you sure that the Inverter firmware supports the MECHATRO LINK II board The command returns 1 if successfully executed and 0 if failed The result if any is returned in the selected VR e station The MECHATROLINK II station number of the Inverter param_number The number of the parameter to write See the Inverter manual param_size The size of the parameter to write 2 or 4 bytes Most of the Inverter parameters are 2 bytes long See the Inverter manual VR The address in the VR memory of the CJ1W MCH 72 where the new value for the parameter is mode 0 just wr
36. The timeout is set to 5 seconds 158 All BASIC commands Section 4 2 Example FINS_COMMS 1 0 0 0 80 50 10 0 300 3000 This command writes 10 words length 10 of CJ1W MCH72 VR mem ory as integers local_area 0 starting from VR 300 local_offset 300 to the CIO area of the PLC remote_area 80 starting from ClO50 remote_offset 50 Thus the values in the CJ1W MCH72 memory range VR 300 to VR 309 are placed in mem ory CIO50 to CIO59 of the PLC The timeout is set to 3 seconds See also N A 4 2 112 FLAG Type System command Syntax FLAG flag_number value Description The FLAG command is used to set and read a bank of 24 flag bits The FLAG command can be used with one or two parameters With one parameter specified the status of the given flag bit is returned With two parameters specified the given flag is set to the value of the second parameter The FLAG command is provided to aid compatibility with earlier controllers and is not recommended for new programs Arguments flag number The flag number is a value from 0 23 value If specified this is the state to set the given flag to i e ON or OFF This can also be written as 1 or 0 Example FLAG 21 ON Set flag bit 21 on See also N A 4 2 113 FLAGS Type System command Syntax FLAGS value Description Read and set the FLAGS as a block The FLAGS command is provided to aid compatibility with earlier controllers and is not recommended for new
37. Two types of data are exchanged during a data exchange e Control and status data e Configurable data 3 3 1 Control and status data The CJ1W MCH 72 has 13 control and status words The control and status data is in the PLC ClO memory at word location n where n is equal to 1500 25 x unit_number 3 3 1 1 Control data The PLC program can directly control the CJ1W MCH72 with control word n It can execute the following functions Word Bit Description Value Function n 0 Enable execution 0 No BASIC programs can be executed 0 Allow BASIC programs to be executed 1to0 Stop BASIC programs switches off the axes watchdog stop all movement clear movement buffers and clear the digital outputs Oto1 Executes the programs that are configured to run at power up 1 Enable watchdog 0 Forces the watchdog to be off 1 Enables BASIC programs to control the axes watchdog 1to0 Switches off the axes watchdog stop all movement and clear movement buffers Oto1 Clear movement buffers 2 Deceleration stop Oto1 Stop BASIC programs and start deceleration RAPIDSTOP 3 Enable outputs 0 Forces digital outputs to be OFF 1 Digital outputs reflect the state of OP 8 15 4 15 Reserved 0 Note Setting bit 2 to 0 has no function 62 Data Section 3 3 3 3 1 2 Status data Status words n 1 and n 2 return the status of the CJU1W MCH 72 The table below lists the layout o
38. aloe telat h io Sloe oc Gains are not 1 Her i used Demanded 1 Following Speed position 1 error command LS Sbeceae TRS J Measured postion gt VSiSitisisia ise a oe In this mode the position and speed loop are closed in the Servo Driver The CJ1W MCH72 sends the position command through the MECHATROLINK II network to the Servo Driver and reads the position feedback Note that this system has no sample delay as compared to the position loop in the Servo Driver the Demanded Position in cycle n with the Measured Position in cycle n The CJ1W MCH 72 for the internal handling continues to use its own position loop so the Following Error that read in the Axis parameter in the CJ1W MCH72 is not the real one in the Servo Driver To read the correct Following Error use DRIVE_MONITOR Adjust the rigidity of the servo the speed loop gain and the position loop gain at the same time using just proportional position gain The results are similar to the MECHATROLINK II Speed mode with the advantages e The tuning is more simple only the rigidity Fn001 and if necessary the feedforward gain Pn109 needs to be set e The position loop in the servo is faster 250us than in the CJ1W MCH72 and it is turned together with the speed loop e There is no sample time delay between Target position and Measured position To do a finetune the different gain parameters can be changed individu
39. fail fail 1 ENDIF IF IN stop ON THEN OP 8 ON VR cycle_flag 0 ELSEIF IN start_cycle ON THEN VR cycle_flag 1 ELSEIF IN step1 ON THEN VR cycle_flag 99 ENDIF 173 All BASIC commands Section 4 2 Example See also 4 2 136 IN Type Syntax Description Arguments Example Example See also 174 IF key_char 31 THEN GOSUB char_1 ELSEIF key_char 32 THEN GOSUB char_2 ELSEIF key_char 33 THEN GOSUB char_3 ELSE PRINT Character unknown ENDIF N A I O function IN input_number final_input_number J IN The IN function returns the value of digital inputs IN input_number final_input_number will return the binary sum of the group of inputs in range input_number final_input_number The two arguments must be less than 24 apart IN input_number will return the value of the particular input speci fied by the parameter input_number input_number The number of the input for which to return a value The range for this parameter is 0 255 final_ input_number The number of the last input for which to return a value The range for this parameter is 0 255 The following lines can be used to move to the position set on a thumb wheel multiplied by a factor The thumb wheel is connected to inputs 4 5 6 and 7 and gives output in BCD moveloop MOVEABS IN 4 7 1 5467 WAIT IDLE GOTO moveloop The MOVEABS command is constructed as follows Step 1 IN 4 7 will get
40. loop IF VR end_ pos lt gt current end pos THEN Recalculate the CAM Table FOR i 0 TO 999 TABLE i VR end_pos 1 COS 2 PI i 999 2 NEXT i current end pos VR end pos ENDIF GOTO loop The VR end_pos value can be changed from some other program or externally from another controller using FINS messaging In this case the CAM table must be recalculated The creation of the CAM table is complete The initialization of the desired axis and system parameters for tracing is Initializations FOR i 0 TO 1 BASE i ATYPE 40 NITS 8192 EP DIST 20 U REP REP OPTION 1 FE _LIMIT 1 DRIVE_CONTROL 11 SPEED 8 A D D S CCEL 50 ECEL 50 EFPOS 0 ERVO ON CANCEL NEXT i WDOG ON BASE 1 Scope settings 315 How to s Section 5 1 1 sample each 2 servo cycles Information stored in TABLE 1000 to TABLE 4999 Because we capture 4 channels we have 1000 samples per channel MPOS AXIS 0 is stored in TABLE 1000 to TABLE 1999 DPOS AXIS 1 is stored in TABLE 2000 to TABLE 2999 Torque reference for AXIS 1 is stored in TABLE 3000 to TABLE 3999 MSPEED AXIS 1 is stored in TABLE 4000 to TABLE 4999 The capture covers 1000 samples 2ms sample 2seconds SCOPE ON 2 1000 4999 MPOS AXIS 0 DPOS DRIVE MONITOR MSPEED FORWARD AXIS 0 Move the master axis forward TRIGGER Start tracing and storing of parameters WHILE NOT MOTION ERRO
41. particularly at low speeds It can be worthwhile to average several readings if a stable value is required at low speeds Arguments N A Example No example See also AXIS SERVO_PERIOD VP_SPEED UNITS 4 2 166 MTYPE Type Axis parameter read only Syntax MTYPE Description The MTYPE parameter contains the type of move currently being exe cuted The possible values are given in the table below Move number Move type 0 IDLE no move 1 MOVE 2 MOVEABS 3 MHELICAL 4 MOVECIRC 5 MOVEMODIFY 10 FORWARD 11 REVERSE 12 DATUM 13 CAM 14 JOG_FORWARD refer to FWD_JOG 15 JOG_REVERSE refer to REV_JOG 20 CAMBOX 21 CONNECT 22 MOVELINK 206 All BASIC commands Section 4 2 MTYPE can be used to determine whether a move has finished or if a transition from one move type to another has taken place A non idle move type does not necessarily mean that the axis is actually moving It can be at 0 speed part way along a move or interpolating with another axis without moving itself Arguments N A Example No example See also AXIS NTYPE 4 2 167 NEG_OFFSET Type System parameter Syntax NEG_OFFSET value Description For Piezo Operation This allows a negative offset to be applied to the output S_REF signal from the servo loop An offset of 327 will represent an offset of 0 1 volts It is suggested that as offset of 65 to 70 of the value required to make the stage move in an open loop
42. tion is reached N A No example N A 153 All BASIC commands Section 4 2 4 2 104 FE Type Syntax Description Arguments Example See also 4 2 105 FE_LATCH Type Syntax Description Arguments Example See also 4 2 106 FE_LIMIT Type Syntax Description Arguments Example See also 154 Axis parameter read only FE The FE axis parameter contains the position error in user units This is calculated by the demand position DPOS axis parameter minus the measured position MPOS axis parameter The value of the Following Error can be checked by using the axis parameters FE_LIMIT and FE_RANGE N A No example AXIS DPOS FE_LIMIT FE_LRANGE MPOS UNITS Axis parameter read only FE_LATCH Contains the initial FE value which caused the axis to put the controller into MOTION_ERROR This value is only set when the FE exceeds the FE_LIMIT and the SERVO parameter has been set to OFF FE_LATCH is reset to 0 when the SERVO parameter of the axis is set back to ON N A No example N A Axis parameter FE_LIMIT FELIMIT The FE_LIMIT axis parameter contains the maximum allowed Following Error in user units When exceeded bit 8 of the AXISSTATUS parame ter of the axis will be set If the ERRORMASK parameter has been properly set a motion error will be generated and WDOG enable relay will be reset to 0 This limit is used to guard against fault conditions such as mechanical lock
43. 101 to VR 110 are used to hold an array of ten 1 s and 0 s to signal that the positions are full 1 or empty 0 The gantry puts the load down in the first free position Part of the program to achieve this would be as follows movep MOVEABS 115 Move to first put down position FOR VR 0 101 TO 110 IF VR VR 0 0 THEN GOSUB load MOVE 200 200 is spacing between positions NEXT VR 0 PRINT All positions are full WAIT UNTIL IN 3 ON GOTO movep load Put load in position and mark array OP 15 OFF VR VR 0 1 RETURN The variables are backed up by a battery so the program here could be designed to store the state of the machine when the power is off It would of course be necessary to provide a means of resetting com pletely following manual intervention loop Assign VR 65 to VR 0 multiplied by axis 1 measured position VR 65 VR 0 MPOS AXIS 1 PRINT VR 65 GOTO loop CLEAR_BIT READ_BIT SET_BIT TABLE System command VRSTRING vr_start Combines the contents of an array of VR variables so that they can be printed as a text string All printable characters will be output and the string will terminate at the first null character found i e VR n contains 0 vr_start number of first VR in the character array PRINT 5 VRSTRING 100 N A 261 All BASIC commands Section 4 2 4 2 259 WA 4 2 260 WAIT IDLE 262 Note Type Syntax Description Arguments Example Se
44. 2 98 ERRORMASK 4 2 99 EX 4 2 100 EXP 152 A Caution Type Syntax Description Arguments Example See also Axis parameter ERRORMASK The ERRORMASK axis parameter contains a mask value that is ANDed bit by bit with the AXISSTATUS axis parameter on every servo cycle to determine if a motion error has occurred If the result of the AND operation is not zero the motion error has occurred When a motion error occurs the enable switch WDOG will be turned off the MOTION_ERROR parameter will have value different than 0 and the ERROR_AXIS parameter will contain the number of the first axis to have the error Check the AXISVALUES parameter for the status bit allocations The default setting of ERRORMASK is 268 N A No example AXIS AXISSTATUS MOTION_ERROR WDOG It is up to the user to define in which cases a motion error is generated For safe operation it is strongly recommended to generate a motion error when the Following Error has exceeded its limit in all cases This is done by setting bit 8 of ERRORMASK Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also System command EX option Resets the controller as if it were being powered up again There are two types of reset performed by the EX command EX without the argument or EX 0 does the software reset of the controller EX 1 does the hardware reset of the controller N A No exam
45. 60000 1073741824 enc_ resolution max_ speed Change the rigidity Fn001 according to the mechanical system Change feedforward gain Pn109 if required If set to 1 and Pn202 Pn203 1 the UNITS are encoder counts UNITS 1 Theoretical FE we will have running the motor at max speed without VFF GAIN in MECHATROLINK SPEED E LIMIT 1073741824 P_GAIN UNITS SPEED is set to 1 3 of max speed SPEED max_speed73 enc_resolution 60 UNITS ACCEL in 200ms from 0 to max speed ACCEL SPEED 0 2 DECEL in 200ms from max speed to 0 DECEL SPEED 0 2 Practical examples Section 5 2 5 2 4 Single axis program 5 2 4 1 Example Trace1 Device1 X x SWS Oa Sitv amp I amp Q o 1 1 1 1 1 60 80 100 120 140 160 180 200 Time ms Display Plot Parameter Offset Change ML MSPEED 0 ML DRIVE_MONITOR L 0 C 0 L 0 L J This program is a simple program to run one axis only GOSUB homing BASE 0 DEFPOS 0 WA 100 loop MOVE 1440 WAIT IDLE WA 100 GOTO loop The units are degrees in this example therefore e 13 bit encoder e Pn202 32 e Pn203 45 e UNITS 32 The graph in the figure is typical for this point to point movement with linear acceleration Note the following During linear acceleration the graph of the position is parabolic bec
46. 72 battery backed up RAM memory in the flash EPROM memory Whether the programs stored in the flash EPROM memory are copied to RAM at start up is controlled by the POWER_UP system parameter Note Trajexia Studio offers this command as a command on the Online menu N A No example POWER_UP RUNTYPE System parameter read only ERROR_AXIS The ERROR_AXIS axis parameter contains the number of the axis which has caused the motion error A motion error occurs when the AXISSTATUS state for one of the axes matches the ERRORMASK setting In this case the enable switch WDOG will be turned off the MOTION_ERROR parameter will have value different than 0 and the ERROR_AXIS parameter will contain the number of the first axis to have the error Note The value of ERROR_AXIS is not cleared when the error condi tion is fixed It is only changed when a new error occurs N A No example AXISSTATUS ERRORMASK MOTION_ERROR WDOG Task parameter read only ERROR_LINE The ERROR_LINE parameter contains the number of the line which caused the last BASIC run time error in the program task This value is only valid when the BASICERROR parameter is TRUE Each task has its own ERROR_LINE parameter Use the PROC modi fier to access the parameter for a certain task Without PROC the cur rent task will be assumed N A gt gt PRINT ERROR_LINE PROC 4 23 0000 BASICERROR PROC RUN_ERROR 151 All BASIC commands Section 4 2 4
47. Active low inputs are used to enable fail safe wiring Arguments sequence See the table below sequence Description value 0 The DATUM 0 command will clear the motion error The currently measured position is set as the demand position this is especially use ful on stepper axes with position verification DATUM 0 also clears the Following Error that exceeded the FE_LIMIT condition in the AXISSTATUS register for ALL axes It sets these bits in AXXISSTATUS to zero Bit 1 Following Error Warning Bit 2 Remote Driver Comms Error Bit 3 Remote Driver Error Bit 8 Following Error Limit Exceeded Bit 11 Cancelling Move Note that the status can not be cleared if the cause of the problem is still present DATUM 0 must only be used after the WDOG is set to OFF otherwise there will be unpredictable errors on the motion 127 All BASIC commands Section 4 2 128 sequence value Description The axis moves at creep speed forward until the Z marker is encoun tered The demand position is then reset to 0 and the measured position corrected so as to maintain the Following Error The axis moves at creep speed in reverse until the Z marker is encoun tered The demand position is then reset to 0 and the measured position corrected so as to maintain the Following Error The axis moves at the demand speed forward until the datum switch is reached The axis then moves reverse at creep speed unt
48. Axis 5 Axis 6 Axis 7 ware aay ee Address Address Address Address Address Address 4B 4C 4D 4E 4F 50 ar A SS SSe Sek SRS SRS Kosten Psy 2 Ol ra O gt Dos E Dys E D E aS S Pos S Sse od D amp Dos A tL LA L Li Terminator 0 0 C0 co lt 0 20 0 Axis 8 Axis9 Axis10 Axis11 Axis12 Axis13 Axis14 Axis 15 e 1x CJ1W MCH72 e 16x Sigma ll Servo Driver e 1x Encoder Axis 16 e SERVO_PERIOD 4ms The CJ1W MCH 72 supports 4ms SERVO_PERIOD with 17 axes 21 Program control and multi tasking Section 1 7 1 7 Program control and multi tasking The Trajexia system has program processes and multi tasking control 1 7 1 Program control The Trajexia system can control 14 processes that are written as BASIC programs When the program is set to run the program is executed Processes 1 to 12 are low priority 13 and 14 are high priority 1 7 2 Processes The low priority process 0 is reserved for the Terminal window of Trajexia Studio This terminal window is used to write direct BASIC commands to the CJ1W MCH72 independent to other programs These commands are executed after you press the Enter button 1 7 3 Multi tasking a LT HT 1 HT 2 COMS Cycle time Each cycle time is divided into 4 time slices called CPU tasks Processes run in the first 3 CPU tasks according to the priority of the process Motion sequence and low priority processes A ar
49. BRK Brake output 26 Reserved HBB E STP E STP Emergency stop switch 27 Reserved Reserved Not used SI2 General input 2 28 1012 1012 Not used PCL General input 12 Sigma Il and Sigma V Torque limit input in positive direction GN 29 1013 1013 Notused NCL General input 13 Sigma Il and Sigma V Torque limit input in negative direction GN 30 1014 1014 Not used SIO General input 14 Sigma Il and Sigma V General input O GN 31 1015 1015 Not used S11 General input 15 Sigma Il and Sigma V General input 1 GN The inputs in the table above are located on the CN1 I O connector of the respective Servo Driver The pin arrangement of this connector is different for the respective Servo Drivers For the Sigma ll and Sigma V Servo Drivers the input signals P_OT N_OT DEC EXT1 EXT2 EXT3 BRK 1012 1013 1014 and 1015 can be mapped to pins of the CN1 I O connector To do this you must set the appropriate parameter of the Servo Driver The table below shows the possible settings and parameter values How to s Section 5 1 Input signal Parameter name Parameter CN1 pin number setting z F Sigma ll Sigma V P_OT active high Pn50A 3 0 40 SIO 13 SIO N_OT active high Pn50B 0 1 41 S11 7 S11 DEC active high Pn511 0 2 42 SI2 8 S12 3 43 SI3 9 SI3 4 44 S14 10 S
50. CJ1W MCH72 have no effect The position reference is sent to the Servo Driver Note Although MPOS and FE are updated the real value is the value in the Servo Driver The real Following Error can be monitored by the DRIVE_MONITOR parameter by set ting DRIVE_CONTROL 2 Note The MECHATROLINK II position ATYPE 40 is the recommended setting to obtain a higher performance of the servo motor 26 Motion sequence and axes Section 1 8 1 8 4 3 MECHATROLINK II speed ATYPE 41 CJ1W MCH72 SERVO SERVO OFF Position loop SERVO OFF Z N l ML II i i a Speed gt Speed Loop Profile generator NA i command i Torque Loop Speed e Demanded 1 Following position command Pe aaa ene ee ey Measured _ 7 position With SERVO ON the position loop is closed in the CJ1W MCH 72 Speed reference is sent to the Servo Driver For Mechatrolink Servo Drivers this axis type is not recommended since there is one cycle delay in the loop DPOS n is compared with MPOS n 1 With SERVO OFF the speed reference is sent via S_REF command 0x40000000 means maximum speed of the servo motor This is the recommended setting 1 8 4 4 MECHATROLINK II torque ATYPE 42 Note CJ1W MCH72 SERVO SERVO OFF Position loop SERVO OFF FN ee R 1 Ng ML II so Tue gt Profile generator 7 eee command Fi 1 Demanded ollowing Torque position error command i ELEA EAN
51. Change z ML MPOS 7 ML MSPEED DigitalInput 2 F ML FE C The value of the rigidity is increased from 6 to 8 The overshoot undershoot is smaller but the motor has more vibration The parameter values for the example are Motion Parameter values P_Gain 131072 VFF_GAIN 1573500 Fn001 8 278 How to s Section 5 1 Example 8 Trace1 Device1 X x Sas Oa alv E I ra o 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms Display Plot Parameter Value Offset Change F ML MPOS o z ML MSPEED o Digitalinput 2 o 7 ML FE o mm Opposite to the P_GAIN where the higher the better the limit is when the mechanical system starts vibrating for the VFF_GAIN there is an optimum value the one in test 6 values higher than this value has an error proportional to the speed acceleration but with different sign The required correction is too large The parameter values for the example are Motion Parameter values P_Gain 131072 VFF_GAIN 1650000 Fn001 6 279 How to s Section 5 1 5 1 2 2 Position mode examples 280 CJ1W MCH72 SERVO SERVO OFF SERVO OFF ZTN Pia NN ML II po gt o gt Position Position Loop Profile generator command 1 1 Speed Loop 1 SSR SS SSR R Se SSS Se ees Torque Loo Position loop me Position Loop is Polk aes io ss i i r deactivated wesp r gt
52. Contains the type of move currently being executed NTYPE Contains the type of the move in the Next Move buffer OFFPOS Contains an offset that will be applied to the demand posi tion without affecting the move in any other way OPEN_WIN Defines the beginning of the window in which a registration mark is expected OUTLIMIT Contains the limit that restricts the speed reference output from the CJ1W MCH72 OV_GAIN Contains the output velocity control gain P_GAIN Contains the proportional control gain REG_POS Contains the position at which a registration event occurred REG_POSB Contains the position at which the secondary registration event occurred REMAIN Is the distance remaining to the end of the current move REMOTE_ERROR Returns number of errors on MECHATROLINK II connec tion of the Servo Driver REP_DIST Contains or sets the repeat distance REP_OPTION Controls the application of the REP_DIST axis parameter REV_IN Contains the input number to be used as a reverse limit input Categories Section 4 1 Name Description REV_JOG Contains the input number to be used as a jog reverse input RS_LIMIT Contains the absolute position of the reverse software limit S_REF Contains the speed reference value which is applied when the axis is in open loop S_REF_OUT Contains the speed reference value being applied to the Servo Driver for both open as
53. DECEL that determine the multi axis movement are taken from the corresponding parameters of the base axis The MOVE command computes the various components of speed demand per axis A is the time axis B is the speed axis 1 3 2 2 Circular interpolation 1 3 2 3 CAM control It may be required that a tool travels from the starting point to the end point in an arc of a circle In this instance the motion of two axes is related via a circular interpolated move using the MOVECIRC command Consider the diagram in the figure It corresponds to the MOVECIRC 100 0 50 0 0 command The centre point and desired end point of the trajectory relative to the start point and the direction of movement are specified The MOVECIRC command computes the radius and the angle of rotation Like the linearly interpolated MOVE command the ACCEL DECEL and SPEED variables associated with the base axis determine the speed profile along the circular move Motion control concepts Section 1 3 Additional to the standard move profiles the CJ1W MCH 72 also provides a way to define a position profile for the axis to move The CAM command moves an axis according to position values stored in the CJ1W MCH 72 Table array The speed of travelling through the profile is determined by the axis parameters of the axis The figure corresponds to the command CAM 0 99 100 20 A is the time axis B is the position axis 1 3 3 EG control Electronic Gearing control allow
54. Description hex All elements valid 0000 OK process invalid 1106 Process number does not exist Stop BASIC program that is not 2202 Wrong mode stopped running Note The FINS Stop command 0402 is equal to the FINS Run command 0401 where mode is equal to 00 3 4 7 Error Data Read 2110 The FINS Error Data Read command reads the error data error line and error code of a process It has this format 21 10 00 command_code process The parameters can have the following values Parameter Values process 01 0E Process number The CJ1W MCH 72 responds with these codes Condition Response code Description hex All elements valid 0000 OK If the response code is 0000 the CJU1W MCH 72 responds with the error data 21 01 00 00 command_code response_code error_line error_code error_line is equal to the return value of the BASIC command ERROR_LINE PROC process error_code is equal to the return value of the BASIC command RUN_ERROR PROC process 71 FINS commands Section 3 4 72 Categories Section 4 1 4 1 Categories SECTION 4 BASIC commands This section lists all BASIC commands divided by categories The categories are Axis commands Axis parameters Communication commands and parameters Constants I O commands functions and parameters Mathematical functions and operat
55. ELSE IF VR 0 lt gt 3 THEN PRINT Incorrect slave count for unit 0 STOP ENDIF ENDIF IF NOT MECHATROLINK 0 4 0 0 THEN PRINT Error getting address for unit 0 station 0 STOP ELSE IF VR 0 lt gt 65 THEN PRINT Incorrect address for unit 0 station 0 STOP ENDIF ENDIF IF NOT MECHATROLINK 0 4 1 0 THEN PRINT Error getting address for unit 0 station 1 STOP ELSE IF VR 0 lt gt 66 THEN PRINT Incorrect address for unit 0 station 1 STOP ENDIF ENDIF IF NOT MECHATROLINK 0 4 2 0 THEN PRINT Error getting address for unit 0 station 2 STOP ELSE IF VR 0O lt gt 67 THEN PRINT Incorrect address for unit 0 station 2 STOP ENDIF ENDIF Set axis types Unit 0 ATYPE AXIS 0 40 ATYPE AXIS 1 40 ATYPE AXIS 2 40 Set drives into run mode 269 How to s Section 5 1 5 1 2 Gain settings 270 Unit 0 MECHATROLINK 0 20 65 MECHATROLINK 0 20 66 M ECHATROLINK 0 20 67 Stop MECHATROLINK Section THIS SECTION MUST BE MANUALLY SET BY THE USER ACCORDING TO THE APPLICATION TYPICAL ACTIONS ARE VARIABLE INITIALIZATION SERVO AXIS SETTING NAMING GLOBAL VARIABLES AND START THE APPLICATION PROGRAM Define Names for global variables GLOBAL project _ status 100 GLOBAL alarm status 101 G OBAL action 102 Initialize variables VR 0 0 project status 0 alarm status 0 action 0 Start
56. G gt H MOVECIRC 3 3 0 3 1 Move H gt A Example A machine is required to drop chemicals into test tubes The nozzle can move up and down and also along its rail The most efficient motion for the nozzle is to move in an arc between the test tubes BASE 0 1 MOVEABS 0 5 move to position above first tube MOVEABS 0 0 lower for first drop WAIT IDLE OP 15 ON apply dropper WA 20 OP 15 OFF FOR x 0 TO 5 MOVECIRC 5 0 2 5 0 1 arc between the test tubes WAIT IDLE OP 15 ON Apply dropper WA 20 OP 15 OFF NEXT x MOVECIRC 5 5 5 0 1 move to rest position See also AXIS ENCODER_RATIO UNITS 198 All BASIC commands Section 4 2 4 2 162 MOVELINK Type Syntax Description Axis command MOVELINK distance link_distance link_acceleration link_deceleration link_axis link_option link_position ML distance link_distance link_acceleration link_deceleration link_axis link_option link_position The MOVELINK command creates a linear move on the base axis linked via a software gearbox to the measured position of a link axis The link axis can move in either direction to drive the output motion The parameters show the distance the BASE axis moves for a certain distance of the link axis link_distance The link axis distance is divided into three phases that apply to the movement of the base axis These parts are the acceleration the constant speed and the decelera ti
57. Measured position MPOS CHR 13 WA 1000 GOTO loop GOSUB RETURN System command HALT The HALT command stops execution of all program tasks currently run ning The command can be used both on Command Line Terminal as in programs The STOP command can be used to stop a single program task Note HALT doesn t stop any motion Currently executing or buffered moves will continue unless they are terminated with a CANCEL or RAP IDSTOP command N A No example PROCESS STOP I O command HEX This command is used in a print statement to output a number in hexa decimal format N A All BASIC commands Section 4 2 4 2 130 HW_PSWITCH Example See also Type Syntax Description Arguments Example Example Example See also PRINT 5 HEX IN 8 16 N A Axis command HW_PSWITCH mode direction opstate table_start table_end The HW_PSWITCH command turns on digital output 8 for the axis when the predefined axis measured position is reached and turns the output off when another measured position is reached Positions are defined as sequence in the TABLE memory in range from table_start to table_end and on execution of the HW_PSWITCH command are stored in FIFO queue This command is applicable only to Flexible axis axes with ATYPE val ues 43 44 and 45 The command can be used with either 1 or 5 parameters Only 1 param eter is needed to disable the switch or clear FIFO queue All five par
58. S Coy Encoder connector pins Pin Incremental Incremental Stepper output SSI EnDat encoder input encoder output 1 NC 2 A A Step Clock 3 A A Step Clock 4 B B Dir 5 B B Dir 6 5 V Encoder power supply 7 Z Enable Enable Data 8 Z Enable Enable Data 9 0 V Encoder ground Shell FG The table below shows the specifications Item Specification Signal level EIA RS 422A Standards Input impedance 48 kQ min Current capacity 20 mA Termination None Maximum response time registration 0 5 us 43 Wiring Section 2 2 CJ1W MCH72 Circuit configuration for the encoder interface 2 2 3 Incremental encoder An incremental encoder has the following phase definition An advanced phase A for forward rotation An advanced phase B for reverse rotation By monitoring the relative phase of the 2 signals you can easily detect the rotation direction If signal A leads signal B the movement is clockwise and the counter increments If channel B leads channel A the movement is counterclockwise and the counter decrements Most rotary encodes also provide an additional Z marker This Z marker is a reference pulse within each revolution With these 3 signals you can determine the direction the speed and the relative position 2 2 3 1 Encoder input 44 The pulse ratio of the CJ1W MCH72 is 1 every encoder edge i e a pulse edge for either phase A or B is equal to one internal count
59. SPEED 1000 PRINT Set speed SPEED ACCEL AXIS DATUM DECEL FORWARD MOVE MOVEABS MOVECIRC MOVEMODIFY REVERSE UNITS All BASIC commands Section 4 2 4 2 227 SPEED_SIGN Type Axis parameter Syntax SPEED_SIGN Description The SPEED_SIGN parameter configures the voltage range of the ana logue speed reference output of the Encoder Interface when the axis type ATYPE is set to 44 If SPEED_SIGN OFF the voltage range of the analogue speed refer ence output is 10V 10V The positive reference voltage corresponds to forward movements in which case DPOS and MPOS increment The negative reference voltage corresponds to reverse movements in which case DPOS and MPOS decrement OFF is the default setting at power on If SPEED_SIGN ON the voltage range of the analogue speed refer ence output is OV 10V The OUT1 signal of the Encoder Interface for the corresponding axis is used as a direction signal During forward movements the controller sets OUT1 to OFF During reverse move ments the controller sets OUT1 to ON This setting is to be used for Servo Drivers that require both speed and direction signals as a speed reference Arguments N A Example No example See also ATYPE S_REF S REF_OUT 4 2 228 SQR Type Mathematical function Syntax SQR expression Description The SQR function returns the square root of the expression The expression must have positive including 0 value Arguments expression An
60. Section 4 2 Example ENCODER AXIS 7 A flying shear that moves at the speed of the material cuts a long sheet of paper into cards every 160 m The shear can move up to 1 2 metres of which 1m is used in this example The paper distance is measured by an encoder The unit conversion factor is set to give units of metres on both axes Note that axis 7 is the link axis WHILE IN 2 ON MOVELINK 0 150 0 0 7 dwell no movement for 150m MOVELINK 0 3 0 6 0 6 0 7 accelerate to paper speed MOVELINK 0 7 1 0 0 0 6 7 track the paper then decelerate WAIT LOADED wait until acceleration movelink is finished OP 8 ON activate cutter MOVELINK 1 0 8 4 0 5 0 5 7 retract cutter back to start WAIT LOADED OP 8 OFF deactivate cutter at end of outward stroke WEND In this program the controller waits for the roll to feed out 150 m in the first line After this distance the shear accelerates to match the speed of the paper moves at the same speed and then decelerates to a stop within the 1 m stroke This movement is specified using two separate MOVELINK commands This allows the program to wait for the next move buffer to be clear NTYPE 0 which indicates that the acceleration phase is complete Note that the distances on the measurement axis the link distance in each MOVELINK command 150 0 8 1 0 and 8 2 add up to 160 m To make sure that the speed and the positions of the cutter and paper match during the cut process the pa
61. Syntax variable expression Description The operator assigns the value of the expression to the variable Arguments variable A variable name expression Any valid BASIC expression Example var 18 Assigns the value 18 to the variable var See also N A 4 2 8 lt gt Is not equal to Type Mathematical function Syntax expression1 lt gt expression2 Description The operator lt gt returns TRUE if expression1 is not equal to expressionz2 otherwise it returns FALSE Arguments expression1 Any valid BASIC expression expression2 Any valid BASIC expression Example IF a lt gt 10 THEN GOTO label1 If variable a contains a value not equal to 10 program execution contin ues at label label1 Otherwise program execution continues with the next statement See also N A 4 2 9 gt Is greater than Type Mathematical function Syntax expression1 gt expression2 Description The operator gt returns TRUE if expression1 is greater than expression2 otherwise it returns FALSE Arguments expression Any valid BASIC expression expression2 Any valid BASIC expression Example IF a gt 10 THEN GOTO label1 If variable a contains a value greater than 10 program execution contin ues at label label1 Otherwise program execution continues with the next statement See also N A 86 All BASIC commands Section 4 2 4 2 10 gt Is greater than or equal to Type Syntax Description
62. System Be sure that the operating environment is within the specified conditions at installation and remains within the specified conditions during the life of the system precautions Do not start the system until you check that the axes are present and of the correct type The numbers of the axis will change if MECHATROLINK II network errors occur during start up or if the MECHATROLINK II network configuration changes Check the user program for proper execution before actually running it in the Unit Not checking the program may result in an unexpected operation Observe the following precautions when using the CJ1W MCH 72 or the PLC Failure to abide by the following precautions could lead to serious or possibly fatal injury Always heed these precautions e Always connect to a ground of 100 Q or less when installing the Units Not connecting to a ground of 100 Q or less may result in electric shock e Always turn OFF the power supply to the PLC before attempting any of the following Not turning OFF the power supply may result in malfunction or electric shock Mounting or dismounting Power Supply Units I O Units CPU Units Memory Cassettes or any other Units Assembling the Units Setting DIP switches or rotary switches Connecting cables or wiring the system Connecting or disconnecting the connectors Be sure that all mounting screws terminal screws and cable connector screws are tightened to the torque specified
63. System parameter read only DATE Returns the current date held by the real time clock of the PLC N A gt gt PRINT DATE 36956 This prints the number representing the current day This number is the number of days since 1st January 1900 with 1 Jan 1900 represented as 1 N A All BASIC commands Section 4 2 4 2 64 DATE 4 2 65 DATUM Type System command Syntax DATE Description Prints the current date DD MM YY as a string to the communication port A 2 digit year description is given Arguments N A Example PRINT DATE This will print the date in format for example 20 10 05 See also N A Type Axis command Syntax DATUM sequence Description The DATUM command performs one of 6 origin search sequences to position an axis to an absolute position and also reset the error bits in AXISSTATUS axis parameter DATUM uses both the creep and demand speed for the origin search The creep speed in the sequences is set with the CREEP axis parame ter and the demand speed is set with the SPEED axis parameter The datum switch input number used for sequences 3 to 6 is set by the DATUMN_IN parameter DATUM works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note The origin input set with the DATUM_IN parameter is active low i e the origin switch is set when the input is OFF The feedhold reverse jog forward jog forward and reverse limit inputs are also active low
64. TABLE value remote_offset The memory offset on the destination FINS server Range 0 65535 Note that this range will be more limited to the maximum TABLE or VR addresses if the destination is another Trajexia system length The number of items to be transferred The range will depend upon the FINS frame length and the capabilities of the client and remote servers The range for a Trajexia system is from 1 to 700 integer val ues or 1 to 350 floating point values local_area The local source memory area Note that this area must be one of the following values 0x00 Integer VR value 0x01 Integer TABLE value 0x02 float TABLE value local_offset The offset of the first value in the local Source memory area The range depends upon the VR or TABLE array size and value for the length argument timeout The number of milliseconds to wait for a response from the destina tion FINS server before timing out Note Be aware that data types from both remote_area and local_area have to match both floating point or both integers Example FINS_COMMS 0 0 0 0 82 1000 20 0 500 5000 This command reads 20 words length 20 of DM PLC memory area remote_area 82 starting from DM1000 remote_offset 1000 and writes it in the CJ1W MCH72 VR memory in integer format local_area 0 starting from VR 500 local_offset 500 Thus values in PLC memory range DM1000 to DM1019 are placed in CJ1W MCH72 memory VR 500 to VR 519
65. The OR is a bit operator and so the binary action taking place is 01010 OR 10010 11010 Therefore result will contain the value 26 Example IF VR 0 1 OR VR 0 2 THEN GOTO label See also N A 4 2 180 OUTLIMIT Type Axis parameter Syntax OUTLIMIT Description The output limit restricts the demand output from a servo axis to a lower value than the maximum For a MECHATROLINK II speed axis the maximum demand output possible is the 32 bit value 2147483648 Arguments N A Example OUTLIMIT AXIS 1 1073741824 The above will limit the demand output to half of the maximum possible output This will apply to the S_REF command if SERVO is off or to the output by the servo loop if SERVO is on See also AXIS S_REF S_REF_OUT SERVO 213 All BASIC commands Section 4 2 4 2 181 OV_GAIN Type Axis parameter Syntax OV_GAIN Description The OV_GAIN parameter contains the output velocity gain The output velocity output contribution is calculated by multiplying the change in measured position with the OV_GAIN parameter value The default value is 0 Adding negative output velocity gain to a system is mechanically equiv alent to adding damping It is likely to produce a smoother response and allow the use of a higher proportional gain than could otherwise be used but at the expense of higher Following Errors High values may cause oscillation and produce high Following Errors Note Negative values are normally required for OV_GA
66. These station addresses correspond to axis numbers 0 to 29 The first non assigned axis number that is the first axis number that is not assigned to a MECHATROLINK II station address is used for the flexible axis on the CJ1W MCH 72 encoder interface 34 Unit components Section 2 1 2 1 2 1 1 SECTION 2 Installation and wiring Unit components The CJ1W MCH72 Motion Control Unit has the following components sebeslesiccoigesteccteeetdcces et 7 MCH72 ery FA i em l Reif T F GPE jJE XI erite a3 i Daai wooc 0 ore lD Y Bes SIG A oo et B C MLK i ne o 0o0060U0UCOOUCOOCcUMOUcUOCCO OO oO oO oO o o o o o 0o 0o o0oo0 0oo0oo0oo0oo0ooD0 7 O CJ1W MCH72 Motion Control Unit Label Description Status LED indicators Unit number selector switch MECHATROLINK II connector Encoder connector I O connector n m O ojl W gt Battery compartment Status LED indicators The CJ1W MCH72 has 5 status LEDs They indicate the operational mode and the status of the CJ1W MCH72 The status LEDs are given in the table below 35 Unit components Section 2 1 36 RUNU ERC ERH J WDOG BF J Status LEDs LED Color Status Description RUN Green OFF e Startup test failed unit
67. UNITS Only use ENCODER_RATIO where absolutely necessary For all other axis scal ing use UNITS Arguments denominator A number between 0 and 16777215 that is used to define the denominator in the above equation numerator A number between 0 and 16777215 that is used to define the numerator in the above equation Example 7200 is the closest to the encoder resolution that can be devided by an integer to give degrees 7200 20 360 ENCODER_RATIO 8192 7200 UNITS 20 axis calibrated in degrees resolution is 0 05 deg A rotary table has a servo motor connected directly to its centre of rota tion An encoder is mounted to the rear of the servo motor and returns a value of 8192 counts per revolution The application requires the table to be calibrated in degrees but so that one degree is an integer number of counts See also N A 148 All BASIC commands Section 4 2 4 2 90 ENCODER_READ Type Syntax Description Arguments Example See also 4 2 91 ENCODER_TURNS Type Syntax Description Arguments Example See also Axis command ENCODER_READ address The ENCODER_READ command is applicable only to Flexible axis absolute EnDat axis with ATYPE value 47 The parameter returns a 16 bit encoder parameter stored at specified address Bits 8 15 of the address are the EnDat MRS field settings and bits 0 7 are the offset within the EnDat MRS block If a CRC error occurs this command will return 1
68. a number between 0 and 15 Step 2 The number is multiplied by 1 5467 to get required distance Step 3 An absolute move is made to this position In this example a single input is tested test WAIT UNTIL IN 4 ON Conveyor is in position when ON GOSUB place OP All BASIC commands Section 4 2 4 2 137 INITIALISE Type Syntax Description Arguments Example See also 4 2 138 INT Type Syntax Description Arguments Example See also 4 2 139 INTEGER_READ Type Syntax Description Arguments Example See also System command INITIALISE Sets all axes system and process parameters to their default values The parameters are also reset each time the controller is powered up or when an EX software reset command is performed In Trajexia Stu dio the menu Reset Device on the Online menu performs the equiva lent of an EX command N A No example e EX Mathematical function INT expression The INT function returns the integer part of the expression Note To round a positive number to the nearest integer value take the INT function of the value added by 0 5 Similarly to round for a negative value subtract 0 5 to the value before applying INT expression Any valid BASIC expression gt gt PRINT INT 1 79 1 0000 N A System command INTEGER_READ source variable destination variable low destination variable high The INTEGER_READ command splits a 32 bit variable in 2 16
69. all UNITS initializations N Caution To make sure that the absolute position is always correct you must make sure that Pn205 1 encoder_resolution lt os and that Pn203 39 Pn202 Note that this is not obvious for the high resolution encoders of the Sigma V and G Series motors Pn205 1 encoder_resolution 290 How to s Section 5 1 5 1 3 5 Example 3 Total length perimeter of belt 4160 M r 17 bit absolute 1 6 31 encoder Gear r 320 2 Pl 1 turn 320mm move The mechanical system uses a servo motor with an 17 bit absolute encoder The mechanical gear ratio of the gearbox is 1 6 31 One rotation of the pulley moves the moving part on the belt 320 mm The total length of the belt and therefore the total moving range of the motion part is 4160 mm The mechanical measurement units must be mm This means that all axis parameters and commands given to the CJU1W MCH 72 are expressed in mm Using the same procedure as in example 1 the equation expressing the relationship between user units and encoder counts is 17 Pn202 2 encoder_counts 6 31 motor_revolution 1 pulley_revolution Pn203 1 motor_revolution 1 pulley_revolution 320mm 17 2 6 31 encoder_counts 320 mm Therefore 17 17 Pn202 2 6 31 2 631 42 631 12 631 9 631 UNITS 2 2 2 Pn203 320 2 1000 8 125 2 125 125 One solution is UNITS 2 512 Pn202 631 Pn203 125 Note th
70. and REVERSE commands can be used to start a continuous movement with constant speed on a certain axis The FORWARD command moves the axis in positive direction and the REVERSE command in negative direction For these commands also the axis parameters ACCEL and SPEED apply to specify the acceleration rate and demand speed Both movements can be cancelled by using either the CANCEL or RAPIDSTOP command The CANCEL command cancels the move for one axis and RAPIDSTOP cancels moves on all axes The deceleration rate is set by DECEL Continuous Path control enables to control a specified path between the start and end position of a movement for one or multiple axes The CJ1W MCH72 supports the following operations e Linear interpolation e Circular interpolation e CAM control 1 3 2 1 Linear interpolation Motion control concepts Section 1 3 In applications it can be required for a set of motors to perform a move operation from one position to another in a straight line Linearly interpolated moves can take place among several axes The commands MOVE and MOVEABS are also used for the linear interpolation In this case the commands will have multiple arguments to specify the relative or absolute move for each axis Consider the three axis move in a 3 dimensional plane in the figure It corresponds to the MOVE 50 50 50 command The speed profile of the motion along the path is given in the diagram The three parameters SPEED ACCEL and
71. argument determines which external input is registered whether the registration is executed on the rising edge or on the falling edge of the input signal whether the windowing function is used and other options For more information on the REGIST command refer to section 4 2 200 The registration differs for different axes depending on their connection to the system If an axis is connected via the MECHATROLINK II bus the registration is done in the Servo Driver hardware If an axis is connected via the Encoder Interface the registration is done in the hardware of the CJ1W MCH72 The different registrations are described below 5 1 6 2 Registration in the Sigma ll and Sigma V Servo Driver Registration in the Sigma lIl and Sigma V Servo Driver occurs when an axis assigned to this Servo Driver is connected to the Trajexia system via the MECHATROLINK II bus There are three registration inputs on these Servo Drivers but only one hardware latch so only one input can be used at a time For Sigma ll Servo Drivers the physical inputs are in pins CN1 44 CN1 45 and CN1 46 on the 50 pins CN1 connector For Sigma V Servo Drivers the physical inputs are in pins CN1 10 CN1 11 and CN1 12 on the 26 pins CN1 connector Trajexia uses logical inputs EXT1 EXT2 and EXT3 to associate the physical inputs to logical ones This association is done by setting the parameter Pn511 of the Servo Driver For more information on setting this association and Pn511 parame
72. array for analogue inputs e AOUT array for analogue outputs e Axis Status array see section 3 3 2 1 The mapping of memory areas for cyclic data exchange in the PLC CPU to memory areas in the CJ1W MCH 72 can be freely configured This can be done in the PLC program or in the CJ1W MCH 72 It is recommended to configure the memory mapping either in the startup program of the PLC or in the startup program of the CJ1W MCH 72 The memory mapping is not stored permanently and will be lost after a restart of the CJ1W MCH 72 or a power cycle of the PLC system It is possible to configure the mapping of memory areas both in the PLC program and in the CJ1W MCH 72 This is not practical because the last configuration overwrites the first Data exchange with the Table memory of the CJ1W MCH 72 is not possible However with the FINS Write command you can write the Table memory of the CJ1W MCH72 Memory areas Section 3 2 3 2 1 Configuration of memory areas in the PLC program To configure the memory areas for cyclic data exchange in the PLC you must use the FINS Parameter Area Write command For more information on this FINS command refer to section 3 4 4 3 2 2 Configuration of memory areas in the CJ1W MCH72 To configure the memory areas for cyclic data exchange in the CJ1W MCH72 you must use the PLC_EXCHANGE BASIC command For more information on this BASIC command refer to section 4 2 184 61 Data Section 3 3 3 3 Data
73. as a percentage of the nominal torque The torque is proportional to the acceleration Because the acceleration is a derivative of the speed and the speed is sinusoidal curve the acceleration and also the torque is a cosine curve There is one peak at the start and another peak at the stop because there is a discontinuity in the acceleration There is also a high frequency oscillation in the torque curve suggesting a resonance frequency that can be eliminated using the notch filter settings in the Sigma ll Servo Driver The high frequency is reinforced because it is also reflected in the speed curve For more information on notch filter settings refer to the Sigma ll Servo Driver manual 5 1 7 4 Troubleshooting with the oscilloscope When the desired data is captured and recorded into the Table memory entries you can use the oscilloscope to visualize this data This can help you when you commission and troubleshoot the system This section gives an example of how a bug which is difficult to analyze can be clearly explained and solved using the captured data and the oscilloscope The parameter end_pos which defines the values in the CAM table depends on external conditions of the system Therefore a program that runs in another task or even a controlling device using FINS communication can change it while the main program that links two axis runs Suppose that these changes in conditions which result in a change of the end_pos parameter ha
74. axes from 0 to LAST_AXIS where LAST_AXIS is the number of the highest axis for which an AXIS or BASE command has been proc essed whichever of the two is larger N A No example AXIS Axis parameter read only LINKAX Returns the axis number that the axis is linked to during any linked moves Linked moves are where the demand position is a function of another axis e g CONNECT CAMBOX and MOVELINK N A 181 All BASIC commands Section 4 2 Example See also 4 2 148 LIST Type Syntax Description Arguments Example See also 4 2 149 LIST_GLOBAL Type Syntax Description Arguments Example See also 182 No example CONNECT CAMBOX MOVELINK Program command Trajexia Studio command line only LIST program_name TYPE program_name For use only with the Command Line Terminal interface LIST is used as an immediate command line command only and must not be used in programs The LIST command prints the current selected program or the program specified by program_name The program name can also be specified without quotes If the program name is omitted the current selected program will be listed Note This command is implemented for an offline Command Line Ter minal Within Trajexia Studio users can use the terminal window program_name The program to be printed No example SELECT System command terminal only LIST_GLOBAL When executed from the Comm
75. before loading the MOVEABS DEFPOS 10 0 WAIT UNTIL OFFPOS 0 Makes sure that DEFPOS is complete before next line MOVEABS 25 03 133 All BASIC commands Section 4 2 Example See also 4 2 69 DEL Type Syntax Description Arguments Example See also 4 2 70 DEMAND_EDGES Type Syntax Description Arguments Example See also 134 BEFORE AFTER From the Command Line of the Terminal window quickly set the DPOS values of the first four axes to 0 gt gt BASE 0 gt gt DP 0 0 0 0 AXIS DATUM DPOS OFFPOS MPOS UNITS Program command DEL program_name RM program_name The DEL command deletes a program from the controller DEL without a program name can be used to delete the currently selected program using SELECT The program name can also be specified without quotes DEL ALL will delete all programs DEL can also be used to delete the Table DEL TABLE The name TABLE must be in quotes Note This command is implemented for the Command Line Terminal program_name Name of the program to be deleted gt gt DEL oldprog COPY NEW RENAME SELECT TABLE Axis parameter read only DEMAND_EDGES The DEMAND_EDGES axis parameter contains the current value of the DPOS axis parameter in encoder edge units N A No example AXIS DPOS All BASIC commands Section 4 2 4 2 71 DIR Type Program command Syntax DIR LS Description The DIR command shows a list
76. bit val ues and copies these values to 2 other variables The source and desti nation variables can be any valid system named TABLE memory or VR variable source variable Variable containing the 32 bit value to read e destination variable low Variable to copy the lower 16 bits of the source variable to e destination variable high Variable to copy the upper 16 bits of the source variable to gt gt INTEGER_READ MOTION_ERROR VR 100 VR 101 This example will copy the first 16 bits of MOTION_ERROR to VR 100 and the rest to VR 101 N A 175 All BASIC commands Section 4 2 4 2 140 INVERT_IN Type Syntax Description Arguments Example See also 4 2 141 INVERT_STEP Type Syntax Description Arguments Example See also 176 System command INVERT_IN input on off The INVERT_IN command allows the input channels 0 31 to be individ ually inverted in software This is important as these input channels can be assigned to activate functions such as feedhold The INVERT_IN function sets the inversion for one channel ON or OFF It can only be applied to inputs 0 31 input Any valid BASIC expression gt gt IN 3 0 0000 gt gt INVERT_IN 3 ON gt gt IN 3 1 0000 N A Axis parameter INVERT_STEP INVERT_STEP is used to switch a hardware Inverter into the stepper pulse output circuit This can be necessary for connecting to some step per drivers The electronic logic insi
77. closed loop SERVO Determines whether the axis runs under servo control or open loop SPEED Contains the demand speed in units s SPEED_SIGN Configures the voltage range of the analogue speed refer ence output of the Encoder Interface SRAMP Contains the S curve factor T_REF Contains the torque reference value which is applied to the servo motor TRANS_DPOS Contains axis demand position at output of frame transfor mation UNITS Contains the unit conversion factor VERIFY Selects different modes of operation on a stepper output axis VFF_GAIN Contains the speed feed forward control gain VP_SPEED Contains the speed profile speed 4 1 3 Communication commands and parameters 4 1 4 Constants Name Description FINS_COMMS Sends FINS Read Memory and Write Memory to a desig nated FINS server unit Name Description FALSE Equal to the numerical value 0 OFF Equal to the numerical value 0 ON Equal to the numerical value 1 PI Equal to the numerical value 3 1416 TRUE Equal to the numerical value 1 77 Categories Section 4 1 4 1 5 I O commands functions and parameters Name Description AIN Holds the value of the analogue channel AOUT Holds the value of the analogue channel GET Waits for the arrival of a single character and assigns the ASCII code of the character to variable IN Returns the value of digital inputs OP Sets one
78. control command Syntax FOR variable start TO end STEP increment commands NEXT variable Description The FOR NEXT loop allows the program segment between the FOR and the NEXT statement to be repeated a number of times On entering this loop the variable is initialized to the value of start and the block of commands is then executed Upon reaching the NEXT command the variable is increased by the increment specified after STEP The STEP value can be positive or negative if omitted the value is assumed to be 1 While variable is less than or equal to end the block of commands is repeatedly executed until variable is greater than end at which time program execution will continue after NEXT Note FOR NEXT statements can be nested up to 8 levels deep in a BASIC program Arguments variable Any valid BASIC expression start Any valid BASIC expression end Any valid BASIC expression increment Any valid BASIC expression commands One or more BASIC commands 162 All BASIC commands Section 4 2 4 2 116 FORWARD Example Example Example See also Type Syntax Description Arguments FOR opnum 8 TO 13 OP opnum ON NEXT opnum This loop turns on outputs 8 to 13 loop FOR dist 5 TO 5 STEP 0 25 MOVEABS dist GOSUB pick_up NEXT dist The STEP increment can be positive or negative loop1 FOR I1 1TO8 loop2 FOR I2 1 TO 6 MOVEABS 11 100 12 100 GOSUB 1000 NEXT 12 NEX
79. depends on the type of Servo Driver which Servo Driver inputs are mapped into inputs 16 to 31 For more information on Servo Driver I O mapping into the Trajexia I O space refer to section 5 1 4 Note The origin input is active low i e the origin switch is set when the input is OFF The feedhold reverse jog forward jog forward and reverse limit inputs are also active low Active low inputs are used to enable fail safe wiring Arguments N A Example DATUM_IN AXIS 0 5 See also AXIS DATUM 131 All BASIC commands Section 4 2 4 2 67 DECEL Type Axis parameter Syntax DECEL Description The DECEL axis parameter contains the axis deceleration rate The rate is set in units s The parameter can have any positive value includ ing 0 Arguments N A Example DECEL 100 Set deceleration rate PRINT Deceleration rate is DECEL mm s s See also ACCEL AXIS UNITS 4 2 68 DEFPOS Type Axis command Syntax DEFPOS pos_1 pos_2 pos_3 pos_4 DP pos_1 pos_2 pos_3 pos_4 Description The DEFPOS command defines the current demand position DPOS as a new absolute position The measured position MPOS will be changed accordingly in order to keep the Following Error DEFPOS is typically used after an origin search sequence see DATUM command as this sets the current position to 0 DEFPOS can be used at any time As an alternative also the OFFPOS axis parameter can be used This parameter can be
80. different absolute encoder standards SSI and EnDat e Incremental encoder output to simulate a line driver type encoder Stepper output to control stepper drivers 39 Wiring Section 2 2 2 2 2 2 1 40 Wiring I O connector The I O connector is a 28 pin connector Input O and input 1 can also be used as registration inputs N OF WO 11 13 15 17 19 21 23 25 27 TT B Pp hl hl il AR al Hl SaSao RD lal f N N N i Ll AG amt D N I O connector pins The connections of the pins are given in the table below Pin Connection Pin Connection 1 Input common 2 Input common 3 Registration input 0 4 Registration input 1 5 Input 2 6 Input 3 7 Input 4 8 Input 5 9 Input 6 10 Input 7 11 Input 8 12 Input 9 13 Input 10 14 Input 11 15 Input 12 16 Input 13 17 Input 14 18 Input 15 19 Output8 PSWITCH 20 Output 9 21 Output 10 22 Output 11 23 Output 12 24 Output 13 25 Output 14 26 Output 15 Section 2 2 Wiring 2 2 1 1 Specifications Pin Connection Pin Connection 27 0 V Output common 28 24 V Power supply input for the outputs
81. digital inputs are on max 55 C 1 For UL certified applications always use for external power supply a Class 2 power supply CJ1W MCH72 External power pee supply 24V Common for Input circuits Circuit configuration for input 4 to input 15 The table below shows the digital output specifications of output 8 to output 15 for the I O Item Specification Type PNP Maximum voltage 24 VDC 10 See footnote Current capacity 100 mA for each output 800 mA in total for the group of 8 outputs Protection Over current Over temperature 2 A fuse on common Maximum response time 250 us for ON 350 us for OFF if the servo period equals 0 5 ms or 1 0 ms 500 us for ON 600 us for OFF if the servo period equals 2 0 ms 150 us when the HW_PSWITCH is used 1 For UL certified applications always use for external power supply a Class 2 power supply Sasss CJ1W MCH72 2A Fuse 28 24V output supply Q External power supply Equivalent 24V circuit Internal circuits galvanically lated from the system ISO To other output circuits Circuit configuration for output 4 to output 15 42 Wiring Section 2 2 2 2 2 Encoder connector The connections of the pins are given in the table below 2 2 2 1 Specifications N J oH s5 9 All le 4 8 ol io Sj 2 sis
82. direction to 0 to produce negative motion about the third possibly imaginary orthogonal axis See the table below Direction Right hand axis Left hand axis 0 Positive Negative 1 Negative Positive 196 All BASIC commands Section 4 2 SPECIFIED END POINT a m ACTUAL END POINT ei Note In order for the MOVECIRC to be correctly executed the two axes generating the circular arc must have the same number of encoder pulses versus linear axis distance If this is not the case it is possible to adjust the encoder scales in many cases by using ENCODER_RATIO parameter Note The MOVECIRC computes the radius and the total angle of rota tion from the centre and end point If the end point is not on the calcu lated path the move simply ends at the computed end and not the specified end point It is the responsibility of the programmer to ensure that the two points correspond to correct points on a circle Note Neither axis may cross the set absolute repeat distance REP_DIST during a MOVECIRC Doing so may cause one or both axis to jump or for their FE value to exceed FE_LIMIT 197 All BASIC commands Section 4 2 Example The following command sequence plots the letter O MOVE 0 6 Move A gt B MOVECIRC 3 3 3 0 1 Move B gt C MOVE 2 0 Move C gt D MOVECIRC 3 3 0 3 1 Move D gt E MOVE 0 6 Move E gt F MOVECIRC 3 3 3 0 1 Move F gt G MOVE 2 0 Move
83. error 40 ELSE ELSEIF ENDIF with out previous IF 41 WEND without previous 42 UNTIL without previous WHILE REPEAT 43 Variable expected 44 TO expected after FOR 45 Too may nested FOR NEXT 46 NEXT without FOR 47 UNTIL IDLE expected after 48 GOTO GOSUB expected WAIT 49 Too many nested GOSUB 50 RETURN without GOSUB All BASIC commands Section 4 2 Number Message Number Message 51 LABEL must be at start of line 52 Cannot nest one line IF 53 LABEL not found 54 LINE NUMBER cannot have decimal point 55 Cannot have multiple 56 Invalid use of instances of REMOTE 57 VR x expected 58 Program already exists 59 Process already selected 60 Duplicate axes not permitted 61 PLC type is invalid 62 Evaluation error 63 Reserved keyword not availa 64 VARIABLE not found ble on this controller 65 Table index range error 66 Features enabled do not allow ATYPE change 67 Invalid line number 68 String exceeds permitted length 69 Scope period should exceed 70 Value is incorrect number of AIN parameters 71 Invalid I O channel 72 Value cannot be set Use CLEAR_PARAMS command 73 Directory not locked 74 Directory already locked 75 Program not running on this 76 Program not running process 77 Program not paused on this 78 Program not paused process 79 Command not allowed when 80 Directory structure invalid running Trajexia Studio 81 Directo
84. execution can be resumed without using the STEPLINE command by executing the TROFF command The trace mode can be stopped by issuing a STOP or HALT com mand Arguments N A Example TRON MOVE 0 10 MOVE 10 0 TRON MOVE 0 10 MOVE 10 0 See also SELECT TROFF 4 2 248 TRUE Type Constant read only Syntax TRUE Description The TRUE constant returns the numerical value 1 Arguments N A Example test t IN 0 AND IN 2 IF t TRUE THEN PRINT Inputs are ON ENDIF See also N A 4 2 249 TSIZE Type System parameter read only Syntax TSIZE Description The TSIZE parameter returns the size of the TABLE array which is one more than the currently highest defined TABLE element TSIZE is reset to 0 when the TABLE array is deleted using DEL TABLE or NEW TABLE on the command line Arguments N A 257 All BASIC commands Section 4 2 4 2 250 UNITS 4 2 251 UNLOCK 4 2 252 UNTIL 258 Example See also Type Syntax Description Arguments Example See also See LOCK The following example assumes that no location higher than 1000 has been written to the TABLE array gt gt TABLE 1000 3400 gt gt PRINT TSIZE 1001 0000 DEL NEW TABLE Axis parameter UNITS The UNITS parameter contains the unit conversion factor The unit con version factor enables the user to define a more convenient user unit like m mm or motor revolutions by specifying the amount of encoder edges to include in a user un
85. in this manual Incorrect tightening torque may result in malfunction Wire correctly Incorrect wiring may result in burning Mount the Unit only after checking the terminal block completely Resume operation only after transferring to the new CJ1W MCH 72 Unit the contents of the VR and table memory required for operation Not doing so may result in an unexpected operation When replacing parts be sure to confirm that the rating of a new part is correct Not doing so may result in malfunction or burning Use the dedicated connecting cables specified in operation manuals to connect the Units Using commercially available RS 232C computer cables may cause failures in external devices or the Unit Outputs may remain on due to a malfunction in the built in transistor outputs or other internal circuits As a countermeasure for such problems external safety measures must be provided to ensure the safety of the system Failure to abide by the following precautions may lead to faulty operation of the PLC the CJ1W MCH 72 or the system or could damage the PLC or CJ1W MCH 72 Always heed these precautions Application precautions A Caution A Caution A Caution A Caution A Caution A Caution e Fail safe measures must be taken by the customer to ensure safety in the event of incorrect missing or abnormal signals caused by broken signal lines momentary power interruptions or other causes e Interlock circuits limit circuits an
86. is used REP_DIST 120 sets repeat distance to pitch of belt flights REP_OPTION ON OPEN_WIN 30 sets window open position CLOSE_WIN 90 sets window close position REGIST 4 256 R input registration with windowing FORWARD start the belt box_seen 0 REPEAT WAIT UNTIL MPOS lt 60 wait for centre point between flights WAIT UNTIL MPOS gt 60 so that actuator is fired between flights IF box_seen 1 THEN was a box seen on the previous cycle OP 8 ON fire actuator WA 100 OP 8 OFF retract actuator box_seen 0 ENDIF IF MARK THEN box_seen 1 set box seen flag REGIST 4 256 UNTIL IN 2 OFF CANCEL stop the belt WAIT IDLE 230 All BASIC commands Section 4 2 Example See also GLUE APPLICATOR SENSOR ENCODER A machine adds glue to the top of a box To do this it must switch output 8 It must detect the rising edge appearance and the falling edge end of a box Also the MPOS must be set to zero when the Z position is detected reg 6 select registration mode 6 rising edge R rising edge Z REGIST reg FORWARD WHILE IN 2 OFF IF MARKB THEN on a Z mark mpos is reset to zero OFFPOS REG_POSB REGIST reg ELSEIF MARK THEN on R input output 8 is toggled IF reg 6 THEN select registration mode 8 falling edge R rising edge Z reg 8 OP 8 ON ELSE reg 6 OP 8 OFF ENDIF REGIST reg ENDIF WEND CANCEL AXIS MARK MARKB REG_POS REG_POSB OPEN_WIN CLOSE_WIN 231 All BASIC commands
87. is a SCARA robot arm with jointed axes For the end tip of the robot arm to perform straight line movements in X Y the motors need to move in a pattern determined by the robots geometry Frame transformations to perform functions such as these need to be compiled from C language source and loaded into the controller system software Contact OMRON if you need to do this A machine system can be specified with several different frames The currently active frame is specified with the FRAME System parameter The default FRAME is 0 which corresponds to a one to one transforma tion N A FRAME 1 N A System function FREE The FREE function returns the remaining amount of memory available for user programs and TABLE array elements Note Each line takes a minimum of 4 characters bytes in memory This is for the length of this line the length of the previous line number of spaces at the beginning of the line and a single command token Additional commands need one byte per token most other data is held as ASCII The CJ1W MCH72 compiles programs before they are executed this means that a little under twice the memory is required to be able to exe cute a program N A gt gt PRINT FREE 47104 0000 DIR TABLE All BASIC commands Section 4 2 4 2 121 FS_LIMIT Type Axis parameter Syntax FS_LIMIT FSLIMIT Description The FS_LIMIT axis parameter contains the absolute position of the for ward software limit in user uni
88. labeller that is synchronized 1 1 to the conveyor attaches the labels e The distance between products is fixed and mechanically guaranteed The distance between labels is never exactly constant so a correction is needed This is done by superimposing a virtual axis onto the movement of the labeller The difference between the expected position and the actual position is measured with a photocell This is the correction factor Every time a correction is made the origin position is updated accordingly 5 2 10 1 Example OFFPOS speed correction labeller 0 conveyor conveyor 0 labeller 1 virtual 15 SERVO AXIS conveyor SERVO AXIS labeller WDOG 1 1 1 BASE labeller CONNECT 1 conveyor ADDAX virtual FORWARD AXIS conveyor REGIST 1 WAIT UNTIL MARK 0 loop WAIT UNTIL MARK correction REG POStexpected pos MOVE correction AXIS virtual WAIT IDLE AXIS virtual OFFPOS label length correction REGIST 1 WAIT UNTIL MARK 0 GOTO loop 346 Section SECTION 6 Troubleshooting This section provides tables to refer to when a particular problem occurs The tables provide a general description of the nature of various potential problems the probable cause items to check and suggested countermeasures 347 Items to Check First Section 6 1 6 1 Items to Check First If a problem occurs investigate the problem after checking the following item
89. match setting in the PLC I O table configuration Set the whole PLC system configuration including unit types unit numbers total number of units and their order in the PLC system so the configuration matches I O table configuration in the PLC CPU Define and set your PLC configuration and then create I O table configuration that match actual configuration and download it in the PLC CPU using CX Programmer software 6 3 8 Low or Empty Battery Error Problem Solution The unit s battery level is low or the battery is empty bit 1 of the SYSTEM_ERROR system parameter is high see section 4 2 232 for more details on this parameter Replace the battery Additional actions to take A user can always check whether the battery is low or empty using the BATTERY_LOW system parameter or bit 1 of the SYSTEM_ERROR system parameter for more information on BATTERY_LOW BASIC command see section 4 2 41 The battery status can also be checked from the PLC ladder program by checking Battery Low status bit in the allocated CIO memory area see section 3 3 1 for more details 6 3 9 CPU Fatal Error FALS Problem Solution A fatal error FALS generated by the PLC CPU either by the system or programmatically from a PLC ladder program Remove the cause of the problem in the PLC if it wasn t generated programmatically on purpose Additional actions to take 351
90. 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 iv TABLE OF CONTENTS Precautions Vii 1 Intended audience c g rece saline salads iit tessa ceseitisdd Sees T E E EEEE vil 2 General precautions eiss geari e e ko ceese eed coees av EE A EEE dca SKEE ietenccvgpeves A KE RETE A RREO EK vii 3 Safety precautions 564 ENEE EAE E EE S E A cect E oe ete ie estos vii 4 Operating environment pr ca tionS sssri ien e Ei EE EEEE E NERE E EEEE a EEE E i ie viii 5 Application precautions oenen E R R E E E T T EE OE TER ix 6 Conformance to EC Directives a e evens a a a e a apiece A a xi SECTION 1 Introduction 1 Le POVETVIEWo care n e RELER eas EA E E ee iat GON ee ee et cine E ee le 1 1 2 System philosophy c scrsse cchestste ok eit a eek Sas tees ae EE tendon Ae Ne ae Bee ie 2 1 3 Motion
91. measurement units must mm Total repeat distance must be the distance between two stations 50mm With the same procedure as in example 1 we have 17 2 encoder_counts 10 motor_revolution 1 pulley_revolution 1 station 1 motor_revolution 1 pulley_revolution 12 station 50mm 2 10 encoder_counts 12 50 mm Therefore if we use the mechanical system to set the electronic gear ratio we have Pn202 2 10 UNITS Pn203 50 12 One possible solution is 2 UNITS 50 Pn202 5 Pn203 6 Pn205 4 Because 217 50 is a number with an infinite number of decimal digits we can choose the following Pn202 37 10 gt 10 LoT zo 1 15 1 Pn203 50 12 600 60 2 15 15 Therefore the parameters are UNITS 293 How to s Section 5 1 UNITS 2 32768 Pn202 1 Pn203 15 Pn205 4 REP DIST 50 REP_OPTION 1 With these settings executing MOVE 50 moves the moving part 50 mm or one station 5 1 3 8 Example 6 10mm o 17 bit absolute 1 3 Gear encoder 540mm The mechanical system consists of a ball screw It uses a servo motor with a 17 bit absolute encoder The mechanical gear ratio of the gearbox is 1 3 The screw pitch of the ball screw is 10mm per revolution The total travel distance of the ball screw is 540 mm The mechanical measurement units must be mm With the same procedure as in example 1 we have 17 Pn202 ms 2 encoder_counts 3 mot
92. motor with 13 bit incremental encoder is used The gear ratio of the gearbox is 1 10 The desired user units are degree of angle This system can be described with the following equations 1 motor_revolution 2 E encoder_counts 10 motor_revolution 1 machine_cycle 1 machine_cycle 360 The combination of these equations results in 13 Pn202 2 encoder_counts 10 motor_revolution 1 machine_revolution _ Pn203 1 motor_revolution 1 machine_revolution 360 2 54 0 encoder_counts 360 degree And therefore From this equation we can derive the values for Pn202 Pn203 and UNITS given the following restrictions and recommendations 287 How to s Section 5 1 1 Pn202 and Pn203 are integers 2 UNITS must not have an infinite number of decimal digits This can create rounding errors that result in small position errors that add up to large accumulative position errors 3 For reasons of stability it is necessary to avoid situations where Pn202 Pn203 is less than 0 01 or greater than 100 It is recommended that Pn202 Pn203 is approximately 1 We can now rewrite the last equation to Pn202 43 10 UNITS 2 gt Pn203 360 One solution to this equation is UNITS 2 8192 Pn202 10 Pn203 360 When we consider the third recommendation from the above list avoid situations where Pn202 Pn203 is less than 0 01 or greater than 100 we can rewrite the last equation to Pn202 43 10 3 2
93. not be executed in this example STOP label PRINT var RETURN See also HALT RUN SELECT 4 2 234 SYSTEM_ERROR Type System parameter read only Syntax SYSTEM_ERROR Description The SYSTEM_ERROR parameter contains system errors that occurred in the Trajexia system since the last time it was initialized The bits in the SYSTEM_ERROR parameter are given in the table below Bit Description 0 BASIC error 1 Battery low error 2 17 Reserved for future use 18 MECHATROLINK II device lost error Any device in the system Arguments N A Example No example See also N A 4 2 235 T_REF Type Axis parameter Syntax T_REF Description The T_REF parameter contains the torque reference value which will be applied to the servo motor The range of this parameter is defined by the number of available bits For MECHATROLINK II axes T_REF takes 32 bits so the available range is 2147483648 2147483648 This range can be limited by using the OUTLIMIT parameter The actual torque reference is depending on the servo motor Arguments N A Example T_REF AXIS 0 1000 See also AXIS S_REF 252 All BASIC commands Section 4 2 4 2 236 TABLE Type System command Syntax TABLE address value value TABLE address Description The TABLE command loads data to and reads data from the TABLE array The TABLE has a maximum length of 64000 elements The TABLE values are floating point numbers with fractions The TAB
94. not operational e Fatal error operation stopped Flashing Detection of MECHATROLINK II slaves and assignment of axes in progress ON Unit is ready to execute BASIC commands ERC Red OFF Unit is in normal operation Flashing Hardware error during startup Flashing Low battery during execution ON Error log access error ERH Red OFF CPU in normal operation ON Communication error with PLC CPU WDOG Green OFF Unit does not operate a Servo Driver ON Unit operates a Servo Driver BF Red OFF Normal operation ON MECHATROLINK II bus fault Also the CJ1W MCH72 has 8 general purpose LEDs The function of the general purpose LEDs can be controlled with the DISPLAY system parameter The table below lists the configuration for the LEDs and the DISPLAY n command where n ranges from 0 to 7 LED n 0 n 1 n 2 n 3 n 4 n 5 n 6 n 7 0 INO IN8 IN16 IN24 OUTO OUT8 OUT16 OUT24 1 IN1 INQ IN17 IN25 OUT1 OUT9 OUT17 OUT25 2 IN2 IN10 IN18 IN26 OUT2 OUT10 OUT18 OUT26 3 IN3 IN11 IN19 IN27 OUT3 OUT11 OUT19 OUT27 4 IN4 IN12 IN20 IN28 OUT4 OUT12 OUT20 OUT28 5 IN5 IN13 IN21 IN29 OUT5 OUT13 OUT21 OUT29 6 IN6 IN14 IN22 IN30 OUT6 OUT14 OUT22 OUT30 7 IN7 IN15 IN23 IN31 OUT7 OUT15 OUT23 OUT31 Section 2 1 Unit components For example if the command DISPLAY 1 is executed LED 5 reflects the activity of input IN13 pin 16 of the 28 pin I O connector 2 1 2 Unit number sele
95. not place objects on top of the cables or other wiring lines Doing so may break the cables Resume operation only after transferring the system parameter data to the CJ1W MCH72 and saving the data to flash memory Not doing so may result in an unexpected operation Confirm that set parameters and data operate properly Check the pin numbers before wiring the connectors Conformance to EC Directives 6 A Caution Perform wiring according to specified procedures Z Caution Before touching a Unit be sure to first touch a grounded metallic object in order to discharge any static build up Not doing so may result in malfunction or damage A Caution Do not drop the Unit or subject it to abnormal shock or vibration A Caution Confirm the safety of the destination node before transferring a program to the node or changing the contents of I O memory Doing either of these without confirming safety may result in injury 6 Conformance to EC Directives 6 1 Applicable directives e EMC Directives 6 2 Concepts 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 machines The actual products have been checked for conformity to EMC standards see the following note 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
96. number of pattern repeats is specified with a negative direction link the first control block produces one repeat less than expected This is because the CAMBOX loads a zero link position which immediately goes negative on the next servo cycle triggering a REPEAT COUNT This effect only occurs when the CAMBOxX is loaded not on transitions from CONTROL BLOCK to CONTROL BLOCK This effect can easily be compensated for either increase the required number of repeats or set the initial value of REPEAT POSITION to 1 See also AXIS CAM REP_OPTION TABLE 116 All BASIC commands Section 4 2 4 2 45 CANCEL Type Syntax Description Arguments Example Example Axis command CANCEL 1 CAI 1 The CANCEL command cancels the move on an axis or an interpolat ing axis group Speed profiled moves FORWARD REVERSE MOVE MOVEABS MOVECIRC MHELICAL and MOVEMODIFY will be decelerated at the deceleration rate as set by the DECEL parameter and then stopped Other moves will be immediately stopped The CANCEL command cancels the contents of the current move buffer MTYPE The command CANCEL 1 cancels the contents of the next move buffer NTYPE without affecting the current move in the MTYPE buffer CANCEL works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note e CANCEL cancels only the presently executing move If further moves are buffered they will then be load
97. of the machine Bag feeder machines have two modes Without mark Forward feeds the film a set distance for films of a flat colour With mark Forward feeds the film to a printed mark on the film The program in this section shows the typical code for a bag feeder machine 5 2 7 1 Example Position Bag_distance expected_postREG_POS Bag_distance Time MARK FALSE Mark not detected no correction MARK TRUE MOVEMODIFY MOVEABS MOVEABS REGIST 1 MOVEABS REGIST 1 Time WAIT IDLE DEFPOS 0 WAIT IDLE DEFPOS 0 IN start_signal BAG FEEDER program 339 Practical examples Section 5 2 340 Working with marks if any mark is missing feed the theoretical distance But if the mark is missing for a number of consecutive bags stop the operation A digital output is activated a certain time to cut the bag Variable initialisation start _signal 7 max fail 3 program alarm 0 failed 0 feeder axis 2 BASE feeder axis Position counter MPOS DPOS goes from 0 to 999999 and 0 again NITS 27 PEED 100 EL 1000 CEL 1000 P DIST 1000000 P OPTION 1 RVO ON DOG ON Q Q Tj T a amp amp SBuaDWDoUPXAG Main program loop Define current position as zero DEFPOS 0 Wait for rising edge in Digital Input start signal WAIT UNTIL IN sta
98. of the programs held in the controller the memory size and the RUNTYPE DIR also shows the available memory size power up mode and current selected program of the con troller Note This command is implemented for the Command Line Terminal only Arguments N A Example No example See also FREE POWER_UP PROCESS RUNTYPE SELECT 4 2 72 DISABLE_GROUP Type Syntax Description Arguments Example Axis command DISABLE_GROUP 1 DISABLE_GROUP axis_1 axis_2 The AXIS_ENABLE is used to create a group of axes which will be disa bled if there is a motion error in any or more axes in the group After the group is made when an error occurs on one they will all have their AXIS_ENABLE set OFF and SERVO set OFF Multiple groups can be made although an axis cannot belong to more than one group All groupings can be cleared using DISABLE_GROUP 1 Note For use with MECHATROLINK II only axis_i A BASIC expression that evaluates to an axis number A machine has 2 functionally separate parts which have their own emergency stop and operator protection guarding If there is an error on one part of the machine the other part can continue to run while the cause of the error is removed and the axis group restarted For this 2 separate axis groupings must be set up DISABLE_GROUP 1 remove any previous axis groupings DISABLE_GROUP 0 1 2 6 group axes 0 to 2 and 6 DISABLE_GROUP 3 4 5 7 group axes 3 to 5 and 7 WDOG O
99. position of this carousel is fixed relative to the absolute zero position of the plotter To change pens an absolute move to the carousel position finds the target irrespective of the plot position MOVEABS 28 5 350 move to just outside the pen holder area WAIT IDLE SPEED pen_pickup_speed MOVEABS 20 5 350 move in to pick up the pen 194 All BASIC commands Section 4 2 4 2 161 MOVECIRC Example See also Type Syntax Description A pallet consists of a 6 by 8 grid in which gas canisters are inserted 185 mm apart by a packaging machine The canisters are picked up from a fixed point The first position in the pallet is defined as position 0 0 with the DEFPOS command The part of the program to position the canis ters in the pallet is FOR x 0 TO 5 FOR y 0 TO 7 MOVEABS 340 516 5 move to pick up point WAIT IDLE GOSUB pick call pick up subroutine PRINT Move to Position x 6 y 1 MOVEABS x 185 y 185 move to position in grid WAIT IDLE GOSUB place call place down subroutine NEXT y NEXT x AXIS MOVE MOVEABS UNITS Axis command MOVECIRC end_1 end_2 centre_1 centre_2 direction MC end_1 end_2 centre_1 centre_2 direction The MOVECIRC command interpolates 2 orthogonal axes in a circular arc at the tool point The path of the movement is determined by the 5 arguments which are incremental from the current position The arguments end_1 and centre_1 apply to the BASE axis and end_2 and centre_2 appl
100. program stops execution until a process buffer is free for use 31 Motion buffers Section 1 9 32 EXAMPLE BASIC PROGRAM BUFFER NTYPE IDLE ee MTYPE MOVE 500 BASIC PROGRAM MOVE 500 MOVE 1000 DATUM 3 MOVE 200 BUFFER NTYPE MOVE 1000 MTYPE MOVE 500 BASIC PROGRAM gt DATUM BUFFER NTYPE MOVE 1000 MTYPE MOVE 500 C MOVE 500 MOVE 1000 DATUM MOVE 200 BUFFER NTYPE DATUM 3 MTYPE MOVE 1000 BUFFER NTYPE MOVE 200 MTYPE DATUM 3 BASIC PROGRAM MOVE 500 MOVE 1000 DATUM MOVE 200 2 BUFFER NTYPE IDLE MTYPE MOVE 200 Cc MOVE 500 MOVE 500 MOVE 500 Example of buffered instructions MOVE 1000 MOVE 1000 MOVE 1000 DATUM 3 DATUM 3 MOVE 200 1 All buffers are empty and a movement is loaded The movement starts to execute 2 A second movement is loaded while the first one is not finished The new movement waits in the second buffer 3 A third movement can still be stored in the process buffer If the basic program reaches MOVE 200 it will wait 4 The first movement has finished The buffer moves by one position The next movement starts to execute 5 As the sent movements are finishe
101. runs under servo closed loop control SERVO ON or open loop SERVO OFF In closed loop the motion control algorithm will output a speed reference signal determined by the control gain settings and the Following Error The position of the servo motor is determined using the Axis com mands In open loop the speed reference signal is completely determined by the S_REF axis parameter N A SERVO AXIS 0 ON Axis 0 is under servo control SERVO AXIS 1 OFF Axis 1 is run open loop AXIS FE_LIMIT S_REF S REF_OUT WDOG All BASIC commands Section 4 2 4 2 222 SERVO_PERIOD A Caution 4 2 223 SET_BIT Type System parameter Syntax SERVO_PERIOD Description The SERVO_PERIOD parameter sets the servo cycle period of the CJ1W MCH72 The timing of the execution of the program tasks and the refreshing of the control data and I O of the Unit are all depending on this setting The parameter is defined in microseconds The CJ1W MCH 72 can be set in either 0 5 1 0 2 0 or 4 0 ms servo cycle See the table below The controller must be reset before the new servo period will be applied Value Description 500 0 5 ms 1000 1 0 ms 2000 2 0 ms 4000 4 0 ms Arguments N A Example No example See also EX When the parameter has been set a power down or software reset using EX must be performed for the complete system Not doing so may result in undefined behaviour Type Syntax Description
102. set_load inertia ratio EXAMPLE 1 enc_resolution 2 13 13 bit encoder max speed 5000 5000 rpm max speed EXAMPLE 2 enc_resolution 2 16 16 bit encoder max speed 5000 5000 rpm max speed DRIVE WRITE 103 2 inertia_ ratio Write inertia ratio DRIVE READ 110 2 10 IF VR 10 lt gt 0012 THEN DRIVE WRITE 110 2 0012 1 Pn110 0012h autotuning disabled restart 1 ENDIF DRIVE READ 202 2 10 IF VR 10 lt gt 1 THEN 333 Practical examples Section 5 2 334 DRIVE WRITE 202 2 1 1 Pn202 1 gear ratio numerator in the drive Default is 4 restart 1 ENDIF DRIVE READ 511 2 10 IF VR 10 lt gt 6548 THEN DRIVE WRITE 511 2 6548 1 Pn511 set the registration inputs in the Servo Driver restart 1 ENDIF DRIVE READ 81E 2 10 IF VR 10 lt gt 4321 THEN DRIVE WRITE S 81E 2 4321 1 Pn81E 4321 To make the Digital inputs in the Servo Driver available for reading through DRIVE INPUTS word restart 1 ENDIF IF restart 1 THEN DRIVE RESET Initial gains For MECHATROLINK SPEED By experience this setting is a good starting point P_ GAIN INT 214748 3648 max speed enc_ resolution This is the optimum value Set if needed VFF_GAIN INT
103. situation is used Arguments value A BASIC expression Example No example See also N A 4 2 168 NEW Type Program command Syntax NEW program_name Description The NEW command deletes all program lines of the program in the con troller NEW without a program name can be used to delete the cur rently selected program using SELECT The program name can also be specified without quotes NEW ALL will delete all programs The command can also be used to delete the TABLE memory NEW TABLE The name TABLE must be in quotes Note This command is implemented for a Command Line Terminal Arguments N A Example No example See also COPY DEL RENAME SELECT TABLE 4 2 169 NEXT See FOR TO STEP NEXT 207 All BASIC commands Section 4 2 4 2 170 NOT Type Mathematical operation Syntax NOT expression Description The NOT operator performs the logical NOT function on all bits of the integer part of the expression The logical NOT function is defined as in the table below Bit Result 0 1 1 0 Arguments expression Any valid BASIC expression Example gt gt PRINT 7 AND NOT 1 6 0000 See also N A 4 2 171 NTYPE Type Axis parameter read only Syntax NTYPE Description The NTYPE parameter contains the type of the move in the next move buffer Once the current move has finished the move present in the NTYPE buffer will be executed The values are the same as those for the MTYP
104. start WAIT UNTIL IN 1 ON 336 Practical examples Section 5 2 SPEED 10 FORWARD WAIT UNTIL IN 2 ON prod_pos MPOS CANCEL WAIT IDLE PRINT Product Position prod_pos SPEED 100 MOVEABS 0 WAIT IDLE GOTO start 5 2 6 Position on a grid A square palette has sides 1m long It is divided into a 5 x 5 grid and each of the positions on the grid contains a box which must be filled using the same square pattern of 100mm by 100mm A dispensing nozzle controlled by digital output 8 must be turned on when filling the box and off at all other times 337 Practical examples Section 5 2 5 2 6 1 Example 338 star GOTO squa RETU x speed y speed nozzle 8 ts FOR x FOR NEXT x start re rel MOVE 0 MOVE MOVE MOVE 0 WA 1000 RN I Square_rel gt T Square rel gt N OP nozzle 0 TO 4 y MOV 0 TO WAIT IDLI OP nozzle ON GOS MOVEABS 0 200 4 EABS x 200 y 200 F a UB sq uare_rel OP nozzle OFF NEXT y 100 100 O0 10 0 100 0 WAIT IDLE MOVEABS 0 400 Practical examples Section 5 2 5 2 7 Bag feeder program A bag feeder machine feeds plastic film a fixed distance that is set by the operator The figure shows a typical bag feeder that is part
105. state as RESET signal RUN run_ant run_act run_act READ BIT 0 signal_ state run_bit run_act AND NOT run ant STOP stop_ant stop act stop act READ BIT 1 signal state stop bit stop act AND NOT stop ant RESET res_ant res_act res act READ BIT 2 signal_ state res bit res_act AND NOT res_ant RETURN Practical examples Section 5 2 alarm_sequence Alarm notification IF SYSTEM ERROR 0 AND MOTION ERROR 0 AND READ BIT 15 diag01 1 TH alarm _bit gal Z ELSE IF MOTION ERROR lt gt 0 THEN SET BIT 0 status_bits Motion error flag first _error ERROR AXIS ENDIF alarm bit 1 DIF Ei pa MECHATROLINK axis alarm monitoring FOR i 0 TO max axis BASE i VR servo_status i 2 AXISSTATUS if stopped by alarm notify the alarm code IF ATYPE gt 40 AND ATYPE lt 42 THEN IF status_word 2 THEN if no response notify communication alarm IF AXISSTATUS AND 4 lt gt 0 THEN VR servo alarm i 2 E6 ELSEIF NOT DRIVE ALARM servo alarm i 2 THEN VR servo alarm i 2 E6 ELSEIF VR servo alarm i 2 0 THEN VR servo_alarm i 2 Sbb ENDIF if no alarm notify RUN 99 or BaseBlock SBB ELSEIF DRIVE STATUS AND 8 THEN VR servo alarmt i 2 99 ELSE VR servo alarm i 2 bb ENDIF ENDIF NEXT i sys_error SYSTEM_ERROR RETU
106. the B_SPLINE stores expanded profile to another area in the TABLE This is ideally used where the source CAM profile is too course and needs to be extrapolated into a greater number of points type Reserved for future expansion Always set this to 1 data_in Location in the TABLE where the source profile is stored number_in Number of points in the source profile data_out Location in the TABLE where the expanded profile will be stored expansion_ratio The expansion ratio i e if the source profile is 100 points and expansion_ratio is set to 10 the resulting profile will be 1000 point 100 10 BASE 1 B_SPLINE 1 0 10 200 10 This command expands a 10 point profile in TABLE locations 0 to 9 toa larger 100 points profile starting at TABLE location 200 N A 101 All BASIC commands Section 4 2 4 2 37 BACKLASH Type Syntax Description Arguments Example See also 4 2 38 BACKLASH_DIST Type Syntax Description Arguments Example See also 102 Axis command BACKLASH on off distance speed accel The BACKLASH command allows the parameters for the backlash compensation to be loaded The backlash compensation is achieved as follows An offset move is applied when the motor demand is in one direc tion The offset move is reversed when the motor demand is in the oppo site direction These moves are superimposed on the command axis movements The backlash compe
107. the Trajexia Studio manual You can trigger the oscilloscope to start tracing given axis and system parameters in two ways manually or by a program Triggering manually is done using the data trace The parameters are stored in the Table memory of the controller The range of the Table memory where the parameters are stored can be set in the Memory Manager of the device configuration see the Trajexia Studio manual With manual triggering the user can see the changes of axis and system parameters in real time as the system runs A change in parameter values is graphically represented as soon as the change happens The limitation of manual triggering is that it requires user interaction which means that the start of tracing is not synchronized with the movement that is analyzed Also with manual triggering the tracing range is limited to 200 samples per channel 5 1 7 2 Using the oscilloscope 5 1 7 3 Example 314 The alternative triggering by a program does not have the limitations of manual triggering of the tracing Triggering by a program stores the axis and system parameters in the memory of the CJ1W MCH 2 Later the parameters are given to the oscilloscope for graphical representation The axis and system parameters are stored in the Table memory The memory range used is defined by the parameters of the SCOPE command When the parameters are in the Table memory the oscilloscope can be configured to show a range of Table memory l
108. the current count of the task clock pulses TICKS is a 32 bit counter that is decremented on each servo cycle TICKS can be written and read It can be used to measure cycles times add time delays etc Each task has its own TICKS parameter Use the PROC modifier to access the parameter for a certain task Without PROC the current task will be assumed Arguments N A Example delay TICKS 3000 OP 9 ON test IF TICKS lt 0 THEN OP 9 OFF ELSE GOTO test ENDIF See also N A 4 2 241 TIME Type System parameter read only Syntax TIME Description Returns the time from the real time clock The time returned as an inte ger is the number of seconds since midnight 00 00 00 Arguments N A Example gt gt PRINT TIME gt gt 48002 0000 See also N A 4 2 242 TIMES Type System command Syntax TIME Description Prints the current time as defined by the real time clock as a string in 24 hour format Arguments N A Example When the time is 13 20 00 gt gt PRINT TIMES gt gt 13 20 00 See also N A 255 All BASIC commands Section 4 2 4 2 243 TO See FOR TO STEP NEXT 4 2 244 TRANS_DPOS Type Axis parameter read only Syntax TRANS_DPOS Description Axis demand position at output of frame transformation TRANS_DPOS is normally equal to DPOS on each axis The frame transformation is therefore equivalent to 1 1 for each axis For some machinery configu rations it can be useful to install a frame
109. the specified VR variable to one 81 Categories Section 4 1 Name Description TABLE Writes and reads data to and from the TABLE variable array TABLEVALUES Returns list of values from the TABLE memory TIME Prints the current time as a string TRIGGER Starts a previously set SCOPE command VR Writes and reads data to and from the global VR vari ables VRSTRING Combines VR memory values so they can be printed as a string WA Holds program execution for the number of millisec onds specified WAIT IDLE Suspends program execution until the base axis has finished executing its current move and any buffered move WAIT LOADED Suspends program execution until the base axis has no moves buffered ahead other than the currently exe cuting move WAIT UNTIL Repeatedly evaluates the condition until it is TRUE 4 1 11 System parameters Name Description BATTERY_LOW Returns the current status of the battery condition CHECKSUM Contains the checksum for the programs in RAM CONTROL Contains the type of controller in the system D_ZONE_MAX Controls the S_REF output in conjunction with the Follow ing Error value D_ZONE_MIN Controls the S_REF output in conjunction with the Follow ing Error value DATE Sets or returns the current date held by the real time clock ERROR_AXIS
110. the values in the TABLE to allow a number of points to define a smooth profile Two or more CAM commands can be exe cuted simultaneously using the same or overlapping values in the TABLE array The TABLE profile is traversed once CAM requires that the start element in the TABLE array has value zero The distance argument together with the SPEED and ACCEL parame ters determine the speed moving through the TABLE array Note that in order to follow the CAM profile exactly the ACCEL parameter of the axis must be at least 1000 times larger than the SPEED parameter CAM works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis 105 All BASIC commands Section 4 2 Arguments start_point The address of the first element in the TABLE array to be used Being able to specify the start point allows the TABLE array to hold more than one profile and or other information e end_point The address of the end element in the TABLE array e table_multiplier The Table multiplier value used to scale the values stored in the TABLE As the Table values are specified in encoder edges use this argument to set the values for instance to the unit conversion factor set by UNITS parameter e distance A factor given in user units that controls the speed of movement through the Table The time taken to execute CAM depends on the current axis speed and this distance For example assume the sys tem is being prog
111. there is no wait time line back cut_length synch dist 1l_ dec l_ acc shear _cut l_acc 2 synch_ distt l_ dec 2 MOVELINK shear_ cut line back 1l acc 4 1 dec 4 line axis AXIS flying axis GOTO loop SPEED The speed time graph shows the steps of the above example The steps are 1 oak The initial cycle the slave waits for the right length in the product to cut cut_length distance_to_accelerate 2 It is necessary to divide distance_to_accelerate when we use the MOVELINK command because when we synchronize the master moves twice the distance of the slave The slave accelerates to synchronize with the master When the acceleration finishes the relative distance between the edge of the product and the shear is cut_length This is the synchronization part the relative distance between the edge of the product and the shear remains the same The cut in the material is made This gives a new material edge The deceleration part the material continues and the shear stops Move back at high speed the distances are calculated such that when the slave reaches it original position the edge of the product is in the correct position to start a new cut A 345 Practical examples Section 5 2 A new movement starts step 2 5 2 10 Correction program This application is for a rotary labeller The constants are e The product arrives on a conveyor master axis that runs at a constant speed e A rotary
112. time of uncertainty Instead the movement is started using the MOVELINK command with link_option 1 which means that the link to the master axis starts when the registration event occurs on link master axis The corresponding program sequence is REGIST 2 AXIS master MOVELINK dst Ink_dst Ink_acc Ink_dec master 1 AXIS slave For more information on the MOVELINK command and the link_option argument refer to section 4 2 162 1 1 1 i i Master Speed Ens f Slave Speed 1 1 i l 1 i 1 1 l l f 1 1 1 1 Correction in the slave according to the latch Extra position the first cycle is equal to the lost position Servo Period l Registration input signal The picture shows how the position of the slave axis is corrected using the registration event on the master axis to start the movement of the slave axis The influence of SERVO_PERIOD and the fact that the registration event can happen at any time inside the SERVO_PERIOD is completely eliminated 313 How to s Section 5 1 5 1 7 Tracing and monitoring 5 1 7 1 Oscilloscope functionality in Trajexia Studio The software oscilloscope is a standard part of Trajexia Studio The oscilloscope can be used to trace and graphically represent axis and system parameters This can help you with development commissioning and troubleshooting of the motion system For more information on the software oscilloscope and its features and capabilities refer to
113. to by ADDAX If the base axis in not linked to any other axis the ADDAX_AXIS parameter returns 1 N A gt gt BASE 0 gt gt ADDAX 2 gt gt PRINT ADDAX_AXIS 2 0000 gt gt ADDAX 1 gt gt PRINT ADDAX_AXIS 1 0000 ADDAX AXIS All BASIC commands Section 4 2 4 2 24 AIN 4 2 25 ALL Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also I O command AIN analogue_chan The AIN reads a value from the AIN array The CJ1W MCH 72 does not provide any analogue input The contents of the AIN array may be mapped to PLC memory to get values from e g PLC analogue input units analogue_chan Analogue input channel number 0 31 MOVE 5000 REPEAT a AIN 1 IF a lt 0 THEN a 0 SPEED a 0 25 UNTIL MTYPE 0 The speed of a production line is governed by the rate at which material is fed onto it The material feed is via a lazy loop arrangement which is fitted with an ultra sonic height sensing device The output of the ultra sonic sensor is in the range OV to 4V where the output is at 4V when the loop is at its longest Note The analogue input value is checked to ensure it is above zero even though it always should be positive This is to allow for any noise on the incoming signal which could make the value negative and cause an error because a negative speed is not valid for any move type except FORWARD or REVERSE N A Slot modifi
114. up loss of encoder feedback etc N A No example AXIS AXISSTATUS ERRORMASK FE FE_RANGE UNITS All BASIC commands Section 4 2 4 2 107 FE_LIMIT_MODE 4 2 108 FE_RANGE Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also Axis parameter FE_LIMIT_MODE value When this parameter is set to 0 the axis will cause a MOTION_ERROR immediately when the FE exceeds the FE_LIMIT value If FE_LIMIT_MODE is set to 1 the axis will only generate a MOTION_ERROR when the FE exceeds FE_LIMIT during 2 consecu tive servo periods This means that if FE_LIMIT is exceeded for one servo period only it will be ignored The default value for FE_LIMIT_MODE is 0 N A No example N A Axis parameter FE_RANGE The FE_RANGE axis parameter contains the limit for the Following Error warning range in user units When the Following Error exceeds this value on a servo axis bit 1 in the AXISSTATUS axis parameter will be turned on This range is used as a first indication for fault conditions in the applica tion compare FE_LIMIT N A No example AXIS AXISSTATUS ERRORMASK FE UNITS 155 All BASIC commands Section 4 2 4 2 109 FHOLD_IN Type Syntax Description Arguments Example See also 4 2 110 FHSPEED Type Syntax Description Arguments Example See also 156 Axis parameter FHOLD_IN FH_IN The FHOLD_IN axis paramet
115. used to perform a relative adjustment of the current position DEFPOS works on the default basis axis or axis sequence group set with BASE unless AXIS is used to specify a temporary base axis Note The changes to the axis position made using DEFPOS or OFF POS are made on the next servo update This can potentially cause problems when a move is initiated in the same servo period as the DEF POS or OFFPOS The following example shows how the OFFPOS parameter can be used to avoid this problem DEFPOS commands are internally converted into OFFPOS position offsets which provides an easy way to avoid the problem by programming as follows DEFPOS 100 WAIT UNTIL OFFPOS 0 MOVEABS 0 Arguments The command can take up to 32 arguments posi The absolute position for base i axis in user units Refer to the BASE command for the grouping of the axes 132 All BASIC commands Section 4 2 Example After 2 axes returned to their homing positions it is required to change the DPOS values so that the home positions are not zero but some defined positions instead DATUM 5 AXIS 1 home both axes At the end of the DATUM DATUM 4 AXIS 3 procedure the positions are 0 0 WAIT IDLE AXIS 1 WAIT IDLE AXIS 3 BASE 1 3 set up the BASE array DEFPOS 10 35 define positions of the axes to be 10 and 35 Example Set the axis position to 10 then start an absolute move but make sure the axis has updated the position
116. value including 0 The default value is 0 This default value is applicable to most appli cations as motion is usually ramped down to zero speed when the free hold input is set In some cases it may be desirable for the axis to ramp to a known constant speed when the freehold input is set Note This feature only works on speed controlled moves Moves which are not speed controlled CAMBOX CONNECT and MOVELINK are not affected N A No example AXIS AXISSTATUS FHOLD_IN UNITS All BASIC commands Section 4 2 4 2 111 FINS_COMMS Type Syntax Description Communication command FINS_ COMMS type network node unit remote_area remote_offset length local_area local_offset timeout FINS Factory Interface Network Service is a Proprietary OMRON com munication protocol A subset of this protocol has been implemented in Trajexia The FINS protocol has been implemented with the intention of enabling seamless communication with other OMRON devices PLCs HMls etc and software CX Drive CX Server etc For more informa tion on FINS communication protocol see the Communication Com mands Reference Manual cat num W342 E1 Sections 3 and 5 Trajexia has built in FINS client capabilities so it can initiate the FINS communications with FINS slave devices using FINS_COMMS Only FINS 0101 Read Memory and FINS 0102 Write Memory commands are implemented With FINS 0101 memory can be read from other devices with FI
117. with all the other axis com mands and parameters Note This command waits for the response of the axis therefore its execution is slow and the time variable Do not use this command together with other commands that require quick execution Note Executing a DRIVE_READ will temporarily disable the Servo Driver Front Panel display Note DRIVE_READ returns 1 on success It also returns 1 with no parameter read if the parameter number does not exist or has the wrong size parameter The number of the parameter to be read Note that the parameter numbers are hexadecimal The format of the data can be found in the Servo Driver manual e size Size of the parameter is specified in bytes For most parameters the size is normally 2 bytes Some special parameters may be 4 bytes long Sizes for each parameter can be found in the Servo Driver manual VR The VR address where the read parameter is stored upon success ful execution All BASIC commands Section 4 2 Example See also IF DRIVE_READ 100 2 1 THEN PRINT The Speed loop gain is VR 1 ELSE PRINT The speed loop gain could not be read ENDIF DRIVE_WRITE HEX HEXADECIMAL INPUT A Caution Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Driver when executing this command Otherwise the program task will be paused until the connection of the other device to the Servo Driver is removed 4 2 80 DRIVE_RESET Type Sy
118. 0 BASE 3 MOVEABS 130 WAIT IDLE start the continuously repeating cambox CAMBOX 1000 1035 1 360 3 4 AXIS 0 FORWARD start camshaft axis WAIT UNTIL IN 2 OFF REP_OPTION 2 cancel repeating mode by setting bit 1 WAIT IDLE AXIS 0 waits for cam cycle to finish CANCEL stop camshaft axis WAIT IDLE Note The system software resets bit 1 of REP_OPTION after the repeating mode has been cancelled 113 All BASIC commands Section 4 2 Setting bit 3 value 8 of the link options parameter enables the CAMBOX pattern mode This mode enables a sequence of scale val ues to be cycled automatically This is normally combined with the auto matic repeat mode so the options parameter must be set to 12 This diagram shows a typical repeating pattern which can be automated with the CAMBOX pattern mode The parameters for this mode are treated differently to the standard CAMBOxX function CAMBOX start end control block pointer link dist link axis options The start and end parameters specify the basic shape profile ONLY The pattern sequence is specified in a separate section of the TABLE mem ory There is a new TABLE block defined The Control Block This block of seven TABLE values defines the pattern position repeat con trols etc The block is fixed at 7 values long Therefore in this mode only there are 3 independently positioned TABLE blocks used to define the required motion e SHAPE BLOCK This is direc
119. 0 OR FF00 OP VR 0 This routine sets outputs 8 to 15 ON and all others off The above programming can also be written as follows OP OP OR FF00 val 8 The value to set mask OP AND NOT 15 256 Get current status and mask OP mask OR val 256 Set val to OP 8 to OP 11 This routine sets value val to outputs 8 to 11 without affecting the other outputs by using masking IN Axis parameter OPEN_WIN OW The OPEN_WIN parameter defines the beginning of the window inside or outside which a registration event is expected The value is in user units N A only look for registration marks between 170 and 230 OPEN_WIN 170 CLOSE_WIN 230 REGIST 256 3 WAIT UNTIL MARK CLOSE_WIN REGIST UNITS All BASIC commands Section 4 2 4 2 179 OR Type Mathematical operation Syntax expression1 OR expression2 Description The OR operator performs the logical OR function between correspond ing bits of the integer parts of two valid BASIC expressions The logical OR function between two bits is defined as in the table below Bit 1 Bit 2 Result 0 0 0 0 1 1 1 0 1 1 1 1 Arguments expression Any valid BASIC expression expression2 Any valid BASIC expression Example result 10 OR 2 1 9 The parentheses are evaluated first but only the integer part of the result 18 is used for the operation Therefore this expression is equiv alent to the following result 10 OR 18
120. 0 80 15 2 start WA 10 WAIT UNTIL MTYPE 0 OR IN 2 ON WEND CANCEL CANCEL AXIS 1 WAIT IDLE The arguments of the CAMBOX command are e Ois the start of the profile shape in the TABLE 30 is the end of the profile shape in the TABLE e 800 scales the TABLE values Each CAMBOX motion therefore totals 800 2000 encoder edges steps e 80 is the distance on the product conveyor to link the motion to The units for this parameter are the programmed distance units on the link axis e 15 specifies the axis to link to e 2is the link option setting It means Start at absolute position on the link axis e The variable start holds a position The motion will execute when this position is reached on axis 15 112 All BASIC commands Section 4 2 TABLE VALUE x 1000 S MM uo ji N STATICOFFSET o Example T T T 50 100 150 200 250 300 350 DEGREES 1025 1030 1000 1005 1010 1015 1020 TABLE INDEX A motor on Axis 0 is required to emulate a rotating mechanical CAM The position is linked to motion on axis 3 The shape of the motion profile is held in TABLE values 1000 1035 The table values represent the mechanical cam but are scaled to range from 0 4000 TABLE 1000 0 0 167 500 999 1665 2664 3330 3497 3497 TABLE 1010 3164 2914 2830 2831 2997 3164 3596 3830 3996 3996 TABLE 1020 3830 3497 3330 3164 3164 3164 3330 3467 3467 3164 TABLE 1030 2831 1998 1166 666 333
121. 000 EV_IN 1 0000 IN 1 0000 HOLD _IN 1 0000 FS_LIMIT 20000000 0000 RS_LIMIT 20000000 0000 FASTDEC 0 0000 FHSPEED 1000 0000 OUTLIMIT 1 0000 FE_RANGE 0 0000 DAC 0 0000 vor Hw wD PW Q Q O Q 0p SE D H GI zZ HyOWAHMNA GAY GI T w lt F BASE 1 Axis Name Flex01 ATYPI E 44 Axis Type Flexible Servo NITS 1024 0000 EP_DIST 5000000 0000 EP OPTION 0 RRORMASK 2 68 XIS_ENABLE 0 RIVE CONTROL 0 _GAIN 1 0000 I_GAIN 0 0000 D_GAIN 0 0000 OV_GAIN 0 0000 VEF_GAIN 0 0000 vouormwmwWa SPEED 50 0000 ACCEL 100 0000 DECEL 100 0000 CREEP 100 0000 JOGSPEED 100 0000 FE_LIMIT 10 0000 SERVO 0 FWD _IN 1 0000 REV_IN 1 0000 DATUM _IN 1 0000 FHOLD_IN 1 0000 FS_LIMIT 20000000 0000 RS_LIMIT 20000000 0000 331 Practical examples Section 5 2 332 FASTDEC 0 0000 FHSPEED 1000 0000 OUTLIMIT 1 0000 FE_RANGE 0 0000 DAC 0 0000 BASE 2 Axis Name Down ATYPE 40 Axis Type Mechatro Position ITS 32 0000 EP DIST 360000 0000 EP _ OPTION 0 RRORMASK 268 IS_ENABLE 0 RIVE CONTROL 0 PEED 3600 0000 CEL 36000 0000 ECEL 36000 0000 REEP 100 0000 PEED 100 0000 _LIMIT 90 0000 ERVO 0 D IN 16 0000 EV IN 17 0000 IN 1 0000 HOLD IN 1 0000 FS LIMIT 20000000 0000 RS_L
122. 14 5 45 SI5 11 SI5 6 46 SI6 12 SI6 7 Always ON 8 Always OFF P_OT active low Pn50A 3 9 40 SIO 13 SIO N_OT active low Pn50B 0 A 41 S1 7 S11 DEC active low Pn511 0 B 42 S12 8 S12 C 43 SI3 9 SI3 D 44 S14 10 S14 E 45 S15 11 S15 F 46 SI6 12 SI6 EXT1 active low Pn511 1 0 3 Always OFF EXT2 active low Pn511 2 4 44 SIA 10 S14 EXT3 active low Pn511 3 5 45 SI5 11 S15 6 46 SI6 12 SI6 7 Always ON 8 9 C Always OFF EXT1 active high Pn511 1 D 44 S14 10 S14 EXT2 active high Pn511 2 E 45 S15 11 SI5 EXT3 active high Pn511 3 F 46 SI6 12 SI6 BRK active low Pn50F 2 0 Always OFF 1 25 1 2 27 23 3 29 25 1012 Pn81E 0 0 Always OFF 1013 Pn81E 1 1 40 SI0 13 SIO 1014 Pn81E 2 1015 Pn81E 3 2 41 SI1 7 S11 3 42 S12 8 S12 4 43 SI3 9 SI3 5 44 S14 10 S14 6 45 SI5 11 S15 7 46 SI6 12 SI6 297 How to s Section 5 1 For the Junma Servo Driver all input signals are mapped to a fixed location on the CN1 I O connector The table below shows the input signals and pin numbers Input signal CN1 pin number P_OT active high 4 N_OT active high 3 DEC active low 1 EXT1 active low 2 BRK active low 13 E STP active high 6 For the G Series Servo Driver all input signals are mapped to a fixed location on the CN1 I O connector The table below shows the input signal
123. 200 This program uses the repeat distance set to 360 degrees and the repeat option on so that the axis position will be maintained between 0 and 360 degrees HW_PSWITCH OP UNITS 221 All BASIC commands Section 4 2 4 2 195 RAPIDSTOP 222 Type Syntax Description Arguments Example Axis command RAPIDSTOP RS The RAPIDSTOP command cancels the current move on all axes from the current move buffer MTYPE Moves for speed profiled move com mands MOVE MOVEABS MOVEMODIFY FORWARD REVERSE MOVECIRC and MHELICAL will decelerate to a stop with the deceler ation rate as set by the DECEL parameter Moves for other commands will be immediately stopped Notes e RAPIDSTOP cancels only the presently executing moves If further moves are buffered in the next move buffers NTYPE or the task buffers they will then be loaded e During the deceleration of the current RAPIDSTOPs will be ignored N A moves additional This example shows the implementation of a stop override button that cuts out all motion CONNECT 1 0 AXIS 1 axis 1 follows axis 0 BASE 0 REPAEAT MOVE 1000 AXIS 0 MOVE 100000 AXIS 0 MOVE 100000 AXIS 0 UNTIL IN 2 OFF stop button pressed RAPIDSTOP WA 10 wait to allow running move to cancel RAPIDSTOP cancel the second buffered move WA 10 RAPIDSTOP cancel the third buffered move All BASIC commands Section 4 2 Example AXISO om AXIS 1
124. 240 Type Task parameter read only Syntax RUN_ERROR Description The RUN_ERROR parameter contains the number of the last BASIC run time error that occurred on the specified task Each task has its own RUN_ERROR parameter Use the PROC modi fier to access the parameter for a certain task Without PROC the cur rent task will be assumed The table below gives an overview of error numbers and the associated error messages Number Message Number Message 1 Command not recognized 2 Invalid transfer type 3 Error programming Flash 4 Operand expected 5 Assignment expected 6 QUOTES expected 7 Stack overflow 8 Too many variables 9 Divide by zero 10 Extra characters at end of line 11 expected in PRINT 12 Cannot modify a special pro gram 13 THEN expected in IF ELSEIF 14 Error erasing Flash 15 Start of expression expected 16 expected 17 expected 18 Command line broken by ESC 19 Parameter out of range 20 No process available 21 Value is read only 22 Modifier not allowed 23 Remote axis is in use 24 Command is command line only 25 Command is runtime only 26 LABEL expected 27 Program not found 28 Duplicate label 29 Program is locked 30 Program s running 31 Program is stopped 32 Cannot select program 33 No program selected 34 No more programs available 35 Out of memory 36 No code available to run 37 Command out of context 38 Too many nested structures 39 Structure nesting
125. 4 2 198 REG_POS 4 2 199 REG_POSB 226 Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also Axis parameter read only REG_POS The REG_POS parameter stores the position in user units at which the primary registration event occurred N A A paper cutting machine uses a CAM profile shape to quickly draw paper through servo driven rollers and stop the paper so it can be cut The paper is printed with a registration mark This mark is detected and the length of the next sheet is adjusted by scaling the CAM profile with the third parameter of the CAM command Example Registration Program using CAM stretching Set window open and close length 200 OPEN_WIN 10 CLOSE_WIN length 10 GOSUB Initial Loop TICKS 0 Set millisecond counter to 0 IF MARK THEN offset REG_POS This next line makes offset ve if at end of sheet IF ABS offset length lt offset THEN offset offset length PRINT Mark seen at offset 5 1 ELSE offset 0 PRINT Mark not seen ENDIF Reset registration prior to each move DEFPOS 0 REGIST 3 768 Allow mark at first 10mm last 10mm of sheet CAM 0 50 lengtht offset 0 5 cf 1000 WAIT UNTIL TICKS lt 500 GOTO Loop Note variable cf is a constant that is calculated depending on the draw length of the machine per encoder edge AXIS MARK REGIST Axis parameter read only REG_POSB The REG_POSB parameter stores the position in user un
126. 7 for PLC output area 8 areas available e 8100 8107 for PLC input area 8 areas available start_address 0000 byte_count 0008 The CJ1W MCH 72 responds with these codes Condition Response code Description hex All elements valid 0000 OK area_code invalid 1101 No area type start_address invalid 1103 Address range designation error byte_count invalid 1104 Address out of range area_code not configured 2003 The registered table does not exist If the response code is 0000 the CJ1W MCH72 responds with the data configured previously 02 01 00 00 00 00 00 08 command_ response_ area_ start_ byte_ plc_ plc_ tj_ tj_ total_ code code code address count area start area start items Refer to section 3 4 4 for more information on the fields plc_area plc_start tj_area tj_start and total_items 3 4 4 Parameter Area Write 0202 The FINS Parameter Area Write command sets the memory mapping configuration It has this format 02 02 00 00 00 00 00 08 command__ response_ area_ start_ byte_ plc_ plc_ tj_ tj_ total_ code code code address count area start area start items The parameters can have the following values Parameter Values hex command_code 02 02 68 FINS commands Section 3 4 Note Parameter
127. 72 directory The program names can also be specified without quotes Note This command is implemented for a Command Line Terminal only and should not be used from within programs Arguments old_program_name The current name of the program new_program_name The new name of the program Example RENAME car voiture See also COPY DEL NEW 4 2 204 REP_DIST Type Axis parameter Syntax REP_DIST Description The REP_DIST parameter contains the repeat distance which is the allowable range of movement for an axis before the demand position DPOS and measured position MPOS are corrected REP_DIST is defined in user units The exact range is controlled by REP_OPTION The REP_DIST can have any non 0 positive value When the measured position has reached its limit the CJ1W MCH72 will adjust the absolute positions without affecting the move in progress or the servo algorithm Note that the demand position can be outside the range because the measured position is used to trigger the adjust ment When measured position reaches REP_DIST twice that distance is subtracted to ensure that the axis always stays in the range REP_DIST REP_DIST assuming that REP_OPTION OFF or in the range 0 REP_OPTION assuming that REP_OPTION ON For every occurrence DEFPOS OFFPOS MOVEABS MOVEMODIFY which defines a position outside the range the end position will be redefined within the range The default value for all axes is 5000000 Ar
128. 75 ClO1699 F hex 15 C101875 Cl01899 The battery makes sure that the following RAM data is preserved when the power supply is off e User programs VR variables e Table memory If the battery is not installed or the battery voltage is too low the RAM data is lost when the power supply is off User programs VR variables and TABLE memory can be stored into flash memory which do not need battery back up on user request using the BASIC commands EPROM and FLASHVR 37 Unit components Section 2 1 2 1 3 1 Battery lifetime The maximum lifetime of a battery is 5 years when the ambient temperature is 25 C The lifetime of the battery is shorter when the ambient temperature is higher The lifetime of the battery is also shorter when there is no power supply to the unit for long periods 2 1 3 2 Low battery indicator If a low battery error occurs the ERC LED flashes the BATTERY_LOW parameter is ON and bit 3 of status word n 2 is set see section 3 3 1 2 If this occurs perform the following steps 1 Check if the battery is installed correctly 2 Ifthe battery is installed correctly replace it When a low battery error occurs the battery can continue to function for 5 days if the ambient temperature is 25 C and if power is supplied to the PLC system at least one time per day If the power is not turned off until the battery is replaced the battery failure and the resulting loss of RAM data can be delayed
129. 9 Torque Limit 10 Latch Completed 11 In Range Speed Limit For Flexible Axis axes this parameter holds the status of registration and auxiliary inputs as well as registration selection The explanation of each bit is given in the second table below Note Only bits relevant to Flexible axis are listed Bit Description Flexible Axis 0 MARK 1 MARKB 2 REG 0 selected current value 3 REG 1 selected current value 5 REG 0 current value 6 REG 1 current value Arguments N A Example PRINT DRIVE_STATUS AXIS 4 This command will print the current value of DRIVE_STATUS for axis 4 Example BASE 3 ATYPE 44 IF DRIVE_STATUS AND 32 32 THEN PRINT REG 0 input is ON for axis 3 ENDIF See also AXIS MARK MARKB REGIST 144 All BASIC commands Section 4 2 4 2 82 DRIVE_WRITE Type Syntax Description Arguments Example See also Axis command DRIVE_WRITE parameter size value mode The DRIVE_WRITE function writes to the specified parameter of the Servo Driver via the MECHATROLINK II bus Upon successful execu tion this command returns 1 If the command cannot be executed the value 0 is returned The command is executed on the driver for the base axis set with BASE It can be changed using the AXIS modifier as with all other axis commands and parameters For some parameters to be written the driver needs to be powered off and on again The DRIVE_RES
130. 9000 107 All BASIC commands Section 4 2 OP 15 TRIGGER Example A masked wheel is used to create a stencil for a laser to shine through for use in a printing system for the ten numerical digits The required digits are transmitted through port 1 serial port to the controller as ASCII text The encoder used has 4000 edges per revolution and so must move 400 between each position The cam table goes from 0 to 1 which means that the CAM multiplier needs to be a multiple of 400 to move between the positions The wheel is required to move to the pre set positions every 0 25 sec onds The speed is set to 10000 edges second and we want the profile to be complete in 0 25 seconds So multiplying the axis speed by the required completion time 10000 x 0 25 gives the distance parameter equals 2500 GOSUB profile_gen WHILE IN 2 ON WAIT UNTIL KEY 1 Waits for character on port 1 GET 1 k IF k gt 47 AND k lt 58 THEN check for valid ASCII character position k 48 400 convert to absolute position multiplier position offset calculate relative movement check if it is shorter to move in reverse direction IF multiplier gt 2000 THEN multiplier multiplier 4000 ELSEIF multiplier lt 2000 THEN multiplier multiplier 4000 ENDIF CAM 0 200 multiplier 2500 set the CAM movment WAIT IDLE OP 15 ON trigger the laser flash WA 20 OP 15 OFF offset k 48 400 calculates current absolute position ENDIF WEND 108 All BA
131. A T E Measured position With SERVO ON only the torque loop is closed in the Servo Driver The torque reference in the Servo Driver depends on the FE and the gain With SERVO OFF the torque reference is sent directly via the T_REF command 0x40000000 is the maximum torque of the servo motor To monitor the torque in the servo in DRIVE_MONITOR set DRIVE_CONTROL 11 27 Motion sequence and axes Section 1 8 1 8 4 5 Stepper output ATYPE 43 The position profile is generated and the output from the system is a pulse train and direction signal This is useful to control a motor via pulses or as a position reference for another motion controller 1 8 4 6 Servo axis ATYPE 44 CJ1W MCH72 Measured Position With SERVO OFF the position of the external incremental encoder is read 1 8 4 7 Encoder output ATYPE 45 CJ1W MCH72 Profile generator AXIS 1 Demanded ATYPE 45 position The position profile is generated and the output from the system is an incremental encoder pulse This is useful to control a motor via pulses or as a position reference for another motion controller 1 8 4 8 Absolute EnDat encoder ATYPE 47 With SERVO OFF the position of the external absolute EnDat encoder is read 1 8 4 9 Absolute SSI encoder ATYPE 48 With SERVO OFF the position of the external absolute SSI encoder is read 28 Motion sequenc
132. APPLICATION program RUN APPLICATION 2 STOP The gain setting is related to the mechanical system to which the motor is attached There are three main concepts e Inertia ratio e Rigidity e Resonant frequency These concepts are described in section 1 10 This section shows example parameter values for e Speed Loop Gain e Proportional position gain e Velocity Feed Forward gain The example values for the program and motion parameters in the Trajexia system are given below Note that they are appropriate for 13 bit encoders and Sigma ll Servo Drivers Drive Parameter value Description Pn103 716 Inertia ratio Pn110 0012 No autotuning Pn202 1 Gear ratio numerator Pn203 1 Gear ratio denominator Motion Parameter values Description UNITS 1 Working in encoder counts SPEED 200000 Speed setting ACCEL 1000000 Acceleration setting How to s Section 5 1 Motion Parameter values Description DECEL 1000000 Deceleration setting MOVEMENT 81920 10 Turns 5 1 2 1 Speed mode examples CJ1W MCH72 DRIVE ae i ae he ee E 10V Position loop 1 SERVO OFF SERVO OFF P 1 i i NN 7 oe Fo gt Profile generator f gt T Pa 1 Demanded Following Speed Position __ _ _ Emor onna _ Command Measured Position a Encoder Signal In this mode the position loop is closed in Trajexia and the Speed loop is clo
133. AR_BIT SET_BIT 224 All BASIC commands Section 4 2 4 2 197 READ_OP Type Syntax Description Arguments Example Example Example See also I O command READ_OP output_no READ_OP first_output_no last_output_no READ_OP output_no returns the binary value 0 or 1 of the digital output output_no READ_OP first_output_no last_output_no returns the number that is the decimal representation of the concatenation of the binary values of the range first_output_no to final_output_no Note The difference between first_output_no and last_output_no must be less than 24 Note Outputs 0 to 7 do not physically exist on the CJ1W MCH72 They cannot be written Their return value is always 0 Note READ_OP checks the state of the output logic READ_OP can return the value 1 even if no actual output is present output_no The number of the output e first_output_no The number of the first output of the output range last_output_no The number of the last output of the output range If output 11 has value 1 output 12 has value 1 output 13 has value 0 and output 14 has value 1 READ_OP 11 14 returns 13 1101 bin In this example a single output is tested WAIT UNTIL READ_OP 12 ON GOSUB place Check a range of 8 outputs and call a routine if one of them has value 1 op_bits READ_OP 16 23 IF op_bits lt gt 0 THEN GOSUB check_outputs ENDIF N A 225 All BASIC commands Section 4 2
134. Alarm flag Bit15 ML communication error with one slave VR 902 action send messages to the upper controller i 0 during initialization 1 Push RESET to restart 2 Resetting 3 System healthy VR 903 VR diag01 gives feedback of the MECHATROLINK initialisation i Bito0 Could not get the ML slave number d Bit1 Slave number is uncorrect y Bit15 Detection OK VR 904 VR diag02 gives feedback of the MECHATROLINK Slaves Bitn Slave n not detected VR 905 VR diag03 gives feedback forUnit detection d Bitn Unit n detected 321 Practical examples Section 5 2 322 VR 906 VR system01 used in system detection VR 907 VR signal state gives feedback on signal state VR 908 sys error system error detected VR 909 first error gives the axis number causing a motion error VR 910 912 940 VR servo_statustaxis n 2 stores AXISSTATUS to report to upper controller VR 911 913 941 VR servo_alarmtaxis n 2 stores the alarm code of the servo Omron Auto Generated Symbols Warning Automated code section any manual code changes will be lost First action is to declare the GLOBAL variables and CONSTANTS and make other initialization Omron Auto Generated Globals GLOBAL length 0 GLOBAL lot_n 1 GLOBAL product_type 2 GLOBAL machine speed 3 GLOBAL status _word 900 SHE
135. Arguments Example See also System command SET_BIT bit_number vr_number The SET_BIT command sets the specified bit in the specified VR varia ble to one Other bits in the variable will keep their values bit_number The number of the bit to be set Range 0 23 vr_number The number of the VR variable for which the bit is set Range 0 1023 No example CLEAR_BIT READ_BIT VR 247 All BASIC commands Section 4 2 4 2 224 SGN Type Syntax Description Arguments Example See also 4 2 225 SIN Type Syntax Description Arguments Example See also 4 2 226 SPEED Type Syntax Description Arguments Example See also 248 Mathematical function SGN expression The SGN function returns the sign of a number It returns value 1 for positive values including 0 and value 1 for negative values expression Any valid BASIC expression gt gt PRINT SGN 1 2 1 0000 N A Mathematical function SIN expression The SIN function returns the sine of the expression Input values are in radians and may have any value The result value will be in the range from 1 to 1 expression Any valid BASIC expression gt gt PRINT SIN PI 2 1 0000 N A Axis parameter SPEED The SPEED parameter contains the demand speed for an axis in units s It can have any positive value including 0 The demand speed is the maximum speed for the speed profiled motion commands N A
136. Arguments Example See also 4 2 61 D_ZONE_MAX Type Syntax expression Any valid BASIC expression gt gt PRINT COS 0 1 0000 N A Axis parameter CREEP The CREEP axis parameter contains the creep speed for the axis The creep speed is used for the slow part of an origin search sequence CREEP can have any positive value including 0 The creep speed is entered in units sec with the unit conversion factor UNITS For example if the unit conversion factor is set to the number of encoder edges inch the speed is set in inches sec N A BASE 2 CREEP 10 SPEED 500 DATUM 4 CREEP AXIS 1 10 SPEED AXIS 1 500 DATUM 4 AXIS 1 AXIS DATUM UNITS Axis parameter D_GAIN The D_GAIN axis parameter contains the derivative gain for the axis The derivative output contribution is calculated by multiplying the change in Following Error with D_GAIN The default value is 0 Add the derivative gain to a system to produce a smoother response and to allow the use of a higher proportional gain that could not be used otherwise High values can cause oscillation Note The servo gain must only be changed when the SERVO is off Note Servo gains have no affect on stepper output axis ATYPE 46 N A D_GAIN 0 25 e AXIS GAIN OV_GAIN P_GAIN VFF_GAIN System parameter D_ZONE_MAX value 125 All BASIC commands Section 4 2 4 2 62 D_ZONE_MIN 4 2 63 DATE 126 Description Arguments Example See also
137. BASE Each BASIC process can have its own axis group and each program can set its own axis group independently Use the PROC modifier to access the parameters for a certain task The BASE order grouping can be set by explicitly assigning the order of axes This order is used for interpolation purposes in multi axes linear and circular moves The default for the base axis group is 0 1 2 31 at start up or when a program starts running on a task The BASE com mand without any arguments returns the current base order grouping This should be used Note If the BASE command does not specify all the axes the BASE command will fill in the remaining values automatically Firstly it will fill in any remaining axes above the last declared value then it will fill in any remaining axes in sequence So BASE 2 6 10 sets the internal array of 32 axes to 2 6 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 1 3 4 5 7 8 9 Note The BASE command without any arguments should only be used on the Command Line Terminal The command can take up to 32 arguments axis_i The number of the axis set as the base axis and any subsequent axes in the group order for multi axis moves BASE 1 UNITS 2000 Set unit conversion factor for axis 1 SPEED 100 Set speed for axis 1 ACCEL 5000 Set acceleration rate for axis 1 BASE 2 UNITS 2000 Set unit conversion factor for axis 2 SPEED 125 Set speed for axis 2 AC
138. BASIC commands Section 4 2 4 2 53 COMPILE Type Program command Syntax COMPILE Description The COMPILE command forces the compilation of the currently selected program to intermediate code Program are compiled automat ically by the system software prior to program execution or when another program is selected This command is not therefore normally required Arguments N A Example No example See also N A 4 2 54 CONNECT Type Axis command Syntax CONNECT ratio driving_axis CO ratio driving_axis Description The CONNECT command connects the demand position of the base axis to the measured movements of the axis specified by driving_axis to achieve an electronic gearbox The ratio can be changed at any time by executing another CONNECT command on the same axis To change the driving axis the CONNECT command needs to be cancelled first CONNECT with different driving axis will be ignored The CONNECT command can be cancelled with a CANCEL or RAPIDSTOP command The CLUTCH_RATE axis param eter can be used to set a specified connection change rate CONNECT works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis OOO cO CONNECT 1 1 CONNECT 2 1 CONNECT 0 5 1 Arguments ratio The connection ratio of the gearbox The ratio is specified as the encoder edge ratio not units It holds the number of edges the base axis is required to move per edge increment of the driving axi
139. CEL 10000 Set acceleration rate for axis 2 It is possible to program each axis with its own speed acceleration and other parameters BASE 0 MOVE 100 23 1 1250 In this example axes 0 1 and 2 will move to the specified positions at the speed and acceleration set for axis 0 BASE 0 sets the base axis to axis 0 which determines the three axes used by MOVE and the speed and acceleration rate 103 All BASIC commands Section 4 2 Example gt gt BASE 0 1 2 On the command line the base group order can be shown by typing BASE Example gt gt RUN PROGRAM 3 gt gt BASE PROC 3 0 2 1 Use the PROC modifier to show the base group order of a certain task Example gt gt BASE 2 gt gt PRINT BASE 2 0000 Printing BASE will return the current selected base axis See also AXIS 4 2 40 BASICERROR Type System command Syntax BASICERROR Description The BASICERROR command can be used to run a routine when a run time error occurs in a program BASICERROR can only be used as part of an ON GOSUB or ON GOTO command This command is required to be executed once in the BASIC program If several com mands are used only the one executed last is effective Arguments N A Example ON BASICERROR GOTO error_routine no_error 1 STOP error_routine IF no_error 0 THEN PRINT The error RUN_ERRORJ 0 PRINT occurred in line ERROR_LINE 0 ENDIF STOP If an error occurs in a BASIC program in this exampl
140. CH 72 uses a semi closed or inferred closed loop system This system detects actual machine movements by the rotation of the motor in relation to a target value It calculates the error between the target value and actual movement and reduces the error through feedback 1 4 2 Internal operation of the CJ1W MCH72 Inferred closed loop systems occupy the mainstream in modern servo systems applied to positioning devices for industrial applications The figure shows the basic principle of the servo system as used in the CJ1W MCH72 1 The CJ1W MCH72 performs actual position control The main input of the controller is the Following Error which is the calculated difference between the demand position and the actual measured position The Position Controller calculates the required speed reference output determined by the Following Error and possibly the demanded position and the measured position The speed reference is provided to the Servo Driver The Servo Driver controls the rotational speed of the servo motor corresponding to the speed reference The rotational speed is proportional to the speed reference The rotary encoder generates the feedback pulses for both the speed feedback within the Servo Driver speed loop and the position feedback within the CJ1W MCH72 position loop The labels in the figure are CT TOATmMMVOWS CJ1W MCH72 Servo system Demand position Position control Speed reference Speed contr
141. CH72 produces one encoder edge for phase A A or phase B B 2 2 4 Absolute encoder 2 2 4 1 46 SSI SSI Synchronous Serial Interface is a digital system for transferring data in serial form SSI is the most widely used serial interface between absolute sensors and controllers SSI uses a pulse train from the controller to clock out the data from the sensor The SSI interface of the CJ1W MCH72 accepts absolute values from an encoder if the data is in Gray Code format or in binary format and if the resolution is 25 bits or less The number of bits and therefore the number of clock pulses sent to the encoder in each frame is programmable You set this number with the BASIC command ENCODER_BITS n When you have initialized the CJ1W MCH72 with the ENCODER_BITS command the CJ1W MCH72 continuously sends clock pulses to the encoder These clock pulses are sent in frames of n 2 pulses where n is the bit count set The clock rate is fixed at 200 kHz The clock interval between frames is 32 us The resulting maximum cable length between the controller and the sensor is 200 m Wiring Note G The labels in the figure are Clock Data QOm7moovOWyD Timing diagram Clock sequence MSB Most Significant Bit LSB Least Significant Bit Clock frame SSI pulses ULL Ip OO POOoR_S B IUULUU szp ULL G Section 2 2 When the data is clocked into the CJ1W MCH72 the position value is interpreted With this pos
142. C_STATUS Type System parameter read only Syntax PLC_STATUS mode Description The PLC_STATUS 0 system parameter contains the monitored PLC CPU PC21 bus status The status consists of status bits which defini tions are shown in the table below Bit number Description 8 PLC Program Mode flag 9 FALS Severe Failure PLC flag 10 FAL Non severe Failure PLC flag 11 LOAD OFF PLC flag 12 Axes watchdog enable monitor See word n bit 1 3 3 1 1 14 Output enable monitor See word n bit 3 3 3 1 1 PLC_STATUS 1 returns the elapsed time in milliseconds since the last PLC cyclic service This function allows you to monitor the PLC CPU using a shorter time than the default of 11 seconds Arguments mode 0 or 1 to return the status or the elapsed time since the last PLC cyclic service Example No example See also PLC_EXCHANGE 4 2 186 PMOVE Type Task parameter read only Syntax PMOVE Description The PMOVE parameter contains the status of the task buffers The parameter returns TRUE if the task buffers are occupied and FALSE if they are empty When the task executes a movement command the task loads the movement information into the task move buffers The buffers can hold one movement instruction for any group of axes PMOVE will be set to TRUE when loading of the buffers has been completed When the next servo interrupt occurs the motion generator loads the movement into the next move NTYPE bu
143. Contains the number of the axis which caused the motion error FRAME Specifies operating frame for frame transformations LAST_AXIS Contains the number of the last axis processed by the sys tem MOTION_ERROR Contains an error flag for axis motion errors NEG_OFFSET Applies a negative offset to the S_REF signal from the servo loop PLC_STATUS Contains the PLC status POWER_UP Determines whether programs should be read from flash EPROM on power up or reset POS_OFFSET Applies a positive offset to the S_REF signal from the servo loop 82 Categories Section 4 1 Name Description SCOPE_POS Contains the current TABLE position at which the SCOPE command is currently storing its first parameter SERVO_PERIOD Sets the servo cycle period of the CJ1W MCH 72 SYSTEM_ERROR Contains the system errors since the last initialization TIME Returns the current time held by the real time clock TSIZE Returns the size of the currently defined Table VERSION Returns the version number of the controller firmware WDOG The software switch that enables Servo Drivers 4 1 12 Task commands and parameters Name Description ERROR_LINE Contains the number of the line which caused the last BASIC program error PMOVE Contains the status of the task buffers PROC Lets a process parameter from a p
144. Driver MOVE x encoder_counts reference_units the ultimate minimum distance the minimum unit you can set you can recognize and internally to the servo depends on the encoder driver UNITS Pn202 Pn203 Motor encoder Parameter Pn202 is the electronic gear ratio denominator G1 Parameter Pn203 is the electronic gear ratio numerator G2 The servo motor rotates using the value of the position command signal sent by the CJ1W MCH72 multiplied by the electronic gear Pn202 Pn203 On the output Servo motor side the signal is expressed in number of encoder pulses For more information on Servo Driver parameters Pn202 and Pn203 see the Sigma ll Servo Driver manual 286 How to s Section 5 1 The UNITS axis parameter effectively expresses the ratio between user units that the user wants to use in the program and the position sent to the Servo Driver via the MECHATROLINK II bus Taking the electronic gear setting into account the equation expressing the relation between user units the UNITS parameter parameters Pn202 and Pn203 encoder pulses and mechanical measurement units is Pn202 y encoder _ counts UNITS Pn203 x user _ units where y is the number of encoder counts and x is the amount in user units 5 1 3 2 Example 1 Full turn 360 M 13 bit incremental 1 10 Gear encoder The mechanical system consists of a simple rotary table A servo
145. E axis parameter NTYPE is cleared by the CANCEL 1 command Arguments N A Example No example See also AXIS MTYPE 4 2 172 OFF Type Constant read only Syntax OFF Description The OFF constant returns the numerical value 0 Arguments N A Example OP lever OFF The above line sets the output named lever to OFF See also N A 208 All BASIC commands Section 4 2 4 2 173 OFFPOS Type Syntax Description Arguments Example Example Axis parameter OFFPOS The OFFPOS parameter contains an offset that will be applied to the demand position DPOS without affecting the move which is in progress in any other way The measured position will be changed accordingly in order to keep the Following Error OFFPOS can therefore be used to effectively datum a system at full speed The value set in OFFPOS will be reset to 0 by the system as the offset is loaded Note The offset is applied on the next servo period Other commands may be executed prior to the next servo period Be sure that these com mands do not assume the position shift has occurred This can be done by using the WAIT UNTIL statement see example N A Change the current position by 125 with the Command Line Terminal gt gt DPOS 300 0000 gt gt OFFPOS 125 gt gt DPOS 425 0000 Define the current demand position as 0 OFFPOS DPOS WAIT UNTIL OFFPOS 0 wait until applied This is equivalent to DEFPOS 0 QX 209 All BASIC comma
146. E is being set auto_run 0 Running manually on command 1 Automatically execute on power up All non zero values are considered as 1 e task_number The number of the task on which to execute the program Range 1 14 gt gt RUNTYPE progname 1 3 This line sets the program progname to run automatically at start up on task 3 gt gt RUNTYPE progname 0 This line sets the program progname to manual running AUTORUN EPROM EX Axis parameter S_REF This parameter contains the speed reference value which is applied directly to the Servo Driver when the axis is in open loop SERVO OFF The range of this parameter is defined by the number of available bits For MECHATROLINK II axes S_REF takes 32 bits so the available range is 2147483648 2147483648 This range can be limited by using the OUTLIMIT parameter The value currently being applied to the driver can be read using the S_REF_OUT axis parameter N A WDOG ON SERVO OFF square S_REF AXIS 0 2000 WA 250 S_REF AXIS 0 2000 WA 250 GOTO square These lines can be used to force a square wave of positive and nega tive movement with a period of approximately 500ms on axis 0 243 All BASIC commands Section 4 2 4 2 217 S_REF_OUT 4 2 218 SCOPE 244 See also Type Syntax Description Arguments Example See also Type Syntax Description AXIS S_REF_OUT OUTLIMIT SERVO Axis parameter read only S_REF_OUT The S
147. ET command can be used for that purpose Note This command waits for the response of the axis so its execution is slow and the time variable Do not use this command together with other commands that require quick execution Note Executing a DRIVE_WRITE will temporarily disable the Servo Driver Front Panel display Note DRIVE_WRITE returns 1 on success It also returns 1 with no parameter read if the parameter number does not exist or has the wrong size parameter The number of the parameter to write to Note that the parameter numbers are hexadecimal The format of the data can be found in the Refer to the Servo Driver manual for the format of the data size SIze of the parameter is specified in bytes For most parameters the size is normally 2 bytes Some special parameters may be 4 bytes long Sizes for each parameter can be found in the Servo Driver manual e value The value to be written into driver parameter mode The write mode Possible values O or omitted write and store in RAM 1 write and store in EPROM IF DRIVE_WRITE 100 2 90 THEN PRINT The new speed loop gain is 90 ELSE PRINT The speed loop gain could not be written in RAM ENDIF e DRIVE_READ DRIVE_RESET HEXADECIMAL INPUT A Caution Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Driver when executing this command Otherwise the program task will be paused until the connection of the other devi
148. For more information see EnDat absolute encoder interface specification address Specifies the EnDat MRS field to read VR 100 ENCODER_READ A10D AXIS 7 This command will read the number of encoder bits and put that value in VR 100 memory location AXIS ENCODER ENCODER _BITS Axis parameter read only ENCODER_TURNS The ENCODER_TURNS parameter returns the number of multi turn count from the encoder This is applicable only to Flexible axis absolute EnDat axis with ATYPE value 47 The multi turn data is not automatically applied to the axis MPOS parameter after initialization The application programmer must apply this from the program using OFFPOS or DEFPOS commands as required If applied to axis of ATYPE value other than 47 the parameter returns 0 N A PRINT ENCODER_TURNS AXIS 1 This command will print absolute encoder multi turn counts for axis 1 AXIS ENCODER ENCODER _BITS 149 All BASIC commands Section 4 2 4 2 92 ENCODER_WRITE Type Syntax Description Arguments Example See also 4 2 93 ENDIF Axis command ENCODER_WRITE address value The ENCODER_WRITE command is applicable only to Flexible axis absolute EnDat axis with ATYPE value 47 The command writes to an encoder parameter specified by the address Bits 8 15 of the address are the EnDat MRS field settings and bits 0 7 are the offset within the EnDat MRS block If a CRC error occurs this command will return 0 Writ
149. IMIT 20000000 0000 FASTDEC 0 0000 FHS PEED 1000 0000 OUTLIMIT 1 0000 FE RANGE 0 0000 H gt Hwg x ea O Q n D H GI zZ Howy mi BASE 3 Axis Name Up ATYPE 40 Axis Type Mechatro Position ITS 32 0000 EP DIST 360 0000 EP OPTION 1 RRORMASK 2 68 IS ENABLE 0 RIVE CONTROL 0 PEED 3600 0000 CEL 36000 0000 ECEL 36000 0000 EEP 100 0000 GSPEED 100 0000 _LIMIT 90 0000 RVO 0 D IN 1 0000 EV_IN 1 0000 ATUM_IN 1 0000 HOLD IN 1 0000 FS LIMIT 20000000 0000 RS_LIMIT 20000000 0000 FASTDEC 0 0000 Hz x Ss O Eal Gl TODAHMGQUPNUPH DAWG we Practical examples Section 5 2 T Frj HSPEED 1000 0000 UTLIMIT 1 0000 FE RANGE 0 0000 Q Eg NDIF Variables TABLE DATA T Stop Standard Section RETURN 5 2 3 Initialization program Note The Initialization program sets the parameters for the axes These parameters are dependant upon the Motor Encoder resolution and the motor maximum speed Refer to the Servo Driver and the motor data sheet for this information EXAMPLE OF INITIALIZATION PROGRAM THIS VERSION IS DESIGNED FOR MECHATROLINK II SERVOS ADAPT THIS PROGRAM ACCORDING TO YOUR APPLICATION BASE x restart 0 inertia ratio
150. IN Note In order to avoid any instability the servo gains should be changed only when the SERVO is off Arguments N A Example No example See also D_GAIN _GAIN P_GAIN VFF_GAIN 4 2 182 P_GAIN Type Axis parameter Syntax P_GAIN Description The P_GAIN parameter contains the proportional gain The proportional output contribution is calculated by multiplying the Following Error with the P_GAIN parameter value The default value of P_GAIN for MECHA TROLINK II Speed axis ATYPE 41 is 131072 The default value for Encoder Interface In ATYPE 44 is 1 0 The proportional gain sets the stiffness of the servo response Values that are too high will cause oscillation Values that are too low will cause large Following Errors Note In order to avoid any instability the servo gains should be changed only when the SERVO is off Arguments N A Example No example See also D_GAIN _GAIN OV_GAIN VFF_GAIN 4 2 183 Pl Type Constant read only Syntax PI Description The PI constant returns the numerical constant value of approximately 3 14159 Arguments N A Example circum 100 PRINT Radius circum 2 PI See also N A 214 All BASIC commands Section 4 2 4 2 184 PLC_EXCHANGE Type Syntax Description Arguments Example See also System command PLC_EXCHANGE 0 area_code PLC_EXCHANGE 1 area_code plc_area plc_start tj_area tj_start total_items PLC_EXCHANGE 0 prints the ma
151. IS AXISSTATUS REV_IN 4 2 123 FWD_JOG Type Axis parameter Syntax FWD_JOG Description The FWD_JOG axis parameter contains the input number to be used as a jog forward input The input can be set from 0 to 31 As default the parameter is set to 1 no input is selected Note This input is active low Arguments N A 167 All BASIC commands Section 4 2 Example No example See also AXIS FAST_JOG JOGSPEED REV_JOG 4 2 124 GET Type I O command Syntax GET n variable Description The GET command assigns the ASCII code of a received character to a variable If the serial port buffer is empty program execution will be paused until a character has been received Channels 5 to 7 are logical channels that are superimposed on the programming port 0 when using Trajexia Studio Note Channel 0 is reserved for the connection to Trajexia Studio and or the command line interface Please be aware that this channel may give problems for this function Arguments n The specified input device When this argument is omitted the port is O Terminal window See the table below Input device number Description 0 Programming port 0 5 Trajexia Studio port 0 user channel 5 6 Trajexia Studio port 0 user channel 6 7 Trajexia Studio port 0 user channel 7 e variable The name of the variable to receive the ASCII code Example GET 5 k This line stores the ASCII character received on the Trajexia Studio por
152. IT UNTIL PMOVE PROC 3 0 N A Task parameter PROC_STATUS The PROC_STATUS parameter returns the status of the process or task specified The parameter is used with the PROC modifier and can return values listed in the table below Value Description Process stopped Process running Process stepping Process paused Arguments Example See also N A WAIT UNTIL PROC_STATUS PROC 3 0 PROCNUMBER PROC 219 All BASIC commands Section 4 2 4 2 192 PROCESS Type Syntax Description Arguments Example See also 4 2 193 PROCNUMBER 4 2 194 PSWITCH 220 Type Syntax Description Arguments Example See also Type Syntax Description Program command PROCESS The PROCESS command displays the running status of all current tasks with their task number N A No example HALT RUN STOP Task parameter read only PROCNUMBER The PROCNUMBER parameter contains the number of the task in which the currently selected program is running PROCNUMBER is often required when multiple copies of a program are running on differ ent tasks N A MOVE length AXIS PROCNUMBER PROC_STATUS PROC I O command PSWITCH switch enable axis output_number output_state set_position reset_position The PSWITCH command turns on an output when a predefined position is reached and turns off the output when a second position is reached The positions are specified as the
153. If the ambient temperature is more than 25 C the battery can only continue for less than 5 days If the ambient temperature is 40 C the battery can continue for 4 days If the ambient temperature is 55 C the battery can continue for 2 days 2 1 3 3 Replacing the battery 38 Note When replacing the battery make sure that the following is adhered to e Use the CJ1W BAT01 as a replacement battery e Do not use a replacement battery that is older than 2 years The production date of the battery is shown on the label in the format yy mm where yy is the year and mm is the month OMRON CJ1W BATO1 08 03 Production date of the battery March 2008 e Make sure that the sensitive internal components of the CJ1W MCH72 cannot be damaged by static electricity when the battery is replaced This can be done in two ways 1 Turn the power off This is the recommended way 2 Leave the power on and touch a grounded piece of metal to discharge static electricity before replacing the battery e Make sure that an experienced technician is in charge when the battery is replaced This is required by UL standards To replace the battery perform the following steps 1 Make sure that the power to the unit is on for at least 5 minutes 2 Turn the power to the unit off You must perform the following steps within 5 minutes If you do not perform the steps within 5 minutes the RAM can be deleted 3 Open the battery compartment 4 Re
154. If the moves are short a high deceleration rate must be set to avoid the CJ1W MCH 72 decelerating in anticipation of the end of the buffered move N A MERGE OFF Decelerate at the end of each move MERGE ON Moves will be merged if possible AXIS Axis command MHELICAL end1 end2 centre1 centre2 direction distance3 mode MH end1 end2 centre1 centre2 direction distance3 mode Performs a helical move that is moves 2 orthogonal axes in such a way as to produce a circular arc at the tool point with a simultaneous lin ear move on a third axis The first 5 parameters are similar to those of a MOVECIRC command The sixth parameter defines the simultaneous linear move Finish 1 and centre 1 are on the current BASE axis Finish 2 and centre 2 are on the following axis The first 4 distance parameters are scaled according to the current unit conversion factor for the BASE axis The sixth parameter uses its own axis units All BASIC commands Section 4 2 Arguments end1 Position on BASE axis to finish at end2 Position on next axis in BASE array to finish at centre1 Position on BASE axis about which to move centre2 Position on next axis in BASE array about which to move direction The direction is a software switch which determines whether the arc is interpolated in a clockwise or anti clockwise direction The parameter is set to 0 or 1 See MOVECIRC distance3 The distance to move on the t
155. LE can also be used to hold information as an alternative to variables The TABLE command has two forms TABLE address value value writes a sequence of values to the TABLE array The location of the first element to write is specified by address The sequence can have a maximum length of 20 elements TABLE address returns the TABLE value at the entry specified by address A value in the TABLE can be read only if a value of that number or higher has been previously written to the TABLE For example printing TABLE 1001 will produce an error message if the highest TABLE loca tion previously written to the TABLE is location 1000 The total TABLE size is indicated by the TSIZE parameter Note that this value is one more than the highest defined element address The TABLE can be deleted with by using DEL TABLE or NEW TABLE on the com mand line Notes e Applications like the CAM command CAMBOX command and the SCOPE command in Trajexia Studio all use the same TABLE as the data area Do not use the same data area range for different pur poses The TABLE and VR data can be accessed from all different running tasks To avoid problems of two program tasks writing unexpectedly to one global variable write the programs in such a way that only one program writes to the global variable at a time Arguments address The first location in the TABLE to read or write Range 0 63999 e value The value to write at the given location
156. LL GLOBAL action 902 SHELL GLOBAL sys _error 908 SHELL GLOBAL first _error 909 SHELL Omron Auto Generated Constants CONSTANT max _axis 15 SHELL CONSTANT status _bits 901 SHELL CONSTANT diag01 903 SHELL CONSTANT diag02 904 SHELL CONSTANT diag03 905 SHELL CONSTANT system01 906 SHELL CONSTANT signal _state 907 SHELL CONSTANT servo _status 910 SHELL CONSTANT servo _alarm 911 SHELL ETHERNET Settings ETHERNET 1 1 12 9600 FINS port number ETHERNET 1 1 7 0 Modbus TCP Mode ETHERNET 1 1 9 0 Modbus TCP Data Configuration Omron Auto Generated CAM TABL Da Omron Auto Generated Symbols End Omron Auto Generated Local Variables alarm bit 0 Practical examples Section 5 2 i 0 Servo Parameters res 0 Servo Parameters res _act 0 res ant 0 res bit 0 run_act 0 run_ant 0 run_bit 0 stop _act 0 stop _ant 0 stop bit 0 Omron Auto Generated Local Variables End VR signal_ state 0 This subroutine tests whether the detected hardware is the expected one or not If the right hardware is detected it sets the right values to the axes and servo drives At least the right system needs to be properly detected once GOSUB system detection This subroutine stops all possible running programs and movements Stop all potential programs mo
157. MECHATROLINK II station number of the Inverter alarm_number The number of the alarm See the Inverter manual operation_signals A bitwise value to control the operation signals See the table below mode The mode to set the Inverter to 0 Inverter mode This is the default value at power up 1 Servo Driver mode Example gt gt INVERTER_WRITE 0 23 2 4500 gt gt INVERTER_COMMAND 0 23 7 2 gt gt WA 10000 gt gt INVERTER_COMMAND 0 23 7 0 The sequence above controls an Inverter connected via MECHATRO LINK II bus to station number 23 hex using following steps Step 1 Speed reference is set to 45 00 Hz Step 2 The Inverter is set to run in reverse direction for 10 seconds with speed reference defined in previous step Step 3 The Inverter is stopped See also N A 178 All BASIC commands Section 4 2 4 2 143 INVERTER_READ Type System command Syntax INVERTER_READ 0 station 0 param_number param_size VR INVERTER_READ 0 station 1 alarm_number VR INVERTER_READ 0 station 2 VR INVERTER_READ 0 station 3 VR INVERTER_READ 0 station 4 from length VR Description INVERTER_READ reads the parameter speed reference torque refer ence or alarm from the Inverter connected to the system via the MECHATROLINK II bus There are five INVERTER_READ functions e 0 Reads an Inverter parameter e 1 Reads the Inverter alarm e 2 Reads the speed reference e 3 Re
158. Motion Control Unit OPERATION MANUAL Notice OMRON products are manufactured for use by a trained operator and only for the purposes described in this manual The following conventions are used to classify and explain the precautions in this manual Always heed the information provided with them N WARNING Indicates information that if not heeded could possibly result in serious injury or loss of life Z Caution Indicates information that if not heeded could possibly result in minor or relatively serious injury damage to the product or faulty operation OMRON product references All OMRON products are capitalized in this manual The first letter of the word Unit is also capitalized when it refers to an OMRON product regardless of whether it appears in the proper name of the product The abbreviation PLC means Programmable Logic Controller Visual aids The following headings appear in the left column of the manual to help you locate different types of information Note Indicates information of particular interest for efficient and convenient operation of the product iii Trademarks and copyrights MECHATROLINK is a registered trademark of Yaskawa Corporation Trajexia is a registered trademark of OMRON All other product names company names logos or other designations mentioned herein are trademarks of their respective owners Copyright Copyright 2009 OMRON All rights reserved No part of this publication
159. N ACCEL AXIS CAMBOX SPEED TABLE 109 All BASIC commands Section 4 2 4 2 44 CAMBOX Type Axis command Syntax CAMBOX start_point end_point table_multiplier link_distance link_axis link_option link_position Description The CAMBOX command is used to generate movement of an axis fol lowing a position profile in the TABLE variable array The motion is linked to the measured motion of another axis to form a continuously variable software gearbox The TABLE values are absolute position rel ative to the starting point and are specified in encoder edges The TABLE array is specified with the TABLE command The move ment can be defined with any number of points from 3 to the maximum table size available 64000 Being able to specify the start point allows the TABLE array to be used to hold more than one profile and or other information The CJ1W MCH72 moves continuously between the val ues in the TABLE to allow a number of points to define a smooth profile Two or more CAMBOX commands can be executed simultaneously using the same or overlapping values in the TABLE array The CAMBOX command requires the start element of the TABLE to have value zero Note also that CAMBOX command allows traversing the TABLE backwards as well as forwards depending on the Master axis direction The link_option argument can be used to specify different options to start the command and to specify a continuous CAM For example if the link_
160. N turn on the enable relay and the remote drive enable FOR ax 0 TO 7 AXIS_ENABLE AXIS ax ON enable the 8 axes SERVO AXIS ax ON start position loop servo for each axis NEXT ax 135 Section 4 2 All BASIC commands 136 All BASIC commands Section 4 2 Example Two conveyors operated by the same Motion Coordinator are required to run independently to make sure that the second conveyor does not stop if the first conveyor is blocked DISABLE_GROUP 0 put axis 0 in its own group DISABLE_GROUP 1 put axis 1 in another group GOSUB group_enable0 GOSUB group_enable1 WDOG ON FORWARD AXIS 0 FORWARD AXIS 1 WHILE TRUE IF AXIS_ENABLE AXIS 0 0 THEN PRINT motion error axis 0 reset_0_flag 1 ENDIF IF AXIS_ENABLE AXIS 1 0 THEN PRINT motion error axis 1 reset_1_flag 1 ENDIF IF reset_0_flag 1 AND IN 0 ON THEN GOSUB group_enable0 FORWARD AXIS 0 reset_0_flag 0 ENDIF IF reset_1_flag 1 AND IN 1 ON THEN GOSUB group_enable1 FORWARD AXIS 1 reset_1_flag 0 ENDIF WEND group_enable0 BASE 0 DATUM 0 clear motion error on axis 0 WA 10 AXIS_ENABLE ON RETURN group_enable1 BASE 1 DATUM 0 clear motion error on axis 0 WA 10 AXIS_ENABLE ON SERVO ON RETURN 137 All BASIC commands Section 4 2 Example See also 4 2 73 DPOS Type Syntax Description Arguments Example See also 138 One group of axes in a machine must be reset if a motion error occurs without affecting the rem
161. NS server capability FINS 0102 can be used to write data to devices with FINS server capability This command returns one of the following values depending on out come of the execution 1 The command executed successfully 0 The command failed 1 Request not sent because the client or the FINS protocol is busy 2 One or more of the request parameters are invalid 3 Invalid source memory area 4 Request was sent but no response from remote server received within timeout period 5 Error response code received from remote server 157 All BASIC commands Section 4 2 Arguments type The type of the FINS command 0 means FINS 0101 read memory from remote FINS server 1 means FINS 0102 write memory to the remote server network The destination network For more details see the Communication Commands Reference Manual cat num W342 E1 Section 3 node The node of the destination FINS server For more details see the Communication Commands Reference Manual cat num W342 E1 Section 3 unit The unit number of the destination FINS server For more details see the Communication Commands Reference Manual cat num W342 E1 Section 3 remote_area The area of memory accessed on the destination FINS server Range 128 255 Note that this area must be one of the following values if the destination is another Trajexia system OxBO Integer VR value OxFO float VR value 0x82 Integer TABLE value 0xC2 float
162. OFF JON OFF origin limit switch min limit switch ON OFF VA max limit switch OFF ON The origin search function is performed by searching for an external limit switch that is positioned absolutely and the position of which defines the origin position The example for this homing procedure is shown in the figure 301 How to s Section 5 1 302 min limit switch CS origin limit switch l ea max limit switch cm REVERSE FORWARD The figure shows the possible scenarios for absolute origin search plus limit switches These scenarios depend on the position of the moving part when the power comes on The program example that does this origin search sequence is given below Absolute origin switch INO Left limit switch IN1 Right limit switch IN2 BASE 0 DATUM IN 0 FWD _IN 2 REV_IN 1 SERVO ON WDOG ON DATUM 4 WA 1 WAIT UNTIL MTYPE 0 OR IN 1 OFF IF IN 1 ON FORWARD WAIT UNTIL IN 0 ON WAIT UNTIL IN 0 OFF CANCEL DATUM 4 WA 1 WAIT IDL ENDIF z Gl How to s Section 5 1 5 1 5 2 Origin search against limit switches rerom min limit switch ON OFF OFF ON max limit switch we This origin search function is performed by searching for an external sensor using limit switches only The example for this homing procedure is shown in the figure mi
163. OP 8 ON green light on line is in motion ELSE OP 8 OFF GOSUB error_correct ENDIF WEND CANCEL STOP error_correct REPEAT OP 10 ON WA 250 OP 10 OFF flash red light to show crash WA 250 UNTIL IN 1 OFF DATUM 0 reset axis status errors SERVO ON turn the servo back on WDOG ON turn on the watchdog OP 9 ON sound siren that line will restart WA 1000 OP 9 OFF FORWARD restart motion RETURN 15 0 MOVE Z MARK The position of an axis must be defined by the Z marker This position must be set to zero Then the axis must move to this position Using the datum 1 the zero point is set on the Z mark But the axis starts to decel erate at this point and therefore it stops after the mark A move is used to bring it back to the Z position SERVO ON WDOG ON CREEP 1000 set the search speed SPEED 5000 set the return speed DATUM 1 register on Z mark and sets this to datum WAIT IDLE MOVEABS 0 moves to datum position 129 All BASIC commands Section 4 2 15 10 7 0 SWITCH Example A machine must return to its home position defined by the limit switch which is found at the rear of the move before operation This can be achieved through using DATUM 4 which moves in reverse to find the switch SERVO ON WDOG ON REV_IN 1 temporarily turn off the limit switch function DATUN_IN 5 sets input 5 for registration SPEED 5000 set speed for quick locatio
164. OR TO STEP NEXT Loop allows a program segment to be repeated with increasing decreasing variable GOSUB RETURN Jumps to a subroutine at the line just after label The pro gram execution returns to the next instruction after a RETURN on page 235 is given GOTO Jumps to the line containing the label IF THEN ELSE ENDIF Controls the flow of the program base on the results of the condition ON GOSUB or ON GOTO Enables a conditional jump to one of several labels REPEAT UNTIL Loop allows the program segment to be repeated until the condition becomes TRUE on page 257 WHILE WEND Loop allows the program segment to be repeated until the condition becomes FALSE Name Description ALL Is a modifier that specifies that all items in the controller are concerned FPGA_VERSION Returns the FPGA version Categories Section 4 1 4 1 10 System commands and functions Name Description HEXADECIMAL INPUT Assigns a hexadecimal number to a variable AXIS Sets the axis for a command axis parameter read or assignment to a particular axis BASICERROR Is used to run a specific routine when an error occurs in a BASIC command CLEAR Clears all global variables and the local variables on the current task CLEAR_BIT Clears the specified bit of the specified VR variable CLEA
165. R Cambox that will start in AXIS 0 position 1 CAMBOX 0 999 UNITS 10 0 2 1 WAIT UNTIL MPOS AXIS 0 lt 1 The capture will start when the master axis is in a position Between 0 and 1 Additional conditions are The previous capture has finished SCOPE POS 1000 We have the permission VR activate_ trigger ON IF SCOPE POS 1000 AND VR activate_ trigger ON THEN TRIGGER PRINT Triggered ENDIF WAIT IDLI WEND HALT T Gl Trace1 Device1 X x Sao Sas tv t I s Q 0 10 1 1 1 1 1 I 0 20 40 60 80 100 120 140 160 180 200 Time ms The result is given in the figure 316 How to s Section 5 1 In the example given above the value of the UNITS parameter is set to encoder counts The position of the master axis MPOS AXIS 0 is given in red The position increases linearly because the speed of the master axis is constant The demanded position of the slave axis DPOS AXIS 1 is given in blue This graph is a cosine curve It corresponds to the created CAM table The measured speed of the slave axis MSPEED AXIS 1 is given in yellow This graph is a sinusoidal curve because the speed is a derivative of the position and the derivative of the cosine is the sine At high speeds there are some ripples The green graph is the torque of the motor for the slave axis set with DRIVE_COMMAND 11
166. RIOD parameter results in an incorrect detection of the MECHATROLINK II slaves The most restrictive rules are given in the tables below For each unit the table lists the maximum number of slaves the unit can control at the given SERVO_PERIOD setting SERVO_PERIOD Total number Number of Total number of of axes MECHATROLINK II MECHATROLINK II stations stations axes inverters 0 5 ms 8 4 4 4 1 0 ms 16 8 8 8 2 0 ms 16 16 8 16 4 0 ms 32 30 8 30 19 Cycle time Section 1 6 1 6 1 6 Configuration examples Example 1 20 Servo Driver E Address Address 45 e 1x CJ1W MCH72 e 3x Sigma V Servo Driver e 1x Encoder Axis 0 SERVO_PERIOD 0 5ms The CJ1W MCH 72 supports 0 5ms SERVO_PERIOD with 4 axes If Sigma lIl Servo Drivers were used in this example the SERVO_PERIOD would be 1 0ms since Sigma ll servo Drivers do not support the SERVO_PERIOD of 0 5ms Cycle time Section 1 6 Example 2 Servo Driver B Address Address Address Address Address Address Address Address 41 42 43 44 45 46 47 48 Fe Fe EDA KA AN SR PANT FTS 2 Se eo BS eo XS eo OS is Bs 5 Os od Ss is as eo aap ag h i A A Ch fh 0 0 0 L co op Axis 0 Axis 1 Axis 2 Axis 3 Axis 4
167. RN stop all In this example if the application program is stopped suddenly all the movements are cancelled and all the axes are set to BaseBlock Modify this section if you require a different STOP procedure STOP APPLICATION WDOG 0 FOR i 0 TO max axis BASE i IF MARK 0 THEN REGIST 1 325 Practical examples Section 5 2 AXIS_ENABLE 0 SERVO 0 CANCEL 1 Cancel NTYPE WA 1 CANCEL 1 Cancel possible program buffer NEXT i RAPIDSTOP Cancel MTYPE RETURN start_app Add all the application programs that should be started with the START signal RUN APPLICATION RETURN reset all Uncorrect system setting IF READ BIT 15 diag01 0 THEN GOSUB system detection M EC FOR VR s NEXT HATROLINK axes reset sequenc i 0 TO max axis BASE i IF ATYPE gt 40 AND ATYPE lt 42 THEN Reset sequence for MECHATROLINK communication error IF AXISSTATUS AND 4 lt gt 0 THEN PRINT Resetting ML alarm GOSUB system detection ENDIF Reset sequence for DRIVE errors IF AXISSTATUS AND 8 lt gt 0 THEN IF VR servo alarm i 2 81 OR ervo alarm i 2 CC THEN GOSUB absencoder ELSE Pending to handle diferently those alarms that cannot be resetted with DRIVE CLEAR DRIVE CLEAR ENDIF ENDIF ENDIF i Res t sequence for AXIS error
168. RVO_PERIOD cycle It is a bit wise word with the bits as listed in the table below All BASIC commands Section 4 2 Bit Servo Driver input signal Description number Sigma ll Sigma V Junma G Series 0 P_OT P_OT P_OT P_OT Forward limit switch 1 N_OT N_OT N_OT N_OT Reverse limit switch 2 DEC DEC DEC DEC Zero point return deceleration 3 PA PA Not used Not used Encoder A phase signal 4 PB PB Not used Not used Encoder B phase signal 5 PC PC Not used PC Encoder Z phase signal 6 EXT1 EXT1 EXT1 EXT1 First external latch signal 7 EXT2 EXT2 Not used EXT2 Second external latch signal 8 EXT3 EXT3 Not used EXT3 Third external latch signal 9 BRK BRK BRK BRK Brake output 10 Reserved HBB E STP E STP Emergency stop switch 11 Reserved Reserved Notused SI2 General input 2 12 1012 1012 Not used PCL General input 12 Sigma ll and Sigma V Torque limit input in positive direction GN 13 1013 1013 Not used NCL General input 13 Sigma ll and Sigma V Torque limit input in negative direction GN 14 1014 1014 Not used SIO General input 14 Sigma ll and Sigma V General input 0 GN 15 1015 1015 Not used SI1 General input 15 Sigma ll and Sigma V General input 1 GN The recommended setting is for Sigma ll type Servo Driver Pn81E 4321 amp Pn511 654x Refer to section 5 1 4 for more information about mapping Servo Driver inputs and outpu
169. R_PARAMS Clears all parameter sand variables stored in flash EPROM to their default values CONSTANT Declares a constant for use in BASIC program DATE Prints the current date as a string EX Resets the controller FLAG Sets and reads a bank of 32 bits FLAGS Read and sets FLAGS as a block FLASHVR Stores TABLE variable data in the flash memory FREE Returns the amount of available memory GLOBAL Declares a reference to one of VR variables HALT Stops execution of all programs currently running INITIALISE Sets all axes and parameters to their default values INTEGER_READ Splits a 32 bit variable in 2 16 bit values and copies these values to 2 other variables INVERT_IN Inverts input channels 0 31 in the software INVERTER_COMMAND Reads I O and clears alarm of the Inverter INVERTER_READ Reads parameter alarm speed and torque reference of the Inverter INVERTER_WRITE Writes to parameter speed and torque reference of the Inverter LIST_GLOBAL Shows all GLOBAL and CONSTANT variables LOCK Prevents the programs from being viewed or modified PLC_EXCHANGE Reads or sets the mapping of PLC memory to CJ1W MCH72 memory READ _BIT Returns the value of the specified bit in the specified VR variable RESET Resets all local variables on a task SCOPE Programs the system to automatically store up to 4 parameters every sample period to the TABLE variable array SET_BIT Sets the specified bit in
170. SECTION 5 Examples This chapter gives 2 categories of examples and tips e How to s e Practical examples 267 How to s Section 5 1 5 1 How to s 5 1 1 Startup program The purpose of this program is to compare the detected MECHATROLINK II configuration with the expected one the expected configuration is the configuration existing in the moment you create the program The STARTUP program does these actions e Checks the number of nodes in the system e Checks that the node numbers agrees e Checks if all slaves are connected and have power Any non agreement the program stops e Sets the correct ATYPE as selected in the intelligent axis window e Sets the mode Run or Commisioning 5 1 1 1 How to set a startup program When you add a new CJ1W MCH 72 device to the solution in Trajexia Studio 2 programs are created by default the SHELL program and an application program called APPLICATION E Programs E SHELL E APPLICATION Default programs SHELL and APPLICATION A CJ1W MCH 72 device can execute a program at startup when the device is switched on it executes the program You can set the startup priority for a program in Trajexia Studio with the Priority property in the Properties window If you click the ellipsis button in the edit field of this property the StartUp Priority window shows StartUp Priority StartUp Priority window To set the program to run at power up select th
171. SIC commands Section 4 2 Example See also profile_gen num_p 201 scale 1 0 FOR p 0 TO num_p 1 TABLE p SIN PI 2 p num_p PI 2 p num_p scale NEXT p RETURN A suction pick and place system must vary its speed depending on the load carried The mechanism has a load cell which inputs to the control ler on the analogue channel AIN The move profile is fixed but the time taken to complete this move must be varied depending on the AIN The AIN value varies from 100 to 800 which must result in a move time of 1 to 8 seconds If the speed is set to 10000 units per second and the required time is 1 to 8 seconds then the distance parameter must range from 10000 to 80000 distance speed x time The return trip can be completed in 0 5 seconds and so the distance value of 5000 is fixed for the return movement The Multiplier is set to 1 to reverse the motion GOSUB profile_gen loads the cam profile into the table SPEED 10000 ACCEL SPEED 1000 DECEL SPEED 1000 WHILE IN 2 ON OP 15 ON turn on suction load AIN 0 capture load value distance 100 load calculate the distance parameter CAM 0 200 50 distance move 50mm forward in time calculated WAIT IDLE OP 15 OFF turn off suction WA 100 CAM 0 200 50 5000 move back to pick up position WEND profile_gen num_p 201 scale 400 set scale so that multiplier is in mm FOR p 0 TO num_p 1 TABLE p SIN PI 2 p num_p PI 2 p num_p scale NEXT p RETUR
172. Servo axis CJ1W MCH72 receives position Default from an incremental encoder Encoder 45 Encoder The same as stepper but with the output phase differential outputs emulat ing an incremental encoder 47 Absolute EnDat Feedback is received from an EnDat absolute encoder 48 Absolute Feedback is received from an SSI SSI absolute encoder 49 MECHATROLINK II Inverter as Inverters with built in encoder Inverters axis interface are controlled on the MECHATROLINK II bus as servo axes 25 Motion sequence and axes Section 1 8 1 8 4 1 Virtual axis ATYPE 0 NFO MEASURED DEMAND POSITION POSITION You can split a complex profile into two or more simple movements each assigned to a virtual axis These movements can be added together with the BASIC command ADDAX then assigned to a real axis 1 8 4 2 MECHATROLINK II position ATYPE 40 CJ1W MCH72 SERVO SERVO OFF SERVO OFF f se ie ML II o Po gt Position gt Position Loop Profile generator ri command 1 Speed Loop 1 SPSS Sols Sasa sa Soe Torque Loo Position Loop is ro hey bo iy 7 r deactivated dial aaa paap Lees 4 gt Gains are not I sg eee 1 Gai x Lee i used Demanded 1 Following Speed position a error command Wyeast UN ees ee TEEN A Measured _ 7 position SSS SSR RSS See a a With SERVO ON the position loop is closed in the Servo Driver Gain settings in the
173. T 11 FOR TO STEP NEXT statements can be nested up to 8 levels deep provided the inner FOR and NEXT commands are both within the outer FOR TO STEP NEXT loop REPEAT UNTIL WHILE WEND Axis command FORWARD FO The FORWARD command moves an axis continuously forward at the speed set in the SPEED axis parameter The acceleration rate is defined by the ACCEL axis parameter FORWARD works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note The forward motion can be stopped by executing the CANCEL or RAPIDSTOP command or by reaching the forward limit If stopped by execution of the CANCEL or RAPIDSTOP command the axis deceler ates to a stop at the programmed DECEL rate N A 163 All BASIC commands Section 4 2 164 Example Example Run an axis forwards When an input signal is detected on input 12 bring the axis to a stop FORWARD wait for stop signal WAIT UNTIL IN 12 ON CANCEL WAIT IDLE Move an axis forward until it hits the end limit switch then move it in the reverse direction for 25 cm BASE 3 FWD_IN 7 limit switch connected to input 7 FORWARD WAIT IDLE wait for motion to stop on the switch MOVE 25 0 WAIT IDLE All BASIC commands Section 4 2 Example A machine that applies lids to cartons uses a simulated line shaft This example sets up a virtual axis running forward to simulate the line shaft Axis 0 is then connecte
174. TROL Type Syntax Description Arguments Example Example See also Axis parameter ENCODER _BITS value This axis parameter configures the interface for the number of encoder bits for Flexible axis SSI and EnDat absolute encoder axes The param eter is applicable only to axes of ATYPE values 47 and 48 When applied to Flexible axis EnDat absolute encoder axis bits 0 7 of the parameter should be set to the total number of encoder bits Bits 8 14 should be set to the number of multi turn bits to be used When applied to Flexible axis SSI absolute encoder axis bits 0 5 of the parameter should be set to the number of encoder bits Bit 6 should be 1 for binary operation or 0 for Gray code For SSI encoders of the Balluff brand bits 8 10 allow an additional hardware shift to be specified Normally bits 8 10 are 0 Note If using Flexible axis absolute encoder axis it is essential to set this parameter for the axis before setting the ATYPE N A ENCODER _BITS 25 256 12 ATYPE 47 In this example a 25 bit EnDat encoder is used that has 12 bits for multi turn value and 13 bits per one revolution ENCODER _BITS 12 64 1 ATYPE 48 In this example a 12 bit 4096 positions per revolution SSI encoder is used with binary output type AXIS Axis parameter ENCODER_CONTROL value The ENCODER_CONTROL parameter is applicable only to Flexible axis absolute EnDat axis with ATYPE value 47 The pa
175. VE 0 50 MHELICAL 6 0 3 0 1 180 1 MOVE 0 50 WAIT IDLE pause again to rotate the knife MOVE 90 AXIS 2 WAIT IDLE AXIS 2 MOVE 22 0 MHELICAL 0 6 0 3 1 180 1 WAIT IDLE See also MOVECIRC 4 2 157 MOD Type Mathematical function Syntax expression1 MOD expression2 Description The MOD function returns the expression2 modulus of expression This function will take the integer part of any non integer input Arguments expression Any valid BASIC expression expression2 Any valid BASIC expression Example gt gt PRINT 122 MOD 13 5 0000 See also N A 189 All BASIC commands Section 4 2 4 2 158 MOTION_ERROR Type System parameter read only Syntax MOTION_ERROR Description The MOTION_ERROR parameter contains a bit pattern showing the axes which have a motion error For example if axis 2 and 6 have the motion error the MOTION_ERROR value would be 68 4 64 A motion error occurs when the AXISSTATUS state for one of the axes matches the ERRORMASK setting In this case the enable switch WDOG will be turned off and MOTION_ERROR contains a bit pattern showing all axes which have the motion error The ERROR_AXIS parameter will contain the number of the first axis to have the error Due to technical limitations MOTION_ERROR can return an invalid bit pattern when multiple axes have a motion error To obtain the correct value use the INTEGER_READ command to get the bit pattern in 2 parts A mot
176. Values hex area_code e 0100 0107 for PLC output area 8 areas available e 8100 8107 for PLC input area 8 areas available start_address 0000 byte_count 0008 plc_area e 01 CIO e 03 DM e 04 WR 05 HR e 08 14 EM bank 0 C plic_start Start address in PLC memory Validity depends on plc_area tj_area e 00 VR 16 bit signed integer e 01 VR 32 bit floating point e 02 IN or OP array depending on direction e 03 AIN or AOUT array depending on direction e 04 Axis Status array only valid if direction is PLC input tj_start Start address in CJ1W MCH72 memory Validity depends on tj_area total_items Total items words and dwords to transfer Validity depends on plc_area and tj_area The CJ1W MCH72 responds with these codes Condition Response code Description hex All elements valid 0000 OK area_code invalid 1101 No area type start_address invalid 1103 Address range designation error byte_count invalid 1104 Address out of range plc_area plc_start 110C Other parameter error tj_area or tj_start invalid total_items greater than 2103 Data has not been registered 2000 words If the response code is 0000 the cyclic area number specified in area_code is configured to exchange data between the PLC CPU and the CJ1W MCH 72 The first 16 entries in the IN array cannot be addressed in the memory mapping These first 16 entries map to the inputs available on the I O connector
177. _REF_OUT parameter contains the speed reference value being applied to the Servo Driver for both open and closed loop In closed loop SERVO ON the motion control algorithm will output a speed reference signal determined by the control gain settings and the Following Error The position of the servo motor is determined using the Axis commands In open loop SERVO OFF the speed reference sig nal is determined by the S_REF axis parameter N A gt gt PRINT S_REF_OUT AXIS 0 288 0000 AXIS S_REF OUTLIMIT SERVO System command SCOPE control period table_start table_stop PO P1 P2 P3 1 The SCOPE command programs the system to automatically store up to 4 parameters every sample period The storing of data will start as soon as the TRIGGER command has been executed The sample period can be any multiple of the servo period The param eters are stored in the TABLE array and can then be read back to a computer and displayed on the Trajexia Studio data trace or written to a file for further analysis using the Create Table file option on the File menu The current TABLE position for the first parameter which is written by SCOPE can be read from the SCOPE_POS parameter Notes 1 Trajexia Studio uses the SCOPE command when running the Oscillo scope function 2 To minimize calculation time for writing the real time data the SCOPE command is writing raw data to the TABLE array For example a The parameters are written in enco
178. a value less than or equal to 10 program execu tion continues at label label1 Otherwise program execution continues with the next statement N A 87 All BASIC commands Section 4 2 4 2 13 Hexadecimal input Type Syntax Description Arguments Example See also 4 2 14 Comment field Type Syntax Description Arguments Example See also 4 2 15 Statement separator Type Syntax Description Arguments Example See also 88 System command hex_num The command makes the number that follows a hexadecimal number hex_num A hexadecimal number consisting of the characters 0 9 and A F hex_num ranges from 0 to FFFFFF gt gt TABLE 0 F ABCD gt gt print TABLE 0 TABLE 1 15 0000 43981 0000 HEX PRINT Program command marks all that follows it on a line as comment and not program code Comment is not executed when the program is run You can use at the beginning of a line or after a valid statement N A This line is not printed PRINT Start N A Program command The statement separator separates multiple BASIC statements on one line You can use it on the command line and in programs N A PRINT THIS LINE GET low PRINT DOES THREE THINGS N A All BASIC commands Section 4 2 4 2 16 Type Special character Syntax Description The symbol is used to specify a communications channel to be used for serial input output commands
179. able data 64 Configuration 61 Control data 62 Memory areas 60 Status data 62 Definition CPU task 3 Cycle time 2 Motion sequence 2 Process 3 Program 3 Servo period 2 Description Motion buffers 16 E Encoder connector 39 Wiring 43 Encoder output 28 EnDat 28 Example Bag feeder program 339 CAM table 341 Configuration 20 Correction program 346 Flying shear program 343 Gain settings 270 Homing 300 Initialization program 333 Motion buffers 32 Multi tasking 23 Origin search 300 Position mode 280 Position on a grid 337 Position with product detection 336 Registration 305 Servo Driver characteristics 295 Servo period 18 Setting units 285 Shell program 320 Single axis program 335 Speed mode 271 Startup program 268 Tracing and monitoring 314 Explanation Communication 16 Cycle time 17 Motion buffers 31 Motion sequence 16 23 Multi tasking 22 Peripherals 16 Program control 16 Servo period 17 357 F FINS 65 Error Data Read 71 Parameter Area Read 68 Parameter Area Write 68 Read 66 Run 70 Stop 71 Write 67 Flying shear example 343 Function T O 78 Mathematical 78 System 81 G Gain example 270 H Homing example 300 VO connector 39 Wiring 40 Incremental encoder Hardware PSWITCH 45 Input 44 Output 46 Registration 45 Wiring 44 Inertia ratio 33 Initialization example 333 Installation 50 MECHATROLINK II Connecting slaves
180. ads the torque reference e 4 Reads the Inverter inputs To use an Inverter via MECHATROLINK II you must put the command and the reference via communication option Inverter MV V7 N3 3 N4 9 e Inverter F7 G7 V1000 B1 01 3 B1 02 3 Make you sure that the Inverter firmware supports the MECHATRO LINK II board The command returns 1 if successfully executed and 0 if failed The result if any is returned in the selected VR Arguments station The MECHATROLINK II station number of the Inverter param_number The number of the parameter to read See the Inverter manual param_size The size of the parameter to read 2 or 4 bytes Most of the Inverter parameters are 2 bytes long See the Inverter manual VR The address in the VR memory of the CJ1W MCH 72 where the read information is put When the function is 4 the result is returned as a bitwise value See the table below Bit Value Command Description 0 Hex 1 Run forward 1 Hex 2 Run reverse 2 Hex 4 Inverter multifunction Input 3 3 Hex 8 Inverter multifunction Input 4 4 Hex 10 Inverter multifunction Input 5 5 Hex 20 Inverter multifunction Input 6 6 Hex 40 Inverter multifunction Input 7 8 Hex 100 External fault 9 Hex 200 Fault reset 14 Hex 4000 Fault history data clear 179 All BASIC commands 4 2 144 INVERTER_WRITE 180 Section 4 2 Bit Value Command Description 15 Hex 8000 External BB command alarm_number
181. aining axes This must be done manually by clearing the cause of the error pressing a button to clear the error flags of the controllers and re enabling the motion DISABLE_GROUP 1 remove any previous axis groupings DISABLE_GROUP 0 1 2 group axes 0 to 2 GOSUB group_enable enable the axes and clear errors WDOG ON SPEED 1000 FORWARD WHILE IN 2 ON check axis 0 but all axes in the group will disable together IF AXIS_ENABLE 0 THEN PRINT Motion error in group 0 PRINT Press input 0 to reset IF IN 0 0 THEN checks if reset button is pressed GOSUB group enable clear errors and enable axis FORWARD restarts the motion ENDIF ENDIF WEND STOP stop program running into sub routine group_enable Clear group errors and enable axes DATUM 0 clear any motion errors WA 10 FOR axis_no 0 TO 2 AXIS_ENABLE AXIS axis_no ON enable axes SERVO AXIS axis_no ON start position loop servo NEXT axis_no RETURN N A Axis parameter read only DPOS The DPOS axis parameter contains the demand position in user units which is generated by the move commands in servo control When the controller is in open loop SERVO OFF the measured position MPOS will be copied to the DPOS in order to maintain a 0 Following Error The range of the demand position is controlled with the REP_DIST and REP_OPTION axis parameters The value can be adjusted without doing a move by using the DEFPOS command or OFFPOS axis param eter DPOS is reset to 0 at s
182. ake sure that the total current consumption of all units connected to the same CPU backplane or expan sion backplane is not greater than the output capacity of the Power Supply Unit To connect the CJ1W MCH72 to the PLC perform the following steps 1 Align the connectors of the units Connector PAZOSR oD omron C POWER SYSMAC MaH72 oe NNN NNN u AC100 240V INPUT LIN A Q z PERIPHERAL eor RUN E l V DC24V NANS N VNANNAYN OO00O0 NEE CJ1W MCH72 hardware installation Move the yellow sliders at the top and bottom of the unit to the front Attach the CJ1W MCH72 to the PLC Push the yellow sliders at the top and bottom of the unit to the rear to lock them AUN If the sliders are not properly locked it is possible that the unit does not operate cor rectly Communication errors can occur in the Encoder Interface when Contact Output Units are installed close to the CJ1W MCH72 This is caused by noise generated by the Con tact Outputs If Contact Output Units and a CJ1W MCH 72 are installed on the same rack and com munication errors occur do one of the following e Install the Contact Output Units at maximum di
183. ally BASE 0 ATYPE 41 MECHATROLINK Position mode SERVO 1 DRIVE CONTROL 2 To monitor the Following Error in DRIVE MONITOR WDOG 1 DEFPOS 0 loop MOVE 81920 WAIT IDLE WA 100 DEFPOS 0 GOTO loop How to s Section 5 1 Example 1 Trace1 Device1 X x S a 3 Oa alv t I A D 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms Change ML MPOS L ML MSPEED L DigitalInput 2 ML DRIVE_MONITOR The Following Error is proportional to the speed There is a soft profile due to the low rigidity setting low gain Note The colours and scale of the oscilloscope for position mode are as follows Red MSPEED Measured Axis speed Units is 50 units ms division Blue DRIVE_MONITOR set as Following Error in the Servo Driver Units is depend ing on the graph Green MPOS Measured Axis position 50000 units division The parameter values for the example are Motion Parameter values Fn001 4 Pn109 0 281 How to s Section 5 1 Example 2 Trace1 Device1 X x A EREEREER ENCE 10 9 8 7 6 5 4 3 f 2 1 d o 1 1 1 1 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms Display Plot Parameter Change 7 ML MPOS 7 ML MSPEED Digitalinput 2 F ML DRIVE_MONITOR The Following Error reduces as the rigidity increases The parameter valu
184. am eters are needed to enable switch After loading FIFO and going through the sequence of positions in it if the same sequence has to be executed again FIFO must be cleared before executing HW_PSWITCH command with the same parameters mode 0 disable switch 1 on and load FIFO 2 clear FIFO e direction 0 decreasing 1 increasing opstate Output state to set in the first position in the FIFO ON or OFF table_start Starting TABLE address of the sequence table_end Ending TABLE address of the sequence HW_PSWITCH 1 1 ON 21 50 This command will load FIFO with 30 positions stored in TABLE mem ory starting from TABLE 21 in increasing direction When the position stored in TABLE 21 is reached output 8 will be set ON and then alter natively OFF and ON on reaching following positions in the sequence until the position stored in TABLE 50 reached HW_PSWITCH 0 This command will disable switch if it was enabled previously but will not clear the FIFO queue HW_PSWITCH 2 This command will clear FIFO queue if loaded previously AXIS 171 All BASIC commands Section 4 2 4 2 131 I_GAIN Type Syntax Description Arguments Example See also 4 2 132 IDLE Axis parameter _GAIN The I_GAIN parameter contains the integral gain for the axis The inte gral output contribution is calculated by multiplying the sums of the Fol lowing Errors with the value of the _GAIN parameter The defau
185. ameters can have the following values Parameter Values command_code 01 02 var_type e 82 Table memory in 16 bit integer format e C2 Table memory in 32 bit IEEE floating point format BO VR memory in 16 bit integer format FO VR memory in 32 bit IEEE floating point format 30 VR memory in bit format start_address 0 lt start_address lt memory size 1 lt FFFF total_words 1 lt total_words lt memory size start_address 1 total_dwords 1 lt total_dwords lt memory size start_address 1 total_bits 1 bit 00 or 01 The CJ1W MCH72 responds with these codes Condition Response code Description hex All elements valid 0000 OK var_type invalid 1101 No area type start_address invalid 1103 Address range designation error bit_number invalid 1103 Address range designation error Number of elements invalid 1104 Address out of range totals 67 FINS commands Section 3 4 3 4 3 Parameter Area Read 0201 The FINS Parameter Area Read command reads the memory mapping configuration that is written with the FINS Parameter Area Write command see section 3 4 4 The Parameter Area Read command has this format 02 01 S 7 00 00 00 08 command_code area_code start_address byte_count The parameters can have the following values Parameter Values hex command_code 02 01 area_code e 0100 010
186. and B inputs If VERIFY ON the encoder circuit is configured for the usual quadrature input Make sure that the encoder inputs do not exceed 5 volts Arguments N A Example VERIFY AXIS 3 ON See also N A 4 2 254 VERSION Type System parameter read only Syntax VERSION Description The VERSION parameter returns the current firmware version number of the current system installed in the CJ1W MCH 72 Arguments N A Example gt gt PRINT VERSION 1 6100 See also N A 4 2 255 VFF_GAIN Type Axis parameter Syntax VFF_GAIN Description The VFF_GAIN parameter contains the speed feed forward gain The speed feed forward output contribution is calculated by multiplying the change in demand position with the VFF_GAIN parameter value The default value is 0 Adding speed feed forward gain to a system decreases the Following Error during a move by increasing the output proportionally with the speed Note In order to avoid any instability the servo gains should be changed only when the SERVO is off Arguments N A 259 All BASIC commands Section 4 2 Example See also 4 2 256 VP_SPEED Type Syntax Description Arguments Example See also 4 2 257 VR Type Syntax Description Arguments Example 260 No example D_GAIN _GAIN OV_GAIN P_GAIN Axis parameter read only VP_SPEED The VP_SPEED parameter contains the speed profile speed in user units s The speed profile speed is an interna
187. and Line Terminal interface channel 0 all the currently set GLOBAL and CONSTANT parameters will be printed to the terminal N A In an application where the following GLOBAL and CONSTANT have been set CONSTANT cutter 23 GLOBAL conveyor 5 gt gt LIST_GLOBAL Global VR conveyor 5 Constant Value cutter 23 0000 N A All BASIC commands Section 4 2 4 2 150 LN Type Mathematical function Syntax LN expression Description The LN function returns the natural logarithm of the expression The input expression value must be greater than 0 Arguments expression Any valid BASIC expression Example gt gt PRINT LN 10 2 3026 See also N A 4 2 151 LOCK Type System command Syntax LOCK code UNLOCK code Description The LOCK command prevents the program from being viewed modi fied or deleted by personnel unaware of the security code The lock code number is stored in the flash EPROM The UNLOCK command allows the locked state to be unlocked The code number can be any integer and is held in encoded form LOCK is always an immediate command and can be issued only when the system is UNLOCKED LOCK is available from within Trajexia Studio users can lock the device from the Online menu Arguments code Any valid integer with maximum 7 digits Example gt gt LOCK 561234 The programs cannot be modified or seen gt gt UNLOCK 561234 The system is now unlocked See also N A Caution The securi
188. and at subsequent locations Example TABLE 100 0 120 250 370 470 530 550 The above line loads an internal table as below Table entry Value 100 0 101 120 102 250 103 370 104 470 105 530 106 550 253 All BASIC commands Section 4 2 Example The following line will print the value at location 1000 gt gt PRINT TABLE 1000 See also CAM CAMBOX DEL NEW SCOPE TSIZE VR 4 2 237 TABLEVALUES Type System command Syntax TABLEVALUES address number_of_points format Description Returns a list of TABLE points starting at the number specified There is only one format supported at the moment and that is comma delimited text Note TABLEVALUES is provided mainly for Trajexia Studio to allow for fast access to banks of TABLE values Arguments address Number of the first point to be returned number_of_points Total number of points to be returned format Format for the list Example No example See also N A 4 2 238 TAN Type Mathematical function Syntax TAN expression Description The TAN function returns the tangent of the expression The expression is assumed to be in radians Arguments expression Any valid BASIC expression Example gt gt print TAN PI 4 1 0000 See also N A 4 2 239 THEN See IF THEN ELSE ENDIF 254 All BASIC commands Section 4 2 4 2 240 TICKS Type Task parameter Syntax TICKS Description The TICKS parameter contains
189. arac ter Arguments n The specified output device When this argument is omitted the port is 0 Terminal window See the table below Value Description 0 Programming port 0 default 5 Trajexia Studio port O user channel 5 6 Trajexia Studio port O user channel 6 7 Trajexia Studio port 0 user channel 7 expression The expression to be printed Example PRINT CAPITALS and lower case CAN BE PRINTED Example Consider VR 1 6 and variab 1 5 the print output will be as follows PRINT 123 45 VR 1 variab 123 4500 4 5000 Example length PRINT DISTANCE mpos DISTANCE 123 0000 In this example the semi colon separator is used This does not tab into the next column allowing the programmer more freedom in where the print items are placed Example PRINT VR 1 4 1 variab 6 2 6 0 1 50 All BASIC commands Section 4 2 Example Example Example See also 4 2 190 PROC Type Syntax Description Arguments Example See also 4 2 191 PROC_STATUS Type Syntax Description params PRINT DISTANCE mpos 0 SPEED v 2 DISTANCE 123 SPEED 12 34 PRINT ITEM total OF limit CHR 13 gt gt PRINT HEX 15 HEX 2 F FFFFA HEXADECIMAL INPUT Task command PROC task_number The PROC modifier allows a process parameter from a particular proc ess to be read or written If omitted the current task will be assumed task_number The number of the task to access WA
190. articular process to be accessed PROC_STATUS Returns the status of the process specified PROCNUMBER Contains the number of the task in which the currently selected program is running RUN_ERROR Contains the number of the last BASIC error that occurred on the specified task TICKS Contains the current count of the task clock pulses 83 All BASIC commands Section 4 2 4 2 4 2 1 Addition Type Syntax Description Arguments Example See also 4 2 2 Subtraction Type Syntax Description Arguments Example See also 4 2 3 Multiplication Type Syntax Description Arguments Example See also 84 All BASIC commands Mathematical function expression expression2 The operator adds two expressions expression1 Any valid BASIC expression expression2 Any valid BASIC expression result 4 3 Assigns the value 7 to the variable result N A Mathematical function expression1 expression2 The operator subtracts expression2 from expression expression1 Any valid BASIC expression expression2 Any valid BASIC expression result 10 2 Assigns the value 8 to the variable result N A Mathematical function expression expression2 The operator multiplies two expressions expression1 Any valid BASIC expression expression2 Any valid BASIC expression result 3 7 Assigns the value 21 to the variable resul
191. at we have not used the pulley radius in the calculation This is to avoid the use of z which cannot be expressed as a fractional number In toothed pulleys the number of teeth and mm per tooth is commonly used The calculation of the multiturn limit setting is m motor_revolution n machine_cycle 4160 pulley_revolution m motor_revolution n machine_cycle n 13 pulley_revolution 320 machine_cycle 6 31 motor_revolution n 13 n 82 03 pulley_revolution 1 pulley_revolution m n 82 03 The smallest integer m for which this equation is valid is 8203 This results in Pn205 8202 291 How to s Section 5 1 5 1 3 6 Example 4 292 In addition to limit the motion units range to the moving range of the motion part the following axis parameters must be set REP_DIST 4260 and REP_OPTION 1 With these settings executing MOVE 38 moves the moving part 38 mm in forward direction The range of possible MPOS and DPOS values is 0 mm to 4160 mm Full turn 360 3600 x tenth of degree M r 17 bit absolute 1 12 24 Gear encoder The mechanical system uses a servo motor with a 17 bit absolute encoder The mechanical gear ratio of the gearbox is 1 12 24 The mechanical measurement units must be tenths of an angle degree Therefore the total repeat distance for the full turn of the moving part is 3600 tenths of an angle degree With the same procedure as in example 1 we
192. ating shaft has a cam operated switch which has to be changed for different size work pieces There is also a proximity switch on the shaft to indicate the TDC of the machine With a mechanical cam the change from job to job is time consuming This can be eased by using PSWITCH as a software cam switch The proximity switch is wired to input 7 and the output is output 11 The shaft is controlled by axis 0 The motor has a 900ppr encoder The output must be on from 80 units PSWITCH uses the unit conversion factor to allow the positions to be set in convenient units First the unit conversion factor must be calcu lated and set Each pulse on an encoder gives four edges for the CJ1W MCH 72 to count There are thus 3 600 edges rev or 10 edges degree If you set the unit conversion factor to 10 you can work in degrees Next you have to determine a value for all the PSWITCH arguments sw The switch number can be any switch that is not in use In this example you will use number 0 en The switch must be enabled to work set the enable to 1 axis The shaft is controlled by axis 0 opno The output being controlled is output 11 opst The output must be on so set to 1 setpos The output is to produced at 80 units rspos The output is to be on for a period of 120 units This can all be put together in the following lines of BASIC code switch UNITS AXIS 0 10 Set unit conversion factor REP_DIST 360 REP_OPTION ON PSWITCH 0 ON 0 11 ON 80
193. ations The integral gain axis parameter is called I_GAIN Derivative gain The derivative gain Kg produces an output Oy that is proportional to the change in the Following Error E and speeds up the response to changes in error while maintaining the same relative stability Og Kg AE Derivative gain may create a smoother response High values may lead to oscillation The derivative gain axis parameter is called D_GAIN Output speed gain The output speed gain Koy produces an output O that is proportional to the change in the measured position Pm and increases system damping Oov Koy 4Pm Servo system principles Section 1 4 The output speed gain can be useful for smoothing motions but will generate high Following Errors The output speed gain axis parameter is called OV_GAIN e Speed feed forward gain The speed feedforward gain Ky produces an output Oy that is proportional to the change in demand position Py and minimizes the Following Error at high speed Over Kure APa The parameter can be set to minimise the Following Error at a constant machine speed after other gains have been set The speed feed forward gain axis parameter is called VFF_GAIN The default settings are given in the table along with the resulting profiles Fractional values are allowed for gain settings Gain Default value Proportional gain 0 1 Integral gain 0 0 Derivative gain 0 0 Output speed gain 0 0 Speed feedforward gain 0 0
194. ause the speed is a derivative of the position e During constant speed the graph of the position is straight During linear deceleration the graph of the position is counter parabolic During stop the graph of the position is constant When an overflow occurs MPOS gt REP_DIST the position jumps to 0 if REP_OPTION 1 or to REP_DIST if REP_OPTION 0 335 Practical examples Section 5 2 e The Following Error is proportional to the speed if you use only Proportional Gain in the position loop e The torque which is given by DRIVE_MONITOR as a percentage of the nominal torque of the motor when you set DRIVE_CONTROL 11 is proportional to the acceleration according to the formula Torquetotal Jtotal x a Torquefriction where TOrque fiction iS usually small a is the angular acceleration and J the inertia of the system 5 2 5 Position with product detection A A ballscrew moves forward at a creep speed until it reaches a product a microswitch IN 2 turns on The ballscrew is stopped immediately the position at which the product is sensed is indicated and the ballscrew returns at a rapid speed back to the start position NaO oO IN 2 mo speed l A CANCEL la WAIT IDLE Forward gt t i Moveabs SPEED 10 FORWARD WAIT UNTIL IN 2 ON Start WAIT UNTIL IN 1 ON WAIT UNTIL IN 1 ON PRINT Product position SPEED 100 MOVEABS 0 WAIT IDLE 5 2 5 1 Example
195. ce to the Servo Driver is removed 145 All BASIC commands Section 4 2 4 2 83 EDIT Type Syntax Description Arguments Example See also 4 2 84 ELSE Program command EDIT line_number ED line_number The EDIT command starts the built in screen editor allowing a program in the controller to be modified using a Command Line Terminal The currently selected program will be edited The editor commands are as follows Quit Editor CTRL K and D e Delete Line CTRL Y This command is implemented for a Command Line Terminal line_number The number of the line at which to start editing No example SELECT See IF THEN ELSE ENDIF 4 2 85 ELSEIF See IF THEN ELSE ENDIF 4 2 86 ENCODER Type Syntax Description Arguments Example See also 146 Axis parameter read only ENCODER The ENCODER axis parameter contains a raw copy of the encoder hardware register or the raw data received from the drive via MECHA TROLINK II On axes with absolute encoders the ENCODER parame ter contains a value using a number of bits programmed with ENCODER_BITS The MPOS axis parameter contains the measured position calculated from the ENCODER value automatically allowing for overflows and off sets N A No example AXIS MPOS All BASIC commands Section 4 2 4 2 87 ENCODER_BITS Type Syntax Description Arguments Example Example See also 4 2 88 ENCODER_CON
196. chronised multi axis motion can be achieved Absolute moves can be merged for profiled continuous path movements by turning on the MERGE axis parameter Considering a 2 axis movement the individual speeds are calculated using the equations below Given command MOVE ax4 ax2 the current position ay ay2 and the profiled speed vp as calculated from the SPEED ACCEL and DECEL parameters from the base axis and the total multi axes distance L SQR x 2 x9 where x4 ax ay The individual speed for axis at any time of the movement is calculated as Vj XiX Vp L Arguments The command can take up to 32 arguments e distance_i The position to move every axis to in user units starting with the base axis 193 All BASIC commands Section 4 2 Example A machine must move to one of 3 positions depending on the selection made by 2 switches The options are home if both switches are off position 1 if the first switch is on and the second switch is off and posi tion 2 if the first switch is off and the second switch is on Position 2 has priority over position 1 define absolute positions home 1000 position_1 2000 position_2 3000 WHILE IN run_switch ON IF IN 6 ON THEN switch 6 selects position 2 MOVEABS position_2 WAIT IDLE ELSEIF IN 7 ON THEN switch 7 selects position 1 MOVEABS position_1 WAIT IDLE ELSE MOVEABS home WAIT IDLE ENDIF WEND Example An X Y plotter has a pen carousel The
197. control concepts icc ccc secesteiecdie n eiai A E E R E E E 4 J4 Seryosystem principles eire r E E TE E O E E O E E O N E EOR AG 13 FS Trajexia system architecture coann aan a E E a EEEE E E E E R E A aA 16 EE E Cycle time vies E EE E EA ES EE E E ted E EE E E EE E E E 17 l 7 Program control and multi tasking sseseeseseeeseseesessreessrerestrstsetstsessesesststsstesesttststestetessestssestessestsstetestesestestsressee 22 1 8 Motion sequence and axes ceiien i E REE E EE EE chuck EE GAE Wivved E EE RE 23 19 Motion DUTTErS inneni a a eRe re tae Gee eet ee eel See E S 31 T 10 Me chanical system lt s3cc Sc lt 8 iho ess loc ecoc ses est E E so cus Soaks ee ca adda deg dad Sus E T 33 TEI AXIS NUMDELS pictues Recah EENE E EEIE Aen deleted ine al tities 34 SECTION 2 Installation and wiring 35 Del Unit COMPOHeMtS aioe 3 ese a tet iets ah ute Auta es a th aia te ot Lae estat oc aa a nene Beat den 35 De De WINE esie n E thes dsc ence deen dea edge case de EE deuce AE EEE REE des Loess eet sleds E ER AREE 40 2 37 Installation Ae mesion E a Noe ad ase in atone ah Lads E E EN GA aban tiie 50 2 42 Specilicatioms vteA vient Nee Me oe IAN oe lee hE Lhd tte Sek atl BHM ANE Tr Uo aad seat Ohne Seite ad 55 SECTION 3 Data exchange 59 321 IntroductiOn2 2cih aie hee ee ye Se ee ean oe te Rene tss 59 a2 SMIEIMOLY AL CAS ake ecacsse a a aa iubveves ofavh soup cavbuheuuensdnebavnestnas aa aa E A a 60 SB Data cis te sevcciutatives sos
198. ctor switch The unit number identifies each individual CPU bus unit when more than one CPU bus unit is connected to the same PLC The unit number must be unique for each CPU bus unit If the unit number is not unique the PLC system cannot start correctly 56 UNIT 5 8 No Vao Unit number selector switch The unit number can range from 0 hex to F hex 2 1 2 1 Word allocations for CPU bus units 2 1 3 Battery Words are automatically allocated in the CIO area of CJ series PLC systems The CJ1W MCH72 uses these words to receive control data from the CPU and to notify the CPU of its status and the status of the communication The word addresses in the allocated areas depend on the unit number Because the word addresses are hard coded in user programs a user program becomes invalid when the unit number is changed The table below gives the relation between the unit number and the allocated CIO area words Unit number Allocated words Unit number Allocated words 0 hex 0 C1I01500 C101524 8 hex 8 C1I01700 C101724 1 hex 1 C1I01525 C101549 9 hex 9 C1I01725 C101749 2 hex 2 C1I01550 C101574 A hex 10 C1I01750 C101774 3 hex 3 C1I01575 C101599 B hex 11 C1I01775 C101799 5 hex 5 C101625 Cl01649 D hex 13 C101825 Cl01849 6 hex 6 C1I01650 C101674 E hex 14 C1I01850 C101874 4 hex 4 C101600 C101624 C hex 12 C101800 C101824 7 hex 7 C1016
199. d Tn z n g 5 1 5 4 Origin search using encoder reference pulse Zero Mark encoder max limit switch 304 How to s Section 5 1 This origin search procedure performs origin search by searching for the Zero Mark signal of the encoder This signal is also known as marker or reference pulse It appears one time per full encoder revolution The example for this homing procedure is shown in the figure encoder 2 pulses Tio ERT TTY VR Ve a EL E E min limit switch max limit switch REVERSE FORWARD The possible scenarios for origin search using encoder reference pulse Zero Mark depending on the position of the moving part on power on are shown in the figure The program example that does this origin search sequence is given below Origin and left limit switch INO Right limit switch IN1 REV_IN 1 BASE 0 D S ATUM_IN 0 ERVO ON WDOG ON DATUM 6 WA 1 WAIT IDLE 5 1 5 5 Static origin search forcing a position from a user reference This origin search procedure performs a static origin search by directly forcing an actual position It does not perform any physical move DATUM 0 5 1 5 6 Static origin search forcing a position from an absolute encoder 5 1 6 Registration This origin search procedure sets the actual position to the position of an absolute encoder It does not perform any p
200. d the buffer empties 6 If no new movements are executed finally the buffer will become empty and the profile generator becomes inactive Section 1 10 Mechanical system 1 10 Mechanical system 1 10 1 Inertia ratio 1 10 2 Rigidity The inertia ratio is a stability criterion The higher the intertia of the load in relation to the intertia of the motor the lower the gains you can set in your system before you reach oscillation and the lower the performance you can reach With a ratio of 1 30 for small Servo Drivers and a ratio of 1 5 for big Servo Drivers you can reach the maximum dynamic of the motor driver combination If a machine is more rigid and less elastic you can set higher gains without vibration and you can reach higher dynamic and lower Following Error 1 10 3 Resonant frequency A mechanical system has at least one resonant frequency If you excite your mechanical system to the resonant frequency it starts oscillating For motion systems it is best to have mechanical systems with a very high resonant frequency that is with low inertia and high rigidity The resonant frequency of the mechanical system is the limit for the gain settings 33 Axis numbers Section 1 11 1 11 Axis numbers The CJ1W MCH72 has a maximum of 31 non virtual axes 30 MECHATROLINK II axes e 1 Flexible axis on the Encoder Interface MECHATROLINK II slaves can have a station address that ranges from 41 hex to 5F hex
201. d with the CONNECT command to this virtual axis to run the conveyor Axis 1 controls a vacuum roller that feeds the lids on to the cartons using the MOVELINK control BASE 4 ATYPE 0 Set axis 4 to virtual axis REP_OPTION 1 SERVO ON FORWARD starts line shaft BASE 0 CONNECT 1 4 Connects base 0 to virtual axis in reverse WHILE IN 2 ON BASE 1 Links axis 1 to the shaft in reverse direction MOVELINK 4000 2000 0 0 4 2 1000 WAIT IDLE WEND RAPIDSTOP See also AXIS CANCEL RAPIDSTOP REVERSE UNITS 4 2 117 FPGA_VERSION Type Slot parameter Syntax FPGA_VERSION Description This parameter returns the FPGA version of the CJ1W MCH 72 Arguments N A Example N A See also N A 4 2 118 FRAC Type Mathematical function Syntax FRAC expression Description The FRAC function returns the fractional part of the expression Arguments expression Any valid BASIC expression Example gt gt PRINT FRAC 1 234 0 2340 See also N A 165 All BASIC commands Section 4 2 4 2 119 FRAME Type Syntax Description Arguments Example See also 4 2 120 FREE Type Syntax Description Arguments Example See also 166 System parameter FRAME value Used to specify which frame to operate within when employing frame transformations Frame transformations are used to allow movements to be specified in a multi axis coordinate frame of reference which do not correspond one to one with the axes An example
202. d becomes capital red MECHATROLINK 0 3 VR Returns the number of detected MECHATROLINK II slaves after a MECHATROLINK 0 0 It is used by the STARTUP program to check that the number of detected MECHATROLINK II stations corresponds with the expected MECHATROLINK 0 4 station VR Returns the address of MECHATROLINK II slave at that station number The station numbers are a sequence 0 x for all the attached slaves 1 is returned if no slave is allocated to that station It is used by the STARTUP program to check that the number of detected MECHA TROLINK II stations corresponds with the expected MECHATROLINK 0 5 station VR Reads and clears missed message count A Non Axis MECHATRO LINK II slave does not report automatically a network problem so use this command to poll the Inverter for checking that the network is alive Note e You can use the command MECHATROLINK 0 5 station VR to monitor the status of a slave during a program execution If the contents of the VR address is greater than 0 a communication error with the slave occurs and the slave can malfunction You can use this command to stop your program when the slave has an error Note This command has two forms depending upon the function required Master and Station Functions All MECHATROLINK functions return TRUE 1 if the command was successful or FALSE 0 if the command failed The functions are separated out into 2 types Master functions that work on a unit and Sta
203. d similar safety measures in external circuits i e not in the Programmable Controller must be provided by the customer e Install external breakers and take other safety measures against short circuiting in external wiring Insufficient safety measures against short circuiting may result in burning e Install the PLC Unit as far as possible from sources of strong harmonic noise e Lock the sliders securely until they click into place when connecting the Power Supply Unit CPU Unit I O Units Special I O Units or CPU Bus Units Functions may not work correctly if the sliders are not locked properly Always attach the End Cover provided with the CPU Unit to the Unit on the right end of the PLC The CJ series PLC will not operate properly if the End Cover is not attached e Always use the power supply voltages specified in the operation manuals An incorrect voltage may result in malfunction or burning e Take appropriate measures to ensure that the specified power with the rated voltage and frequency is supplied in places where the power supply is unstable An incorrect power supply may result in malfunction e Use crimp terminals for wiring Do not connect bare stranded wires directly to terminals Connection of bare stranded wires may result in burning e Leave the label attached to the Unit when wiring Removing the label may result in malfunction if foreign matter enters the Unit e Remove the label after the completion of wiring to en
204. de for position control MECHATROLINK II with MECHATROLINK II axes 41 OFF Speed Recommended mode for speed control MECHATROLINK II with MECHATROLINK II axes Set the speed with S_REF 41 ON Position The position loop is closed in Trajexia MECHATROLINK II This gives lower performance than closing the position loop in the Servo Driver 42 OFF Torque Recommended mode for torque control MECHATROLINK II with MECHATROLINK II axes Set the torque with T_REF 42 ON Position via torque The position loop is closed in Trajexia MECHATROLINK II The output of the position loop is sent as the torque reference to the Servo Driver 29 Motion sequence and axes Section 1 8 30 ATYPE SERVO Mode Comment 49 OFF Speed Inverter with built in encoder interface controlled on the MECHATROLINK II bus as a servo axis Set the speed with S_REF 49 ON Position Inverter with built in encoder interface controlled on the MECHATROLINK II bus as a servo axis The position loop is closed in Trajexia Motion buffers Section 1 9 1 9 Motion buffers AXIS BUFFER BASIC PROGRAM G eipor axis a CONNECT 1 1 AXIS 2 Y NTYPE PE ea MOVE S00 PROCESS BUFFER ik MOVE 1000 sides MTYPE Currently executed CONNECT 1 1 MOTION COMMAND vs It DEMAND POSITION Profile generator The motion buffer is a temporary st
205. de the Trajexia stepper pulse gener ator assumes that the FALLING edge of the step output is the active edge which results in motor movement This is suitable for the majority of stepper drivers Setting INVERT_STEP ON effectively makes the RISING edge of the step signal the active edge INVERT_STEP should be set if required prior to enabling the controller with WDOG ON Default is off Note If the setting is incorrect a stepper motor may lose position by one step when changing direction Note This parameter is applicable only to Flexible axis stepper output axes with ATYPE 46 With other types of axes this parameter has no effect N A No example N A All BASIC commands Section 4 2 4 2 142 INVERTER_COMMAND Type System command Syntax INVERTER_COMMAND 0 station 1 alarm_number INVERTER_COMMAND 0 station 8 mode INVERTER_COMMAND 0 station 7 operation_signals Description INVERTER_COMMAND controls inputs and clears alarm of the Inverter connected to the system via the MECHATROLINK II bus There are three INVERTER_COMMAND functions e 1 Clears an alarm e 7 Controls operation signals e 8 Set an Inverter to Servo Driver mode so it acts as a servo axis This is possible only for Inverters with an encoder feedback option card connected To use an Inverter via MECHATROLINK II you must put the command and the reference via communication option e Inverter MV V7 N3 3
206. der edges per second and there fore not compensated for the UNITS conversion factor b The MSPEED parameter is written as the change in encoder edges per servo period 3 Applications like the CAM command CAMBOX command and the SCOPE command all use the same TABLE as the data area All BASIC commands Section 4 2 4 2 219 SCOPE_POS Arguments Example Example See also Type Syntax Description Arguments Example See also control Set on or off to control SCOPE execution If turned on the SCOPE is ready to run as soon as the TRIGGER command is executed period The number of servo periods between data samples table_start The address of the first element in the TABLE array to start storing data table_stop The address of the last element in the TABLE array to be used e PO First parameter to store e P1 Optional second parameter to store e P2 Optional third parameter to store e P3 Optional fourth parameter to store SCOPE ON 10 0 1000 MPOS AXIS 1 DPOS AXIS 1 This example programs the SCOPE function to store the MPOS param eter for axis 1 and the DPOS parameter for axis 1 every 10 servo cycles The MPOS parameter will be stored in TABLE locations 0 to 499 the DPOS parameters in TABLE locations 500 to 999 The SCOPE function will wrap and start storing at the beginning again unless stopped Sampling will not start until the TRIGGER command is executed SCOPE OFF This above line turn
207. done Alternatively a new control block pointer can be used to point to a further control block 115 All BASIC commands Section 4 2 Example A quilt stitching machine runs a feed cycle that stitches a plain pattern before it starts a patterned stitch The plain pattern must run for 1000 cycles Then it must runs a pattern continuously until requested to stop at the end of the pattern The cam profile controls the motion of the nee dle bar between moves The pattern table controls the distance of the move to make the pattern The same shape is used for the initialisation cycles and the pattern This shape is held in TABLE values 100 150 The running pattern sequence is held in TABLE values 1000 4999 The initialisation pattern is a single value held in TABLE 160 The initialisation control block is held in TABLE 200 TABLE 206 The running control block is held in TABLE 300 TABLE 306 Set up Initialisation control block TABLE 200 160 1 160 160 0 1000 300 Set up running control block TABLE 300 1000 1 1000 4999 0 1 1 Run whole lot with single CAMBOX Third parameter is pointer to first control block CAMBOX 100 150 200 5000 1 20 WAIT UNTIL IN 7 OFF TABLE 305 0 Set zero repeats This will stop at end of pattern Note The axis to which the CAMBOX is linked can run in a positive or negative direction In the case of a negative direction link the pattern executes in reverse In the case where a certain
208. e the error routine will be executed The IF statement is present to prevent the program going into error rou tine when it is stopped normally See also ERROR_LINE ON RUN_ERROR 4 2 41 BATTERY_LOW Type System parameter read only Syntax BATTERY_LOW Description This parameter returns the current state of the battery condition If BATTERY_LOW ON then the battery needs to be changed If BATTERY_LOW OFF then battery condition is ok Arguments N A Example No example See also N A 104 All BASIC commands Section 4 2 4 2 42 BREAK_RESET Type System command Syntax BREAK_RESET program_name Description Used by Trajexia Studio to remove all break points from the specified program Arguments program_name The name of the program from which you want to remove all break points Example BREAK_RESET simpletest Will remove all break points from program simpletest See also N A 4 2 43 CAM Type Axis command Syntax CAM start_point end_point table_multiplier distance Description The CAM command is used to generate movement of an axis following a position profile which is stored in the TABLE variable array The TABLE values are absolute positions relative to the starting point and are specified in encoder edges The TABLE array is specified with the TABLE command The movement can be defined with any number of points from 3 to the maximum table size available 64000 The CJ1W MCH72 moves con tinuously between
209. e CJ1W MCH 72 offers these types of positioning control operations 1 Point to Point PTP control 2 Continuous Path CP control 3 Electronic Gearing EG control This section introduces some of the commands and parameters used in the BASIC programming of the motion control application Coordinate system Positioning operations performed by the CJ1W MCH 72 are based on an axis coordinate system The CJ1W MCH72 converts the position data from either the connected Servo Driver or the connected encoder into an internal absolute coordinate system The engineering unit that specifies the distances of travelling can be freely defined for each axis separately The conversion is performed through the use of the unit conversion factor which is defined by the UNITS axis parameter The origin point of the coordinate system can be determined using the DEFPOS command This command re defines the current position to zero or any other value MOVEABS 30 MOVE 69 MOVEABS 50 i AS MOVE 50 gt MOVE 30 A move is defined in either absolute or relative terms An absolute move takes the axis A to a specific predefined position with respect to the origin point A relative move takes the axis from the current position to a position that is defined relative to this current position The figure shows an example of relative command MOVE and absolute command MOVEABS linear moves In point to point posit
210. e Run at Power Up check box and select a priority in the list Possible priority values are Default or 1 lowest priority to 14 highest priority To set the program not to run at startup clear the Run at Power Up check box Note The SHELL program by default runs at startup at priority 1 Note OMRON recommends that the statement RUN your_program is used at the end of the Startup program to start your application program The application program starts when the startup program is executed successfully and without errors If you set an application program to Run at startup there is a risk that the machine starts if there is an error on the MECHATROLINK II bus 268 How to s Section 5 1 5 1 1 2 Example THE FIRST PART OF THE PROGRAM CONSISTS OF A CHECK SEQUENCE TO VERIFY THAT THE DETECTED AXIS CONFIGURATION IS THE EXPECTED ONE IF YES THE PROGRAM FINISHES AND STARTS APPLICATION IF NOT THE PROGRAM STOPS AND NO OTHER PROGRAM STARTS THIS PROGRAM MUST BE SET TO RUN AT POWER UP IN A LOW PRIORITY TASK 1 IN THIS EXAMPLE Start MECHATROLINK Section Check detected slaves Unit 0 IF NOT MECHATROLINK 0 3 0 THEN PRINT Error getting slave count for unit 0 STOP
211. e also Type Syntax Description Arguments Example Example Explanation See also System command WA time The WA command pauses program execution for the number of milli seconds specified for time The command can only be used in a pro gram e time The number of milliseconds to hold program execution The following lines would turn ON output 7 two seconds after turning off output 1 OP 1 OFF WA 2000 OP 7 ON N A System command WAIT IDLE The WAIT IDLE command suspends program execution until the base axis has finished executing its current move and any buffered move The command can only be used in a program WAIT IDLE works on the default basis axis set with BASE unless AXIS is used to specify a tem porary base axis Note The execution of WAIT IDLE does not necessarily mean that the axis will be stationary in a servo motor system N A MOVE 1000 WAIT IDLE PRINT Move Done The print statement is printed at the end of the movement MOVE 1000 WAIT UNTIL MTYPE 0 PRINT Movement finished The print statement is printed most of the times BEFORE the move ment starts and sometimes when the movement is finished Motion programs and motion sequence work in parallel and unsynchro nized One complete cycle can occur before the movement is loaded into the buffer The program executes MOVE 1000 but the movement is not loaded to the buffer until the start of the next motion sequence so w
212. e and axes Section 1 8 1 8 4 10 Inverter axis ATYPE 49 CJ1W MCH72 INVERTER SERVO OFF Position loop 1 5 1 o il 1 Profile generator i gt f i Demanded Following Speed position command i SERVO OFF S ML II gt o gt Speed Speed Loop command error Soe Leia cee oe Seal Measured _ position DPRAM REFRESH EVERY Sms CO This type allows Inverters with built in encoder interface to be controlled on the MECHATROLINK II bus as servo axes From the controller point of view Inverter axes are handled the same as servo axes in MECHATROLINK II Speed Mode ATYPE 44 Unlike the other axis types this Inverter axis must be defined programmatically with function 8 of the command INVERTER_COMMAND The Speed command to the Inverter and the feedback from the encoder is refreshed in the Inverter with a few milliseconds delay This is an inverter limitation This means that the use of the Inverter is similar to the use of a Servo Driver but the performance is lower 1 8 4 11 Summary of axis types and control modes The following table lists the axis types and their recommended modes for speed control position control and torque control ATYPE SERVO Mode Comment 40 OFF Position The position loop is closed in the Servo MECHATROLINK II Driver No new motion command is allowed 40 ON Position Recommended mo
213. e executed in the Low Task LT period High priority processes B are executed in the high Task HT periods g g AS Yy AA u Hre coms lt gt Cycle time External communication that are not related to the motion network are updated in the communications COMS period in the fourth CPU task Trajexia can control up to 14 programs at the same time In contrast to low priority processes a high priority process is always available for execution during two of the four CPU tasks The high priority tasks are executed faster than the low priority tasks it is that they have more time available for their execution All the low priority tasks must share one slot of time and the high priority task have their own two slots of time 22 Motion sequence and axes Section 1 8 1 7 4 Multi tasking example 1 ims ims ims ims 3 14 13 coms 2 14 13 coms 1 14 13 coms J0 14 13 3 14 coms 2 14 coms 1 14 coms O ci 14 COMS 3 2 1 Icoms Om 3 2 coms 1 O em 3 coms 2 1 0 n coms In the example 1 there are two high priority processes 13 and 14 The two HT periods are reserved for these processes one for processes 13 and one for processes 14 The low priority processes 3 2 1 and 0 are executed in the LT period one process per Cycle time here set to 1 0ms
214. e required e Absolute switch origin search plus limit switches e Origin search against limit switches e Origin search against hardware parts blocking movement 300 How to s Section 5 1 e Origin search using encoder reference pulse Zero Mark e Static origin search forcing a position from a user reference e Static origin search forcing a position from an absolute encoder OFF JON OFF origin limit switch min limit switch _ON OFF encoder max limit switch OFF ON The figure shows a general origin search scenario This simple origin search sequence has 3 steps 1 Search for a signal 2 Search for another signal 3 Move the axis to a predefined position Note For safety reasons limit switches are normally closed For this reason in this figure and in the following figures in this section the low signal level is indicated as ON and the high signal level is indicated as OFF It is important to note that before any homing procedure is executed it is necessary to set the axis parameters UNITS REP_DIST and REP_OPTION and Servo Driver parameters Pn202 Pn203 and Pn205 properly and in accordance with the mechanical system and desired measurement units used in programming Those parameters have influence to the origin search especially if an absolute encoder is used For more information on setting these parameters see section 5 1 2 5 1 5 1 Absolute switch origin search plus limit switches
215. ection 4 2 Arguments Example See also 4 2 135 IF THEN ELSE ENDIF Type Syntax Description Arguments Example Example Example e value Any BASIC floating point variable or parameter e n The byte number 0 3 to be extracted a MPOS AXIS 2 byte0 IEEE_OUT a 0 byte1 IEEE_OUT a 1 byte2 IEEE_OUT a 2 byte3 IEEE_OUT a 3 N A Program control command IF condition_1 THEN commands ELSEIF condition_i THEN commands ELSE commands ENDIF IF condition_1 THEN commands This structure controls the flow of the program based on the results of the condition If the condition is TRUE the commands following THEN up to ELSEIF ELSE or ENDIF are executed If the condition is FALSE and the command of a subsequent ELSEIF substructure is TRUE the commands of this substructure are executed If all conditions are FALSE the commands following ELSE will be executed or the program will resume at the line after ENDIF in case no ELSE is included The ENDIF is used to mark the end of the conditional block Note IF THEN ELSE ENDIF sequences can be nested without limit For a multi line IF THEN construction there must not be any statement after THEN A single line construction must not use ENDIF condition_i A logical expression commands One or more BASIC commands IF MPOS gt 0 22 VR 0 THEN GOTO exceeds_length IF IN 0 ON THEN count count 1 PRINT COUNTS count fail 0 ELSE
216. ed e During the deceleration of the current move additional CANCELs will be ignored e CANCEL 1 cancels only the presently buffered move Any moves stored in the task buffers indicated by the PMOVE variable can be loaded into the buffer as soon as the buffered move is cancelled N A v 0 5 10 TIME SECS FORWARD WA 10000 CANCEL Stop movement after 10 seconds MOVE 1000 MOVEABS 3000 CANCEL Cancel the move to 3000 and move to 4000 instead MOVEABS 4000 Note that the command MOVEMODIFY is a better solution for modifying end points of moves in this case 117 All BASIC commands Section 4 2 Example See also 4 2 46 CHECKSUM Type Syntax Description Arguments Example See also 118 15000 1000 MSEC Two axes are connected with a ratio of 1 2 Axis 0 is cancelled after 1 second then axis 1 is cancelled when the speed drops to a specified level After the first cancel axis 1 decelerates at the DECEL rate When the CONNECT of axis 1 is cancelled axis 1 stops instantly BASE 0 SPEED 10000 FORWARD CONNECT 0 5 0 AXIS 1 WA 1000 CANCEL WAIT UNTIL VP_SPEED lt 7500 CANCEL AXIS 1 AXIS MTYPE NTYPE PMOVE RAPIDSTOP System parameter read only CHECKSUM The CHECKSUM parameter contains the checksum for the programs in RAM At start up the checksum is recalculated and compared with the previously held value If the checksum is incorrect the program w
217. ed in programs e This value is normally set by Trajexia Studio N A No example EPROM 217 All BASIC commands Section 4 2 4 2 189 PRINT 218 Type I O command Syntax PRINT n expression expression n expression expression Description The PRINT command outputs a series of characters to the communica tion ports PRINT can output parameters fixed ASCII strings and single ASCII characters By using PRINT n any port can be selected to out put the information to Multiple items to be printed can be put on the same line separated by a comma or a semi colon A comma separator in the print command places a tab between the printed items The semi colon separator prints the next item without any spaces between printed items The width of the field in which a number is printed can be set with the use of w x after the number to be printed The width of the column is given by w and the number of decimal places is given by x Using only one parameter x takes the default width and specifies the number of decimal places to be printed The numbers are right aligned in the field with any unused leading characters being filled with spaces If the number is too long then the field will be filled with asterisks to signify that there was not sufficient space to display the number The maximum field width allowable is 127 characters The backslash command can be used to print a single ASCII ch
218. eed feedback Incremental and absolute ported Absolute encoder standards sup SSI 200 kHz EnDat 1 MHz Encoder input maximum edge rate 6 M edges s Encoder pulse output edge rate maximum 2 M edges s Maximum cable length SSI 100 m max EnDat 40 m max Encoder input 100 m max Encoder stepper output 100 m max 57 Specifications Section 2 4 58 Introduction Section 3 1 SECTION 3 Data exchange 3 1 Introduction The CJ1W MCH72 can exchange data with memory areas in the PLC This enables the CJ1W MCH 72 to use the inputs and outputs connected to the PLC Also programs in the CJ1W MCH72 and PLC programs can exchange control and status data Because the CJ1W MCH 72 can only access the input and output data via the PLC the data exchange requires an extra PLC cycle This section describes the issues related to cyclic data exchange 59 Memory areas Section 3 2 3 2 Memory areas PLC CPU CJ1W MCH72 cio DM AIN Digital and analogue 60 Note inputs and outputs HR AOUT WR Data exchange memory areas The PLC CPU uses the following memory areas for data exchange with the CJ1W MCH72 EM Expanded Memory e ClO Common I O memory e DM Data Memory e WR memory e HR memory The CJ1W MCH 72 uses the following memory areas to exchange data with the PLC CPU e VR memory e IN array for digital inputs e OP array for digital outputs AIN
219. ement on the link axis link_distance The positive incremental distance in user units that is required to be measured on the link axis to result in the distance motion on the BASE axis link_acceleration The positive incremental distance in user units on the link axis over which the base axis will accelerate link_deceleration The positive incremental distance in user units on the link axis over which the base axis will decelerate Note If the sum of parameter 3 and parameter 4 is greater than parameter 2 they are both reduced in proportion until their sum equals parameter 2 link axis The axis to link to link_option See the table below link_option Description 1 Link starts when registration event occurs on link axis 2 Link starts at an absolute position on link axis see link_position 4 MOVELINK repeats automatically and bidirectionally This option is cancelled by setting bit 1 of REP_OPTION parameter that is REP_OPTION REP_OPTION OR 2 5 Combination of options 1 and 4 6 Combination of options 2 and 4 link_position The absolute position where MOVELINK will start when link_option is set to 2 Note The command uses the BASE and AXIS and unit conversion fac tors in a similar way to other MOVE commands Note The link axis may move in either direction to drive the output motion The link distances specified are always positive 200 All BASIC commands
220. equence is responsible for controlling the position of the axes Servo period Defines the frequency at which the Motion Sequence is executed The servo period must be set according to the configuration of the physical axes The available settings are 0 5 ms 1 ms 2 ms or 4 ms Cycle time Is the time needed to execute one complete cycle of operations in the CJ1W MCH72 The cycle time is divided in 4 time slices of equal time length called CPU Tasks The cycle time is 1ms if SERVO_PERIOD 0 5 ms or SERVO_PERIOD 1 ms 2 ms if the SERVO_PERIOD 2 ms and 4 ms if the SERVO_PERIOD 4 ms System philosophy Section 1 2 1 2 1 4 CPU tasks The operations executed in each CPU task are CPU task Operation First CPU task Motion Sequence Low priority process Second CPU task High priority process Third CPU task Motion Sequence only if SERVO_PERIOD 0 5 ms LED Update High priority process Fourth CPU task External Communications 1 2 1 5 Program A program is a piece of BASIC code 1 2 1 6 Process Is a program in execution with a certain priority assigned Process 0 to 12 are Low priority processes and Process 13 and 14 are High priority processes First the process priority High or Low and then the process number from high to low will define to which CPU task the process will be assigned Motion control concepts Section 1 3 1 3 1 3 1 Motion control concepts PTP control Th
221. er ALL The ALL modifier is used with the commands DEL and NEW It indi cates that these commands are applied to all items in the directory structure of the controller N A DEL ALL This deletes all programs of the controller DEL NEW 95 All BASIC commands Section 4 2 4 2 26 AND Type Syntax Description Arguments Example Example See also 4 2 27 AOUT Type Syntax Description Arguments Example See also 96 Mathematical operation expression1 AND expression2 The AND operator performs the logical AND function on the corre sponding bits of the integer parts of two valid BASIC expressions The logical AND function between two bits is defined as follows 0 AND 0 0 0 AND 1 0 1AND0 0 1 AND 1 1 expression1 Any valid BASIC expression expression2 Any valid BASIC expression VR 0 10 AND 2 1 9 The parentheses are evaluated first but only the integer part of the result 18 is used for the AND operation Therefore this expression is equivalent to the following VR 0 10 AND 18 The AND is a bit operator and so the binary action is as follows 01010 AND 10010 00010 Therefore VR 0 will contain the value 2 IF MPOS AXIS 0 gt 0 AND MPOS AXIS 1 gt 0 THEN GOTO cycle1 If measured positions MPOS of both axis 1 and axis 2 are greater than zero program execution continues at label cycle1 Otherwise program execution continues with the next statement N A I O comma
222. er contains the input number to be used as the feedhold input The valid input range is 0 to 31 Values 0 to 15 repre sent physically present inputs of CJ1W MCH 72 I O connector and are common for all axes Values 16 to 31 are mapped directly to driver inputs that are present on the CN1 connector They are unique for each axis It depends on the type of Servo Driver which Servo Driver inputs are mapped into inputs 16 to 31 For more information on Servo Driver I O mapping into the Trajexia I O space refer to section 5 1 4 As default the parameter is set to 1 no input is used for feedhold Note This input is active low If an input number is set and the feedhold input turns set the speed of the move on the axis is changed to the value set in the FHSPEED axis parameter The current move is not cancelled Furthermore bit 7 of the AXISSTATUS parameter is set When the input turns reset again any move in progress when the input was set will return to the programmed speed Note This feature only works on speed controlled moves Moves which are not speed controlled CAMBOX CONNECT and MOVELINK are not affected N A No example AXIS AXISSTATUS FHSPEED UNITS Axis parameter FHSPEED The FHSPEED axis parameter contains the feedhold speed This parameter can be set to a value in user units s and defines at which speed the axis will move when the feedhold input turns on The current move is not cancelled FHSPEED can have any positive
223. er format FO VR memory in 32 bit IEEE floating point format start_address 0 lt start_address lt memory size 1 lt FFFF element_count 1 lt element_count lt memory size start_address The CJ1W MCH 72 responds with these codes Condition Response code Description hex All elements valid 0000 OK var_type invalid 1101 No area type start_address invalid 1103 Address range designation error Number of elements invalid 1104 Address out of range If var_type is 82 or BO and the response code is 0000 the CJU1W MCH72 responds with 01 01 00 00 command_code response_code word_1 word_2 If var_type is C2 or FO and the response code is 0000 the CJU1W MCH72 responds with 01 01 00 00 command_code response_code dword_1 Note The returned words and dwords are in big endian format 66 FINS commands Section 3 4 3 4 2 Write 0102 The FINS Write command has these formats e If var_type is 82 or BO 01 02 a z e 00 command_code var_ start_ fixed total_words word 1 type address e If var_type is C2 or FO 01 02 s e 7 00 command_code var_type start_ fixed total_dwords dword 1 address e If var_type is 30 01 02 30 3 00 command_code var_ start_ bit_ total_bits bit type address num The par
224. erged for profiled continuous path movements by turn ing on the MERGE axis parameter Considering a 2 axis movement the individual speeds are calculated using the equations below Given command MOVE x x gt and the pro filed speed Vp as calculated from the SPEED ACCEL and DECEL parameters from the base axis and the total multi axes distance L SQR x4 xp The individual speed v for axis at any time of the movement is calcu lated as v x Vp L Arguments The command can take up to 32 arguments e distance_i The distance to move for every axis in user units starting with the base axis Example A system works with a unit conversion factor of 1 and has a 1000 line encoder Note that a 1000 line encoder gives 4000 edges turn MOVE 40000 move 10 turns on the motor 191 All BASIC commands Section 4 2 Example Axes 3 4 and 5 must move independently that is without interpolation Each axis moves at its own programmed SPEED ACCEL and DECEL etc setup axis speed and enable BASE 3 SPEED 5000 ACCEL 100000 DECEL 150000 SERVO ON BASE 4 SPEED 5000 ACCEL 150000 DECEL 560000 SERVO ON BASE 5 SPEED 2000 ACCEL 320000 DECEL 352000 SERVO ON WDOG ON MOVE 10 AXIS 5 start moves MOVE 10 AXIS 4 MOVE 10 AXIS 3 WAIT IDLE AXIS 5 wait for moves to finish WAIT IDLE AXIS 4 WAIT IDLE AXIS 3 B D C A E Example An X Y plotter can write text at any position within its working envelope
225. ero deceleration ratio when an axis limit switch or position is reached FE Contains the Following Error FE_LATCH Contains the FE value which caused the axis to put con troller in MOTION_ERROR state FE_LIMIT Contains the maximum allowable Following Error FE_LIMIT_MODE Defines how FE influences MOTION_ERROR state FE_RANGE Contains the Following Error warning range limit FHOLD_IN Contains the input number to be used as the feedhold input 75 Categories Section 4 1 76 Name Description FHSPEED Contains the feedhold speed FS_LIMIT Contains the absolute position of the forward software limit FWD_IN Contains the input number to be used as a forward limit input FWD_JOG Contains the input number to be used as a jog forward input _GAIN Contains the integral control gain INVERT_STEP Switches a hardware Inverter into the stepper output cir cuit JOGSPEED Sets the jog speed LINKAX Contains the axis number of the link axis during any linked move MARK Detects the primary registration event on a registration input MARKB Detects the secondary registration event on a registration input MERGE Is a software switch that can be used to enable or disable the merging of consecutive moves MPOS Is the position of the axis as measured by the encoder MSPEED Represents the change in the measured position in the last servo period MTYPE
226. es Axis 0 shear_axis the advancement of the shear e Axis 1 flying_axis is the flying shear e Axis 2 line_axis transports the material 5 2 9 1 Example ZERO POSITION Initial a material to cut and shear both in the zero position MOVELINK 0 cut_length _acc 2 0 0 line_axis 1 cut_lenght _acc 2 MOVELINK synch_dist I_acc I _dec synch_dist _acc 2 _dec 2 _acc l_dec line_axis Lacc 2 Cut_length i SS Just after synchronization cut operation is done on the fly during synchronization 4 Cut_length _ace 2 synch_dist Just after deceleration l_acc 2 synch_dist _dec 2 Cut_length lt VV i lideo 2 i MOVELINK I_acc 12 synch_dist _dec 2 cut_lenght synch_dist _dec I_acc l_acc 4 _dec 4 line_axis Cut_length l_acc 2 343 Practical examples Section 5 2 344 FLYING SHEAR program Typical example of a flying shear application One axis line axis transport the material Second axis flying axis is the flying shear itself Third axis shear_axis is the shear advancement The distance in synchronization must be long enough to allow the cut at maximum speed The return of the flying shear is done at such a speed that the wait time is zero optimization of the movement Again it is assumed that everithing has been calculated to not exceed the maximum motor speed at maximum line speed
227. es a rotation motion you can prefer a degree of angle or its fraction For more information on the UNITS axis parameter see section 4 2 250 285 How to s Section 5 1 However the user must be aware that not only the UNITS axis parameter matters in the conversion between encoder counts and user defined units Certain Servo Driver parameters and some characteristics of the mechanical system are also important The following sections describe which Servo Driver parameters are important for this conversion We also give examples of how to set those parameters and the UNITS axis parameter taking the characteristics of the mechanical system into account 5 1 3 1 Conversion between encoder counts and user defined units Two very important parameters of the Servo Drivers for conversion of encoder counts into user units are the electronic gear ratio numerator and the electronic gear ratio denominator The table below gives these parameters for the Servo Drivers Servo Driver Numerator Denominator Sigma ll Pn202 Pn203 Sigma V Pn20E Pn210 Junma Pn20E Pn210 G series Pn205 Pn206 Note The remainder of this section uses the parameters of the Sigma ll Servo Driver that is Pn202 and Pn203 If you use a Sigma V a Junma or G series Servo Driver you must use the corresponding parameters If a servo motor with an absolute encoder is used setting parameter Pn205 Multiturn limit is also necessary Trajexia Servo
228. es for the argu ment are 1 The whole TABLE memory content is written to flash memory On power up the RAM TABLE data are replaced by the data saved in flash memory 2 Stop using data stored in flash to replace RAM TABLE data during start up 3 Write a page of TABLE data into flash memory 4 Read a page of flash memory into TABLE data flashpage The index number in range 0 31 of a 16k page 512k in total of the flash memory where the table data is to be stored option 3 or retrieved from option 4 tablepage The index number in range 0 3 of a 16k page it TABLE memory where the table data is to be copied from option 3 or restored to option 4 Note When the FLASHVR 1 is executed the whole range all 64000 slots of the TABLE memory is written to the flash memory and restored from flash memory on start up If for example only 1000 TABLE mem ory in range 0 999 are defined in which case an attempt to read TABLE 1000 would result in Index range error executing FLASHVR 1 would write already defined values of TABLE memory in range 0 999 into the flash memory but also all other TABLE memory slots in range 1000 63999 will be written to the flash memory with undefined values On start up the whole range of TABLE memory 0 63999 would be restored from flash memory so for example an attempt to read previously undefined slot TABLE 1000 would succeed but the value is undefined The simila
229. es for the example are Motion Parameter values Fn001 6 Pn109 0 282 How to s Section 5 1 Example 3 Trace1 Device1 X x Sus Oa alv t I aA o 54 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms Change ML MPOS L ML MSPEED L DigitalInput 2 ML DRIVE_MONITOR With high gain the motor starts to vibrate but the profile is more stable that in MECHATROLINK II Speed mode The parameter values for the example are Motion Parameter values Fn001 8 Pn109 0 283 Section 5 1 J How to s Example 4 Trace1 Device1 X x SW 3 Aea I ua 9 gt 10 9 8 7 6 5 4 3 2 1 4 o 1 1 1 1 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms Display Plot Parameter Change z ML MPOS 7 ML MSPEED DigitalInput 2 a ML DRIVE_MONITOR m The effect of the Feedforward gain is that the Following Error is reduced and the effect is proportional to the acceleration The parameter values for the example are Motion Parameter values Fn001 6 Pn109 95 284 How to s Section 5 1 Example 5 Trace1 Device1 X a 3 Oa alv kt I rA o 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms Display Plot Parameter Value Offset Change v ML MPOS o 7 ML MSPEED o laad Digital
230. esponding Servo Driver is assigned It is necessary to invert the signal because a Normally Closed input is expected Also note that INVERT_IN inverts the selected input in all axes 299 How to s Section 5 1 5 1 5 Origin search The origin search or homing functionality is often seen as a particular sequence of movements of an axis at the start up phase of the machine This sequence is done automatically in most cases without the input from the operator of the machine In general an origin search procedure couples a position to a specific axis It depends on the encoders used absolute or relative on the system used linear or circular and on the mechanical construction of the machine Absolute encoders do not need a movement during the origin search procedure because the exact positions are transferred directly to the system For other encoder types a movement is necessary since there is no knowledge of the exact position within the system Basically this movement is at low speed in some direction until a certain measuring point is reached Such a measuring point can be scanned from both directions to increase the precision At startup the current positions of the axes using incremental encoders are 0 Because these positions do not match with the mechanical 0 of the machine it is necessary to execute the homing sequence If an absolute encoder is used the absolute position is read at startup from the encoder and homing i
231. expression2 The result in radians will be between PI and PI Arguments expression Any valid BASIC expression expression2 Any valid BASIC expression Example gt gt PRINT ATAN2 0 1 0 0000 See also N A 97 All BASIC commands Section 4 2 4 2 31 ATYPE Type Axis parameter Syntax ATYPE value Description The ATYPE axis parameter indicates the axis type for the axis The valid values depend on the port the Servo Driver controlling the axis is connected to See the table below AXIS type ATYPE value Virtual 0 MECHATROLINK II Position 40 MECHATROLINK II Speed 41 MECHATROLINK II Torque 42 Flexible axis Stepper Out 43 Encoder Interface In 44 Flexible axis Encoder Out 45 Flexible axis Absolute EnDat 47 Flexible axis Absolute SSI 48 MECHATROLINK II Inverter 49 The ATYPE parameters are set by the system at start up For axes con trolled by the Servo Drivers connected to the system via MECHATRO LINK Il bus the default ATYPE value is 40 MECHATROLINK II Position for all Servo Driver types For axes controlled by the Servo Drivers connected to the system via the Encoder Interface the default ATYPE value is 44 Encoder Interface In Arguments N A Example ATYPE AXIS 1 45 This command will set axis 1 as Flexible axis encoder output axis See also AXIS 4 2 32 AUTORUN Type Program command Syntax AUTORUN Description The AUTORUN command starts all the p
232. f these status words Word Bit Description Value Function n 1 0 Unit operational 0 Unit not operational 1 Unit operational 1 Watchdog on 0 Axes watchdog off 1 Axes watchdog on 2 7 N A Always 0 8 Program execution Feedback of word n bit 0 enabled 9 Axes watchdog Feedback of word n bit 1 enabled 10 Deceleration active Feedback of word n bit 2 11 Outputs enabled Feedback of word n bit 3 12 15 N A Always 0 n 2 O MECHATROLINK II O No MECHATROLINK II error abies 1 Error on MECHATROLINK II bus 1 Axes error 0 No axes error 1 Axes error See control and status words n 7 and n 8 2 BASIC error 0 No BASIC error 1 BASIC error for a running process 3 Battery error 0 Battery OK 1 Battery low or empty 4 15 N A Always 0 Status words n 3 n 13 return the status of the axes and processes of the CJ1W MCH72 Word Bit Description n 3 0 15 Servo On flags for axes 0 15 n 4 0 15 Servo On flags for axes 16 31 n 5 0 15 Axis Enable flags for axes 0 15 n 6 0 15 Axis Enable flags for axes 16 31 n 7 0 15 Axis Error flags for axes 0 15 n 8 0 15 Axis Error flags for axes 16 31 n 9 0 15 Axis In Commissioning Mode flags for axes 0 15 n 10 0 15 Axis In Commissioning Mode flags for axes 16 31 n 11 0 13 Process Running flags for processes 1 14 14 15 Always 0 63 Data Section 3 3 Word Bit Description
233. ffer of the required axes if they are available When this second transfer has been completed PMOVE is cleared to 0 until another move is executed in the task Each task has its own PMOVE parameter Use the PROC modifier to access the parameter for a certain task Without PROC the current task will be assumed Arguments N A Example No example See also NTYPE PROC 216 All BASIC commands Section 4 2 4 2 187 POS_ OFFSET 4 2 188 POWER_UP Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also System parameter POS_OFFSET value For Piezo Operation This keyword allows a positive offset to be applied to the output S_REF signal from the servo loop An offset of 327 will represent an offset of 0 1 volts for axis with servo output generated by a 16 bit S_REF It is suggested that as offset of 65 to 70 of the value required to make the stage move in an open loop situation is used N A No example N A System parameter POWER_UP This parameter is used to determine whether or not programs should be read from flash EPROM on power up or software reset EX Two values are possible 0 Use the programs in battery backed RAM 1 Copy programs from the controllers flash EPROM into RAM Programs are individually selected to be run at power up with the RUNTYPE command Notes POWER_UP is always an immediate command and therefore can not be includ
234. fied as absolute position MOVECIRC Interpolates 2 orthogonal axes in a circular arc MOVELINK Creates a linear move on the base axis linked via a soft ware gearbox to the measured position of a link axis MOVEMODIFY Changes the absolute end position of the current single axis linear move MOVE or MOVEABS RAPIDSTOP Cancels the current move on all axes REGIST Captures an axis position when a registration input or the Z mark on the encoder is detected REVERSE Moves an axis continuously in reverse at the speed set in the SPEED parameter STEP_RATIO Sets the ratio for the axis stepper output 4 1 2 Axis parameters Name Description ACCEL Contains the axis acceleration rate ADDAX_AXIS Contains the number of the axis to which the base axis is currently linked to by ADDAX ATYPE Contains the axis type AXIS_ENABLE Enables and disables particular axis independently of other axis 74 Categories Section 4 1 Name Description AXISSTATUS Contains the axis status BACKLASH_DIST Defines the amount of backlash compensation CLOSE_WIN Defines the end of the window in which a registration mark is expected CLUTCH_RATE Defines the change in connection ratio when using the CONNECT command CREEP Contains the creep speed D_GAIN Contains the derivative control gain DATUMN_IN Contains the input number t
235. gh REV_IN parameters for both axes have the same value the real inputs used are not the same For axis 0 the input on CN1 44 of the Sigma ll driver assigned to axis 0 is used but for axis 3 the input on CN1 41 of the Junma driver assigned to axis 3 is used Therefore we say that those inputs are accessed per axis they are not unique for the whole controller In general these two inputs have a different status at the same time Also note that neither of these two inputs can be accessed using the command IN For example the command IN 22 returns the status of controller software input 22 unique for all axes which has a different status than Servo Driver inputs mapped to the same number However the command INVERT_IN 22 inverts the status of input 22 read by the controller It affects not only the unique software input 22 which is accessible with the IN command but all axis specific inputs 22 which in this example are the EXT1 inputs of the connected Servo Drivers If a forward limit reverse limit and origin input signal are used for an axis it is strongly recommended to use the following settings for the axis BASE axis_number DAT_IN 18 DEC input in the corresponding Servo Driver is assigned FWD_IN 16 INVERT_IN 16 ON P_OT input in the corresponding Servo Driver is assigned It is necessary to invert the signal because a Normally Closed input is expected REV_IN 17 INVERT_IN 17 ON N_OT input in the corr
236. gnal If you read these outputs they return their current status Use the command OP to write and read these outputs e Digital outputs 16 255 These outputs can be mapped to the PLC memory If they are not mapped they are software outputs only They do not physically exist on the CJ1W MCH72 but you can write them and read their correct status You use these outputs mostly in BASIC programs to accomplish some control sequences that require outputs which do not need to be physical Use the command OP to write and read these outputs All outputs are unique to the controller They are not accessed per axis The digital input range has three parts e Digital inputs 0 15 These inputs physically exist on the CJ1W MCH72 You can physically access them on the 28 pin screwless connector on the front side of the CJ1W MCH 72 These inputs are active ON when a 24 VDC signal is applied to them When you read them they return their current status Use the command IN to read these inputs e Digital inputs 16 255 These inputs can be mapped to the PLC memory If they are not mapped they are software inputs only They do not physically exist on the CJ1W MCH72 but you can read them You use them mostly in BASIC programs to accomplish some control sequences that require inputs which do not need to be physical Use the command IN to read these inputs All inputs are unique to the controller They are not accessed per axis 5 1 4 1 MECHATROLINK II Ser
237. guments Example Example Example See also Program command RUN program_name task_number The RUN command executes the program in the CJ1W MCH72 as specified with program_name RUN without the program name speci fied will run the current selected program The program name can also be specified without quotes To enable the commands to be executed the Enable Execution bit con trol word n bit 0 must be set The task number specifies the task number on which the program will be run If the task number is omitted the program will run on the highest available task RUN can be included in a program to run another pro gram Note Execution continues until one of the following occurs e There are no more lines to execute e HALT is typed at the command line to stop all programs e STOP is typed at the command line to stop a single program The STOP command in the program is encountered A run time error is encountered The Enable Execution bit control word n bit 0 is reset program_name Any valid program name e task_number Any valid task number Range 1 14 gt gt SELECT PROGRAM PROGRAM selected gt gt RUN This example executes the currently selected program RUN sausage This example executes the program named sausage RUN sausage 3 This example executes the program named sausage on task 3 HALT STOP 239 All BASIC commands Section 4 2 4 2 214 RUN_ERROR
238. guments N A Example No example See also AXIS DPOS MPOS REP_OPTION UNITS 233 All BASIC commands Section 4 2 4 2 205 REP_OPTION 234 Type Axis parameter Syntax REP_OPTION Description The REP_OPTION parameter controls the application of the REP_DIST axis parameter and the repeat option of the CAMBOX and MOVELINK Axis commands The default value is 0 See the table below Bit Description The repeated distance range is controlled by bit 0 of the REP_OPTION param eter If REP_OPTION bit 0 is off the range of the demanded and measured posi tions will be between REP_DIST and REP_DIST If REP_OPTION bit 0 is on the range of the demanded and measured posi tions will be between 0 and REP_DIST The automatic repeat option of the CAMBOX and MOVELINK commands are controlled by bit 1 of the REP_OPTION parameter The bit is set on to request the system software to end the automatic repeat option When the system soft ware has set the option off it automatically clears bit 1 of REP_OPTION Arguments N A Example No example See also AXIS CAMBOX MOVELINK REP_DIST All BASIC commands Section 4 2 4 2 206 REPEAT UNTIL Type Program control command Syntax REPEAT commands UNTIL condition Description The REPEAT UNTIL structure allows the program segment between the REPEAT and the UNTIL statement to be repeated a number of times until the condition becomes TRUE No
239. have 17 Pn202 _ 2 encoder_counts 12 24 motor_revolution 1 pulley_revolution _ Pn203 1 motor_revolution 1 machine_revolution 3600 tenth of degree 7 27 12 24 encoder_counts 3600 tenth of degree Therefore Pn202 47 1224 UNITS Pn203 360000 One solution is UNITS 2 131072 Pn202 1224 Pn203 360000 Because the greatest common divisor of Pn202 and Pn203 must be 1 we get Pn202 17 and Pn203 500 Therefore the parameters are UNITS 131072 Pn202 17 Pn203 500 Pn205 16 REP_DIST 3600 REP_OPTION 1 To calculate the multiturn limit setting Pn205 we have How to s Section 5 1 5 1 3 7 Example 5 m motor_revolution n machine_cycle n 12 24 motor_revolution The evident solution is n 100 and m 1224 Or when we simplify the factors n 25 and m 306 Therefore Pn205 m 1 305 With these settings executing MOVE 180 moves the moving part 180 tenths of an angle degree or 18 angle degrees in forward direction w 17 bit absolute 1 10 Gear encoder Pulley 12 teeth 50mm between teeth Main Wheel 144 stations 50 mm between stations The mechanical system uses a servo motor with a 17 bit absolute encoder The mechanical gear ratio of the gearbox is 1 10 The pulley has got 12 teeth and each two are 50 mm apart One complete turn of the pulley equals 144 stations on the main wheel The distance between two stations is 50 mm The mechanical
240. he number of additional digital O connected to the PLC and value is the value to be output either 0 or 1 Command OP binary_pattern sets the binary pattern to the 24 out puts according to the value set by binary_pattern e Function OP without arguments returns the status of the first 24 outputs This allows multiple outputs to be set without corrupting oth ers which are not to be changed Note The first 8 outputs 0 to 7 do not physically exist on the CJ1W MCH 72 They can not be written to and will always return 0 output_number The number of the output to be set The range for this parameter depends on the number of additional digital I O connected to the PLC If there are no digital I O connected the range for this parame ter is 8 31 e value The value to be output either OFF 0 or ON 1 All non 0 values are considered as ON binary_pattern The integer equivalent of the binary pattern is to be output 211 All BASIC commands Section 4 2 4 2 178 OPEN_WIN 212 Example Example Example Example See also Type Syntax Description Arguments Example See also OP 12 1 OP 12 ON These two lines are equivalent OP 18 256 This line sets the bit pattern 10010 on the first 5 physical outputs out puts 13 to 17 would be cleared The bit pattern is shifted 8 bits by multi plying by 256 to set the first available outputs as outputs 0 to 7 do not exist VR 0 OP VR 0 VR
241. hen you check MTYPE 0 it is 0 because the movement HAS NOT STARTED YET not because it has finished AXIS WAIT LOADED WAIT IDLE is a command specifically designed to wait until the previous movement has been finished so it handles the delay from when the previous command is exe cuted in the program until the command is correctly loaded in the motion buffer All BASIC commands Section 4 2 4 2 261 WAIT LOADED 4 2 262 WAIT UNTIL Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example Example See also System command WAIT LOADED The WAIT LOADED command suspends program execution until the base axis has no moves buffered ahead other than the currently execut ing move The command can only be used in a program This is useful for activating events at the beginning of a move or at the end when multiple moves are buffered together WAIT LOADED works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis N A Switch output 8 ON at start of MOVE 500 and OFF at end MOVE 800 MOVE 500 WAIT LOADED OP 8 ON MOVE 400 WAIT LOADED OP 8 OFF AXIS WAIT IDLE System command WAIT UNTIL condition The WAIT UNTIL command repeatedly evaluates the condition until it is TRUE After this program execution will continue The command can only be used in a program condition Any valid BASIC logical expression
242. hird axis in the BASE array axis in user units mode 0 Interpolate the third axis with the main two axis when calculating path speed true helical path 1 Interpolate only the first two axes for path speed but move the third axis in coordination with the other 2 axes circular path with fol lowing third axis 187 All BASIC commands Section 4 2 Example The command sequence follows a rounded rectangle path with axis 1 and 2 Axis 3 is the tool rotation so that the tool is always perpendicular to the product The UNITS for axis 3 are set such that the axis is cali brated in degrees REP_DIST AXIS 3 360 REP_OPTION AXIS 3 ON all 3 axes must be homed before starting MERGE ON MOVEABS 360 AXIS 3 point axis 3 in correct starting direction WAIT IDLE AXIS 3 MOVE 0 12 MHELICAL 3 3 3 0 1 90 MOVE 16 0 MHELICAL 3 3 0 3 1 90 MOVE 0 6 MHELICAL 3 3 3 0 1 90 MOVE 2 0 MHELICAL 3 3 0 3 1 90 188 All BASIC commands Section 4 2 Example A PVC cutter uses 2 axes similar to a X Y plotter The third axis is used to control the cutting angle of the knife To keep the resultant cutting speed for the x and y axis equal when cutting curves mode 1 is applied to the helical command BASE 0 1 2 MERGE ON merge moves into one continuous movement MOVE 50 0 MHELICAL 0 6 0 3 1 180 1 MOVE 22 0 WAIT IDLE MOVE 90 AXIS 2 rotate the knife after stopping at corner WAIT IDLE AXIS 2 MO
243. his problem set the link option to 4 to make MOVELINK repeat con tinuously MOVELINK 4000 3072 0 0 linkaxis 4 NON SERVO SPINDLE MOTOR E 202 All BASIC commands Section 4 2 Example See also 4 2 163 MOVEMODIFY Type Syntax Description Arguments In this example on coil winding the unit conversion factors UNITS are set so that the payout movements are in mm and the spindle position is measured in revolutions The payout eye therefore moves 50 mm over 25 revolutions of the spindle with the command MOVELINK 50 25 0 0 linkax To accelerate over the first spindle revo lution and decelerate over the final 3 use the command MOVELINK 50 25 1 3 linkax OP motor ON Switch spindle motor on FOR layer 1 TO 10 MOVELINK 50 25 0 0 1 MOVELINK 50 25 0 0 1 NEXT layer WAIT IDLE OP motor OFF AXIS UNITS REP_OPTION Axis command MOVEMODIFY position MM position The MOVEMODIFY command changes the absolute end position of the current single axis linear move MOVE MOVEABS If there is no cur rent move or the current move is not a linear move then MOVEMODIFY is treated as a MOVEABS command The ENDMOVE parameter will contain the position of the end of the current move in user units MOVEMODIFY works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis position The absolute position to be set as the new end of move SHEET GLASS SENSOR 203 A
244. hysical move It is only possible with an axis with an absolute encoder in a control loop Registration also called latch or print registration is about real time storing of the position of an axis when an external input is activated The information that is registered i e stored is processed later not in real time by the application program Registration is different from processing an interrupt input or signal With registration no event is generated when the registration input is activated Also the normal execution of the application program is not disturbed or 305 How to s Section 5 1 interrupted Only the position of an axis is stored This information can be used like other parameters or values in a program The registration information is available to a program immediately after the registration The advantage of registration is that it is done very quickly Therefore the axis position that is stored is very accurate To achieve this speed and accuracy registration is implemented with hardware and the registration input must be on the same board as the encoder input that provides information on the axis position Capturing and storing the axis position is done in real time by the hardware Processing this information is done not in real time by the application program 5 1 6 1 The REGIST axis command In Trajexia you do a registration with the REGIST axis command This command takes one argument This
245. il the datum switch is reset The demand position is then reset to O and the meas ured position corrected so as to maintain the Following Error The axis moves at the demand speed in reverse until the datum switch is reached The axis then moves forward at creep speed until the datum switch is reset The demand position is then reset to O and the meas ured position corrected so as to maintain the Following Error The axis moves at demand speed forward until the datum switch is reached The axis then reverses at creep speed until the datum switch is reset The axis continues in reverse at creep speed until the Z marker of the encoder is encountered The demand position is then reset to 0 and the measured position corrected so as to maintain the Following Error The axis moves at demand speed reverse until the datum switch is reached The axis then moves forward at creep speed until the datum switch is reset The axis continues forward at creep speed until the Z marker of the encoder is encountered The demand position is then reset to 0 and the measured position corrected so as to maintain the Following Error All BASIC commands Section 4 2 Example Example A production line must stop if something blocks the product belt which causes a motion error The obstacle must be removed and a reset but ton must be pressed to restart the line FORWARD start production line WHILE IN 2 ON IF MOTION_ERROR 0 THEN
246. ill be stepped If STEPLINE is executed without program name in a program this program will be stepped If the program is specified then all occurrences of this program will be stepped A new task will be started when there is no copy of the pro gram running If the task is specified as well then only the copy of the program running on the specified task will be stepped If there is no copy of the program running on the specified task then one will be started on it Arguments program_name The name of the program to be stepped task_number The number of the task with the program to be stepped Range 1 14 Example gt gt STEPLINE conveyor Example gt gt STEPLINE maths 2 See also RUN SELECT STOP TROFF TRON 4 2 233 STOP Type Program command Syntax STOP program_name task_number Description The STOP command will halt execution of the program specified with program_name If the program name is omitted then the currently selected program will be halted The program name can also be speci fied without quotes In case of multiple executions of a single program on different tasks the task_number can be used to specify the specific task to be stopped 251 All BASIC commands Section 4 2 Arguments program_name The name of the program to be stopped task_number The number of the task with the program to be stopped Range 1 14 Example gt gt STOP progname Example The lines from label on will
247. ill not run N A No example N A All BASIC commands Section 4 2 4 2 47 CHR 4 2 48 CLEAR 4 2 49 CLEAR_BIT Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also I O command CHR x The CHR command is used to send individual ASCII characters which are referred to by number PRINT CHR x is equivalent to PUT x in some other versions of BASIC e x A BASIC expression gt gt PRINT CHR 65 A N A System command CLEAR The CLEAR command resets all global VR variables to 0 and sets local variables on the process on which the command is run to 0 When you use it in a program it resets all local variables defined to 0 N A gt gt VR 0 22 VR 20 44 3158 VR 300 12 gt gt PRINT VR 0 VR 20 VR 300 22 0000 44 3158 12 0000 gt gt CLEAR gt gt PRINT VR 0 VR 20 VR 300 0 0000 0 0000 0 0000 e RESET VR System command CLEAR_BIT bit_number vr_number The CLEAR_BIT command resets the specified bit in the specified VR variable Other bits in the variable keep their values bit_number The number of the bit to be reset Range 0 23 vr_number The number of the VR variable for which the bit will be reset Range 0 1023 gt gt PRINT VR 17 112 0000 gt gt CLEAR_BIT 5 17 gt gt PRINT VR 17 80 0000 READ_BIT SET_BIT VR 119
248. ils on ERROR_LINE BASIC commands BASIC program cannot be run due to compilation or syntax error Use Trajexia Studio Software to edit and compile BASIC programs Editor of the software will automatically highlight locations of possible compile errors and provide all necessary debugging information while compiling the program Problem Solution Not all physically present axes are initialised Some of them are virtual ATYPE 0 or have illegal axis number 1 assigned Wrong setting of the SERVO_PERIOD system parameter for a given number of MECHATROLINK II stations and axes Correct the SERVO_PERIOD value and restart the unit see section 4 2 222 for more information on valid SERVO_PERIOD value depending on number of connected stations Present axis has illegal axis number 1 assigned to it Encoder Interface axis is in error Confliction axis number for MECHATROLINK II axis and Encoder Interface axis This can happen if a new MECHATROLINK II axis is added to the system and the MECHATROLINK II bus is reinitialized using BASIC command MECHATROLINK 0 0 but the unit is not restarted After adding new MECHATROLINK II axis to the system restart the unit Troubleshooting Errors Section 6 3 Problem Solution Axis error due to a motion error no error signalization on servo drives Using ERROR_AXIS and MOTION_ERROR system parameters determine axis or axes which ca
249. in a step change Therefore CLUTCH_RATE is used together with an initial and final connect ratio of zero to get the required motion FORWARD AXIS 0 BASE 1 CONNECT 0 0 set intitial ratio to zero CLUTCH_RATE 0 5 set clutch rate CONNECT 2 0 apply the required connect ratio WA 8000 CONNECT 0 0 apply zero ratio to disconnect WA 4000 wait for deceleration to complete CANCEL cancel connect AXIS CANCEL CLUTCH_RATE CONNECT RAPIDSTOP System command CONSTANT name value Declares the name as a constant for use both within the program con taining the CONSTANT definition and all other programs in the Trajexia Studio solution Note The program containing the CONSTANT definition must be run before the name is used in other programs In addition only that pro gram should be running at the time the CONSTANT is executed other wise the program error will appear and the program will stop when trying to execute this command For fast startup the program should also be the only process running at power up When the CONSTANT is declared the declaration remains active until the next CJ1W MCH 72 reset by switching the power off and back on or by executing the EX command A maximum of 128 CONSTANTS can be declared 123 All BASIC commands Section 4 2 Arguments name Any user defined name containing lower case alpha numerical or underscore characters e value The value assigned to name Example CONSTANT
250. ing to address 0 performs an encoder reset function For more infor mation see EnDat absolute encoder interface specification In order to successfully write an encoder parameter with this command the ENCODER_CONTROL parameter must be set to 1 encoder parameter read write mode e address Specifies the EnDat MRS field to write to e value Any valid BASIC expression No example AXIS ENCODER ENCODER_BITS ENCODER_CONTROL See IF THEN ELSE ENDIF 4 2 94 ENDMOVE Type Syntax Description Arguments Example See also 150 Axis parameter ENDMOVE The ENDMOVE axis parameter holds the position of the end of the cur rent move in user units If the SERVO axis parameter is ON the ENDMOVE parameter can be written to produce a step change in the demand position DPOS Note As the measured position is not changed initially the Following Error limit FE_LIMIT should be considered when writing to ENDMOVE to produce a step change If the change of demanded position is too big the limit will be exceeded N A No example AXIS DPOS FE_LIMIT UNITS All BASIC commands Section 4 2 4 2 95 EPROM 4 2 96 ERROR_AXIS 4 2 97 ERROR_LINE Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also Program command EPROM The EPROM command stores the BASIC programs in the CJ1W MCH
251. input 2 o a ML DRIVE_MONITOR 0 Pm With the feedforward set to 100 the Following Error is very small and proportional to the acceleration The optimum value of 100 correction is the maximum value that can be set The parameter value of Pn109 is easier to set than the parameter value of VFF_GAIN The parameter values for the example are Motion Parameter values Fn001 6 Pn109 100 5 1 3 Setting the UNITS axis parameter and gear ratio In controlling the mechanical axis with the CJ1W MCH 72 a Servo Driver and a servo motor the only measurement units that the hardware understands are encoder counts All commands to the driver to move an axis are expressed in encoder counts All feedback information about axis positions is also expressed in encoder counts When writing programs in BASIC to achieve movements or a sequence of movements a user can prefer to work with user defined units such as millimeter centimeter meter degree of angle product rotation stations The UNITS axis parameter contains the conversion factor between encoder counts and user defined units All axis parameters related to motion and arguments of axis commands that determine the amount of motion are expressed in these user units This parameter enables the user to define the most convenient units to work with For example for a moving part that makes a linear motion you can prefer mm or fraction of mm For a moving part that mak
252. inputs with the driver parameter Pn511 For example Pn511 654x sets the connections of EXT1 to CN1 pin44 EXT2 to CN1 pin45 and EXT3 to CN1 pin46 of the Sigma II Servo Driver The table below shows how to configure the external inputs individually Note To configure EXT1 EXT2 and EXT3 registration signals parame ter numbers Pn511 1 Pn511 2 and Pn511 3 are used respectively Pn511 0 is not used Refer to the user manual of the Servo Driver for more details Registra tion signal Parameter number Parameter value Description EXT 1 Pn511 1 O0to3 Not used Input from CN1 pin44 Rising edge Input from CN1 pin45 Rising edge Input from CN1 pin46 Rising edge Signal always OFF Signal always ON Not used Input from CN1 pin44 Falling edge Input from CN1 pin45 Falling edge 4 5 6 7 8 9 D E F Input from CN1 pin46 Falling edge EXT 2 Pn511 2 As for EXT 1 As for EXT 1 EXT 3 Pn511 3 As for EXT 1 As for EXT 1 227 All BASIC commands Section 4 2 Note The mapping of the registration signals in the table above applies to the Sigma ll Servo Driver For the mapping of the registration signals of the Sigma V Junma and G Series Servo Drivers refer to section 5 1 6 Arguments Inclusive windowing lets the registration to occur only within a specified window of axis positions With this windowing funct
253. ion registration events are ignored if the axis measured position is not greater than the OPEN_WIN axis parameter and less than the CLOSE_WIN parameter Exclusive windowing allows the registration to occur only outside of the specified window of axis positions With this windowing function the registration events are ignored if the axis measured position is not less than the OPEN_WIN axis parameter and greater than the CLOSE_WIN parameter mode The mode parameter specifies the registration input and event for use and the signal edge the registration event occurs The mode parameter also specifies the use of the windowing function and filter ing The mode parameter differs between MECHATROLINK II and Encoder Interface The function of each bit in the mode parameter is explained in the tables below Bit Function MECHATROLINK Il 1 0 Primary registration occurs for 00 Z mark of the encoder e 01 EXT1 input CN1 pin programmed with Pn511 1 e 10 EXT2 input CN1 pin programmed with Pn511 2 e 11 EXT3 input CN1 pin programmed with Pn511 3 2 7 Not used 9 8 Windowing function choice e 00 No windowing e 01 Inclusive windowing e 10 Inclusive windowing e 11 Exclusive windowing 10 Not used Bit Function Encoder Interface 1 0 Primary registration occurs for e 00 Z mark of the encoder e 01 REG 0 input e 10 REG 1 input Set this bit to use primary registrati
254. ion error can be cleared executing a DATUM 0 command or resetting the controller with an EX command Arguments N A Example INTEGER_READ MOTION_ERROR VR 100 VR 101 This example will copy the first 16 bits of MOTION_ERROR to VR 100 and the rest to VR 101 See also AXIS AXISSTATUS DATUM ERROR_AXIS ERRORMASK WDOG INTEGER_READ 190 All BASIC commands Section 4 2 4 2 159 MOVE Type Axis command Syntax MOVE distance_1 distance_2 distance_3 distance_4 MO distance_1 distance_2 distance_3 distance_4 Description The MOVE command moves with one or more axes at the demand speed and acceleration and deceleration to a position specified as increment from the current position In multi axis moves the movement is interpolated and the speed acceleration and deceleration are taken from the base axis The specified distances are scaled using the unit conversion factor in the UNITS axis parameter If for example an axis has 4 000 encoder edges mm then the number of units for that axis would be set to 4000 and MOVE 12 5 would move 12 5 mm MOVE works on the default basis axis group set with BASE unless AXIS is used to specify a temporary base axis Argument distance_1 is applied to the base axis distance_2 is applied to the next axis etc By changing the axis between individual MOVE commands uninterpo lated unsynchronised multi axis motion can be achieved Incremental moves can be m
255. ioning each axis is moved independently of the other axis The CJ1W MCH 72 supports the following operations e Relative move e Absolute move e Continuous move forward e Continuous move reverse Motion control concepts Section 1 3 1 3 1 1 Relative and absolute moves B MOVEABS 100 AXIS 0 MOVEABS 50 AXIS 1 To move a single axis either the command MOVE for a relative move or the command MOVEABS for an absolute move is used Each axis has its own move characteristics which are defined by the axis parameters Suppose a control program is executed to move from the origin to an axis no 0 A coordinate of 100 and axis no 1 B coordinate of 50 If the speed parameter is set to be the same for both axes and the acceleration and deceleration rate are set sufficiently high the movements for axis 0 and axis 1 will be as shown in the figure At start both the axis 0 and axis 1 moves to a coordinate of 50 over the same duration of time At this point axis 1 stops and axis 0 continues to move to a coordinate of 100 The move of a certain axis is determined by the axis parameters Some relevant parameters are Parameter Description UNITS Unit conversion factor ACCEL Acceleration rate of an axis in units s DECEL Deceleration rate of an axis in units s SPEED Demand speed of an axis in units s Defining moves ACCEL 10 DECEL 10 SPEED 10 MOVE 40 Motion control concepts Section 1 3
256. ions Program commands Program control commands Slot parameters and modifiers System commands and functions System parameters Task commands and parameters The lists are quick reference guides only A complete description of the commands is given in alphabetical order in the next section 4 1 1 Axis commands Name Description ACC Changes the ACCEL and DECEL at the same time ADD_DAC Sum to the S_REF value of one axis to the analogue out put of the base axis ADDAX Sets a link to a superimposed axis All demand position movements for the superimposed axis will be added to any moves that are currently being executed B_SPLINE Expands the profile stored in TABLE memory using the B Spline mathematical function BACKLASH Allows the backlash compensation to be loaded BASE Used to set the base axis to which the commands and parameters are applied CAM Moves an axis according to values of a movement profile stored in the TABLE variable array CAMBOX Moves an axis according to values of a movement profile stored in the TABLE variable array The motion is linked to the measured motion of another axis to form a continu ously variable software gearbox CANCEL Cancels the move on an axis CONNECT Connects the demand position of an axis to the measured movements of the axis specified for driving_axis to pro duce an electronic gearbox DATUM Perfo
257. istration in the Sigma ll Servo Driver with one difference There are three physical inputs but only one can be activated at a time The physical input is associated to logical latch EXT1 EXT2 and EXT3 but the corresponding locations on the CN1 connector are fixed so no settings of Servo parameters are necessary Only the rising signal edge can be used for registration In contrast with all other types Servo Drivers the G series Servo Drivers do not support executing registration while it is in base block state The registration can be executed on G Series Servo Drivers only when WDOG is set to ON If registration is required when the G Series Servo Driver is in base block state this workaround can be used put the G Series Servo Driver in torque mode with zero torque by executing e ATYPE 42 e T_REF 0 and then perform registration 5 1 6 5 Registration in the Encoder Interface The CJ1W MCH72 has three physical registration inputs two registration inputs see section 2 1 1 and encoder Z mark input see section 2 2 2 and two latch circuits which can be used independently Therefore two independent registration inputs can be used at the same time For more information on how to use both registration inputs of the CJ1W MCH72 at the same time refer to sections 4 2 152 4 2 153 4 2 198 4 2 199 and 4 2 200 The delay in the capture is 0 5 us Because the encoder position is read continuously from the line drive encoder input interpola
258. it Axis parameters like speed acceleration deceleration and the Axis commands are specified in these user units Note The UNITS parameter can be any non zero value but it is recom mended to design systems with an integer number of encoder pulses per user unit Changing UNITS will affect all axis parameters which are dependent on UNITS in order to keep the same dynamics for the sys tem N A A leads crew arrangement has a 5mm pitch and a 1 000 pulse rev encoder The units must be set to allow moves to be specified in mm The 1 000 pulses rev will generate 1 000 x 4 4 000 edges rev One rev is equal to 5mm Therefore there are 4 000 5 800 edges mm UNITS is thus set as following gt gt UNITS 1000 4 5 AXIS ENCODER_RATIO See REPEAT UNTIL All BASIC commands Section 4 2 4 2 253 VERIFY Type Axis parameter Syntax VERIFY Description The verify axis parameter is used to select different modes of operation on a stepper encoder axis e VERIFY OFF Encoder count circuit is connected to the STEP and DIRECTION hardware signals so that these are counted as if they were encoder signals This is particularly useful for registration as the registration circuit can therefore function on a stepper axis e VERIFY ON Encoder circuit is connected to external A B Z signal Note On the Flexible Axis when VERIFY OFF the encoder counting circuit is configured to accept STEP and DIRECTION signals hard wired to the encoder A
259. ite 1 write and enter 2 write and config e value The new value that is written All BASIC commands Section 4 2 Example gt gt INVERTER_WRITE 1 23 2 3500 gt gt INVERTER_READ 1 23 2 100 gt gt PRINT VR 100 3500 0000 See also N A Note If you have to transfer many parameters at the same time the most efficient way is to 4 2 145 JOGSPEED 4 2 146 LAST_AXIS 4 2 147 LINKAX use MODE 0 for all but the last parameter and MODE 1 for the last parameter MODE 0 is executed faster than MODE 1 Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also Type Syntax Description Arguments Axis parameter JOGSPEED The JOGSPEED parameter sets the jog speed in user units for an axis A jog will be performed when a jog input for an axis has been declared and that input is low A forward jog input and a reverse jog input are available for each axis respectively set by FWD_JOG and REV_JOG The speed of the jog can be controlled with the FAST_JOG input N A No example AXIS AXIS FAST_JOG FWD_JOG REV_JOG UNITS System parameter read only LAST_AXIS The LAST_AXIS parameter contains the number of the last axis proc essed by the system Most systems do not use all the available axes It would therefore be a waste of time to task the idle moves on all axes that are not in use To avoid this to some extent the CU1W MCH 72 will task moves on the
260. ition value it produces a value for MPOS and a position error that is used to close the control loop The connections for SSI are Pin Signal Clock Clock 5V Data Data o CO N OD WwW N OV The CJ1W MCH72 encoder interface does not have a termination inside In case of long distances or disturbed communication add an external termination to the inter face The table below and the figure give an example of how to connect the Stegmann ATM 60 A encoder to the CJ1W MCH72 Encoder CJ1W MCH72 encoder inter face Pin Signal Wire color Pin Signal 2 Data White 7 Data 10 Data Brown 8 Data 3 Clock Yellow 2 Clock 11 Clock Lilac 3 Clock 47 Wiring 2 2 4 2 EnDat 48 Note Section 2 2 Encoder CJ1W MCH 72 encoder inter face Pin Signal Wire color Pin Signal 1 GND Blue 9 0 V Encoder ground 8 Us Red See footnote1 1 Use an external power supply CJ1W MCH72 24 VDC Power Supply Stegmann ATM 60 A connection You can configure the CJ1W MCH72 to interface directly to EnDat absolute encoders EnDat absolute encoders respond on a dedicated Clock and Data 1 MHz RS485 serial interface when their position is requested by the controller When you set the encoder to the relevant encoder mode the axis transmits an information request to the encoder on a fixed 250 us cycle The connections for EnDat are
261. its at which the secondary registration event occurred N A No example AXIS MARKB REGIST All BASIC commands Section 4 2 4 2 200 REGIST Type Syntax Description Axis command REGIST mode The REGIST command sets up the registration operation The com mand captures an axis position when a registration signal is detected With an Encoder Interface the capture is done by the hardware so soft ware delays do not affect the accuracy of the position that is captured With a MECHATROLINK II axis the capture is done by the Servo Driver With an Encoder Interface a REGIST command can capture two regis tration positions using separate registration inputs When a primary reg istration event has occurred the MARK axis parameter is set to ON and the position is stored in the REG_POS axis parameter For the second ary registration event the MARKB axis parameter is set to ON and the position is stored in the REG_POSB axis parameter MARKB and REG_POSB are applicable only to axes with ATYPE values 43 44 and 45 MECHATROLINK II registration can be performed using encoder Z marker or external registration inputs EXT1 EXT2 or EXT3 on a Servo Driver Unlike Flexible axis axes only one registration position can be captured When a registration event has occurred the MARK axis parameter is set to ON and the position is stored in the REG_POS axis parameter The registration signals EXT1 EXT2 and EXT3 must be allocated to CN1
262. l be executed at the beginning of each servo period will contain the following elements 1 Oa WNDY N Transfer any moves from BASIC process buffers to motion buffers see section 1 9 Read digital inputs Load moves See note Calculate speed profile See note Calculate axis positions See note Execute position servo For axis O this also includes the Servo Driver communications See note Update outputs Note Each of these items will be performed for each axis in turn before moving on to the next item Profile generator Basic Program Profile generator Demand Position The profile generator is the algorithm that calculates the demanded position for each axis The calculation is made every motion sequence The profile is generated according to the motion instructions from the BASIC programs 1 8 2 Position loop The position loop is the algorithm that makes sure that there is a minimal deviation between the measured position MPOS and the demand position DPOS of the same axis 1 8 3 Axis sequence 24 The motion controller applies motion commands to an axis array that is defined with the BASE command If the motion command concerns one axis it is applied to the first axis in the BASE array If the motion command concerns more than one axis and makes an orthogonal move the axes are taken from the array in the order defined by the BASE command For Motion sequence and axes Section 1 8
263. l process is as follows 1 REGIST window is executed in the program 2 MARK 0 and the latch is triggered 3 The position is captured and transmitted to the Trajexia processor 4 ls the captured position inside the inclusive window or outside the exclusive window e If yes MARK 1 and REG_POS is updated e If not return to point 2 trigger the latch again transparently to the user 309 How to s Section 5 1 310 Position CLOSE_WIN OPEN_WIN 1 i l No Registration the position H The trigger is active REGIST 0 _is outside the window i y 1 The trigger is active i i REGIST 0 1 1 i MARK 1 MARK 0 MARK 0 MARK 1 MARK 0 1 1 t 1 REG_POS xxx REG_POS XXX REG_POS Pos1 f 4 i l i Registration Input i The figure shows the sequence of execution of the above commands and the occurrence of registration events when you use inclusive windowing There are delays between these events e Trajexia receives the latch e Trajexia decides to trigger the latch again e The latch is triggered Because of these delays there is an uncertainty in the edges of the window when marks may be detected near the edges This is more notable for axes connected to the system via the MECHATROLINK II bus due to bus delays To compensate for these delays a user must set the window margins large enough How to s Section 5 1 5 1 6 8 Example Correcting the position of an axis Mandrel f
264. l speed which is acceler ated and decelerated as the movement is profiled N A Wait until at command speed MOVE 100 WAIT UNTIL SPEED VP_SPEED AXIS MSPEED UNITS System command VR address The VR command reads or writes the value of a global VR variable These VR variables hold real numbers and can be easily used as an element or as an array of elements The CJ1W MCH72 has in total 1024 VR variables The VR variables can be used for several purposes in BASIC program ming The VR variables are globally shared between tasks and can be used for communications between tasks VR variable memory area is battery backed so all VR variables retain their values between power ups Notes The TABLE and VR data can be accessed from all different running tasks To avoid problems of two program tasks writing unexpectedly to one global variable write the programs in such a way that only one program writes to the global variable at a time e address The address of the VR variable Range 0 1023 In the following example the value 1 2555 is placed into VR variable 15 The local variable val is used to name the global variable locally val 15 VR val 1 2555 All BASIC commands Section 4 2 4 2 258 VRSTRING Example Example See also Type Syntax Description Arguments Example See also A transfer gantry has 10 put down positions in a row Each position may at any time be full or empty VR
265. lem Solution The communication on the backplane of the PLC system has not been refreshed in a timely manner backplane communication signal failure Turn off the PLC system and then turn it back on Additional actions to take When this error happens during operation a user can take any additional action if necessary in BASIC program The occurrence of this error during operation can be checked by reading bit 0 of the value returned by the PLC_STATUS 0 BASIC command and value returned by the PLC_STATUS 1 BASIC command see section 4 2 185 for more details on PLC_STATUS BASIC command 6 3 5 Other CPU Error 350 Problem Solution Other error occurred in the units CPU Turn off the PLC system and then turn it back on If the error persist replace the CJ1W MCH72 unit Troubleshooting Errors Section 6 3 6 3 6 Unit No Setting Error 6 3 7 Problem Solution Unit number set does not match setting in the PLC I O table configuration Set unit number according to the I O table configuration downloaded in the PLC CPU Duplicate unit numbers in the PLC system Set the unit number using the rotary switch on the front of the case so there are no duplicated unit numbers in the PLC system I O Table Configuration Error Problem Solution Unit types unit numbers their order on the PLC backplane or the total number of units does not
266. leration rate ACCEL mm s s ACCEL AXIS 2 100 Sets acceleration rate for axis 2 ACCEL DECEL UNITS Mathematical function ACOS expression The ACOS function returns the arc cosine of the expression The expression value must be between 1 and 1 The result in radians is between 0 and PI Input values outside the range will return 0 expression Any valid BASIC expression gt gt PRINT ACOS 1 3 1416 N A Axis command ADD_DAC axis Demanded position Demanded position Measured__ position DAC AXIS m Ea be ae ae EE SERVO OFF Position loop ADD_DAC n AXIS m Final speed reference in AXIS n Ss DAC_OUT AXIS m DAC_OUT AXIS n 7 gt o i z I A f SERVO ON A Following Speed error command ep ele ee ets tae et Measured__ position DAC AXIS n E EEA Ee SERVO OFF Position loop P i gt o gt gt ja SERVO ON Following Speed error command i i All BASIC commands Section 4 2 Description The ADD_DAC command adds the S_REF_OUT value of axis to the S_REF_OUT value of the base axis Use ADD_DAC 1 to cancel the sum ADD_DAC works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note 1 Be aware that the control loop gains for both axes need to be deter mined with care As different encoders with different resolutions are used the gains are not identical 2 Set the OUTLIMIT paramete
267. les for VRs elevation 1 UNITS AXIS 0 360 counts_per_revO UNITS AXIS 1 360 counts_per_rev1 WHILE IN 2 ON MOVEMODIFY VR bearing AXIS 0 adjust bearing to match VRO MOVEMODIFY VR elevation AXIS 1 adjust elevation to match VR1 WA 250 WEND RAPIDSTOP stop movement WAIT IDLE AXIS 0 MOVEABS 0 AXIS 0 return to transport position WAIT IDLE AXIS 1 MOVEABS 0 AXIS 1 4 2 164 MPOS Type Axis parameter read only Syntax MPOS Description The MPOS parameter is the measured position of the axis in user units as derived from the encoder This parameter can be set using the DEFPOS command The OFFPOS axis parameter can also be used to shift the origin point MPOS is reset to 0 at start up or after the controller has been reset The range of the measured position is controlled with the REP_DIST and REP_OPTION axis parameters Arguments N A 205 All BASIC commands Section 4 2 Example WAIT UNTIL MPOS gt 1250 SPEED 2 5 See also UNITS AXIS DEFPOS ENCODER FE OFFPOS REP_DIST REP_OPTION UNITS 4 2 165 MSPEED Type Axis parameter read only Syntax MSPEED Description The MSPEED parameter contains the measured speed in units s It is calculated by taking the change in the measured position in user units in the last servo period and divide it by the servo period in seconds The servo period is set with the SERVO_PERIOD parameter MSPEED represents a snapshot of the speed and significant fluctua tions which can occur
268. ll BASIC commands Section 4 2 SENSOR SEEN Example A sheet of glass is fed on a conveyor and is required to stop 250 mm after the leading edge is sensed by a proximity switch The proximity switch is connected to the registration input MOVE 10000 Start a long move on conveyor REGIST 3 set up registration WAIT UNTIL MARK MARK becomes TRUE when sensor detects glass edge OFFPOS REG_POS set position where mark was seen to 0 WAIT UNTIL OFFPOS 0 wait for OFFPOS to take effect MOVEMODIFY 250 change move to stop at 250mm SENSOR Example A paper feed system slips To counteract this a proximity sensor is posi tioned one third of the way into the movement This detects at which position the paper passes and thus how much slip has occurred The move is then modified to account for this variation paper_length 4000 DEFPOS 0 REGIST 3 MOVE paper_length WAIT UNTIL MARK slip REG_POS paper_length 3 offset slip 3 MOVEMODIFY paper_lengthtoffset 204 All BASIC commands Section 4 2 Example A satellite receiver sits on top of a van It must align correctly to the sat ellite from data processed in a computer This information is sent to the controller through the serial link and sets VR 0 and VR 1 This infor mation is used to control the two axes MOVEMODIFY is used so that the position can be continuously changed even if the previous set position is not achieved bearing 0 set lab
269. lt value is 0 Adding integral gain to a servo system reduces positioning error when at rest or moving steadily but it can produce or increase overshooting and oscillation and is therefore only suitable for systems working on constant speed and with slow accelerations Note In order to avoid any instability the servo gains should be changed only when the SERVO is off Note Servo gains have no affect on stepper output axis ATYPE 46 N A No example D_GAIN OV_GAIN P_GAIN VFF_GAIN See WAIT IDLE 4 2 133 IEEE_IN Type Syntax Description Arguments Example See also 4 2 134 IEEE_OUT Type Syntax Description 172 Mathematical function IEEE_IN byte0 byte1 byte2 byte3 The IEEE_IN function returns the floating point number represented by 4 bytes which typically have been received over a communications link such as ModbusTCP or FINS Note byte0 is the high byte of the 32 bit IEEE floating point format byte byte3 Any combination of 8 bit values that represents a valid IEEE floating point number VR 20 IEEE_IN b0 b1 b2 b3 N A Mathematical function byte_n IEEE_OUT value n The IEEE_OUT function returns a single byte in IEEE format extracted from the floating point value for transmission over a communications link The function will typically be called 4 times to extract each byte in turn Note Byte 0 is the high byte of the 32 bit IEEE floating point format All BASIC commands S
270. mands and the registrations of the sample program below BASE N REGIST 0 WAIT UNTIL MARK 0 loop WAIT UNTIL MARK 1 PRINT Position captured in REG POS REGIST 0 WAIT UNTIL MARK 0 GOTO loop 308 How to s Section 5 1 5 1 6 7 Registration and windowing function The windowing function enables for registration to occur only within a specified range of axis positions This function is selected by giving the right value as an argument for the REGIST command The windowing function is controlled by two axis parameters OPEN_WIN and CLOSE_WIN For more information on REGIST OPEN_WIN and CLOSE _WIN refer to sections 4 2 200 4 2 178 and 4 2 51 There are two types of windowing OPEN WIN 20 CLOSE WIN 40 1 OUTSIDE THE WINDOW INSIDE THE WINDOW OUTSIDE MARK TRUE REG_POS 27 e Inclusive windowing allows the registration to occur only within the specified window of axis positions With this windowing function registration events are ignored if the axis measured position is less than the OPEN_WIN axis parameter or greater than the CLOSE_WIN parameter e Exclusive windowing allows the registration to occur only outside the specified window of axis positions With this windowing function the registration events are ignored if the axis measured position is greater than the OPEN_WIN axis parameter or less than the CLOSE_WIN parameter When the windowing function is used the interna
271. measured absolute positions There are 16 position switches each of which can be assigned to any axis Each switch has assigned its own ON and OFF positions and out put number The command can be used with 2 or all 7 arguments With only 2 argu ments a given switch can be disabled PSWITCHes are calculated on each servo cycle and the output result applied to the hardware The response time is therefore 1 servo cycle period approximately Note An output may remain ON if it was ON when the PSWITCH was disabled In such cases the OP command can be used to turn off an output as follows PSWITCH 2 OFF OP 14 OFF Turn OFF pswitch controlling OP 14 Note The physical switches that are used with PSWITCH are not fast hardware switches so switching is done by software which can intro duce some small delays in operation Fast hardware switching can be used only with an axis connected via the Encoder Interface port Use the HW_PSWITCH command All BASIC commands Section 4 2 Arguments Example See also e switch The switch number Range 0 15 enable The switch enable Range on off axis The number of the axis providing the position input output_number The physical output to set Range 8 31 output_state The state to output Range on off set_position The absolute position in user units at which output is set reset_position The absolute position in user units at which output is reset A rot
272. model Yaskawa model Cable length FNY W6003 A5 JEPMC W6003 A5 0 5m FNY W6003 01 JEPMC W6003 01 1m FNY W6003 03 JEPMC W6003 03 3m FNY W6003 05 JEPMC W6003 05 5m FNY W6003 10 JEPMC W6003 10 10m FNY W6003 20 JEPMC W6003 20 20m FNY W6003 30 JEPMC W6003 30 30 m 53 Installation Section 2 3 54 Note To terminate the MECHATROLINK II slaves connect an OMRON FNY W6022 terminator or a Yaskawa JEPMC W6022 terminator to the MECHATROLINK II connector of the last MECHATROLINK II slave When the MECHATROLINK II slaves are connected up to 16 nodes within 30 m or up to 15 nodes within 50 m no repeater unit is required For more nodes or longer distances a repeater unit is required You can use the OMRON FNY REP2000 repeater or the Yaskawa JEPMC REP2000 repeater For more details refer to the Yaskawa Sigma ll Series SGDH MECHATROLINK II Application Module User Manual for model JUSP NS115 manual number SIEPC71080001 MECHATROLINK II slaves can have a station address that ranges from 41 hex to 5F hex These station addresses correspond to axis numbers 0 to 29 Specifications Section 2 4 2 4 Specifications 2 4 1 Unit dimensions l
273. move the old battery A from the battery compartment Unit components Section 2 1 Battery A and battery connector B Remove the battery connector B of the old battery Connect the battery connector B of the new battery Install the new battery A in the battery compartment Close the battery compartment ONO When the new battery is installed the low battery error is cleared N WARNING These actions can cause the battery to leak burn or rupture which can lead to fire injury loss of property and death e Do not short circuit the battery terminals Do not charge the battery Do not disassemble the battery Do not heat the battery or set fire to the battery N WARNING Do not use a battery that is dropped on the floor or that is subjected to a shock The battery can leak 2 1 4 I O connector The I O connector is a 28 pin connector used to wire to an external I O All I Os are general purpose I Os Functions like limit inputs and origin proximity inputs can be allocated The recommended connector is the Weidmuller B2L 3 5 28 LH connector 2 1 5 MECHATROLINK II connector The MECHATROLINK II connector is used to connect the CJU1W MCH 72 unit to a MECHATROLINK II network 2 1 6 Encoder connector The encoder connector of the MCH72 supports different types of encoders It can also act as a reference output It supports the following e Incremental encoder input for line driver type encoders e Two
274. n limit switch max limit switch lt _ gt REVERSE FORWARD The possible scenarios for origin search against limit switches depending on the position of the moving part on power on are shown in the figure The program example that does this origin search sequence is given below Origin and left limit switch INO Right limit switch IN1 BASE 0 DATUM _IN 0 SERVO ON WDOG ON DATUM 4 WA 1 WAIT IDLE 303 How to s Section 5 1 5 1 5 3 Origin search against hardware parts blocking movement oroen This origin search procedure performs origin search against a physical object and mechanically blocks the movement There are no limit switches no absolute position switch and no reference pulses The origin position is detected by detecting a particular amount of torque against the blocking objects An adequate torque limit is required in order not to damage the mechanics during the origin search process The example for this homing procedure is shown in the figure The program example that does this origin search sequence is given below BASE 0 RIVE CONTROL 11 Monitor torque with DRIVE MONITOR ERVO ON DOG ON PEE D CREEP EVERSE WA 1 WAIT UNTIL DRIVE MONITOR lt 100 Wait for particular amount of applied torque CANCEL DEFPOS 0 MOVEABS 10 This is necessary otherwise the position is kept pushing the hardware limit of the machine and the motor trips by overloa
275. n of limit switch CREEP 500 set creep speed for slow move to find edge of switch DATUM A4 find edge at creep speed and stop WAIT IDLE DATUM_IN 1 REV_IN 5 restore input 5 as a limit switch again 15 107 0 SWITCH Z MARK 130 All BASIC commands Section 4 2 Example A machine similar to the machine in the example above must locate a home switch which is at the forward end of the move The machine then moves backwards to the next Z marker and set this Z marker as the datum This is done with DATUM 5 which moves forward at SPEED to locate the switch then reverses at CREEP to the Z marker If required a move is made to the datum Z marker SERVO ON WDOG ON DATUM_IN 7 sets input 7 as home switch SPEED 5000 set speed for quick location of switch CREEP 500 set creep speed for slow move to find edge of switch DATUM 5 start the homing sequence WAIT IDLE See also ACCEL AXIS AXISSTATUS CREEP DATUN_IN DECEL MOTION_ERROR SPEED 4 2 66 DATUMN_IN Type Axis parameter Syntax DATUM_IN DAT_IN Description The DATUNL_IN axis parameter contains the input number to be used as the datum switch input for the DATUM command The valid input range is given by 0 to 31 Values 0 to 15 represent physically present inputs of CJ1W MCH 72 I O connector and are common for all axes Values 16 to 31 are mapped directly to driver inputs that are present on the CN1 connector They are unique for each axis It
276. nak 15 CONSTANT start_button 5 IF IN start_button ON THEN OP led1 ON IF key_char nak THEN GOSUB no_ack_received See also N A 4 2 56 CONTROL Type System parameter read only Syntax CONTROL Description The CONTROL parameter returns the type of controller in the system The value of this system parameter for the CJ1W MCH 72 is 264 Note When the Motion Controller is locked 1000 is added to the value so a locked CJ1W MCH 72 will return 1264 Arguments N A Example No example See also N A 4 2 57 COPY Type Program command Syntax COPY program_name new_program_name Description The COPY command copies an existing program in the controller to a new program with the specified name The program name can be spec ified without quotes Note This command is implemented for the Command Line Terminal Arguments program_name Name of the program to be copied new_program_name Name to use for the new program Example gt gt COPY prog newprog See also DEL NEW RENAME 4 2 58 COS Type Mathematical function Syntax COS expression Description The COS function returns the cosine of the expression Input values are in radians and may have any value The result value will be in the range from 1 to 1 124 All BASIC commands Section 4 2 Arguments Example See also 4 2 59 CREEP Type Syntax Description Arguments Example See also 4 2 60 D_GAIN Type Syntax Description
277. nd AOUT analogue_chan The AOUT reads a value from the AOUT array The CJ1W MCH72 does not provide any analogue output The contents of the AOUT array may be mapped to PLC memory to transfer values to e g PLC ana logue output units e analogue_chan Analogue output channel number 0 31 No example N A All BASIC commands Section 4 2 4 2 28 ASIN Type Mathematical function Syntax ASIN expression Description The ASIN function returns the arc sine of the argument The argument must have a value between 1 and 1 The result in radians is between PI 2 and PIl 2 Input values outside this range return 0 Arguments expression Any valid BASIC expression Example gt gt PRINT ASIN 1 1 5708 See also N A 4 2 29 ATAN Type Mathematical function Syntax ATAN expression Description The ATAN function returns the arc tangent of the argument expression can have any value The result is in radians and is between PI 2 and PI 2 Arguments expression Any valid BASIC expression Example gt gt PRINT ATAN 1 0 7854 See also N A 4 2 30 ATAN2 Type Mathematical function Syntax ATAN2 expression1 expression2 Description The ATAN2 function returns the arc tangent of the non zero complex number expression1 expression2 which is equivalent to the angle between a point with coordinate expression1 expression2 and the x axis If expression2 gt 0 the result is equal to the value of ATAN expression1
278. ndicates the results of the command execution The first byte provides the main response code MRES which classifies the results The table below lists the MRES codes The second byte provides the sub response code SRES which contains details about the results MRES Execution result 00 Normal completion 01 Master unit error 02 Slave device error 04 Service not supported 10 Command format error 11 Parameter error 20 Read not possible 22 Status error If the FINS command was not completed normally the 2 byte response code is not equal to 0000 Also the response frame does not contain any additional data Data can only be returned depending on the command when the response code is 0000 The CJ1W MCH 72 supports the following FINS commands e Read 0101 e Write 0102 e Parameter Area Read 0201 e Parameter Area Write 0202 e Run 0401 e Stop 0402 For more information on FINS refer to the Communication Commands Reference manual W342 E1 65 FINS commands Section 3 4 3 4 1 Read 0101 The FINS Read command has this format 01 01 T 00 command_code var_type start_address fixed element_count The parameters can have the following values Parameter Values hex command_code 01 01 var_type e 82 Table memory in 16 bit integer format e C2 Table memory in 32 bit IEEE floating point format BO VR memory in 16 bit integ
279. nds Section 4 2 4 2 174 ON 4 2 175 ON GOSUB 210 Example See also Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also A conveyor transports boxes Labels must be applied onto these boxes The REGIST function can capture the position at which the leading edge of the box is seen Then the OFFPOS command can adjust the measured position of the axis to make it 0 at that point Thus after the registration event has occurred the measured position seen in MPOS reflects the absolute distance from the start of the box The mechanism that applies the label can take advantage of the absolute position start mode of the MOVELINK or CAMBOX commands to apply the label BASE conv REGIST 3 WAIT UNTIL MARK OFFPOS REG_POS Leading edge of box is now zero AXIS DEFPOS DPOS MPOS UNITS Constant read only ON The ON constant returns the numerical value 1 N A OP lever ON The above line sets the output named lever to ON N A Program control command ON expression GOSUB label labell The ON GOSUB and ON GOTO structures enable a conditional jump The integer expression is used to select a label from the list If the expression has value 1 the first label is used for value 2 the second label is used and so on Once the label is selected subroutine GOSUB jump to that label is performed Note If the expression is not valid e g
280. necessary parameters in the drives and controller the error handling to start stop and reset the application programs and to report the status to the user Practical examples Section 5 2 5 2 1 1 SHELL programs and Trajexia Studio Trajexia Studio helps the user to create a proper SHELL program When a new project is created a SHELL program with the basic structure is created automatically see 5 1 1 When you define the hardware and set the parameters for the application you can select to add your changes to the SHELL program so the user do not have to type it manually Use the example SHELL program as a template to start stop and reset your machine and adjust the rest of the SHELL program according to the requirements The SHELL program is automatically selected to start at POWER ON in low priority task 1 5 2 2 SHELL program example The example program below is a typical SHELL program created by Trajexia studio This SHELL program is an example that OMRON provide as recommended This program should be modified for the particular user application Reserved symbol area for SHELL program handling Do not use these areas in your application programs VR 900 status word reports about the status of the system t 0 during initialization application stopped with no error d 2 errors in the system 3 application running VR 901 VR status_bits reports next status BitO
281. ning the registration mark is detected the target position is changed on the fly in order to finish the movement at a defined position after the registration mark Therefore the same distance in respect to the registration mark is always guaranteed Feeder 2 The new target position is recalculated speed TARGET POS CAPTURED POS D 1 The rising edge of The area below the graph the registration captures distance is D the feeder position e The motion profile and its modification due to the registration mark are shown in The BASIC program for this example is DEFPOS 0 REGIST 3 Trigger the mark registration MOVE bag_length Move to the theoretical distance WA 1 WAIT UNTIL MARK OR MTYPE 0 IF MARK THEN end _position REG POS distance after mark MOVEMODIFY end position Correct the distance according to the mark ENDIF How to s Section 5 1 5 1 6 9 Example Starting a slave axis in precise position of a master axis Slave axis Flying shear Transporting belt MIMIM Master axis The picture shows a flying shear cutting the head of wood tables When the wood comes the edge of the wood is detected by the photocell and at the exact moment the movement of the flying shear starts to be synchronized with the right position on the wood If the movement is started by the program upon detecting a signal from the photocell there is always at least one SERVO_PERIOD of
282. ns executed in each CPU task are CPU task Operation First CPU task Motion Sequence Low priority process Second CPU task High priority process Third CPU task Motion Sequence only if SERVO_PERIOD 0 5ms LED Update High priority process Fourth CPU task External Communications The Motion sequence execution depends on setting of the SERVO_PERIOD parame ter The SERVO_PERIOD can be set at 0 5 1 2 or 4 ms The processes that take place within the cycle time depend on the setting of the SERVO_PERIOD parameter The SERVO_PERIOD parameter is a Trajexia parameter that must be set according to the system configuration The factory setting is 1ms SERVO_PERIOD 1000 A change is set only after a restart of the CJ1W MCH72 17 Cycle time Section 1 6 Note Only the Sigma lIl Servo Driver and the Sigma V Servo Driver support the 0 5 ms trans mission cycle 1 6 1 1 Servo period 0 5 ms CPU task 1 Motion sequence Low priority task 0 1 2 3 CPU task 2 CPU task 3 CPU task 4 High priority task 13 14 Motion sequence LED refresh High priority task 13 14 Communication 4ms The SERVO_PERIOD has a value of 0 5ms and the motion sequence is executed every 0 5ms 1 6 1 2 Servo period 1 ms CPU task 1 Motion sequence Low priority task 0 1 2 3 CPU task 2 CPU task 3 CPU task 4 High priority task 13 14 LED refresh High priority task 13 14
283. nsation is applied after a change in the direction of the DPOS parameter The backlash compensation can be seen in the TRANS_DPOS parameter which is equal to DPOS backlash com pensation on off Either ON or OFF distance The offset distance expressed in user units speed The speed of the compensation move expressed in user units accel The acceleration or deceleration rate of the compensation move expressed in user units BACKLASH ON 0 5 10 50 AXIS 0 BACKLASH ON 0 4 8 50 AXIS 1 This applies backlash compensation on axes 0 and 1 DPOS TRANS_DPOS Axis parameter BACKLASH_DIST BACKLASH_DIST is the amount of backlash compensation that is applied to the axis when BACKLASH ON N A IF BACKLASH_DIST gt 100 THEN OP 10 ON show that backlash compensation reached this value ELSE OP 10 OFF END IF BACKLASH All BASIC commands Section 4 2 4 2 39 BASE Type Syntax Description Arguments Example Example Axis command BASE BASE axis_1 axis_2 axis_3 axis_4 axis_ BA BA axis_1 axis_2 axis_3 axis_4 axis_ The BASE command is used to set the default base axis or to set a specified axis sequence group All subsequent motion commands and axis parameters will apply to the base axis or the specified axis group unless the AXIS command is used to specify a temporary base axis The base axis or axis group is effective until it is changed again with
284. ntax Description Arguments Example See also Axis command DRIVE_RESET The DRIVE_RESET command resets the Servo Driver connected via the MECHATROLINK II bus The command is executed on the driver for the base axis set by BASE The base axis can be changed with the AXIS modifier as with all the other axis commands and parameters N A No example N A A Caution Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Driver when executing this command Otherwise the program task will be paused until the connection of the other device to the Servo Driver is removed 4 2 81 DRIVE_STATUS Type Axis parameter read only Syntax DRIVE_STATUS Description For MECHATROLINK II axes this parameter is set from the STATUS field in the MECHATROLINK II communication frame and is updated every servo period Those bits can be seen in the drive configuration window in Trajexia Studio and can be used in programs The explana tion of each bit is given in the table below Note Only bits relevant to MECHATROLINK II axes are listed For the detailed explanation for these status bits see the MECHATROLINK II manual Bit Description MECHATROLINK lIl 0 Alarm 1 Warning 2 Ready 3 Servo on 4 Power on 5 Machine Lock 6 Home Position 7 At Position Speed 143 All BASIC commands Section 4 2 Bit Description MECHATROLINK II 8 Output Completed
285. ny reverse motion on that axis will be stopped Bit 5 of the AXISSTATUS axis parameter will also be set Note This input is active low Arguments N A Example No example See also AXIS AXISSTATUS FWD_IN 4 2 210 REV_JOG Type Axis parameter Syntax REV_JOG Description The REV_JOG parameter contains the input number to be used as a jog reverse input The input can be from 0 to 31 As default the parame ter is set to 1 no input is selected Note This input is active low Arguments N A Example No example See also AXIS FAST_JOG FWD_JOG JOGSPEED UNITS 4 2 211 REVERSE Type Axis command Syntax REVERSE RE Description The REVERSE command moves an axis continuously in reverse at the speed set in the SPEED parameter The acceleration rate is defined by the ACCEL axis parameter REVERSE works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note The reverse motion can be stopped by executing the CANCEL or RAPIDSTOP command or by reaching the reverse limit inhibit or ori gin return limit Arguments N A 236 All BASIC commands Section 4 2 Example Run an axis in reverse When an input signal is detected on input 5 stop the axis back REVERSE WAIT UNTIL IN 0 ON Wait for stop signal CANCEL 10 207 SPEED 30 40 MPOS 129 45 ra 0 MPOS 300 50 Example Run an axis in reverse When it reaches a certain p
286. o s Section 5 1 To guarantee the correct overflow both in the CJ1W MCH 72 and in the Servo Driver we must set two additional axis parameters REP_DIST 60 and REP_OPTION 1 With these settings the command MOVE 35 rotates the table 35 degrees in positive direction The range of possible MPOS and DPOS values is from 0 degrees to 60 degrees Z Caution You must initialize the absolute encoder before you use it for the first time when the battery is lost during power off and when the multiturn limit setting in the parameter Pn205 is changed The initialization can be done on the display of the Servo Driver or with the software tool For more detail on initialising absolute encoder please see the Sigma ll Servo Driver manual N Caution It is possible to reset the multiturn counter but it is not possible to reset the position within one turn the fraction from 0 to and excluding 1 To adjust zero offset use the parameter Pn808 For more details see the NS115 MECHATROLINK II Interface Unit manual A Caution At power up the absolute encoder position is read from the motor and written to MPOS using the following conversion e For MPOS 1 Pn203 UNITS Pn202 Absolute _MPOS abs_position_encoder e This is correct if encoder_counts lt 224 Pn203 Pn205 1 Pn202 e If this value is greater than 224 MPOS can have incorrect values at start up To avoid this problem add the program code DEFPOS ENCODERIUNITS after
287. o be used as the origin input DECEL Contains the axis deceleration rate DEMAND_EDGES Contains the current value of the DPOS axis parameter in encoder edges DPOS Contains the demand position generated by the move commands DRIVE_CONTROL Selects data to be monitored using DRIVE_MONITOR for axes connected via the MECHATROLINK II bus For axes connected via the Encoder Interface DRIVE_CONTROL sets outputs of the Encoder Interface DRIVE_INPUTS Holds I O data of the driver connected to MECHATRO LINK II bus Data is updated every servo cycle DRIVE_MONITOR Monitors data of the Servo Driver connected to MECHA TROLINK II bus Data are updated every servo cycle DRIVE_STATUS Contains the current status of the Servo Driver ENCODER Contains a raw copy of the encoder hardware register ENCODER_BITS Sets the number of bits for the absolute encoder con nected to the Encoder Interface ENCODER_CONTROL Controls operating mode of the EnDat absolute encoder ENCODER_RATIO Sets scaling value for incoming encoder counts ENCODER_TURNS Returns the multi turn count of the absolute encoder ENDMOVE Holds the position of the end of the current move ERRORMASK Contains the mask value that determines if MOTION_ERROR occurs depending on the axis status FAST_JOG Contains the input number to be used as the fast jog input FASTDEC Defines ramp to z
288. ocations instead of axis and system parameters The exact moment when the tracing is started can be exactly determined because it is controlled by the TRIGGER command This means the start of tracing is synchronized with the movement There is no limitation of 200 samples per channel the oscilloscope shows as many samples Table entries as configured This section gives you a practical example on the use of the SCOPE and TRIGGER commands and how to use them in combination with the oscilloscope to monitor axis parameters and troubleshoot the system For more information on the SCOPE and TRIGGER commands refer to sections 4 2 218 and 4 2 245 How to s Section 5 1 Suppose the motion system consists of two axis AXIS 0 and AXIS 1 AXIS 0 is the master axis It makes a simple forward movement AXIS 1 is the slave axis It must follow the master axis in accordance to cosine rule 1 2m x end_ pos 1 cos an 2 999 where Xo is the position of the master AXIS 0 and x is the position of the slave AXIS 1 You can link the two axis with the CAMBOX command For more details refer to section 4 2 44 Suppose furthermore that the parameter end_pos is not constant but it can change due to different conditions of the motion system The part of the program that creates the CAM table is Initial CAM values VR end_pos 15 current end pos VR end pos FOR i 0 TO 999 TABLE i VR end_pos 1 COS 2 PI i 999 2 NEXT i
289. ol Motor Encoder Measured speed Measured position 13 Servo system principles Section 1 4 1 4 3 Motion control algorithm The servo system controls the motor by continuously adjusting the speed reference to the Servo Driver The speed reference is calculated by the motion control algorithm of the CJ1W MCH72 which is explained in this section 14 The motion control algorithm uses the demand position A the measured position D and the Following Error B to determine the speed reference The Following Error is the difference between the demanded and measured position The demand position the measured position and the Following Error are represented by the axis parameters MPOS DPOS and FE Five gain values have been implemented for the user to be able to configure the correct control operation for each application C is the output signal Proportional gain The proportional gain Kp creates an output Op that is proportional to the Following Error E Op Kp E All practical systems use proportional gain For many just using this gain parameter alone is sufficient The proportional gain axis parameter is called P_GAIN Integral gain The integral gain K creates an output O that is proportional to the sum of the Following Errors that have occurred during the system operation O Ki DE Integral gain can cause overshoot and so is usually used only on systems working at constant speed or with slow acceler
290. ommunication lines A and B short circuit of any communication line with shielding MECHATROLINK II bus terminator is missing or damaged bit 17 of the SYSTEM_ERROR system parameter is high see section 4 2 234 for more details on this parameter Fit a MECHATROLINK II bus terminator on the last station in the chain or replace it The MECHATROLINK II station connected to the unit is lost due to power off or MECHATROLINK II interface failure at the station bit 18 of the SYSTEM_ERROR system parameter is high see section 4 2 234 for more details on this parameter Check the power and MECHATROLINK II interface of the station that caused the problem Replace the station if necessary The MECHATROLINK II The CJ1W MCH 72 is defective Replace the CJ1W MCH 72 unit 353 Troubleshooting Errors Section 6 3 6 3 12 BASIC Program Error 6 3 13 Axis Error 354 Problem Solution BASIC program stopped working during operation due to runtime error bit O of the SYSTEM_ERROR system parameter is high see section 4 2 234 for more details on this parameter Using BASIC command RUN_ERROR determine the error type that caused runtime error Using BASIC command ERROR_LINE find a line in the BASIC program which caused runtime error Modify found line causing an error to prevent it from happening in the future see section 4 2 214 for more details on RUN_ERROR and section 4 2 97 for more deta
291. on The link acceleration and deceleration distances are specified by the link_acceleration and link_deceleration parameters The con stant speed link distance is derived from the total link distance and these two parameters The three phases can be divided into separate MOVELINK commands or can be added up together into one Consider the following two rules when setting up the MOVELINK com mand Rule 1 In an acceleration and deceleration phase with matching speed the link_distance must be twice the distance See the figure Rule 2 In a constant speed phase with matching speeds the two axes travel the same distance so the distance to move must equal the link_distance MOVELINK works on the default basis axis group set with BASE unless AXIS is used to specify a temporary base axis The axis set for link_axis drives the base axis MOVELINK is designed for controlling movements such as Synchronization to conveyors e Flying shears e Thread chasing tapping etc Coil winding Note If the sum of link_acceleration and link_deceleration is greater than link_distance they are both reduced in proportion in order to equal the sum to link_distance Acceleration Dec eleration link Speed distance Speed distance ink speed distance ink mi ae speed 199 All BASIC commands Section 4 2 Arguments distance The incremental distance in user units to move the BASE axis as a result of the measured link_distance mov
292. on you can use the REGIST command The position is captured in the hardware which means that there is no software overhead Therefore you do not have to deal with timing issues For more information on how to use the registration inputs refer to the REGIST command in section 4 2 200 2 2 3 3 Hardware PSWITCH The MCH72 has one output output 8 that can be used as a hardware position switch This output goes on when the measured position of the Flexible Axis is reached It goes off when another measured position is reached The output is driven by hardware only This means that the response times do not have software delays For more information on using the position switch refer to section 4 2 130 on the HW_PSWITCH command 2 2 3 4 Connection example The table below and the figure give an example of the OMRON E6B2 CW21Z encoder connected to the CJ1W MCH 72 CJ1W MCH72 Encoder input connection E6B2 CWZ1Z encoder CJ1W MCH 72 encoder interface Signal Wire color Pin Signal A Black 2 A A Black red 3 A B White 4 B B White red 5 B 45 Section 2 2 Wiring E6B2 CWZ1Z encoder CJ1W MCH72 encoder interface Signal Wire color Pin Signal Z Orange 7 Z Z Orange red 8 Z 0 V COM Blue 9 0 V Encoder ground 5 VDC Brown 6 5V 2 2 3 5 Encoder output Encoder edges The CJ1W MCH72 can generate encoder type pulses For each internal count C the CJ1W M
293. on event Primary registration event occurs on signal e 0 rising edge e 1 falling edge 5 4 Secondary registration occurs for 00 Z mark of the encoder e 01 REG 0 input e 10 REG 1 input 228 All BASIC commands Section 4 2 Bit Function Encoder Interface Set this bit to use secondary registration event Secondary registration event occurs on signal 0 rising edge e 1 falling edge 9 8 Windowing function choice 00 No windowing e 01 Inclusive windowing e 10 Inclusive windowing e 11 Exclusive windowing 10 Set this bit to use filtering function Example Z MARK SERVO MOTOR A disc used in a laser printing process requires registration to the Z marker before it can start to print The example code locates to the Z marker and then sets it as the zero position REGIST 1 set registration point on Z mark FORWARD start movement WAIT UNTIL MARK CANCEL stops movement after Z mark WAIT IDLE MOVEABS REG_POS relocate to Z mark WAIT IDLE DEFPOS 0 set zero position 229 All BASIC commands Section 4 2 SENSOR BEAM SENSOR Example Components are placed on a flighted belt The flights are 120 mm apart The components are on the belt 30 mm from the flights When a compo nent is found an actuator pushes it off the belt To prevent that the sen sor finds a flight instead of a component registration with windowing
294. option is set to 4 then the CAMBOX operates like a physical CAM CAMBOX works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note While CAMBOX is being executed the ENDMOVE parameter will be set to the end of the previous move The REMAIN axis parameter will hold the remainder of the distance on the link axis Arguments start_point The address of the first element in the TABLE array to be used end_point The address of the end element in the TABLE array table_multiplier The Table multiplier value used to scale the values stored in the TABLE As the TABLE values are specified in encoder edges use this argument to set the values for instance to the unit conversion factor set by UNITS parameter link_distance The distance in user units the link axis must move to complete the specified output movement The link distance must be specified as a positive distance e link_axis The axis to link to link_option See the table below link_option Description value 1 Link starts when registration event occurs on link axis 2 Link starts at an absolute position on link axis see link_position 110 All BASIC commands Section 4 2 link_option value Description CAMBOX repeats automatically and bidirectionally This option is cancelled by setting bit 1 of REP_OPTION parameter REP_OPTION REP_OPTION OR 2 Combination of option
295. or Printed mark bag forming pT _e Foe ee 7 Vertical External encoder for slip compensation The picture shows the vertical fill and seal machine for packaging products into bags The bag material comes from a plastic film coil that is unwinded then it is shaped into the tube by a mechanical mandrel and at the same time the tube is sealed vertically The feeder movement is intermittent and the feed length corresponds with the bag length Once the bag is fed the horizontal sealer closes the bag so it can be filled with the product After that the process starts again feeding the new bag After 1 bag After 20 bag After 100 bag The feeder can work in two modes without registration mark and with registration mark Working without the registration mark is a simple point to point incremental movement In this case there is no guarantee that the feeder moves exactly the same distance as the design pattern For example suppose the bag length that needs to be fed is 200 mm but the real pattern is 200 1 mm With simple point to point incremental movement without 311 How to s Section 5 1 312 correction an error of 0 1 mm per bag is accumulated With a small number of bags the difference is not visible but after 500 bags the error is 50 mm which is a 25 of the bag length When working with registration marks the motion controller executes an incremental movement to a certain position If during the positio
296. or more outputs or returns the state of the first 24 outputs PRINT Outputs a series of characters to a serial port PSWITCH Turns on an output when a predefined position is reached and turns off the output when a second position is reached READ_OP Returns the value of the digital outputs 4 1 6 Mathematical functions and operands 78 Name Description ADDITION Adds two expressions SUBTRACTION Subtracts two expressions MULTIPLICATION Multiplies two expressions DIVISION Divides two expressions POWER Takes the power of one expression to the other expres sion IS EQUAL TO Checks two expressions to see if they are equal ASSIGNMENT Assigns an expression to a variable lt gt IS NOT EQUAL TO Checks two expressions to see if they are different gt IS GREATER THAN Checks two expressions to see if the expression on the left is greater than the expression on the right gt IS GREATER THAN OR EQUAL TO Checks two expressions to see if the expression on the left is greater than or equal to the expression on the right lt IS LESS THAN Checks two expressions to see if the expression on the left is less than the expression on the right lt IS LESS THAN OR Checks two expressions to see if the expression on the left EQUAL TO is less than or equal to the expression on the right ABS Returns the absol
297. or_revolution 1 ballscrew_revolution _ Pn203 1 motor_revolution 1 ballscrew_revolution 10mm 17 2 3 encoder_counts 10 mm Therefore One solution is UNITS 2 65536 Pn202 3 Pn203 5 The calculation of the multiturn limit setting parameter Pn205 is not needed in this case because the ball screw is a system with a fixed limited axis It is enough to set this value large enough to have the overflow of the counter out of the effective position Also because of the axis is finite it is not important to set the REP_OPTION parameter because REP_DIST must be set large enough so it is outside of the maximum effective position 540 mm One solution is REP_DIST 1000 and REP_OPTION 0 With these setting executing MOVE 17 moves the ball screw 17 mm in forward direction 294 How to s Section 5 1 5 1 4 Mapping Servo Driver inputs and outputs The CJ1W MCH72 has got a digital I O space that consists of 256 digital inputs and 256 digital outputs The digital outputs range has four parts e Digital outputs 0 7 These outputs do not physically exist on the CJ1W MCH 72 If you write these outputs nothing happens If you read these outputs they return 0 e Digital outputs 8 15 These outputs physically exist on the CJ1W MCH72 You can physically access them on the 28 pin screwless connector on the front side of the CJ1W MCH 72 If you write these outputs they become active and give a 24 VDC si
298. ore of the motion instruction from the BASIC program to the profile generator The BASIC program continues while the instruction waits in the buffer There are three types of buffer e MTYPE The current movement that is being executed MTYPE relates to the axis and not to the process e NTYPE The new movement that waits for execution NTYPE relates to the axis and not to the process e Process Buffer The third buffered movement cannot be monitored The process buffer relates to the process and not to the axis It is possible to check if the process buffer is full by checking the PMOVE process parameter Process 1 Co Process Buffer WAITING EXECUTING Process 2 el Process Buffer NTYPE MTYPE Process 3 J Process Buffer NTYPE gt MTYPE Process 4 CE Process Buffer NTYPE gt MTYPE Process 5 Process Buffer Process 6 J Process Buffer NTYPE gt MTYPE Process 7 Ea Process Buffer Process 14 Program Buffer NTYPE gt MTYPE Each process has its own Each Axis has its own Process Buffer 2 buffers NTYPE amp MTYPE When a motion instruction is executed in the BASIC program the instruction is loaded into the process buffer and distributed to the corresponding axis buffer in the next motion sequence If a fourth motion instruction is executed and the three buffers are full the BASIC
299. osition slow down DEFPOS 0 set starting position to zero REVERSE WAIT UNTIL MPOS lt 129 45 SPEED slow_speed WAIT UNTIL VP_SPEED slow_speed wait until the axis slows OP 11 ON turn on an output to show that speed is now slow 237 All BASIC commands Section 4 2 Example A joystick is used to control the speed of a platform A deadband is required to prevent oscillations from the joystick midpoint This is done with the REVERSE command which sets the correct direction relative to the operator Then the joystick adjusts the speed through analogue input 0 REVERSE WHILE IN 2 ON IF AIN 0 lt 50 AND AIN 0 gt 50 THEN sets a deadband in the input SPEED 0 ELSE SPEED AIN 0 100 sets speed to a scale of AIN ENDIF WEND CANCEL See also AXIS CANCEL FORWARD RAPIDSTOP 4 2 212 RS_LIMIT Type Axis parameter Syntax RS_LIMIT RSLIMIT Description The RS_LIMIT parameter contains the absolute position of the reverse software limit in user units A software limit for reverse movement can be set from the program to control the working range of the machine When the limit is reached the CJ1W MCH72 will decelerate to 0 and then cancel the move Bit 10 of the AXISSTATUS axis parameter will be turned on while the axis posi tion is smaller than below RS_LIMIT Arguments N A Example No example See also AXIS FS_LIMIT UNITS 238 All BASIC commands Section 4 2 4 2 213 RUN Type Syntax Description Ar
300. ossibility to exchange analogue and digital input and output data with the PLC CPU e A wide choice of rotary linear and direct drive servos as well as Inverters are available to fit your needs in compactness performance and reliability The Inverters connected to the MECHATROLINK II are driven at the same update cycle time as the Servo Drivers The Trajexia system supports 3 kinds of MECHATROLINK II slaves Servo Drivers Inverters and I Os The CJ1W MCH 72 only supports 2 kinds of MECHATROLINK II slaves Servo Drivers and Inverters It does not support I Os System philosophy Section 1 2 1 2 1 2 1 1 2 1 1 1 2 1 2 1 2 1 3 System philosophy AXIS CONTROL LOOP CJ1W MCH72 AXIS TYPE Buffer amp Program Buffer _ profile Position gererator P M BASIC PROGRAMS All other Process 1 Servo Process 2 Servo Driver Drivers Process 3 Position Loan Speed Loop Process 14 Comme Torque Loop BUILT IN TJ1 PLC interface The system philosophy is centred around the relationship between e System architecture e Cycle time e Program control and multi tasking e Motion sequence and axes e Motion buffers A clear understanding of the relationship between these concepts is necessary to obtain the best results for the Trajexia system Glossary Motion sequence The Motion S
301. peats if the link axis motion is in a positive direction The number will decrement when the pattern repeats if the link axis motion is in a negative direction Note that the counter runs starting at zero 0 1 2 3 114 All BASIC commands Section 4 2 Value Parameter R W Description REPEAT COUNT R W Required number of pattern repeats If 1 the pattern repeats endlessly The number should be positive When the ABSOLUTE value of CB 4 reaches CB 5 the CAMBOX finishes if CB 6 1 The value can be set to 0 to terminate the CAMBOxX at the end of the current pat tern The axis the CAMBOxX is linked to can run in a positive or negative direction In the case of a negative direction link the pattern will execute in reverse In the case where a certain number of pattern repeats is specified with a negative direction link the first control block will produce one repeat less than expected This is because the CAMBOX loads a zero link position which immedi ately goes negative on the next servo cycle triggering a REPEAT COUNT This effect only occurs when the CAMBOx is loaded not on transitions from CONTROL BLOCK to CONTROL BLOCK This effect can easily be compensated for either by increasing the required number of repeats or setting the initial value of REPEAT POSITION to 1 NEXT CONTROL BLOCK R W If set to 1 the pattern will finish when the required number of repeats are
302. ple N A Mathematical function EXP expression The EXP function returns the exponential value of the expression expression Any valid BASIC expression gt gt PRINT EXP 1 0 2 7183 N A All BASIC commands Section 4 2 4 2 101 FALSE 4 2 102 FAST_JOG 4 2 103 FASTDEC Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also Type Syntax Description Arguments Example See also Constant read only FALSE The FALSE constant returns the numerical value 0 N A test res IN 0 OR IN 2 IF res FALSE THEN PRINT Inputs are off ENDIF N A Axis parameter FAST_JOG The FAST_JOG axis parameter contains the input number to be used as the fast jog input The number can be from 0 to 31 As default the parameter is set to 1 no input is used for the fast jog The fast jog input controls the jog speed between two speeds If the fast jog input is set the speed as given by the SPEED axis parameter will be used for jogging If the input is not set the speed given by the JOGSPEED axis parameter will be used Note This input is active low N A No example AXIS FWD_JOG JOGSPEED REV_JOG SPEED Axis parameter FASTDEC The FASTDEC axis parameter contains fast deceleration ration Its default value is zero If a non zero FASTDEC is specified the axis will ramp to zero at this deceleration rate when an axis limit switch or posi
303. ppen most of the time when the axes are not linked i e when the CAMBOX command is not executed Suppose furthermore that very rarely the condition changes when the axes are linked The change of the end_pos parameter triggers the recalculation of the CAM table while the CAMBOX command is executed The consequence is that the part of the demanded position of the slave axis follows the profile before the change and the other part follows the profile after the change In the end this leads to a discontinuation of the profile which causes an indefinite speed of the axis and ends up with this error the WDOG goes off and all axes stop The scenario above is hard to analyze when you do not know what happens The only thing that the user sees is that the slave axis has an error once every few hours or even less often But the oscilloscope can clearly show where the problem is In order to be able to use the oscilloscope all desired parameters must be captured at the time of an error This can be achieved by arranging the application programs in a certain way The good programming practice suggests to have a separate start up program that is set to run automatically on power up of the system and checks the integrity of the system whether all the expected slaves are connected and initialized For an example of a start up program see section 5 1 1 It is recommended to let the start up program when it is finished start only one program that takes care of
304. pping of the PLC memory area specified by area_code to the CJ1W MCH72 memory The output of this command is area_code plc_area plc_start tj_area tj_start total_items PLC_EXCHANGE 1 configures the mapping of the PLC memory to the CJ1W MCH72 memory area_code The PLC area Possible values in hexadecimal are 0100 0107 for PLC output area 8 areas available 8100 8107 for PLC input area 8 areas available plc_area The PLC memory area used for data exchange Possible values in hexadecimal are 01 CIO 03 DM 04 WR 05 HR 08 14 EM bank 0 C plc_start The start address in PLC memory Note The validity depends on plic_area e tj_area The CJ1W MCH72 memory area used for data exchange Possible values are 00 VR 16 bit signed integer 01 VR 32 bit floating point 02 IN or OP array depending on direction 03 AIN or AOUT array depending on direction 04 Axis Status array only valid if direction is PLC input e tj_start The tart address in CJ1W MCH72 memory Note The validity depends on tj_area Note The first 16 entries in the IN array are invalid start addresses total_items The total number of items words and dwords to transfer Note The validity depends on plc_area and tj_area Note The total number of words configured for all blocks may not exceed 2000 A floating point value corresponds to 2 words No example PLC_STATUS 215 All BASIC commands Section 4 2 4 2 185 PL
305. programs The 24 flag bits can be read with FLAGS and set with FLAGS value Arguments value The decimal equivalent of the bit pattern to which the flags must be set See the table below Bit number Decimal value 0 1 1 2 2 4 3 8 4 16 5 32 159 All BASIC commands Section 4 2 4 2 114 FLASHVR 160 Bit number Decimal value 6 64 7 128 Example FLAGS 146 2 16 128 Set Flags 1 4 and 7 on all others off Example IF FLAGS and 8 lt gt 0 then GOSUB somewhere Test if Flag 3 is set See also N A Type System command Syntax FLASHVR option flashpage tablepage Description The FLASHVR command is used to store TABLE variable data in the flash memory After the data has been stored at each power up the TABLE data will be restored to the values held in flash memory The command will write either the entire TABLE array or a part page of it depending on the value of the argument option Normally TABLE data are preserved in battery backed RAM memory However data can be lost if this battery is empty or if the bat tery replacement takes too long longer than 5 minutes In such cases it is advised to store TABLE memory to flash memory since it is not affected by battery failure All BASIC commands Section 4 2 Arguments option Depending of the value of this argument either the whole or just a part of the TABLE memory is stored The valid valu
306. r behaviour applies to executing FLASHVR 4 flashpage tablepage It the current defined range of the TABLE memory is narrower that the one of the retrieved data the range of TABLE memory will be extended automatically Note FLASHVR 1 writes the whole range all 64000 slots of the TABLE memory in flash memory starting from flashpage 0 Once FLASHVR 2 is executed the RAM TABLE data are not replaced on start up by the data saved in flash memory but that data is still available in flash memory and can be retrieved in any tablepage by using FLASHVR 3 flashpage tablepage command Note Each FLASHVR command generates a write to a block of the Flash memory Although this memory allows numerous writes and erases it has a limited life cycle Programmers should be aware of this fact and use the command as limited as possible 161 All BASIC commands Section 4 2 TABLE FLASH 0 15999 lepage 0 tablepage 0 16000 31999 lepage 1 tablepage 1 32000 47999 lepage 2 tablepage 2 48000 63999 epage 3 tablepage 3 Example FLASHVR 1 Store whole TABLE memory to flash memory Example FLASHVR 3 20 3 Store table page 3 TABLE 48000 TABLE 63999 into flash page 20 FLASHVR 4 20 3 Restore table page 0 TABLE 0 TABLE 15999 from flash page 20 This effectively copies data in range TABLE 48000 TABLE 63999 into range TABLE 0 TABLE 15999 See also TABLE 4 2 115 FOR TO STEP NEXT Type Program
307. r synchronizing two axes for a fixed period The labels in the figure are Time axis Speed axis Master axis 1 Synchronized MOVELINK axis 0 mOoOQOWDY Motion control concepts Section 1 3 1 3 3 4 Adding axes B BASE 0 ADDAX 2 FORWARD MOVE 100 AXIS 2 MOVE 60 AXIS 2 It is very useful to be able to add all movements of one axis to another One possible application is for instance changing the offset between two axes linked by an electronic gearbox The CJ1W MCH 72 provides this possibility by using the ADDAX command The movements of the linked axis will consists of all movements of the actual axis plus the additional movements of the master axis In the figure A is the time axis and B is the speed axis 1 3 4 Other operations 1 3 4 1 Cancelling moves 1 3 4 2 Origin search In normal operation or in case of emergency it can be necessary to cancel the current movement from the buffers When the CANCEL or RAPIDSTOP commands are given the selected axis respectively all axes will cancel their current move The encoder feedback for controlling the position of the motor is incremental This means that all movement must be defined with respect to an origin point The DATUM command is used to set up a procedure whereby the CJ1W MCH72 goes through a sequence and searches for the origin based on digital inputs and or Z marker from the encoder signal 11 Motion control concepts Section 1 3
308. r to the same value for both linked axes 3 This command has no meaning for a MECHATROLINK II axis in position mode ATYPE 40 because the value of S_REF_OUT is ignored Arguments axis The axis from which to sum the speed reference output to the base axis Set the argument to 1 to cancel the link and return to normal operation Example No example See also AXIS S_REF_OUT OUTLIMIT 4 2 22 ADDAX Type Axis command Syntax ADDAX axis Description The ADDAX command is used to superimpose two or more movements to build up a more complex movement profile The ADDAX command takes the demand position changes from the superimposed axis as specified by the axis argument and adds them to any movement running on the axis to which the command is issued The axis specified by the parameter can be any axis and does not have to physically exist in the system The ADDAX command therefore allows an axis to perform the moves specified on two axes added together When the axis parameter is set to OFF on an axis with an encoder interface the measured position MPOS is copied into the demanded position DPOS This allows ADDAX to be used to sum encoder inputs After the ADDAX command has been issued the link between the two axes remains until broken Use ADDAX 1 to cancel the axis link ADDAX allows an axis to perform the moves specified for 2 axes added together Combinations of more than two axes can be made by applying ADDAX to the superimposed axi
309. rameter controls the mode in which EnDat encoder return its position The encoder can be set to either cyclically return its position or it can be set to a parame ter read write mode The default after initialization is cyclic position return mode For more information see EnDat absolute encoder inter face specification N A ENCODER_CONTROL AXIS 1 0 This command sets cyclic position return mode ENCODER_CONTROL AXIS 1 1 This command sets parameter read write mode AXIS ENCODER ENCODER _BITS 147 All BASIC commands Section 4 2 4 2 89 ENCODER_RATIO Type Axis parameter Syntax ENCODER_RATIO denominator numerator Description This command allows the incoming encoder count to be scaled by a non integer number using the equation MPOS numerator demoninator x encoder_edges_input Unlike the UNITS parameters ENCODER_RATIO affects commands like MOVECIRC and CAMBOx since it affects the number of encoder edges within the servo loop at the low level It is necessary to change the position loop gains after changing encoder ratio in order to maintain performance and stability Note Large ratios should be avoided as they will lead to either loss of resolution or much reduced smoothness in the motion The actual phys ical encoder count is the basic resolution of the axis and the use of this command may reduce the ability of the Motion Controller to accurately achieve all positions Note ENCODER_RATIO does not replace
310. rameters of the MOVELINK command must be correct The easiest way to do this is to consider the acceleration constant speed and deceleration phases sep arately and then combine them as required according to these 2 rules 201 All BASIC commands Section 4 2 Rule 1 In an acceleration phase to a matching speed the link distance must be twice the movement distance Therefore the acceleration phase can be specified alone as MOVELINK 0 3 0 6 0 6 0 1 move is all accel Rule 2 In a constant speed phase with matching speed the two axes move the same distance Therefore the distance to move must be equal the link distance Therefore the constant speed phase can be specified as MOVELINK 0 4 0 4 0 0 1 all constant speed The deceleration phase is set in this case to match the acceleration MOVELINK 0 3 0 6 0 0 6 1 all decel The movements of each phase can be added to give the total move ment MOVELINK 1 1 6 0 6 0 6 1 Same as 3 moves above But in the example above the acceleration phase is kept separate MOVELINK 0 3 0 6 0 6 0 1 MOVELINK 0 7 1 0 0 0 6 1 This allows the output to be switched on at the end of the acceleration phase Example MOVELINK can be used to create an exact ratio gearbox between two axes Suppose it is required to create a gearbox link of 4000 3072 This ratio is inexact 1 30208333 If this ratio is entered into a CONNECT command the axes will slowly creep out of synchronisation To prevent t
311. rammed in mm and the speed is set to 10 mm s and the acceleration sufficiently high If a distance of 100 mm is specified CAM will take 10 seconds to execute The SPEED parameter in the base axis allows modification of the speed of movement when using the CAM move Note When the CAM command is executing the ENDMOVE parame ter is set to the end of the previous move 25000 20000 15000 10000 5000 106 All BASIC commands Section 4 2 Example Motion is required to follow the POSITION equation t x x 25 10000 1 cos x where x is in degrees This example table provides a simple oscillation superimposed with a constant speed To load the table and cycle it continuously the program would be FOR deg 0 TO 360 STEP 20 loop to fill in the table rad deg 2 PI 360 convert degrees to radians x deg 25 10000 1 COS rad TABLE deg 20 x place value of x in table NEXT deg WHILE IN 2 ON repeat cam motion while input 2 is on CAM 0 18 1 200 WAIT IDLE WEND Note The subroutine camtable loads the data into the cam TABLE as shown in the figure and in the table below TABLE position Degree Value 1 0 0 2 20 1103 3 40 3340 4 60 6500 5 80 10263 6 100 14236 7 120 18000 8 140 21160 9 160 23396 10 180 24500 11 200 24396 12 220 23160 13 240 21000 14 260 18236 15 280 15263 16 300 12500 17 320 10340 18 340 9103 19 360
312. ration there is no material slip and the friction helps to the stop to zero Trace1 Device1 X x S a 3 Eao alv kh I uA D 1 1 1 1 1 1 1 f I 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms Offset Change MLO MSPEED 0 MLO MPOS 0 ML1 MSPEED 0 0 L C L _ L J ML1 MPOS 341 Practical examples Section 5 2 5 2 8 1 342 Example start BAS GOSUB filltable WDOG 1 Set servos to RUN BASE 1 SERVO B S lt Enable position loop in axis 1 1 SE 0 RVO 1 Enable position loop in axis 0 he position counter counts from 0 to 11999 nd then back to 0 again P OPTION 1 P DIST 12000 EED 200 FORWARD D E Uh foe 4 loop CAMBOX in _tbl end_ tbl 1 ink_dst master opt start WAIT IDLE GOTO loop filltable RETURN The shape of the CAM is stored in TABLE 0 to TABLE 360 npoints 360 in _tbl 0 end tbl in_tbl npoints Distance of the master to make the CAM Ink dst 10000 Master axis master 0 The CAM start exactly when the master reaches position start opt 2 start 1000 k 100 Fill the TABLE with the suitable waveform FOR i in_tbl TO end_tbl TABLE i k COS PI i npoints 1 2 NEXT i Practical examples Section 5 2 5 2 9 Flying shear program An example of the Flying shear program In this application there are three ax
313. resent which makes them virtual and as such they can still be used in cyclic data exchange 3 3 2 1 Axis Status array The Axis Status array is a special array that exists of 4 fields The table below lists the Axis Status fields and the corresponding PLC data type 64 Axis Status field Description PLC data type Status BASIC command AXISSTATUS 16 bit word Position Measured position in encoder units if 32 bit integer devided by UNITS axis parameter gives MPOS axis parameter Monitor BASIC command DRIVE_MONITOR 16 bit word Drive status Status of the drive 16 bit word FINS commands Section 3 4 3 4 FINS commands Note FINS Factory Intelligent Network Services commands are message service communications commands developed by OMRON for Factory Automation control devices They do not depend on a particular transmission path and can be used to e Read from and write to the PLC memory or the CJ1W MCH72 memory e Control various operations The FINS communications can be issued from a PLC CPU or a host computer and they can also be sent to any of these The specific commands that can be sent depend on the destination A FINS command is defined by its command code and its response code A command code is a 2 byte hexadecimal code FINS commands always begin with a 2 byte command code The required parameters come after the command code The response code is a 2 byte hexadecimal code that i
314. rms one of 7 origin search sequences to position an axis to an absolute position or reset a motion error DEFPOS Defines the current position as a new absolute position 73 Categories Section 4 1 Name Description DISABLE_GROUP Groups axes together for error disabling DRIVE_ALARM Monitors the current alarm DRIVE_CLEAR Clears the alarm status of the Servo Driver DRIVE_READ Reads the specified parameter of the Servo Driver DRIVE_RESET Resets the Servo Driver DRIVE_WRITE Writes a specific value to the specified parameter of the Servo Driver ENCODER_READ Reads a parameter of the EnDat absolute encoder ENCODER_WRITE Writes to a parameter of the EnDat absolute encoder FORWARD Moves an axis continuously forward at the speed set in the SPEED parameter HW_PSWITCH Sets on and off the hardware switch on output 0 of the Encoder Interface when predefined positions are reached MECHATROLINK Initializes MECHATROLINK II bus and performs various operations on MECHATROLINK II stations connected to the bus MHELICAL Interpolates 3 orthogonal axes in a helical move MOVE Moves one or more axes at the demand speed accelera tion and deceleration to the position specified as increment from the current position MOVEABS Moves one or more axes at the demand speed accelera tion and deceleration to the position speci
315. rograms that have been set to run at start up Note This command should only be used on the Command Line Termi nal Arguments N A Example No example See also RUNTYPE 98 All BASIC commands Section 4 2 4 2 33 AXIS Type Syntax Description Arguments Example Example Example See also 4 2 34 AXIS_ENABLE Type Syntax Description Arguments Example See also System command AXIS axis_number The AXIS modifier sets the axis for a single motion command or a single axis parameter read write to a particular axis AXIS is effective only for the command or axis parameter operation If it is required to change the axis used to a particular axis in every subsequent command use the BASE command instead axis_number Any valid BASIC expression specifying the axis number BASE 0 PRINT VP_SPEED AXIS 2 MOVE 300 AXIS 0 REP_DIST AXIS 1 100 BACKLASH Axis parameter AXIS_ENABLE ON OFF The AXIS_ENABLE axis parameter is used to enable or disable partic ular axis independently of others This parameter can be set ON or OFF for each axis individually The default value on start up is ON or all axes The axis will be enables if both AXIS_ENABLE for that axis is ON and WDOG is on For MECHATROLINK II axes setting AXIS_ENABLE to OFF will disable Servo Driver output to the motor For Flexible axis Servo axis setting AXIS_ENABLE to OFF will force both voltage out puts to 0 For Flexible axis Stepper O
316. rt Standard Section IF READ BIT 15 diag01 1 THEN Drive Parameters BASE 2 Parameter data param _n param_v mask size TABLE 0 20E 32 SFFFFFF 4 TABLE 4 210 45 SFFFFFF 4 TABLE 8 515 800 SFFFOFF 2 TABLE 12 1 MECHATROLINK 0 20 43 SJDE O2ANA OY REGIST 1 VR system01 0 i 0 res 0 WHILE TABLE i lt gt 1 IF NOT DRIVE READ TABLE i TABLE i 3 system01 THEN SET BIT 0 diag02 T ELSE IF TABLE i 2 FFFFFF THEN IF VR system01 lt gt TABLE i 1 THEN IF NOT DRIVE WRITE TABLE i TABLE i 3 TABLE i 1 1 THEN SET BIT 1 diag02 ELSE res 1 ENDIF ENDIF ELSE Parameter set using Mask IF VR system01 AND NOT TABLE i 2 lt gt TABLE i 1 VR system01 VR system01 AND TABLE i 2 OR TABLE i IF NOT DRIVE WRITE TABLE i TABLE i 3 VR system01 THEN SET BIT 1 diag02 ELSE res 1 ENDIF ENDIF ENDIF 329 Practical examples Section 5 2 i it4 WEND Reset drive if necessary IF res 1 THEN IF NOT DRIVE RESET THEN SET BIT 0 diag02 NDIF El BASE 3 Parameter data param _n param_v mask size TABLE 0 20E 32 SFFFFFF 4 TABLE 4 210 45 SFFFFFF 4 TABLE 8 50A 8000 SFFOFFF 2 E E TABLE 12 50B
317. rt_ signal 0 WAIT UNTIL IN start_signal 1 Move bag length MOVEABS bag_distance WAIT UNTIL MTYPE 2 To verify that the MOVEABS is being executed If we work with Mark activate the trigger MARK FALSE when triggered and TRUE when not triggered IF work with mark AND MARK THEN REGIST 1 WAIT UNTIL MARK 0 ENDIF Wait until movement finished or mark detected WAIT UNTIL MTYPE 0 OR MARK AND work with mark Working with mark IF work with mark THEN IF MARK THEN If the mark has been detected th position is corrected MOVEMODIFY bag_distance expected pos REG POS Practical examples Section 5 2 failed 0 ELSE If the mark has not been detected PRINT Mark not detected failed failedtl IF failed gt max_ fail THEN After several consecutive misdetection stop the application PRINT Mark definitelly lost program alarm 3 STOP ENDIF ENDIF ENDIF Wait until the feed movement has finished WAIT IDLE GOTO loop r 5 2 8 CAM table inside a program It shows how to create a CAM table inside a program and use the CAMBOX motion command The profile used is the COS square one This is a quite typical profile for feeder type applications as e The motion provides a smooth acceleration without sudden acceleration changes so the material slip is minimized e It gives a fast deceleration so the cycle time is reduced During decele
318. ry is locked 82 Cannot edit program 83 Too many nested OPERANDS 84 Cannot reset when drive servo on 85 Flash Stick blank 86 Flash Stick not available on this controller 87 Slave error 88 Master error 89 Network timeout 90 Network protocol error 91 Global definition is different 92 Invalid program name 93 Program corrupt 94 More than one program run ning when trying to set GLO BAL CONSTANT 95 Program encrypted 96 TOKEN definition incorrect 97 Cannot change program type 98 Command expected once it has been created 99 Invalid command 100 Invalid parameter for com mand 101 Too many tokens in block 102 Invalid mix of modal groups 103 Variable defined outside 104 Invalid program type include file 241 All BASIC commands Section 4 2 Number Message Number Message 105 Variable not declared 106 expected 107 Number expected 108 AS expected 109 STRING VECTOR or ARRAY 110 String expected expected 111 Invalid MSPHERICAL input 112 Too many labels 113 Symbol table locked 114 Incorrect symbol type 115 Invalid mix of data types 116 Command not allowed when running Trajexia Studio 117 Parameter expected 118 Firmware error Device in use 119 Device error Timeout waiting 120 Device error Command not for device supported by device 121 Device error CRC error 122 Device error Error writing to device 123 Device error Invalid response 124 Firmware error Cannot refer
319. s Name Description COMMENT FIELD Enables a line not to be executed STATEMENT SEPARATOR Enables more statements on one line AUTORUN Starts all the programs that have been set to run at start up COMPILE Compiles the current program COPY Copies an existing program in the motion control ler to a new program DEL Deletes a program from the motion controller DIR Displays a list of the programs in the motion con troller their size and their RUNTYPE on the stand ard output EDIT Allows a program to be modified using a VT100 Terminal EPROM Stores a program in the flash memory LIST Prints the program on the standard output NEW Deletes all lines of the program in the motion con troller PROCESS Returns the running status and task number for each current task 79 Categories Section 4 1 Name Description RENAME Changes the name of a program in the motion controller RUN Executes a program RUNTYPE Determines if a program is run at start up and which task it is to run on SELECT Specifies the current program STEPLINE Executes a single line in a program STOP Halts program execution TROFF Suspends a trace at the current line and resumes normal program execution TRON Creates a breakpoint in a program 4 1 8 Program control commands 4 1 9 Slot parameters and modifiers 80 Name Description F
320. s first Category Items to check Installation Is the environment dusty environment Are there any conducting materials in the environment that could get into the equipment Is the ambient temperature in a range shown in the unit specification Is there excessive moisture from humidity water usage etc Wiring Are signal lines and power lines placed in separate ducts Is the proper grounding provided Is there too much electric noise and if so does the power supply have a noise filter Recent changes Has there been changes to the system Has there been changes to the system configuration Has there been changes to application including programs 348 Error Indicators Section 6 2 6 2 Error Indicators The unit s status LED indicators indicate the following errors 6 2 1 Errors During Initialisation 6 2 2 Errors During Operation Status LED ON OFF FLASH Not Lit Not lit Flashing changed RUN ERC ERH WDOG BF Initial hardware test OFF Flashing OFF OFF OFF error Error log access OFF ON OFF OFF OFF error PLC watchdog OFF OFF OFF OFF OFF timeout error Communication error OFF OFF ON OFF OFF between the unit and the PLC Other CPU error OFF OFF ON OFF OFF Unit No setting error OFF OFF ON OFF OFF I O table OFF OFF ON OFF OFF config
321. s The ratio value can be either positive or negative and has sixteen bit fractional resolution e driving_axis The Master axis which will drive the base axis Note To achieve an exact connection of fractional ratio s of values such as 1024 3072 the MOVELINK command can be used with the continuous repeat link option set to ON 121 All BASIC commands Section 4 2 Example In a press feed a roller is required to rotate at a speed that is equal to one quarter of the measured rate from an encoder installed on the incoming conveyor The roller is wired to the master axis 0 The refer ence encoder is connected to axis 1 BASE 0 SERVO ON CONNECT 0 25 1 Ay Example A machine has an automatic feed on axis 1 that must move at a set ratio to axis 0 This ratio is selected using inputs 0 2 to select a particular gear This ratio can be updated every 100 ms Combinations of inputs select the intermediate gear ratios For example 1 ON and 2 ON gives a ratio of 6 1 BASE 1 FORWARD AXIS 0 WHILE IN 3 ON WA 100 gear IN 0 2 CONNECT gear 0 WEND RAPIDSTOP cancel the FORWARD and the CONNECT 122 All BASIC commands Section 4 2 4 2 55 CONSTANT Example See also Type Syntax Description 15 AXIS 1 107 AXIS 0 4 SEC 8 SEC 12 SEC CONNECT 2 0 CONNECT 0 0 CANCEL Axis 0 is required to run a continuous forward Axis 1 must connect to axis 0 If CONNECT is called it results
322. s 1 and 4 Combination of options 2 and 4 Example link_position The absolute position where CAMBOX will start when link_option is set to 2 Note When the CAMBOX command is executing the ENDMOVE parameter is set to the end of the previous move The REMAIN axis parameter holds the remainder of the distance on the link axis 2000 1500 1000 500 rreiioditi titi citi loriiad 3 6 9 12 15 18 21 24 27 30 Subroutine to generate a SIN shape speed profile Uses p is loop counter num_p is number of points stored in tables pos 0 num_p scale is distance travelled scale factor profile_gen num_p 30 scale 2000 FOR p 0 TO num_p TABLE p SIN PI 2 p num_p PI 2 p num_p scale NEXT p RETURN This graph plots TABLE contents against table array position This cor responds to motor POSITION against link POSITION when called using CAMBOX The SPEED of the motor will correspond to the derivative of the position curve above 111 All BASIC commands Section 4 2 160 1207 80 40 7 0 TTTtrtrTtTTtr1rtrtrrrrtrtirtrrrrr 0 3 6 9 12 15 18 21 24 27 30 Example A pair of rollers feeds plastic film into a machine The feed is synchro nised to a master encoder and is activated when the master reaches a position held in the variable start This example uses the table points 0 30 generated in the example above start 1000 FORWARD AXIS 1 WHILE IN 2 OFF CAMBOX 0 30 80
323. s and pin numbers Input signal CN1 pin number P_OT active high 19 N_OT active high 20 DEC active high 21 EXT1 active high 5 EXT2 active high 4 EXT3 active high 3 E STP active high 2 SIO active high 22 SI1 active high 23 S12 active high 6 PCL active high 7 NCL active high 8 For more information on the CN1 I O connector pins on the Servo Drivers refer to the Sigma ll Servo Driver manual the Sigma V Servo Driver manual the Junma series Servo Driver manual and the G Series series Servo Driver manual Servo Driver inputs that are mapped into the CJ1W MCH 72 I O space like this are accessed within the program per axis and cannot be accessed in the usual way with the IN command The only way you can use these inputs in the program is to assign them to the axis parameters DATUM_IN FHOLD_IN FWD_IN and REV_IN The inputs of the axis Servo Driver are used depending on the axis of which the parameters are set Example We have a Sigma ll and a Junma driver assigned to controller axes 0 and 3 For the Sigma ll driver we want to use input signal EXT1 mapped to CN1 44 if Pn511 2 is set to 4 to serve as reverse limit input for axis 0 For the Junma driver we want to use input signal EXT1 CN1 2 as reverse limit for axis 3 We can do this with these commands REV_IN AXIS 0 22 REV_IN AXIS 3 22 298 How to s Section 5 1 Note Note that even thou
324. s as well ADDAX works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note The ADDAX command sums the movements in encoder edge units Arguments axis The axis to be set as a superimposed axis Set the argument to 1 to cancel the link and return to normal operation 91 All BASIC commands Section 4 2 Example UNITS AXIS 0 1000 UNITS AXIS 1 20 Superimpose axis 1 on axis 0 ADDAX 1 AXIS 0 MOVE 1 AXIS 0 MOVE 2 AXIS 1 Axis 0 will move 1 1000 2 20 1040 edges ENCODER AXIS 2 92 All BASIC commands Section 4 2 Example Pieces are placed randomly onto a belt that moves continuously Fur ther along the line they are transferred to a second flighted belt A detection system indicates if a piece is in front of or behind its nominal position and how far expected 2000 sets expected position BASE 0 ADDAX 1 CONNECT 1 2 continuous geared connection to flighted belt REPEAT GOSUB getoffset get offset to apply MOVE offset AXIS 1 make correcting move on virtual axis UNTIL IN 2 OFF repeat until stop signal on input 2 RAPIDSTOP ADDAX 1 clear ADDAX connection STOP getoffset sub routine to register the position of the piece and calculate the offset BASE 0 REGIST 3 WAIT UNTIL MARK seenat REG_POS offset expected seenat RETURN Axis 0 in this example is connected to the encoder of the second con veyor A superimposed MOVE on axis 1 is used
325. s not necessary In this case a startup sequence must be executed one time during the machine commissioning In practice there are several different origin search sequences They are different in these areas e The means used to detect limit positions of the moving part sensors switches etc e Origin home position or reference e Possible positions of the moving part related to limit positions and origin position The CJ1W MCH72 includes some pre defined basic homing sequences e DATUM 0 This is not really an origin search This command sets DPOS MPOS and cancels the axis errors e DATUM 1 This does an origin search in forward direction using the Z mark of an encoder as homing switch e DATUM 2 Does an origin search in reverse direction using the Z mark of an encoder as homing switch e DATUM 3 Does an origin search in forward direction using the input selected in DATUNLIN as homing switch e DATUM 4 Does an origin search in reverse direction using the input selected in DATUNLIN as homing switch e DATUM 5 Does an origin search in forward direction using the input selected in DATUNLIN as homing switch and searches the next Z mark of an encoder e DATUM 6 Does an origin search in reverse direction using the input selected in DATUNLIN as homing switch and searches the next Z mark of an encoder For more details on these pre defined homing sequences see section 4 2 65 In some situations more complex homing sequences ar
326. s the scope function off SCOPE_POS TABLE TRIGGER System parameter read only SCOPE_POS The SCOPE_POS parameter contains the current TABLE position at which the SCOPE command is currently storing its parameters N A No example SCOPE 245 All BASIC commands Section 4 2 4 2 220 SELECT Type Syntax Description Arguments Example See also 4 2 221 SERVO Type Syntax Description Arguments Example See also 246 Program command SELECT program_name The SELECT command specifies the current program for editing run ning listing etc SELECT makes a new program if a program with the name entered does not exist The program name can also be specified without quotes When a program is selected the commands COMPILE DEL EDIT LIST NEW RUN STEPLINE STOP and TROFF will apply to the cur rently selected program unless a program name is specified in the com mand line When another program is selected the previously selected program will be compiled The selected program cannot be changed when a program is running Note This command is implemented for a Command Line Terminal Trajexia Studio automatically selects programs when you click on their entry in the list in the control panel N A gt gt SELECT PROGRAM PROGRAM selected gt gt RUN COMPILE DEL EDIT LIST NEW RUN STEPLINE STOP TROFF Axis parameter SERVO The SERVO parameter determines whether the base axis
327. s when you install the CJ1W MCH72 in a PLC system e Turn off the power supply to the PLC before the installation or connection of the CJ1W MCH72 e Use separate conduits or ducts for the I O lines This prevents noise from high tension lines or power lines Do not remove the label on top of the CJ1W MCH72 during the installation and wiring The label makes sure that no foreign matter can enter the unit e Remove the label on top of the CJ1W MCH 72 after the installation and wiring of the unit This makes sure that the unit cannot become overheated The CJ1W MCH 72 can be installed in any slot in a CJ series CPU rack or ina CJ series expansion CPU rack The CuJ series PLC supports up to 4 expansion CPU racks Up to 16 CPU bus units can be connected to one PLC Also the maximum number of CJ1W MCH 72 units that can be connected to one PLC is 16 PLC CPU rack 10 Units max Erid cover Expansion Backplane 10 Units max End cover Expansion Backplane 10 Units max End cover Expansion Backplane 10 Units max End cover PII s ae PS Power Supply Unit CPU CPU Unit IC I O Control Unit Il I O Interface Unit Expansion racks 50 Installation Section 2 3 2 3 2 Setup Note Note Note The maximum current consumption of the CJ1W MCH72 is 680 mA M
328. s you to create a direct gearbox link or a linked move between two axes The MC Unit supports the following operations e Electronic gearbox Linked CAM e Linked move e Adding axes 1 3 3 1 Electronic gearbox The CJ1W MCH 72 is able to have a gearbox link from one axis to another as if there is a physical gearbox connecting them This can be done using the CONNECT command in the program In the command the ratio and the axis to link to are specified In the figure A is the Master axis and B is the CONNECT axis Axes Ratio CONNECT command 1 1 CONNECT 1 0 AXIS 1 2 1 CONNECT 2 0 AXIS 1 1 2 CONNECT 0 5 0 AXIS 1 Motion control concepts Section 1 3 1 3 3 2 Linked CAM control 1 3 3 3 Linked move 10 Next to the standard CAM profiling tool the CJ1W MCH 72 also provides a tool to link the CAM profile to another axis The command to create the link is called CAMBOX The travelling speed through the profile is not determined by the axis parameters of the axis but by the position of the linked axis This is like connecting two axes through a cam In the figure A is the Master axis 0 position and B is the CAMBOX Axis 1 position The MOVELINK command provides a way to link a specified move to a master axis The move is divided into an acceleration deceleration and constant speed part and they are specified in master link distances This can be particularly useful fo
329. sed in the Servo Driver The Speed axis parameter is sent to the Servo Driver and reads the position feedback BASE 0 ATYPE 44 Servo axis encoder mode SERVO 1 WDOG 1 DEFPOS 0 loop MOVE 81920 WAIT IDLE WA 100 DEFPOS 0 GOTO loop 271 How to s Section 5 1 Example 1 Trace1 Device1 X x SH 3 Oa alv I Aa 9 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms lay Plot Parameter Change ML MPOS L ML MSPEED aa C DigitalInput 2 ML FE Only proportional gain has a set value the Following Error is proportional to the speed The parameter values for the example are Motion Parameter values P_Gain 131072 VFF_GAIN 0 Fn001 4 Note The colours and scale of the oscilloscope for speed mode are as follows Red MSPEED Measured Axis speed Units is 50 units ms division Blue FE Following Error Units is depending on the graph Green MPOS Measured Axis position 50000 units division 272 How to s Section 5 1 Example 2 Trace1 Device1 X x Sas Oa alv I ra o 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms Change ML MPOS L ML MSPEED L DigitalInput 2 ML FE m The value for rigidity is increased The error magnitude remains the same but the ripple the speed stability and overshoot are better The parameter
330. stance from the CJ1W MCH 72 e Use surge absorbers for the Contact Outputs After the installation of the unit in a PLC system the following initial setup procedure must be executed A unique unit number must be set Refer to section 2 3 2 1 e An I O table must be created in the PLC to register the unit on the PLC CPU Refer to section 2 3 2 2 This initial setup procedure makes sure that the unit can start up properly and can be configured for operation 2 3 2 1 Setting the unit number To set the unit number perform the following steps 1 Turn off the power supply to the PLC system 2 Use a small screwdriver to set the unit number selector switch to the new unit number 51 Installation Section 2 3 A Caution Do not damage the unit number selector switch Note The factory setting of the unit number selector switch is 0 3 Turn on the power supply to the PLC system Note The unit reads the unit number during the initialization after a power up It does not read the unit number after a software reset Thus the power must always be turned off before the unit number is set Note If the unit number is set for the first time or if the unit number is changed an I O table must be created for the PLC system 2 3 2 2 Creating an I O table The I O table identifies the units connected to the PLC and allocates I O to these units The I O table is stored in the PLC CPU It is loaded at start up If the configuration of a
331. sure proper heat dissipation Leaving the label attached may result in malfunction Do not apply voltages to the Input Units in excess of the rated input voltage Excess voltages may result in burning e Do not apply voltages or connect loads to the Output Units in excess of the maximum switching capacity Excess voltage or loads may result in burning e Check the user program for proper execution before actually running it on the Unit Not checking the program may result in an unexpected operation e Be sure that the terminal blocks Memory Units expansion cables and other items with locking devices are properly locked into place Improper locking may result in malfunction e Double check all wiring and switch settings before turning ON the power supply Incorrect wiring may result in burning e Disconnect the LR and GR terminals when performing insulation resistance or withstand voltage tests Not disconnecting the functional ground terminal may result in burning Confirm that no adverse effect will occur in the system before attempting any of the following Not doing so may result in an unexpected operation e Changing the operating mode of the PLC including the operating mode at power up e Force setting force resetting any bit in memory e Changing the present value of any word or any set value in memory Do not pull on the cables or bend the cables beyond their natural limit Doing either of these may break the cables Do
332. t N A All BASIC commands Section 4 2 4 2 4 Division Type Syntax Description Arguments Example See also 4 2 5 Power Type Syntax Description Arguments Example See also 4 2 6 Is equal to Type Syntax Description Arguments Example See also Mathematical function expression1 expression2 The operator divides expression1 by expression2 expression1 Any valid BASIC expression expression2 Any valid BASIC expression result 11 4 Assigns the value 2 75 to the variable result N A Mathematical function expression1 expression2 The power operator expression2 This operation uses floating point algorithms and may give small devia tions for integer calculations raises expression1 to the power of expression1 Any valid BASIC expression expression2 Any valid BASIC expression result 2 5 Assigns the value 32 to the variable result N A Mathematical function expression1 expression2 The operator returns TRUE if expression1 is equal to expression2 otherwise it returns FALSE expression1 Any valid BASIC expression expression2 Any valid BASIC expression IF a 10 THEN GOTO label1 If variable a contains a value equal to 10 program execution continues at label label1 Otherwise program execution continues with the next statement N A 85 All BASIC commands Section 4 2 4 2 7 Assignment Type Mathematical function
333. t channel 5 in k See also N A 168 All BASIC commands Section 4 2 4 2 125 GLOBAL Type Syntax Description Arguments Example See also 4 2 126 GOSUB RETURN Type Syntax Description Arguments System command GLOBAL name vr_number Declares the name as a reference to one of the global VR variables The name can then be used both within the program containing the GLOBAL definition and all other programs in the Trajexia Studio solu tion Note The program containing the GLOBAL definition must be run before the name is used in other programs In addition only that pro gram should be running at the time the GLOBAL is executed otherwise the program error will appear and the program will stop when trying to execute this command For fast startup the program should also be the only process running at power up When the GLOBAL is declared the declaration remains active until the next CJ1W MCH72 reset by switching the power off and back on or by executing the EX command In programs that use the defined GLOBAL name has the same mean ing as VR vr_number Do not use the syntax VR name A maximum of 128 GLOBALs can be declared name Any user defined name containing lower case alpha numerical or underscore characters vr_number The number of the VR to be associated with name GLOBAL srew_pitch 12 GLOBAL ratio1 534 ratio1 3 56 screw_pitch 23 0 PRINT screw_pitch ratio1 N A
334. t or outlet ports operation panel mounting holes or in the control panel door may cause electromagnetic wave leakage or interference In this case the product may fail to meet EC Directives In order to prevent such interference fill clearances in the control panel with conductive packing In places where conductive packing comes in contact with the control panel ensure electrical conductivity by removing the paint coating or masking these parts when painting xii Overview Section 1 1 1 1 Overview Note SECTION 1 Introduction The CJ1W MCH72 is a Trajexia style motion control unit that can be connected to a CJ1 series PLC It acts as an interface between PLC systems and Trajexia style motion control systems Trajexia is the OMRON motion platform that offers you the performance and the ease of use of a dedicated motion system It maximum flexibility and scalability At the heart of Trajexia lies the TJ1 multi tasking motion coordinator Powered by a 32 bit DSP it can do motion tasks such as e cam e gearbox registration control and interpolation all using simple motion commands The CJ1W MCH72 has the following features e A MECHATROLINK II connection for a MECHATROLINK II network with up to 30 axes The motion cycle time is selectable 0 5 ms 1 ms 2 ms or 4 ms e An Encoder Interface connection It supports the main absolute encoder protocols allowing the connection of an external encoder to the system e The p
335. tadsvesceavepantaztuautene E ate atuneen Mere ae hes AURA el EET 62 3 4 FINS Commands meieni ii aneii E ish ia diag acini atin Gos aisle eo ein EAE e aiaa 65 SECTION 4 BASIC commands 73 4 1 4 2 Categories wos ditees Mth ee ARS ites Re Ree Be RE ee as 73 All BASIC command eninin roii i EEE EE EE EEE sab ue ETE EA wes bs AE Civ dT 84 SECTION 5 Examples 267 5 1 TABLE OF CONTENTS SECTION 6 Troubleshooting 6 1 Items to Check First 6 2 Error Indicators 6 3 Troubleshooting Errors 6 4 Miscellaneous Revision history vi Intended audience Precautions 1 Intended audience This manual is intended for the following personnel who must also have knowledge of electrical systems an electrical engineer or the equivalent e Personnel in charge of installing FA systems e Personnel in charge of designing FA systems e Personnel in charge of managing FA systems and facilities 2 General precautions N WARNING The user must operate the product according to the performance specifications described in the operation manuals Before using the product under conditions which are not described in the manual or applying the product to nuclear control systems railroad systems aviation systems vehicles combustion systems medical equipment amusement machines safety equipment and other systems machines and equipment that may have a serious influence on lives and property if used improperly consult your OMRON representa
336. tart up or controller reset N A gt gt PRINT DPOS AXIS 0 34 0000 The above line will return the demand position in user units AXIS DPOS DEFPOS DEMAND_EDGES FE MPOS REP_DIST REP_OPTION OFFPOS UNITS All BASIC commands Section 4 2 4 2 74 DRIVE_ALARM Type Syntax Description Arguments Example See also 4 2 75 DRIVE_CLEAR Type Syntax Description Arguments Example See also Axis command DRIVE_ALARM VR alarm_number The DRIVE_ALARM function reads the current alarm of the Servo Driver that is connected to the Trajexia system via MECHATROLINK II Upon successful execution the command returns 1 and stores the value in the VR memory location specified by the VR parameter If the command cannot be executed the value 0 is returned The command is executed on the driver for the base axis set by BASE The base axis can be changed with the AXIS modifier as with all the other axis com mands and parameters This command waits for the response from the axis The execution of the command can be slow and variable in time If you require a quick response do not use this command VR The alarm value is stored on the VR address on successful execu tion alarm_number Optional parameter to set which alarm to read O means the last alarm default 1 means the penultimate alarm etc alarm_number ranges from 0 to 9 IF NOT DRIVE_ALARM 10 AXIS 2 THEN PRINT Failed to readalarm for Servo Dri
337. tched off Arguments N A Example No example See also AXISSTATUS ERROR_AXIS ERRORMASK MOTION_ERROR SERVO 4 2 264 WHILE WEND Type Program control command Syntax WHILE condition commands WEND Description The WHILE WEND structure allows the program segment between the WHILE and the WEND statement to be repeated a number of times until the condition becomes FALSE In that case program execution will continue after WEND Note WHILE WEND loops can be nested without limit Arguments condition Any valid logical BASIC expression Example WHILE IN 12 OFF MOVE 200 WAIT IDLE OP 10 OFF MOVE 200 WAIT IDLE OP 10 ON WEND See also FOR TO STEP NEXT REPEAT UNTIL 264 All BASIC commands Section 4 2 4 2 265 XOR Type Mathematical operation Syntax expression1 XOR expression2 Description The XOR eXclusive OR operator performs the logical XOR function between corresponding bits of the integer parts of two valid BASIC expressions The logical XOR function between two bits is defined as in the table below Bit 1 Bit 2 Result 0 0 0 0 1 1 1 0 1 1 1 0 Arguments expression Any valid BASIC expression expression2 Any valid BASIC expression Example VR 0 10 XOR 18 The XOR is a bit operator and so the binary action taking place is as fol lows 01010 XOR 10010 11000 The result is therefore 24 See also N A 265 All BASIC commands Section 4 2 266
338. te REPEAT UNTIL construct can be nested indefinitely Arguments commands Any valid set of BASIC commands e condition Any valid BASIC logical expression Example A conveyor is to index 100mm at a speed of 1000mm s wait for 0 5s and then repeat the cycle until an external counter signals to stop by turning on input 4 cycle SPEED 1000 REPEAT MOVE 100 WAIT IDLE WA 500 UNTIL IN 4 ON See also FOR TO STEP NEXT WHILE WEND 4 2 207 RESET Type System command Syntax RESET Description The RESET command sets the value of all local variables of the current BASIC task to 0 Arguments N A Example No example See also CLEAR 4 2 208 RETURN See GOSUB RETURN 235 All BASIC commands Section 4 2 4 2 209 REV_IN Type Axis parameter Syntax REV_IN Description The REV_IN parameter contains the input number to be used as a reverse limit input The valid input range is 0 to 31 Values 0 to 15 repre sent physically present inputs of CJ1W MCH 72 I O connector and are common for all axes Values 16 to 31 are mapped directly to driver inputs that are present on the CN1 connector They are unique for each axis It depends on the type of Servo Driver which Servo Driver inputs are mapped into inputs 16 to 31 For more information on Servo Driver I O mapping into the Trajexia I O space refer to section 5 1 4 As default the parameter is set to 1 no input is selected If an input number is set and the limit is reached a
339. ter refer to section 4 2 200 table 1 The input used for registration is determined by the argument of the REGIST command Latch input Position l a ai ae Interpolated l position e 306 How to s Section 5 1 The delay in the capture in the Sigma ll Servo Driver is about 3 us As the encoder information is refreshed every 62 5 us it is necessary to make interpolation to obtain the right captured position value see the picture Since the motor speed cannot change much during 62 5 us the resulting accuracy is very high The delays in transmission of the information are e Delay in triggering the registration 0 625 ms to 4 ms e Delay in receiving the registration 3 5 ms e Delay in capturing the registration 3 us It is also possible to use the encoder Z mark to register an axis position This is also done with the argument of the REGIST command 5 1 6 3 Registration in the Junma Servo Driver Registration in the Junma Servo Driver is the same as registration in the Sigma ll Servo Driver with one difference There is only one physical input and one logical latch too so no settings of Servo Driver parameters are necessary The physical input is associated to logical latch EXT1 and only the rising signal edge can be used for registration 5 1 6 4 Registration in the G Series Servo Driver Registration in the G Series Servo Driver is the same as reg
340. the BASIC resolution of the axis and use of this command may reduce the ability of the Motion Controller to accurately achieve all positions e STEP_RATIO does not replace UNITS Do not use STEP_RATIO to remove the x16 factor on the stepper axis as this will lead to poor step frequency control e denominator An integer number between 0 and 16777215 that is used to define the denominator in the above equation numerator An integer number between 0 and 16777215 that is used to define the numerator in the above equation All BASIC commands Section 4 2 Example Two axes are set up as X and Y but the axes steps per mm are not the same Interpolated moves require identical UNITS values on both axes in order to keep the path speed constant and for MOVECIRC to work correctly The axis with the lower resolution is changed to match the higher step resolution axis so as to maintain the best accuracy for both axes Axis 0 500 counts per mm 31 25 steps per mm Axis 1 800 counts per mm 50 00 steps per mm BASE 0 STEP_RATIO 500 800 UNITS 800 BASE 1 UNITS 800 See also N A 4 2 232 STEPLINE Type Program command Syntax STEPLINE program_name task_number Description The STEPLINE command executes one line i e steps in the pro gram specified by program_name The program name can also be specified without quotes If STEPLINE is executed without program name on the command line the current selected program w
341. the result of the expression is less than 1 or greater that the number of available labels in the program no jump is performed expression Any valid BASIC expression label Any valid label in the program REPEAT GET 5 char UNTIL 1 lt char and char lt 3 ON char GOSUB mover stopper change GOSUB RETURN GOTO All BASIC commands Section 4 2 4 2 176 ON GOTO 4 2 177 OP Type Syntax Description Arguments Example See also Type Syntax Description Arguments Program control command ON expression GOTO label label The expression is evaluated and then the integer part is used to select a label from the list If the expression has the value 1 then the first label is used 2 then the second label is used and so on If the value of the expression is less than 1 or greater than the number of labels then an error occurs Once the label is selected subroutine GOTO jump to that label is performed expression Any valid BASIC expression label Any valid label in the program REPEAT GET 5 char UNTIL 1 lt char and char lt 3 ON char GOTO mover stopper change N A I O command OP output_number value OP binary_pattern OP The OP command sets one or more outputs or returns the state of the first 24 outputs OP has three different forms depending on the number of arguments Command OP output_number value sets a single output channel The range of output_number depends on t
342. the safety and 317 How to s Section 5 1 integrity of the application and execution of all other application programs This program is usually referred to as a SHELL program For more information on designing a SHELL program see section 5 2 1 Suppose that program is designed in a way the it contains a following fraction of code When there is an error we stop all programs No new oscilloscope captures are done And we have stored in the selected TABLES the last data trace in which the error has occurred Therefore we can recover this trace and analyze it loop IF MOTION ERROR lt gt 0 THEN HALT GOTO loop Trace1 Device1 X x SUS DB Elv t I4 Q a 1 1 I 1 1 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms This programming code causes all the programs and tracing to stop when an error happens on any axis The data is already captured in the Table memory and we can start using the oscilloscope to see the status of the desired parameters at the moment the error occurred The measured position of the master axis given in red does not seem to be the cause because there is no discontinuity on it We discard a mechanical problem as well because the torque given in green has low values An the moment of the problem the speed of the slave axis given in yellow was smooth and low therefore this is no problem either The next step is to analyze the CAM table to see which
343. tion functions that work on a specific station_address of a given unit All functions that retrieve a value store it in the VR variable indicated in the last parameter If this parameter has the value 1 then the value is printed to the command line port N A No example N A 185 All BASIC commands Section 4 2 4 2 155 MERGE 4 2 156 MHELICAL 186 Type Syntax Description Arguments Example See also Type Syntax Description Axis parameter MERGE The MERGE parameter is a software switch that can be used to enable or disable the merging of consecutive moves When MERGE is ON and the next move already in the next move buffer NTYPE the axis will not ramp down to 0 speed but will load up the following move enabling a seamless merge The default setting of MERGE is OFF It is up to the programmer to ensure that merging is sensible For exam ple merging a forward move with a reverse move will cause an attempted instantaneous change of direction MERGE will only function if the following are all true 1 Only the speed profiled moves MOVE MOVEABS MOVECIRC MHELICAL REVERSE FORWARD and MOVEMODIFY can be merged with each other They cannot be merged with linked moves CONNECT MOVELINK and CAMBOX 2 There is a move in the next move buffer NTYPE 3 The axis group does not change for multi axis moves When merging multi axis moves only the base axis MERGE axis parameter needs to be set Note
344. tion is not necessary The delay for the transmission of the captured information is just one SERVO_PERIOD cycle 307 How to s Section 5 1 5 1 6 6 Using registration in application programs There is one axis command REGIST and two axis parameters MARK and REG_POS With these commands and parameter you can control and use the registration functionality in BASIC programs e REGIST captures the axis position when a registration signal is detected The available settings depend on the axis type Refer to section 4 2 200 MARK is a flag that signals whether the position has been captured or not For the second registration input of the Encoder Interface the parameter MARKEB is also available For more information refer to sections 4 2 152 and 4 2 153 e REG_POS holds the captured axis position Only if the MARK flag signals that the position was captured successfully you can regard the REG_POS value as valid For the second registration input of the Encoder Interface the parameter REG_POSB is also available For more information refer to sections 4 2 198 and 4 2 199 Position gt t The trigger is active i The trigger is active The position If the trigger is information is not active I available the registration is REGIST 0 ignored REGIST 0 MARK 1 MARK 0 MARK 1 MARK 1 ned REG_POS xxx REG_POS Pos1 REG_POS Pos1 Registration Input The picture gives the sequence of executing the com
345. tive Make sure that the ratings and performance characteristics of the product are sufficient for the systems machines and equipment and be sure to provide the systems machines and equipment with double safety mechanisms This manual provides information for using the CJ1W MCH 72 Be sure to read this manual before attempting to use the Unit and keep this manual close at hand for reference during operation It is extremely important that the CJ1W MCH 72 and related devices be used for the specified purpose and under the specified conditions especially in applications that can directly or indirectly affect human life You must consult with your OMRON representative before applying the CJ1W MCH 72 and related devices to the above mentioned applications 3 Safety precautions N WARNING N WARNING N WARNING N WARNING N WARNING N WARNING Never short circuit the positive and negative terminals of the batteries charge the batteries disassemble them deform them by applying pressure or throw them into a fire The batteries may explode combust or leak liquid The CJ1W MCH72 outputs will go off due to overload of the output transistors protection As a countermeasure for such problems external safety measures must be provided to ensure safety in the system The CJ1W MCH 72 will turn off the WDOG when its self diagnosis function detects any error AS a countermeasure for such errors external safety measures must be pro
346. tly pointed to by the CAMBOX com mand as in any CAMBOX e CONTROL BLOCK This is pointed to by the third CAMBOX param eter in this options mode only It is of fixed length 7 table values It is important to note that the control block is modified during the CAMBOxX operation It must therefore be re initialised prior to each use e PATTERN BLOCK The start and end of this are pointed to by 2 of the CONTROL BLOCK values The pattern sequence is a sequence of scale factors for the SHAPE The table below gives the CONTROL BLOCK parameters Note READ WRITE values can be written to by the user program dur ing the pattern CAMBOX execution Value Parameter R W Description 0 CURRENT R The current position within the TABLE of the pattern POSITION sequence This value should be initialised to the START PATTERN number 1 FORCE R W Normally this value is 1 If at the end of a SHAPE the POSITION user program has written a value into this TABLE posi tion the pattern will continue at this position The system software will then write 1 into this position The value written must be inside the pattern such that the value CB 2 lt CB 1 lt CB 3 2 START R The position in the TABLE of the first pattern value PATTERN 3 END R The position in the TABLE of the final pattern value PATTERN 4 REPEAT R W The current pattern repeat number Initialise this number POSITION to 0 The number will increment when the pattern re
347. to apply offsets ENCODER AXIS 2 93 All BASIC commands Section 4 2 Example See also An X Y marking machine must mark boxes as they move along a con veyor Using CONNECT enables the X marking axis to follow the con veyor A virtual axis is used to program the marking absolute positions this is then superimposed onto the X axis using ADDAX ATYPE AXIS 3 0 set axis 3 as virtual axis SERVO AXIS 3 ON DEFPOS 0 AXIS 3 ADDAX 3 AXIS 0 connect axis 3 requirement to axis 0 WHILE IN 2 ON REGIST 3 registration input detects a box on the conveyor WAIT UNTIL MARK OR IN 2 OFF IF MARK THEN CONNECT 1 2 AXIS 0 connect axis 0 to the moving belt BASE 3 1 set the drawing motion to axis 3 and 1 Draw the M MOVEABS 1200 0 move A gt B MOVEABS 600 1500 move B gt C MOVEABS 1200 3000 move C gt D MOVEABS 0 0 move D gt E WAIT IDLE BASE 0 CANCEL stop axis 0 from folowing the belt WAIT IDLE MOVEABS 0 move axis 0 to home position ENDIF WEND CANCEL ADDAX_AXIS AXIS OUTLIMIT N WARNING Beware that giving several ADDAX commands in a system can create a dangerous loop when for instance one axis is linked to another and vice versa This may cause instability in the system 4 2 23 ADDAX_AXIS 94 Type Syntax Description Arguments Example See also Axis parameter read only ADDAX_AXIS The ADDAX_AXIS axis parameter returns the number of the axis to which the base axis is currently linked
348. transformation which is not 1 1 these are typically machines such as robotic arms or machines with par asitic motions on the axes Frame transformations have to be specially written in the C language and downloaded into the controller It is essen tial to contact OMRON if you want to install frame transformations Arguments N A Example No example See also FRAME 4 2 245 TRIGGER Type System command Syntax TRIGGER Description The TRIGGER command starts a previously set up SCOPE command Note Trajexia Studio uses TRIGGER automatically for its oscilloscope function Arguments N A Example No example See also SCOPE 4 2 246 TROFF Type Program command Syntax TROFF program_name Description The TROFF command suspends a trace at the current line and resumes normal program execution for the program specified with program_name The program name can also be specified without quotes If the program name is omitted the selected program will be assumed Arguments program_name The name of the program for which to suspend tracing Example gt gt TROFF lines See also SELECT TRON 256 All BASIC commands Section 4 2 4 2 247 TRON Type Program command Syntax TRON Description The TRON command creates a breakpoint in a program that will sus pend program execution at the line following the TRON command The program can then for example be executed one line at a time using the STEPLINE command Notes e Program
349. ts A software limit for forward movement can be set from the program to control the working range of the machine When the limit is reached the CJ1W MCH 72 will ramp down the speed of an axis to 0 and then can cel the move Bit 9 of the AXISSTATUS axis parameter will be turned on while the axis position is greater than FS_LIMIT FS_LIMIT is disabled when it has a value greater than REP_DIST Arguments N A Example No example See also AXIS AXISSTATUS REP_DIST UNITS 4 2 122 FWD_IN Type Axis parameter Syntax FWD_IN Description The FWD_IN axis parameter contains the input number to be used as a forward limit input The valid input range is 0 to 31 Values 0 to 15 repre sent physically present inputs of CJ1W MCH 72 I O connector and are common for all axes Values 16 to 31 are mapped directly to driver inputs that are present on the CN1 connector They are unique for each axis It depends on the type of Servo Driver which Servo Driver inputs are mapped into inputs 16 to 31 For more information on Servo Driver I O mapping into the Trajexia I O space refer to section 5 1 4 For more information on setting driver parameter Pn81E see Servo Driver manual As default the parameter is set to 1 no inputs selected If an input number is set and the limit is reached any forward motion on that axis will be stopped Bit 4 of the AXISSTATUS will also be set Note This input is active low Arguments N A Example No example See also AX
350. ts The command is executed on the driver for the base axis set by BASE The base axis can be changed with the AXIS modifier as with all the other axis commands and parameters Arguments N A 141 All BASIC commands Section 4 2 Example See also 4 2 78 DRIVE_MONITOR Type Syntax Description Arguments Example See also 4 2 79 DRIVE_READ Type Syntax Description Arguments 142 No example N A Axis parameter DRIVE_MONITOR This parameter contains the monitored data of the Servo Driver connected to the system via the MECHATROLINK II bus The data to be monitored is selected using DRIVE_CONTROL and can be displayed in the Trajexia Studio scope or used inside a program The monitored data is updated each SERVO_PERIOD The command is executed on the driver for the base axis set by BASE The base axis can be changed with the AXIS modifier as with all the other axis commands and parameters N A No example N A Axis command DRIVE_READ parameter size VR The DRIVE_READ function reads the specified parameter of the Servo Driver connected to the Trajexia system via the MECHATROLINK II bus Upon successful execution this command returns 1 and puts the read value in the VR memory location specified by the VR parameter If the command cannot be executed the value 0 is returned The com mand is executed on the driver for the base axis set with BASE It can be changed using the AXIS modifier like
351. ty code must be remembered it will be required to unlock the system Without the security code the system can not be recovered 4 2 152 MARK Type Axis parameter read only Syntax MARK Description The MARK is set to FALSE when the REGIST command has been exe cuted and is set to TRUE when the primary registration event occurs Only when this parameter is TRUE the REG_POS value is correct Arguments N A 183 All BASIC commands Section 4 2 Example loop WAIT UNTIL IN punch_clir ON MOVE index_length REGIST 3 WAIT UNITL MARK MOVEMODIFY REG_POS offset WAIT IDLE GOTO loop See also AXIS REGIST REG_POS 4 2 153 MARKB Type Axis parameter read only Syntax MARKB Description The MARKB is set to FALSE when the REGIST command has been executed and is set to TRUE when the primary registration event occurs Only when this parameter is TRUE the REG_POSB value is correct Arguments N A Example IF MARKB AXIS 2 THEN PRINT Secondary registration event for axis 2 occurred ENDIF See also AXIS REGIST REG_POSB 184 All BASIC commands Section 4 2 4 2 154 MECHATROLINK Type Syntax Description Arguments Example See also System command MECHATROLINK 0 0 Detects and connects slaves on the MECHATROLINK II connection It is necessary to use it to reset the network from a communication prob lem and to re detect servos that have been not detected EG when the A letter in the AXISSTATUS wor
352. ty in the CAM red graph coincides in time with the interruption of the movement To analyze this check the position values individually with a spread sheet program To analyze the point values in detail you can export the TABLE points to a spreadsheet program for a more complex analysis 319 Practical examples Section 5 2 5 2 Practical examples 5 2 1 SHELL program i loop 1 Application 1 GLOBAL amp CONSTANTdefinition System initialization S Stop Application programs and movements Start Stop Application programs and movements Stop Application programs and movements Reset sequence programs Update of status l Other monitoring Good programming practice requires a good SHELL program A SHELL program starts stops and resets the application programs The SHELL program is not necessary but gives structure to the applications and makes the method to program the motion controller more effective The purpose of the SHELL program is to ensure the proper initialization of your system and the integrity of your machine The example in the next section can be used as a template and can be modified if required A SHELL program needs to ensure the next operations 320 the declaration of constants and global variables the correct initialization of the system by checking if the correct hardware is used and by initializing all
353. uch problems external safety measures must be provided to ensure safety in the system e When the 24 V DC output service power supply to the PLC is overloaded or short circuited the voltage may drop and result in the outputs being turned OFF As a countermeasure for such problems external safety measures must be provided to ensure safety in the system e External safety measures must also be taken to ensure safety in the event of unexpected operation when connecting or disconnecting the connectors of the CJ1W MCH72 User programs written to the CJ1W MCH72 will not be automatically backed up in the CJ1W MCH 72 flash memory flash memory function Tighten the screws on the terminal block of the Power Supply Unit to the torque specified in this manual Loose screws may result in burning or malfunction When positioning to a position determined using the teaching function set the position designation setting in the positioning sequence to absolute positioning If it is set to relative positioning positioning will be performed to a position other than the one obtained with the teaching function Execute online edit only after confirming that no adverse effects will be caused by extending the cycle time Otherwise the input signals may not be readable Confirm the safety of the destination node before transferring a program to the node or changing the contents of I O memory Doing either of these without confirming safety may result in inj
354. uffers During the next motion sequence the profile generator executes the movement according to the information in the buffer When the movement is finished the motion command is removed from the buffer Communication Peripherals The CJ1W MCH72 can exchange data with memory areas in the PLC This enables the CJ1W MCH 72 to use the inputs and outputs connected to the PLC Also programs in the CJ1W MCH72 and PLC programs can exchange control and status data For more information on communication and data exchange refer to chapter 3 All inputs and outputs are used with the set of parameters IN OP AIN AOUT The inputs and outputs are automatically detected and mapped in Trajexia Inverters are considered a peripheral device and have a set of BASIC commands to control them Cycle time Section 1 6 1 6 1 6 1 Cycle time Note Servo period All processes in the Trajexia system are based on the cycle time The cycle time is divided into four CPU tasks e 250 us time intervals fora SERVO_PERIOD of 0 5 and 1 0 ms 4 250us 0o ro 1 2 3 4 lt gt Cycle time ims e 500 us time intervals fora SERVO_PERIOD of 2 0 ms za 500 us L gt 1 2 3 4 lt gt Cycle time 2 ms e 1 ms time intervals for a SERVO_PERIOD of 4 0 ms Cycle time 4 ms The processes that can be carried out in each time interval depends on the SERVO_PERIOD that is set The operatio
355. unit connected to the PLC is changed the I O table must be created again to register the units to the CPU To create the I O table connect a programming device such as a programming console or the CX Programmer software to the PLC The following programming console can be used e Model number C2090H PRO27 E e Key sheet required CS1W KS001 E e Recommended cable required CS1W CN224 2 m CS1W CN624 6 m For CX Programmer refer to the CX Programmer User Manual 52 Installation Section 2 3 Below is given the procedure to create an I O table with a programming console 1 Attach a key sheet to the programming console 2 Connect the programming console to the peripheral port of the CPU Do not connect it to the RS 232C port 3 Follow the steps on the programming console given in the figure Initial screen CH E Create I O table 2 3 3 Connecting MECHATROLINK II slaves Note WRITE Save or clear the CPU Bus Unit System Setup The Trajexia system supports 3 kinds of MECHATROLINK II slaves Servo Drivers Inverters and I Os The CJ1W MCH 72 only supports 2 kinds of MECHATROLINK II slaves Servo Drivers and Inverters It does not support I Os To connect MECHATROLINK II slaves use a MECHATROLINK II cable for W series with ring core and USB connector on both ends These cables are not included The table below lists the MECHATROLINK II cables OMRON
356. uration error Status LED ON Lit OFF FLASH Not Not lit Flashing changed RUN ERC ERH WDOG BF Low or empty battery Flashing error Error log access ON error PLC watchdog OFF timeout error Communication error ON between the unit and the PLC CPU fatal error OFF FALS CPU non fatal error FAL Mechatrolink Il bus OFF ON error BASIC program error Axis error Other errors 349 Troubleshooting Errors Section 6 3 6 3 6 3 1 6 3 2 6 3 3 6 3 4 Troubleshooting Errors Initial Hardware Test Error Problem Solution FLASH error RAM error CPU error System software error during initialization Turn off the PLC system and then turn it back on If the error persist replace the CJ1W MCH72 unit Error Log Access Error Problem Solution Error log has been detected to be corrupt or error log cannot be written Turn off the PLC system and then turn it back on If the error persist replace the CJ1W MCH72 unit PLC Watchdog Timeout Error Problem Solution PLC CPU stalled not servicing watchdog timer Turn off the PLC system and then turn it back on If the error persist replace the PLC CPU unit Communication Error Between the PLC CPU unit and the CJ1W MCH72 unit Prob
357. ury Do not save data into the flash memory during memory operation or while the motor is running Otherwise unexpected operation may be caused Operating environment precautions A Caution A Caution Do not operate the control system in the following locations e Locations subject to direct sunlight e Locations subject to temperatures or humidity outside the range specified in the specifications e Locations subject to condensation as the result of severe changes in temperature e Locations subject to corrosive or flammable gases e Locations subject to dust especially iron dust or salts e Locations subject to exposure to water oil or chemicals e Locations subject to shock or vibration Take appropriate and sufficient countermeasures when installing systems in the following locations e Locations subject to static electricity or other forms of noise e Locations subject to strong electromagnetic fields Application precautions 5 A Caution Application Z N WARNING N WARNING Z N WARNING A Caution A Caution A Caution A Caution A Caution A Caution A Caution A Caution e Locations subject to possible exposure to radioactivity e Locations close to power supplies The operating environment of the PLC System can have a large effect on the longevity and reliability of the system Improper operating environments can lead to malfunction failure and other unforeseeable problems with the PLC
358. used motion error Using AXISSTATUS axis parameter determine the type of the axis error see section 4 2 96 for more information on valid ERROR_AXIS section 4 2 158 for MOTION_ERROR and section 4 2 35 for AXISSTATUS BASIC commands In necessary modify application or motion system so the axis error doesn t happen in the future Axis error due to an error in the servo drive Using ERROR_AXIS and MOTION_ERROR system parameters determine axis or axes which caused motion error see section 4 2 96 for more information on ERROR_AXIS and section 4 2 158 for MOTION_ERROR basic commands Using DRIVE_ALARM and DRIVE_STATUS axis parameter check for alarm code It can be also determined by checking the operation panel of the drive see section 4 2 74 for more information on DRIVE_ALARM and section 4 2 81 for DRIVE_STATUS BASIC commands Remove the cause of the alarm error and restart the system if necessary for more details on alarm codes and possible couse of the alarms see servo driver Operation Manual 355 Miscellaneous Section 6 4 6 4 Miscellaneous 356 Problem Solution A connection with the unit from Trajexia Studio software cannot be established Check connection cable between the PLC and the Personal Computer running the software Check that configuration settings network type IP address unit number in the software matches the one of the unit Check there is no other software or de
359. ut and Encoder Out axes setting AXIS_ENABLE to OFF will block pulses generation on the outputs N A AXIS_ENABLE AXIS 3 OFF This command will disable axis 3 independently of other axes in the sys tem AXIS DISABLE_GROUP 99 All BASIC commands Section 4 2 4 2 35 AXISSTATUS 100 Type Axis parameter read only Syntax AXISSTATUS Description The AXISSTATUS axis parameter contains the axis status and is used for the motion error handling of the controller The axis status consists of status bits which definitions are shown in the table below Bit Description Value Character number 0 1 1 Following error warning range 2 w 2 Servo Driver communication error 4 a 3 Servo Driver alarm 8 m 4 in forward limit 16 f 5 In reverse limit 32 r 6 Datuming 64 d 7 Feed hold input 128 h 8 Following error exceeds limit 256 e 9 In forward software limit 512 x 10 In reverse software limit 1024 y 11 Cancelling move 2048 c 12 Encoder out overspeed 4096 o Arguments N A Example IF AXISSTATUS AND 16 gt 0 THEN PRINT In forward limit See also AXIS ERRORMASK All BASIC commands Section 4 2 4 2 36 B_SPLINE Type Syntax Description Arguments Example See also Axis command B_SPLINE type data_in number_in data_out expand Expands an existing profile stored in the TABLE using the B Spline mathematical function The expansion factor is configurable and
360. ute value of an expression ACOS Returns the arc cosine of an expression AND Performs an AND operation on corresponding bits of the integer parts of two expressions ASIN Returns the arc sine of an expression ATAN Returns the arc tangent of an expression ATAN2 Returns the arc tangent of the non zero complex number made by two expressions Categories Section 4 1 Name Description COS Returns the cosine of an expression EXP Returns the exponential value of an expression FRAC Returns the fractional part of an expression IEEE_IN Returns floating point number in IEEE format represented by 4 bytes IEEE_OUT Returns single byte extracted from the floating point number in IEEE format INT Returns the integer part of an expression LN Returns the natural logarithm of an expression MOD Returns the modulus of two expressions NOT Performs a NOT operation on corresponding bits of the integer part of the expression OR Performs an OR operation between corresponding bits of the integer parts of two expressions SGN Returns the sign of an expression SIN Returns the sine of an expression SQR Returns the square root of an expression TAN Returns the tangent of an expression XOR Performs an XOR function between corresponding bits of the integer parts of two expressions 4 1 7 Program command
361. values for the example are Motion Parameter values P_Gain 131072 VFF_GAIN 0 Fn001 6 273 How to s Section 5 1 Example 3 Trace1 Device1 X x EIEEE 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms lay Plot Parameter Change ML MPOS L ML MSPEED L C DigitalInput 2 ML FE The parameter P_GAIN is increased further The Following Error decreases proportionally The parameter values for the example are Motion Parameter values P_Gain 200000 VFF_GAIN 0 Fn001 6 274 How to s Section 5 1 Example 4 Trace1 Device1 X x Sas Oa alv I ara o 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms ML MPOS ML MSPEED DigitalInput 2 ML FE The value of the parameter P_GAIN two times the value in example 1 The Following Error is half but there is vibration due to the excessive gains The parameter values for the example are Motion Parameter values P_Gain 262144 VFF_GAIN 0 Fn001 6 275 How to s Section 5 1 276 Example 5 Trace1 Device1 X x e a 3A alw H I uA 9 10 9 8 7 6 a 4 3 4 2 1 4 o 1 1 1 1 1 1 1 1 1 1 0 20 40 60 80 100 120 140 160 180 200 Time ms lay Plot Parameter Change ML MPOS ML MSPEED ra DigitalInput 2
362. values were used for demanding the position of the slave axis To do that we change the data trace to show a block of values from Table 0 to Table 999 in red because these entries are where the CAM table is created see the part of the program that creates the CAM table above The changed configuration is shown in the figure 318 How to s Section 5 1 Note Trace1 Device1 X x SUSE SE v 1 4 Q 0 1 1 1 1 1 1 1 1 1 1 I 20 40 60 80 100 120 140 160 180 200 Time ms The result is given in the figure The red graph clearly shows a discontinuity in the position values that the slave axis must follow Because the speed is a derivative of the position at the point of discontinuity of the position curve the speed gets a high value This value equals infinity in theory in practice the value is just very big This causes the error The red graph shows where the root of the problem is The amplitude of the cosine curve and therefore the end_pos parameter has been changed during the execution of the CAMBOX command The solution is simple A change of the end_pos parameter during CAMBOX execution must be prevented To do this either modify the programs in Trajexia or in some other controller if the parameter is changed outside of the scope of the application programs for example by a FINS message The time base of the CAM TABLE points is not the same as the capture of the other sig nals The discontinui
363. vements GOSUB stop all status_word 1 The main loop of the program handles the fault handling run application programs stop application programs reset the system and report the status loop IF alarm bit THEN action 1 Alarm push RESET to restart IF status_word lt gt 2 THEN PRINT Stop with Alarm GOSUB stop all status_word 2 Programs stopped with error ENDIF IF res bit 1 THEN action 2 Resetting PRINT Resetting GOSUB reset_all status_word 1 Programs stopped NO error ENDIF ELSE action 3 OK IF run bit 1 THEN PRINT Start application 323 Practical examples Section 5 2 324 GOSUB start _ app status word 3 Application running ENDIF IF stop bit 1 AND status _word 3 THEN PRINT Stop by command GOSUB stop all status word 1 ENDIF NDIF zal Evaluates rising edge in RUN STOP amp RESET bits GOSUB sequence Checks for alarms in the system and monitors the system status GOSUB alarm _ sequence Upgrade values for showing in the HMI amp PLC GOSUB monitoring Reports and reset warnings in servodrive GOSUB warning seq GOTO loop Sequence Define here your signals to STOP START RE n This example uses the following signals Rising edge of bit 0 of VR signal_ state as RUN signal Rising edge of bit 1 of VR signal_ state as STOP signal Rising edge of bit 2 of VR signal_
364. ver ELSE IF VR 10 OTHEN PRINT ServoDriver healthy ELSE PRINT Servoalarm code VR 10 ENDIF ENDIF This example reads an alarm of the Servo Driver driving axis 2 and present that information to the user N A Axis command DRIVE_CLEAR The DRIVE_CLEAR command clears the alarm status of the Servo Driver connected via the MECHATROLINK II bus This command is not capable of clearing all the possible alarm states Some alarms can only be cancelled by turning off the power supply both the CJ1W MCH72 and the Servo Driver and then turning it on again Also an alarm will not be cleared if the cause of the alarm is still present The command is executed on the driver for the base axis set by BASE The base axis can be changed with the AXIS modifier as with all the other axis com mands and parameters N A No example DRIVE_STATUS 139 All BASIC commands Section 4 2 A Caution Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Driver when executing this command Otherwise the program task will be paused until the connection of the other device to the Servo Driver is removed 4 2 76 DRIVE_CONTROL Type Axis parameter Syntax DRIVE_CONTROL Description When applied to an axis driven by the Servo Driver connected to the system via the MECHATROLINK II bus this parameter selects the data to be monitored by DRIVE_MONITOR according to the table below
365. vice using the same connection There is no axis nor motion error in the system but the WDOG cannot be set ON The command WDOG ON is accepted but no changes Check the Enable Watchdog bit of the unit status area in the allocated ClO memory of the PLC see section 3 3 1 for more details If this bit is OFF turning on the WDOG is disabled Programs are correct and compiled correctly but they cannot be started Check the Enable Program Run bit of the unit status area in the allocated ClO memory of the PLC see section 3 3 1 for more details If this bit is OFF running BASIC programs is disabled Outputs cannot be turned ON Check the LOAD OFF bit A500 15 of the PLC If this bit is set on the setting ON the unit s outputs is disabled A Absolute EnDat 28 SSI 28 Absolute encoder Wiring 46 Architecture 16 Axis sequence 24 Axis type 25 B Bag feeder program example 339 BASIC commands 73 BASIC program 3 Battery 37 Replace 38 Buffer types 31 Buffers 16 31 C CAM table example 341 Command Axis 73 Communication 77 T O 78 Program 79 Program control 80 System 81 Task 83 Communication 16 Complex profile 26 Components CJ1W MCH72 35 Configuration examples 20 Connector Encoder 39 T O 39 MECHATROLINK II 39 Constants 77 Correction example 346 CPU task 3 Cycle time 2 17 D Data exchange 59 Index Configur
366. vided to ensure safety in the system Never attempt to disassemble any Units while power is being supplied Doing so may result in serious electric shock Do not attempt to disassemble repair or modify any Units Any attempt to do so may result in malfunction fire or electric shock Never touch any of the terminals while power is being supplied Doing so may result in serious electric shock vii Operating environment precautions 4 viii N WARNING Provide safety measures in external circuits i e not in the Programmable Controller A Caution A Caution A Caution A Caution A Caution A Caution to ensure safety in the system if an abnormality occurs due to malfunction of the PLC malfunction of the CJ1W MCH72 or external factors affecting the operation of the PLC or CJ1W MCH72 Not providing sufficient safety measures may result in serious accidents e Emergency stop circuits interlock circuits limit circuits and similar safety measures must be provided in external control circuits e The PLC will turn OFF all outputs when its self diagnosis function detects any error or when a severe failure alarm FALS instruction is executed As a countermeasure for such errors external safety measures must be provided to ensure safety in the system e The PLC or CJ1W MCH72 outputs may remain ON or OFF due to deposits on or burning of the output relays or destruction of the output transistors As a countermeasure for s
367. vo Drivers inputs in the CJ1W MCH72 I O space With the BASIC command IN you can access the physical controller inputs only To read the inputs in the Servo Driver the BASIC command DRIVE_INPUTS must be used Servo Drivers can have additional inputs that are located on their I O connectors These inputs can be used as forward and or reverse limit switches or origin switches They are mapped into the CJ1W MCH72 I O space Thus they can be accessed from BASIC programs The CJ1W MCH72 only supports this for Servo Drivers connected to the CJ1W MCH 72 system via the MECHATROLINK II bus It is not supported for Flexible Axis Servo Drivers CJ1W Servo Driver input signal Description MCH72 z F i Sigma ll Sigma V Junma G Series input 16 P_OT P_OT P_OT P_OT Forward limit switch 17 N_OT N_OT N_OT N_OT Reverse limit switch 295 How to s Section 5 1 296 CJ1W Servo Driver input signal Description Mee Sigma ll Sigma V Junma G Series input 18 DEC DEC DEC DEC Zero point return deceleration 19 PA PA Not used Not used Encoder A phase signal 20 PB PB Not used Not used Encoder B phase signal 21 PC PC Not used PC Encoder Z phase signal 22 EXT1 EXT1 EXT1 EXT1 First external latch signal 23 EXT2 EXT2 Notused EXT2 Second external latch signal 24 EXT3 EXT3 Not used EXT3 Third external latch signal 25 BRK BRK BRK
368. with EC Directives will vary depending on the configuration wiring and other conditions of the equipment or control panel in which the OMRON devices are installed The customer must therefore perform final checks to confirm that devices and the overall machine conform to EMC standards Note Applicable EMC Electromagnetic Compatibility standards are as follows e EMS Electromagnetic Susceptibility EN61000 6 2 e EMI Electromagnetic Interference EN61000 6 4 Radiated emission 10 m regulations 6 3 Conformance to EC Directives The CJ1W MCH 72 complies with EC Directives To ensure that the machine or device in which a CJ1W MCH 2 is used complies with EC Directives the CJ1W MCH72 must be installed as follows 1 The CJ1W MCH 72 must be installed within a control panel 2 Reinforced insulation or double insulation must be used for the DC power supplies used for the communications and I O power supplies 3 Units complying with EC Directives also conform to the Common Emission Standard EN61000 6 4 With regard to the radiated emission 10 m regulations countermeasures will vary depending on the devices connected to the control panel wiring the configuration of the system and other conditions The customer must therefore perform final checks to confirm that devices and the overall machine conform to EC Directives xi Conformance to EC Directives 6 6 4 Installation within Control Panel Unnecessary clearance in cable inle
369. with registration functionality 8 Outputs 1 with hardware position switch func tionality Measurement units User definable Available memory for user pro grams 756 1006 KB Data storage capacity RAM memory 1024 KB minus the size of the user programs VR memory 4 KB Saving program data unit SRAM with battery backup and Flash ROM Saving program data PC Trajexia Studio manages a backup on the hard disk of the PC Firmware update Via Trajexia Studio 1 The available memory for user programs depends on the size of the Table memory which is minimum 0 KB and maximum 250 KB 2 4 4 MECHATROLINK II specifications 56 Item Specification Electrical characteristics Conforms to the MECHATROLINK standard Communication ports 1 MECHATROLINK II master port Transmission speed 10 Mbps Communication cycle 0 5 ms 1 ms 2 ms 4 ms Slave types Servo Drivers Frequency Inverters Number of slaves per master Cycle time Max 30 slaves 4 ms Max 16 slaves 2 ms Max 8 slaves 1 ms Max 4 slaves 0 5 ms Transmission distance Max 50 m Specifications Section 2 4 2 4 5 Encoder interface specifications Item Specification Number of axes 1 Electrical characteristics EIA RS 422 A Standards line driver Control method Pulse Train output open loop only Encoder position sp
370. y to the following axis All arguments are given in user units of each axis The speed of movement along the circular arc is set by the SPEED ACCEL and DECEL parameters of the BASE axis The first four distance parameters are scaled according to the current unit conversion factor for the BASE axis MOVECIRC works on the default basis axis group set with BASE unless AXIS is used to specify a temporary base axis For MOVECIRC to be correctly executed the two axes moving in the circular arc must have the same number of encoder pulses per linear axis distance If they do not it is possible to adjust the encoder scales in many cases by adjusting with ENCODER_RATIO axis parameters for the axis 195 All BASIC commands Section 4 2 2 T i mC a i Ca et a fat fe Fal Ga al Gad DIRECTION 1 2 J 1 TEF a a AR DIRECTION 0 Arguments end_1 The end position for the BASE axis end_2 The end position for the next axis centre_1 The position around which the BASE axis is to move centre_2 The position around which the next axis is to move e direction A software switch that determines whether the arc is interpolated in a clockwise or counterclockwise direction Value 0 or 1 If the two axes involved in the movement form a right hand axis set direction to 0 to produce positive motion about the third possibly imaginary orthogonal axis If the two axes involved in the move ment form a left hand axis set
371. y valid BASIC expression Example gt gt PRINT SQR 4 2 0000 See also N A 249 All BASIC commands Section 4 2 4 2 229 SRAMP 4 2 230 STEP 4 2 231 STEP_RATIO 250 Type Syntax Description Arguments Example See also Axis parameter SRAMP The SRAMP parameter contains the S curve factor The S curve factor controls the amount of rounding applied to the trapezoidal profiles A value of 0 sets no rounding A value of 10 sets maximum rounding The default value of the parameter is 0 SRAMP is applied to the FORWARD MOVE MOVEABS MOVECIRC MHELICAL and REVERSE commands Notes e Using S curves increases the time required for the movement to complete e The S curve factor must not be changed while a move is in progress N A No example AXIS See FOR TO STEP NEXT Type Syntax Description Arguments Axis command STEP_RATIO output_count dpos_count This command sets up a ratio for the output of the stepper axis Every servo period the number of steps is passed through the STEP_RATIO function before it goes to the step pulse output Pulse Count Out numerator denominator MPOS STEP_RATIO affects both MOVECIRC and CAMBOX Notes e The STEP_RATIO function operates before the divide by 16 factor in the stepper axis e Large ratios should be avoided as they will lead to either loss of res olution or much reduced smoothness in the motion The actual physical step size x 16 is

Download Pdf Manuals

image

Related Search

Related Contents

Conditions générales Web  M40/50D2  ACS355 06/12 PDF, 8.8 MB  AVerMedia AVerTV Express mini  1 MB - Nexus Marine  - Massage Expert  Yazoo/Kees SV26B-4 Series User's Manual  LED-03ECM-PM-DMX-2200 - se LIGHTMANAGEMENT AG  パネル操作詳細編  Smeg VR115B Product manual  

Copyright © All rights reserved.
Failed to retrieve file