Home

Trajexia motion control system PROGRAMMING MANUAL

image

Contents

1. 225 HOWARDS TEE 225 6 1 1 m EEUU 225 M ME EDDIE EE 229 6 1 9 Setting the UNITS axis parameter and gear ratio nat erret o da E Pre Ea coi e pex uaa dei ea e ut uda ee cua Ra vu Re ex 239 6 1 4 Mapping Servo Driver inputs and Outputs 251 6 1 5 SCANCH esas IER 253 6 1 6 d a 259 6 1 7 _ 2 S 269 6 2 2 279 6 2 1 Shel 279 6 2 2 283 6 2 3 Single axis pOr uuu cc eee Pa rado Dea Rea tac ele i pe o a Ea Do uma d Or secte d ne aede cde wanda cor Delia d den a dea reet 286 6 2 4 Position WIth Product detection MP 287 625
2. 80 EIE 80 FE UMIT 81 0 Contents traj exia 3 2 118 RANGE 81 3 2 119 iempE ME 81 83 2 120 EHSPEED m tut msc eee uaa ec tas A 82 3 2 121 I eeuc 82 3 2 122 FLAG 84 3 2123 SEL CVM 84 3 2 124 85 3 2 125 FORWARD nadiang 86 8 2 126 FPGA VERSION 86 32 127 5 orum 86 3 2 128 SV ERREUR 86 827129 FREE m 87 2 2 130 FS LIMIT 87 3 2 131 FWD IN
3. 87 3 2 132 S PENIOCHM 88 SEAAHCCMECIZIE 88 VANS MCEQIAI 89 3 2 1385 EC 89 3 2 136 89 3 2 137 R 90 QUALI S 90 3 2 139 COMMAND EE 90 3 2 140 ALM READ 91 3 2 141 STATUS M 92 8 2 142 TIMEOUT 93 3 2143 WRITE E M M PUOo 94 3 2 144 HLS NODE 95 3 2 145 95 3 2 146 Y 96 pr TAMIPI ELT 96 SPMLLazzzamce
4. m 118 SEE EET 118 OFFPOS E QA 118 ON M 119 GOSUB PM A 119 e GOTO LP 119 O 119 PROGRAMMING MANUAL 10 0 Contents 3 2 198 3 2 199 3 2 200 3 2 201 3 2 202 3 2 203 3 2 204 3 2 205 3 2 206 3 2 207 3 2 208 3 2 209 3 2 210 3 2 211 3 2 212 3 2 213 3 2 214 3 2 215 3 2 216 3 2 217 3 2 218 3 2 219 3 2 220 3 2 221 3 2 222 3 2 223 3 2 224 3 2 225 3 2 226 3 2 227 3 2 228 3 2 229 3 2 230 3 2 231 3 2 232 3 2 233 3 2 234 3 2 235 3 2 236 3 2 237 trajexia 120 oos punc EE MD DI D MEE 120 I LEM LI uM MM MM EI 121 NNNM 121 e mro
5. 109 MOTION ERROR qe 109 MOVE 110 111 93 112 MOW ERIN dE 114 suns a 115 Mae p 116 MSPEED e 116 116 PO 117 aes 117 NEW 117 2s 117 RM 117 lel 118
6. 150 32281 WARM LOADED roen EE 150 3 2 282 WAIT EE E EEIE E AEA E A REENE ea EEEE A EAA 150 32 2809 WDOG araka EET 151 3 2 284 WHILE WEND 151 3 2 285 XOR E 152 4 Communication protocols et 153 41 VIE DELL Aa DEDERE 153 4 2 153 4 2 1 Communicate with Trajexia directly from your 154 422 Communicate with Trajexia remotely oseni dme edd Epid 155 4 2 3 TOONS t 156 4 2 4 FINS serv r Protocol 156 4 2 5 FINS client protocol 158 43 E E 158 4 3 1 Host Link master see
7. 172 zy 302 laii m c 167 Programie compare 192 alis irc intei ni lt tC Cc Ace 180 xis 7 c Ems 192 Protocol c 173 FINS client c n 158 FINS o 156 PCS VAS UCN UIN D a 158 PU Se TIA Meteo Q s 163 MECHATROLNK Mer 179 risit Ero PPE RI METER 167 D cADO A H H 156 cerere E 165 Protocols E A 153 R Registration example e L 259 S Safety operating H E OP
8. ences 96 3 2 149 e ada 96 3 2 150 IF E ELSE ENDIF 259 sna tes 97 SEZ VO AN 97 3 2 152 98 SPAN ESSERI IRBABII O 98 3 2154 LIUUM 99 3 2 155 Ue O 99 3 2 156 INVERT E 99 3 2 157 INVERT STEP 100 PROGRAMMING MANUAL 0 Contents 3 2 158 3 2 159 3 2 160 3 2 161 3 2 162 3 2 163 3 2 164 3 2 165 3 2 166 3 2 167 3 2 168 3 2 169 3 2 170 3 2 171 3 2 172 3 2 173 3 2 174 3 2 175 3 2 176 3 2 177 3 2 178 3 2 179 3 2 180 3 2 181 3 2 182 3 2 183 3 2 184 3 2 185 3 2 186 3 2 187 3 2 188 3 2 189 3 2 190 3 2 191 3 2 192 3 2
9. a 158 4 3 2 163 4 3 3 User defined Protocol sacs 165 P MELIUS 167 4 4 1 M 167 4 4 2 WU ec 167 4 4 3 StAtUS a KE S 172 ASS 173 4 5 1 173 4 5 2 COMMUNICATION SEU Py A 173 4 5 3 Communication OY 178 A0 siepe cM pr 179 5 MAPS Ke Tools MMC ACC c 180 Sum 180 5 2 Specifications ANd CONNECTIONS 180 5 2 1 gp 180 5 2 2 Install the Trajexia Tools software enna 181 5 2 3 Connection to the __ 186 9 9 5
10. E 131 sime sui MEARUM MAKE 131 iz pM 132 MEETS OMNE IMMO HM HMM 132 132 133 133 i LR DEM AU DD MM De ME 133 o oos LU I M tae eee 133 E eiO cedex A 134 134 M MM M 135 S RER pP 135 SCOPE ere NAMUR 136 PROGRAMMING MANUAL 11 0 Contents 3 2 238 3 2 239 3 2 240 3 2 241 3 2 242 3 2 243 3 2 244 3 2 245 3 2 246 3 2 247 3 2 248 3 2 249 3 2 250 3 2 251 3 2 252 3 2 253 3 2 254 3 2 255 3 2 256 3 2 257 3 2 258 3 2 259 3 2 260 3 2 261 3 2 262 3 2 263 3 2 264 3 2 265 3 2 266 3 2 267 3 2 268 3 2 269 3 2 270 3 2 271 3 2 272 3 2 273 3 2 274 3 2 275 3 2 276 3 2 277 trajexia SCOPE e 137 UH 137 SERVO M 137 137 Mn 138
11. 219 PROGRAMMING MANUAL 311 0 Revision history Revision history A manual revision code shows as a suffix to the catalogue number on the front cover of the manual trajexia Revision code Date Revised content 01 August 2006 Original 02 October 2006 DeviceNet update 03 May 2007 Updated with TJ1 MC04 and TJ1 ML04 Improved BASIC commands programming examples and tips PROGRAMMING MANUAL 312
12. 21 2 Trajexia Syst m dal 22 P NEN eei 22 2 1 1 Trajeria DOLI A c 23 2 1 2 TL E 23 2 2 Multitasking BASIC programming c Po Ee e ar eem epu de EE Re KE du Fev 23 23 BASIC programmirng 2 3 cedro nt eri tates 24 2 3 1 Axis system and task statements eere ere 24 2 9 2 Menon aoas eai e polar piace de 24 2 3 3 Data str ctures and variables rtc E EET RN AI HANS Rex ES a UC Ra 25 2 3 4 Mathematical Specifications issie 27 EN cellis aa 28 2 4 1 28 D PAMEES U eom 29 243 Move
13. 15 this registration information correct PROGRAMMING MANUAL 182 0 Trajexia Tools interface 12 Click Next 13 Click Next PROGRAMMING MANUAL trajexia fig 6 TrajeXia Tools v1 0 Setup Select Features Select the features setup will install tr lt m Select the features you want to install and deselect the features you do not want to install Description Drive Manuals This comro noida the xS necessary files for the sue CX Drive Trajexia Tools USB Driver FCI Driver WinMerge 129 03 MB of space required on the C drive 31534 47 MB of space available on the C drive fig 7 TrajeXia Tools v1 0 Setup Choose Destination Location Select folder where setup will install files hr Setup will install TrajexiaT ools in the following folder To install to this folder click Next To install to a different folder click Browse and select another folder Destination Folder C Program Files OMRON Cancel 183 0 Trajexia Tools interface 14 Click Next 15 Click Next 16 The Trajexia Tools Setup program copies files to your PC This can take a few minutes PROGRAMMING MANUAL trajexia 0 fig 8 TrajeXia Tools v1 0 Setup Select Program Folder Please select a program folder cnr et d A OMRON Program Fo
14. cae 289 Position Wit product 1 eR o sooo oom Ur 287 ier c M 259 Semo UNIV CPA cp 251 Setting UNITS 239 Shell progra EE 279 Single axis Program 286 Speed MOJE 5 E 230 dM M 225 ee 269 F MENT ERREUR e T 156 Flexible axis zr I 305 Flying SITAR example iinis OQ 295 PROGRAMMING MANUAL 307 O E Index trajexia Function System G Gain example H Hardware overview Homing example Host Link Basic commands Master protocol Slave protocol ICONS Initialization example Installation of software Intelligent drives Interface DEVICENET
15. MT 289 626 Bag feeder program 291 r X secera na A 293 6 2 8 295 62 9 298 FEM UU i M M 300 71 Voltage analysis tools 300 7 2 a 300 7 2 1 LICHE 300 JO S EE 300 7 2 3 te 301 7 24 COnPQurAtION SIONS 302 7 265 ZEE
16. ives 74 ENCODER CONTROL Em 74 ENCODER EE 75 dq 75 ENCODER READ 75 ENCODER STATUS a L M 76 ENCODER TURNS E 76 ENGODER WRITE M 76 76 zpeucbr c 77 cT 77 77 77 ERRORMASK u 78 Az 78 X 79 C 79 i m 79 gia 79 gae LM 80 80 LATCH E
17. 222 0 Trajexia Tools interface trajexia Diagnostics Allow to select the events to be stored in a log file for diagnostics fig 48 Diagnostic Options E Only use debug logging when requested to do so as the lagging feature puts significant load on the system slowing down the operation of Motion Perfect and potentially making communications less reliable Log File Change D Mis documentos MP2D ebug log Enable logaing to file r Enable logging with D utputDebugString pee 4 Comms transmit receive Comms message Comms locking Comms send from tool Commis request in project Comms dispatch reply Comms reply at tool Receive loop counter Tx Rx character count Comms error Channel Change FINS Comms Window registration Destroy Window request Event 14 Event 15 Enable intelligent drive r comms log windows Main Communications Log 31 Drive Communications Use Development r Version Checking Functionality Checking om CUR RC dd Terminal Font Selects the font to be displayed in the terminal window Very useful for commissioning Program Compare Allows to compare programs CX Drive Configuration Allow to select the directory of the CX Drive Database FINS Configuration Selects the port and the timeout for the FINS communication Language At the moment only English
18. BASIC commands Description Arguments Example Example Example 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 argu ments Command OP output number value sets a single output channel The range of output number is between 8 and 256 and value is the value to be output either O or 1 Command OP binary pattern sets the binary pattern to the 24 outputs according to the value set by binary pattern Function OP without arguments returns the status of the first 24 out puts This allows multiple outputs to be set without corrupting others which are not to be changed Note The first 8 outputs 0 to 7 do not physically exist on the TJ1 MC They can not be written to and will always return O output number The number of the output to be set value The value to be output either off or on All 0 values are considered as on binary pattern The integer equivalent of the binary pattern is to be output OP 12 1 12 These two lines are equivalent OP 18 256 This line sets the bit pattern 10010 on the first 5 physical outputs outputs 13 to 17 would be cleared The bit pattern is shifted 8 bits by multiplying by 256 to set the first available outputs as outputs 0 to 7 do not exist VR 0 OP VR 0 VR 0 AND 65280 OP VR 0 This routine sets outputs 8 to 15 ON and all oth
19. BASIC commands trajexia Axis command STEP RATIO output count dpos count This command sets up a ratio for the output of the axis stepper Every servo period the number of steps is passed through the RATIO function before it goes to the step pulse output Pulse Count Out numerator denominator MPOS STEP RATIO affects both MOVECIRC and CAMBOX Notes The STEP RATIO function operates before the divide by 16 factor in the stepper axis Large ratios should be avoided as they will lead to either loss of resolu tion or much reduced smoothness in the motion The actual physical step size x 16 is the BASIC resolution of the axis and use of this command may reduce the ability of the Motion Controller to accurately achieve all positions 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 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 3 2 248 SQR 3 2 250 STEP See FOR TO STEP NEXT Type Mathematical function 3 2 251 STEP RATIO Syntax SQR expression Description The SQR function returns the square root of the expression The expression must have positive including 0 value Type Arguments expression Syntax Any
20. Example PRINT VR 1 4 1 variab 6 2 6 0 1 50 Example params PRINT DISTANCE mpos 0 SPEED v 2 DISTANCE 123 SPEED 12 34 Example PRINT ITEM total OF limit CHR 13 Example gt gt PRINT 15 2 See also HEXADECIMAL INPUT OUTDEVICE Value Description 0 Programming port 0 default 1 RS 232C serial port 1 2 RS 422A 485 serial port 2 5 Trajexia Tools port 0 user channel 5 6 Trajexia Tools port 0 user channel 6 7 Trajexia Tools port 0 user channel 7 PROGRAMMING MANUAL trajexia e 9 3 2 209 Task command Syntax PROC task number Description The PROC modifier allows a process parameter from a particular process to be read or written If omitted the current task will be assumed Arguments task number The number of the task to access Example WAIT UNTIL PMOVE PROC 3 0 See also N A 3 2 210 PROC STATUS Type Task parameter Syntax PROC STATUS Description PROC STATUS parameter returns the status of the process or task specified The parameter is used with the PROC modifier and can return val ues listed in the table below Arguments Example WAIT UNTIL PROC STATUS 3 0 See also PROCNUMBER PROC Value Description 0 Process stopped 1 Process running 2 Process stepping 3 Process paused 124 0 BASIC commands trajexia 0 3 2 211
21. 3 2 225 REPEAT UNTIL Type Program control command Syntax REPEAT commands UNTIL condition 131 0 BASIC commands Description 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 Note REPEAT UNTIL construct can be nested indefinitely Arguments commands Any valid set of BASIC commands condition Any valid BASIC logical expression Example A conveyor is to index 100mm at a speed of 1000mmys wait for 0 55 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 3 2 226 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 Example No example See also CLEAR PROGRAMMING MANUAL trajexia 3 2 227 RETURN See GOSUB RETURN 3 2 228 REV IN Type Syntax Description Sigma 11 Sigma 111 Junma Arguments Example See also Axis parameter REV IN The REV parameter contains the input number to be used as a reverse limit input The number can be set from 0 to 7 and 19 The valid input range is 0 to 31 Values 0 to 15 represent physically present inputs of TJ1 MC__ connector and are com
22. 5 RR 37 31 7 EMI urere i e LH EET 37 3 1 8 Boro 38 3 1 9 Slot parameters 38 3 1 10 System commands and functions 38 PROGRAMMING MANUAL 5 0 Contents 3 2 PROGRAMMING MANUAL trajexia 31 11 Systenmi parameters etiatn se cedet spa rh dte ah rado nta d cess enc adea Re d Cu Peu e e unen devs Be ce untere de duse he du RR een ERR RR RR Aro ERES 39 3 1 12 Task icommands and parameters 2 REA d CUN a Ea Napa 40 5 commands a p tte n y o ton ba spa en cad p vu dant d d p a ud nda v ta ren RE ERE 41 3 2 1 uem 9 9 T 41 CS MEME ESI 41 323 MultipliCation u eiie ret ehe Eee de te ice ta b 41 3 24 beesi
23. PROGRAMMING MANUAL 4 TJ1 MC16 i Profile generator fig Demanded Position Following Error trajexia 1 TJ1 ML16 1 Speed Loop Loop Torque Loop i 1 i 1 Measured Pd Position 230 0 Examples and tips 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 131072 GAIN 0 Fn001 4 Note H 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 divi sion PROGRAMMING MANUAL fig 4 trajexia 231 0 Examples and tips Example 2 The value for rigidity is increased The error magnitude remains the same but the ripple the speed stability and overshoot are better The parameter values for the example are Motion Parameter values P Gainz131072 GAIN 0 001 6 Example 3 The parameter 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
24. counts 10 motor revolution 1 machine revolution _ Pn203 EET motor revolution 1 revolution 360 7 13 2 10 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 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 Forreasons of stability itis necessary to avoid situations where Pn202 Pn203 is less than 0 01 or greater than 100 We can now rewrite the last equation to PROGRAMMING MANUAL fig 19 trajexia Full turn 360 241 0 Examples and tips Pn202 13 10 UNITS 2 Zn 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 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 Absolute encoder setting The absolute encoder keeps the current motor position even if there is no power
25. 191 5 3 1 Tools E nile 191 5 3 2 Check 192 5 4 Trajexia Tools application windQW ex Rd o dee Uh a 194 PROGRAMMING MANUAL 13 0 Contents traj exia 5 4 1 Control dane 9 194 5 4 2 Ment 194 Sr RENE 195 5 5 5 196 5 5 1 Me 196 592 C ntrollenmenu naien enni EMIT 198 5 5 3 Program E E a 203 5 94 TOOS MENU eae ee d EY y 205 5 5 5 Options 221 5560 Windows Menu 224 5 5 7 Help 224 6 Examples and tips enc
26. Ethernet MECHATROLINK PROFIBUS Serial _ Interface overview status MECHATROLINK EOFS PROGRAMMING MANUAL 0 noe rj Protocol 179 RR et se 198 Help A 224 erui Lr PORTET 221 Program 203 J UH 196 E 205 lares n E 224 196 Modifier age 38 Motion cie di s 28 DIIS d gro MERE oo 000 RSS 23 N PU OMe Connection mm 187 O Operand meter meee pM RIPE 37 Mathematical
27. 13 1013 CN1 input signal selected in Pn81E 1 14 1014 CN1 input signal selected in Pn81E 2 N C 15 1015 CN1 input signal selected in Pn81E 3 Bit Description Sigma ll Description Junma number 0 POT POT 1 N OT N OT 2 DEC Signal selected with Pn511 0 IDEC 3 Encoder Phase A N C 4 Encoder Phase B N C 5 Encoder Phase C N C PROGRAMMING MANUAL 3 2 85 DRIVE_MONITOR Type Syntax Description Arguments Example See also 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 Tools scope or used inside a program The monitored data is updated each SERVO PERIOD N A No example N A 70 0 BASIC commands 3 2 86 DRIVE READ Type Syntax Description Arguments Example See also 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 suc cessful 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 command is executed on the driver for the base axis set with BASE It can be c
28. 41 3 25 28 sg 42 3 26 lt lt LO T 42 32 MEE ASSIQNIMON m Em 42 9 20 Isnotequal to ebore oap pecca do Epi Pede pr cO S 42 3 29 6 greater venda de e eed 43 3210 gt Nan or egual 43 CRUEL EESTI 43 32 12 Is lessthan orequal to e ere sett pre t Po set Dar ide has drags dev apud eto E ND avene d dup erac eel epe O Eee ped ua edet 43 3 2 13 Hexadecimal input nter dedi e t te ard ct teria ade bague fede cya 44 3 2 14 Commen ERR TREE IEEE ER DRMEE 44 2215 Statement separaltor 5 E aaa hd ds 44 3 2 16 C E 44 3 2717 CABS 45 8 2 18 45 SPA MN eec 45 9 2220
29. 302 7 3 C 302 PROGRAMMING MANUAL 14 O E Contents 7 4 7 5 7 6 7 3 1 on 302 7 3 2 l O data communication problems LG 303 304 7 4 1 YEA 304 7 4 2 l O data communication aa ERU I uA Ken xen n 304 MUTI 304 7 5 1 NER ccm 304 7 5 2 Ep m 304 IUBE UOUO H 305 7 6 1 E 305 PROGRAMMING MANUAL 15 0 Safety warnings and precautions 1 Safety warnings and precautions 1 1 Intended audience This manual is int
30. 5 I M 45 SPAN TRIP o 46 3 2 22 qe R 46 3 2 235 BID A ic EE 47 o MEA E nsec edt E 47 SSH 47 ES MENOS 48 mM 48 3 2 28 ATAN fared des Space E dowd 48 3 2 29 SP vanes 48 3 2 30 T 49 3 2 31 AUTORUN Ce ale cu 49 OR MEC EET 49 3233 AAS DISPLAY ee 50 pA EE EEZILVIB M 50 3 2 39 AXISSTATUS C lier etna detuned ated ned ad ste Seed eaten des de atic ae ee 5
31. LM MELIA 304 PROGRAMMING MANUAL 306 0 Indo je WUE 173 E Errors Ps ac cer 300 Sensu c 302 RID oec Ore 300 gn 301 Ethernet Protocol NECNON 153 Example Bag feeder program a eee 291 CAM table c oaiae o aad ai a n EEEE 293 OTT MN TD E E E E tet tn cal UD bum muU E E tet 298 Fiying shear program cererii ein o ooo 295 Gai POs esere a a a e E E 229 HOMINO 253 lari 22 r M s 283 MOGI 253 loc VO MN We n M 235 Position on Kin ePtC
32. e M 37 Ogin SIVAN Mose n9 253 210 P Parameter JAXIS ccc M c uM LM I MAE M E 34 ens RR tmc 36 VO 36 a ae 38 ER OO M D 39 TASK Me Moe 40 PC Connection Tre 186 DIKLA GONE UI 154 PROGRAMMING MANUAL 309 0 noe je Remote Connection arcs 155 DCEBCINEGUDIT nee ee a MM a bae edu DE iei au Ced NM M e 180 succ VL OOS eee cmOT w Q 187 POSitiON mMOdS example oom mem 235 Position on a CMI SR ANS recat cece arcsec des a eat 289 Position with product detection example 287 PROFIBUS esed 3 eio zin er QR 167
33. Defective unit Unit not connected to the Trajexia bus Anl O unit or an inverter on a MECHATROLINK II unit is lost or disconnected Noterminator Defective unit The error code shows on the display where n ranges from 0 to 6 and is the number of the unit that causes the error To solve the problem replace the defective unit Unit not connected to the Trajexia bus The error code shows on the display where n ranges from 0 to 6 and is the number of the unit that causes the error To solve the problem check the bus connector of the unit unit or inverter on a MECHATROLINK II unit is lost or disconnected The error code shows on the display where n is the number of the TJ1 ML to which the MECHATROLINK II unit that causes the error is connected You can set system flags to enable and disable these errors The errors are enabled by default To disable the errors type COORDINATOR DATA 7 1 in the Trajexia Tools terminal window To enable the errors type COORDINATOR DATA 7 0 in the Trajexia Tools terminal window To see the current setting type PRINT COORDINATOR DATA T in the Trajexia Tools terminal window 301 0 Troubleshooting To clear the error after repair do these steps Reconnect the lost MECHATROLINK II I O unit or inverter Type MECHATROLINK n 5 station 1 in the Trajexia Tools terminal window where n is the number of the TJ1 ML__ to which
34. c 138 SGN EE 139 gt 139 LOT ced 139 SPEED a 139 la 140 SRAMP H 140 ie 140 STEP RATIO 140 mc 141 OVOP ER 141 142 gr 142 uc 143 ME m 143 TAN e r 144 144 TICKS mE 144 nrc 144 MME S 145 go
35. 1 motor revolution 1 pulley revolution 12 station 50mm 27 10 encoder counts 12 50 mm Therefore if we use the mechanical system to set the electronic gear ratio we have Pn202 2740 UNITS Pn203 50 12 One possible solution is 17 UNITS 50 Pn202 5 Pn203 6 Pn205 4 Because 27 50 is a number with an infinite number of decimal digits we can choose the following Pn202 15 1 UNITS Pn203 50 12 600 60 2 15 15 PROGRAMMING MANUAL trajexia Main Wheel 144 stations 50 mm between stations 249 0 Examples and tips Therefore the parameters are 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 Example 6 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 M 17 Pn202 _ 2 counts revolution 1 revolution 17 bit absolute 1 3 Gear Pn203 1 motor revolution 1 ballscrew revolution 10mm encoder 17 2 3 encoder counts
36. 10 0 WEND FOR TO STEP NEXT REPEAT UNTIL 151 0 BASIC commands 3 2 285 XOR Type Mathematical operation Syntax expression1 XOR expression2 Description operator performs the logical 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 Arguments 1 Any valid BASIC expression expression2 Any valid BASIC expression Example VR 0 10 18 The XOR is a bit operator and so the binary action taking place is as follows 01010 10010 11000 The result is therefore 24 See also N A Bit 1 Bit 2 Result 0 0 0 0 1 1 1 0 1 1 1 0 PROGRAMMING MANUAL trajexia 152 0 Communication protocols 4 Communication protocols 4 1 Available interfaces The Trajexia units have these interfaces to communicate Unit Interface Protocol Comment TJ1 MC jEthernet Trajexia Tools protocol To program monitor and debug the project with Trajexia Tools FINS server To communicate with any FINS master for example PLC HMI or personal computer FINS client To communicate to any FINS server for example PLC or another Trajexia unit Serial Host Link Master To communicate with any Host Link slave for example an OMRON PLC Host Link Slave To communicate with any Host Lin
37. 121 Eco MM M TM 122 Poo kd lu uL t M uter mu t 122 122 BOSSUPESET 123 e 123 PRINT 123 PROC E 124 124 PROCESS 125 M 125 PROFIBUS REMIT MM 125 E MM 126 R PIDS TOR dt Elec M DM 127 127 uui MU I MEDICA 127 REG 128 Fea 128 128 130 130 130 meee 131
38. 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 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 0 67 THEN PRINT Incorrect address for unit 0 station 2 STOP ENDIF ENDIF Set axis types Unit 0 AXIS 0 40 ATYPE AXIS 1 40 ATYPE AXIS 2 40 Set drives into run mode Unit 0 MECHATROLINK 0 20 65 MECHATROLINK 0 20 66 MECHATROLINK 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 SHELL PROGRAM PROGRAMMING MANUAL 228 0 Examples and tips Define Names for global variables OBAL project status 100 OBAL alarm status 101 OBAL action 102 Initialize variables VR 0 20 project status 0 alarm status 0 action 0 Start SHELL program RUN SHELL 2 STOP Q QQ 6 1 2 Gain settings The gain setting is related to the mechanical system to which the m
39. 1 Push reset to restart 2 Resetting 3 OK action 3 GOSUB stop all GOSUB start application loop Lf IF MOTION lt gt 0 OR READ BIT 1 0 TH Error or Stop command Clear the Servo Driver Warning if any IF DRIVE STATUS AXIS 0 AND 2 gt 0 THEN IF DRIVE STATUS AXIS 1 AND 2 gt 0 THEN IF DRIVE STATUS AXIS 1 AND 2 gt 0 THEN GOTO loop alarm sequence IF MOTION lt gt 0 TH 2 project status 2 action 1 ERROR DIAGNOSTICS Checking for MECHATROLINK errors PROGRAMMING MANUAL DRIVE DRIVE DRIVE EN GOSUB alarm sequence EAR AXIS 0 EAR AXIS 1 EAR AXIS 1 trajexia 280 0 Examples and tips IF AXIS STATUS AXIS 0 AND 4 lt gt 0 THEN alarm status 4 ELSE ENDIF ELSE ENDIF ELSEIF AXISSTATUS AXIS 1 AND 4 lt gt 0 alarm stat ELSEIF AXISSTATUS AXIS 1 AND 4 lt gt 0 TH alarm status 4 Bal 2 us 4 zal Z Checking for Axis error alarm status ERROR 1 project status 1 GOSUB stop all GOSUB reset all GOSUB start application RETURN stop all STOP THE PROGRAMS STOP APPLICATION ES CANCEL Cancel MTYPE Cancel NTYP Cancel possible program buffer command in the servos STOP THE AX FOR i 0 TO max axis
40. 10 mm Therefore Pn202 17 _ 17 3 263 203 10 2 5 5 One solution is UNITS 2 65536 Pn202 3 Pn203 5 PROGRAMMING MANUAL trajexia fig 24 250 0 Examples and tips 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 OPTION 0 With these setting executing MOVE 17 moves the ball screw 17 mm in forward direction 6 1 4 Mapping Servo Driver inputs and outputs The Trajexia controller has got a digital I O space that consists of 256 digital inputs and 256 digital outputs The digital outputs range has four parts Digital outputs O 7 These outputs do not physically exist on the TJ1 MC If you write these outputs nothing happens If you read these outputs they return O Digital outputs 8 15 These outputs physically exist on the TJ1 MC You can physically access them on the 28 pin screwless connector on the front side of the TJ1 MC see the Hardware Reference Manual for details If
41. Axis command MOVEABS distance 1 distance 2 distance 3 distance 4 MA distance 1 distance 2 distance 3 distance 4 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 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 MOVEABS 12 5 would move to a position 12 5 mm from the 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 commands uninterpolated unsynchronised 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 a 1 ax the current position ay4 ay2 and the profiled speed v as calculated from the SPEED ACCEL and DECEL parameters from the base axis and the total multi axes distance L S
42. EXAMPLE OF SHELL PROGRAM THIS VERSION IS DESIGNED FOR MECHATROLINK SERVOS ADAPT THIS PROGRAM ACCORDING TO YOUR APPLICATION IN THIS EXAMPLE ANY ERROR MAKES STOP ALL PROGRAMS AND MOVEMENTS STOP WE USE A GLOBAL VARIABLE VR 0 FOR PROGRAM VR 0 bitO To start the application rising edge VR 0 bitl To RESET all alarms rising edge VR 0 bit2 To STOP the application rising edge This example is for an application with three servos AXIS 1 2 and 3 Variable initialisation max axis 2 project status 0 initial value PROGRAMMING MANUAL fig 49 trajexia Stop Application programs and movements VR 0 bitO v Start Application programs Main_loop VR O bit2 Alarm or Stop Yes lt gt v Store status for diagnostics k Y Stop Application programs and movements Yes Reset VR 0 bit Yes v Reset Sequence Y 279 0 Examples and tips 1 programs stopped but no error 2 programs stopped and error 3 programs running project status 0 alarm status 0 Nothing Alarm in Axis 0 Alarm in Axis 1 al Action 1 2 3 Alarm in Axis 3 4 Alarm in MECHATROLINK 5 a Healthy rm status 5 0 Nothing
43. Values command code 01 02 var type e 82 TABLE memory in 16 bit integer format e C2 TABLE memory 32 bit IEEE floating point format memory in 16 bit integer format 30 VR memory in bit format start address 0 lt lt start address lt lt number of variables 1 lt lt total words 1 lt total words lt memory size start address 1 total bits 1 bit 00 or 01 The TJ1 MC responds with these codes 157 0 Communication protocols 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 4 2 5 FINS client protocol Trajexia can initiate the FINS communication using the FINS COMMS BASIC command Refer to the command description for details Both the Read Memory 0101 and the Write Memory 0102 commands are supported This functionality is useful to communicate with an OMRON PLC another Trajexia system or a PC running FINS server application software With the Read Memory command memory can be read from other devices with FINS server capability The Write Memory command can be used to write data to devices with FINS server capability The command returns one of the
44. 4 Select CJ1W DRM21 from the OMRON Communication adapter list PROGRAMMING MANUAL fig 14 Select Network Selected DeviceNet Select a network from the following list CompoWw ayF ControllerLink DeviceNet 175 O g Communication protocols 5 Drag and drop the CJ1W DRM21 to the Network window 6 Install the EDS file from the CX Integrator 7 Select No from the dialog window The icon is not needed PROGRAMMING MANUAL trajexi NewProject CX Integrator File Edit Insert Network Component Tools Windows Help gt e j 4 HE OX ED ud wa CRs NewProject Network 1 DeviceNet 001 zi Network 1 DeviceNet 001 imponent 9 63 Vendor E OMRON Corporation AC Drives C200Hw DRM2 C200Hw DRT2 DIM 5 2 5100 8 2 5110 CS1W DRM21 CVMT DRM21 v 4 CPS 5 ds DER Off line fig 16 NewProject CX Integrator Edit View Insert Network Component Tools Windows Help DG amp e Start Data Link Start Routing table 44 344 NT Link tool 2141 DeviceNet tool NewProject Es Network 1 DeviceNet 001 Controller Link tool Ethernet tool H PS file EDS 2 Vendor OMRON Corpor
45. DOG ON MPOS DPOS goes from 0 to 999999 Q C Gl Gl Main program loop Define current position as zero DEFPOS 0 Wait for rising edge in Digital Input start signal WAIT UNTIL IN start signal 0 WAIT UNTIL IN start signal 1 PROGRAMMING MANUAL fig 56 Position Bag distance expected POS Bag distance MARK TRUE MOVEMODIFY MOVEABS REGIST 1 WAIT IDLE DEFPOS 0 IN start signal trajexia MARK FALSE Mark not detected no correction MOVEABS WAIT IDLE DEFPOS 0 292 O E Examples and tips Move bag length MOVEABS bag distance WAIT UNTIL MTYPE 2 To verify that the MOVEABS is being executed 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 the position is corrected MOVEMODIFY distance expected POS failed 0 ELSE If the mark has not been detected PRINT Mark not detected failed failed l IF failed max fail THEN After several consecutive misdetection stop the application PRINT Mark de
46. Example See also Axis command CONNECT ratio driving axis CO ratio driving axis 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 com mand 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 parameter 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 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 axis The ratio value can be either positive or negative and has sixteen bit fractional resolu tion driving axis The Master axis which will drive the base axis In a press feed a roller is required to rotate at a speed one quarter of the measured rate from an encoder mounted on the incoming conveyor The roller is wired to axis 0 An input channel monitors the encoder pulses from the conveyor and forms axis 1 This code can be used BASE 1 SERVO OFF This axis is used to monitor the conveyor
47. Examples and tips 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 OPTION 1 To calculate the multiturn limit setting Pn205 we have 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 PROGRAMMING MANUAL trajexia 248 0 Examples and tips Example 5 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 M measurement units must mm Total repeat distance must be the distance between two stations 50mm 17 bit absolute 1 10 Gear d With the same procedure as in example 1 we have encoder Pulley 12 teeth 50mm between teeth Pn202 UNITS Pn203 17 2 counts 10 motor revolution 1 pulley_revolution 1 station
48. Messages Programs on controller differ from those in project Save Save controller programs to new project Load Load a different project Change project for comparison Erase controller programs and create a new project Resolve project and controller mismatches Change New Resolve Cancel 192 0 Trajexia Tools interface New Deletes the project that is on the Trajexia system and starts a new project on the PC Trajexia Tools makes a new directory with the project name that contains the new project file The name of the directory must be the same as the name of the project else the project cannot open Resolve Compares the project that is on the Trajexia Tools with the project that is on the PC This option offers the possibility to Save Load or Examine the differences individually for each individual program inside the project This option allows a modification of a program off line using the simulator and a download of the same program to the TJ1 MC This option also allows more than one person work on the same project at the same time Cancel Stops the connection process The Trajexia Tools starts in disconnected mode PROGRAMMING MANUAL trajexia 193 O g Trajexia Tools interface 5 4 Tools application window The Trajexia Tools application window has these parts 1 Control panel 2 Menu bar 3 Toolbar 4 Workspace 5 Status bar 5 4 1 Con
49. O E Examples and tips WA 1 WAIT IDLE ENDIF Origin search against limit switches 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 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 BASE 0 DATUM 0 SERVO ON WDOG ON DATUM 4 WA 1 WAIT IDLE PROGRAMMING MANUAL trajexia fig 28 e min limit switch OFF max limit switch fig 29 min limit switch max limit switch REVERSE FORWARD 256 O E Examples and tips Origin search against hardware parts blocking movement 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 orig
50. The best way to ensure the precedence of various operators is through the use of parentheses 27 O E Trajexia system 2 4 Motion execution Every task on the TJ1 MC___ has a set of buffers that holds the information from the motion commands given 2 4 4 Motion generator The motion generator has a set of two motion buffers for each axis One buffer called MTYPE holds the Actual Move which is the move currently executing on the axis The other buffer called NTYPE holds the Next Move which is executed after the Actual Move has finished See chapter 2 8 Motion Buffers in the Trajexia Hardware Reference manual for detailed explanation The BASIC programs are separate from the motion generator program which controls moves for the axes The motion generator has separate functions for each axis so each axis is capable of being programmed with its own axis parameters for example speed acceleration and moving independently and simultaneously or they can be linked together using special commands When a move command is being processed the motion generator waits until the move is finished and the buffer for the required axis has become empty and then loads these buffers with the next move information PROGRAMMING MANUAL trajexia 28 0 Trajexia system paused until buffers are available again This also applies to the command line task and no commands can be given for that period Tr
51. 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 loop IF pos 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 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 PROGRAMMING MANUAL fig 43 trajexia 271 0 Examples and tips trajexia Initializations FOR 0 TO 1 BASE i ATYPE 40 NITS 8192 P DIST 20 P OPTION 1 1 VE CONTROL 11 FED 8 CCEL 50 ECEL 50 FPOS 0 ERVO ON CANCEL NEXT i WDOG ON BASE 1 Scope settings 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
52. eter can be used to perform a relative adjustment of the current position DEFPOS works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note The changes to the axis position made using DEFPOS or OFFPOS are made on the next servo update This can potentially cause problems when a move is initiated in the same servo period as the DEFPOS 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 64 0 BASIC commands Arguments Example See also The command can take up to 16 arguments posi The absolute position for base i axis in user units Refer to the BASE command for the grouping of the axes BASE 2 DATUM 5 BASE 1 DATUM 4 WAIT IDLE DEFPOS 1000 3500 The last line defines the current position to 1000 3500 in user units The current position would have been reset to 0 0 by the two DATUM com mands AXIS DATUM DPOS OFFPOS MPOS UNITS 3 2 74 DEL Type Syntax Description Arguments Example See also Program command DEL program name RM program name The DEL command deletes a program from the controller DEL without a pro gram name can be used to delete the currently selected prog
53. position MPOS axis parameter The value of the Following Error can be checked by using the axis parameters LIMIT and FE RANGE N A No example AXIS DPOS FE LIMIT FE RANGE MPOS UNITS PROGRAMMING MANUAL trajexia 3 2 115 FE LATCH Type Syntax Description Arguments Example See also 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 LIMIT and the SERVO parameter has been set to 0 FE LATCH is reset to 0 when the SERVO parameter of the axis is set back to 1 N A No example N A 3 2 116 FE LIMIT Type Syntax Description Arguments Example See also Axis parameter FE LIMIT The FE LIMIT axis parameter contains the limit for the maximum allowed Fol lowing 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 This limit is used to guard against fault conditions such as mechanical lock up loss of encoder feedback etc N A No example AXIS AXISSTATUS ERRORMASK FE FE RANGE UNITS 80 0 BASIC commands 3 2 117 FE LIMIT MODE Type Syntax Description Arguments Example See also 3 2 118 FE RANGE Type Syntax Description Arguments Example See also Axis parameter Type FE LIMIT MO
54. 0 lt BASIC commands 3 2 262 TIME Type System command Syntax Description Prints the current time as defined by the real time clock as a string 24 hour format Arguments Example gt gt TIME 14 39 02 See also N A 3 2 263 TO See FOR TO STEP NEXT 3 2 264 TRANS DPOS Type Syntax Description Arguments Example See also Axis parameter read only TRANS DPOS 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 configurations it can be useful to install a frame transformation which is not 1 1 these are typically machines such as robotic arms or machines with parasitic motions on the axes Frame transformations have to be specially written in the C language and downloaded into the controller It is essential to contact OMRON if you want to install frame transformations N A No example FRAME PROGRAMMING MANUAL trajexia 0 3 2 265 TRIGGER Type System command Syntax TRIGGER Description TRIGGER command starts a previously set up SCOPE command Note Trajexia Tools uses TRIGGER automatically for its oscilloscope func tion Arguments Example No example See also SCOPE 3 2 266 TROFF Type Program command Syntax TROFF program name Description TROFF command suspends a trace at the curren
55. 1 FORWARD 10 IDLE 0 Next Move NTYPE MOVECIRC 4 MOVECIRC 4 IDLE 0 Move Loading 29 0 Trajexia system 2 5 The command line interface provides a direct interface for the user to execute commands and access parameters on the system Use the Terminal Window in Trajexia Tools when the TJ1 MC is connected See section 5 5 4 for details The TJ1 MC puts the last 10 commands given on the command line in a buffer Pressing the Up and Down Cursor Key will cycle through the buffer to execute the command again Command line interface 2 6 The TJ1 MC can store up to 14 programs in memory provided the capacity of memory is not exceeded The TJ1 MC q supports simple file handling instructions for managing these program files rather like the DOS filing system on a computer The Trajexia Tools software package is used to store and load programs to and from a computer for archiving printing and editing It also has several controller monitor and debugging facilities Refer to chapter 5 BASIC programs 2 6 1 Managing programs Trajexia Tools automatically creates a project which contains the programs to be used for an application The programs of the project are kept both in the controller and on the computer Whenever a program is created or edited Trajexia Tools edits both copies in order to always have an accurate backup outside the controller at any time Tr
56. Ethernet configuration Enable features Enable editing Fix project into EPROM Flash Stick Load system software Full Directory Lock Controller Unlock Gontroller 198 0 Trajexia Tools interface Controller configuration Shows the hardware configuration screen of the controller hardware that is connected to the PC Controller The PC is connected to a Trajexia Motion Controller TJ1 MC with 1 64 Dev 94 software The servo period is 1000us Axis Shows the axes that are available Comms The communication capability of the Trajexia Motion Controller The type and range of the digital analog and virtual inputs and outputs CANIO Not implemented for Trajexia PROGRAMMING MANUAL trajexia fig 26 Controller Configuration BS Controller Type System Version Servo Period TJ1 MC16 1 64 Dev 94 1000us Type Mechatrolink Speed Type Mechatrolink Profibus Digital inputs Digital outputs lens si 199 0 Trajexia Tools interface traj Ethernet configuration Lets you change the Ethernet configuration and IP address of the fig 27 controller hardware Slot Always 1 for Trajexia Ethernet IP address The IP address of the Trajexia Motion Controller This 3 is not the same as the IP address of the PC IP Address 182 168 Subnet Mask The subnet mask for the Tra
57. MECHATROLINK unit 4 station VR Returns the address of MECHATROLINK II device at that station number The station numbers are a sequence O x for all the attached devices 1 is returned if no device is allocated to that station It is used by the STARTUP program to check that the number of detected MECHATROLINK II modules corresponds with the expected MECHATROLINK unit 5 station VR Reads and clears missed message count A Non Axis MECHATROLINK II device does not report automatically a network problem so use this command to poll the inverter and IO modules for checking that the network is alive This command will be used in the proposed SHELL program Note You can use the command MECHATROLINK unit 5 station VR to mon itor the status of a device during a program execution If the contents of the VR address is greater than 0 a communication error with the device occurs and the device can malfunction You can use this command to stop your program when the device has an error 107 0 BASIC commands trajexia Description Note This command has two forms depending upon the function required 3 2 173 MERGE Master and Station Functions All MECHATROLINK functions return TRUE 1 if the command was suc cessful or FALSE 0 if the command failed Type The functions are separated out into 2 types MASTER functions that work on a unit and STATION functions that work on a specific station address of a given unit Des
58. See also 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 bus system 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 value Any BASIC floating point variable or parameter n The byte number 0 3 to be extracted V MPOS AXIS 2 0 IEEE OUT V 0 byte1 IEEE OUT V 1 byte2 IEEE OUT V 2 byte3 IEEE OUT V 3 N A 96 0 BASIC commands 3 2 150 IF THEN ELSE ENDIF Type Syntax Description Arguments Example Example Example 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 con dition If the condition is TRUE the commands following THEN up to ELSEIF ELSE or ENDIF is executed If the condition is FALSE and the command of a subsequent ELSEIF substructre 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
59. Set up You need the SETCOM command to set up the serial port of the TJ1 MC__ for the Host Link Master protocol Set the command as follows SETCOM baudrate data_bits stop_bits parity port 6 After you have set this command you can use the HLM_READ HLM_WRITE and HLM_COMMAND commands to read and write data using Host Link 161 0 Communication protocols Timeout The timeout mechanism is implemented to prevent that the BASIC task pauses for a long time due to bad or no communication The HLM TIMEOUT parameter specifies the timeout period This period is the maximum time the program task waits after it has sent the command to receive a response If the timeout period elapses the HLM STATUS contains the status of the command and the BASIC task continues The HLM TIMEOUT parameter specifies the timeout period for all commands and for all ports Status The HLM STATUS parameter contains the status of the last Host Link master command sent to the specified port The parameter indicates the status for the HLM READ HLM WRITE and HLM COMMAND commands The status bits are Bit Name Description 0 7 End code The end code is the end code defined by the Host Link slave when a prob lem occurred in the data string of the sent command or anend code defined by the Host Link master when a prob lem occurred in the data string of the received response 8 Timeout error A timeout
60. The current move is not cancelled FHSPEED can have any positive value including 0 The default value is 0 Note This feature only works on speed controlled moves Moves which are not speed controlled CAMBOX CONNECT and MOVELINK are not affected Arguments Example No example See also AXIS AXISSTATUS FHOLD UNITS PROGRAMMING MANUAL trajexia 3 2 121 COMMS Type Syntax Description Communication command FINS COMMS type network node unit remote area remote offset length local area local offset timeout ip1 ip2 ip3 ip4 FINS Factory Interface Network Service is a Proprietary OMRON communi cation 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 information on FINS commu nication protocol see section 4 2 4 and the Communication Commands Ref erence Manual cat num W342 E1 Sections 3 and 5 Trajexia has built in FINS client capabilities so it can initiate the FINS commu nications with FINS slave devices using FINS COMMS Both FINS 0101 Read Memory and FINS 0102 Write Memory commands are implemented With FINS 0101 memory can be read from other devices with FINS server capability FINS 0102 can be used to write data to devices with FINS server capability This command returns
61. This window allows the user to manually move the axes on the Trajexia Refer to Jog Axis in the Tools menu p 205 Refer to Digital IO Status in the Tools menu p 205 Refer to Analog input in the Tools menu p 205 PROGRAMMING MANUAL use TABLE values VR values Watch variables Simulator Trajexia Tools Help Trio BASIC Help trajexia Refer to the TABLE and VR values in the Tools menu p 205 Refer to the TABLE and VR values in the Tools menu p 205 Not implemented in Trajexia Not fully implemented in Trajexia Opens Trajexia Tools Help Opens Trio BASIC Help 195 0 Trajexia Tools interface 5 5 Menu descriptions 5 5 1 Project menu The Project menu lets you create load and save Trajexia Tools projects New project Deletes the project that is on the Trajexia system and starts a new project on the PC Trajexia Tools makes a new directory with the project name that contains the new project file The name of the directory must be the same as the name of the project else the project can not open Load project Opens a project that is on the PC Trajexia Tools downloads the project that is in the PC to the Trajexia system The project on the Trajexia system is overwritten Before you load to the Trajexia system make sure that the program on the Trajexia system has a back up copy first Save project as Uploads the project that is in the Tra
62. due to limitations imposed by the system servo period Table range used for data capture From 15000 To 14999 Table Data Graph Points per division Fit to display D e Table ranges to graph From To Boko o 89 0 00 Block 1 2000 2999 Block2 40 Block3 4000 4999 277 0 Examples and tips as the capture of the other signals The discontinuity in the CAM red graph coincides in time with the interrup tion of the movement To analyze this check the position values individually with a spreadsheet program To ana lyze the point values in detail you can export the TABLE points to a spreadsheet program for a more complex analysis H The time base of the CAM TABLE points is not the same PROGRAMMING MANUAL trajexia 278 O E Examples and tips 6 2 Practical examples 6 2 1 Shell program 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 Find below an example of a shell program make sure that you modify the program to the specific needs of the application Check correct operation before you rely on the safe operation of the program This program is typically set to run at power up at low priority Example
63. forward and reverse limit inputs are also active low Active low inputs are used to enable fail safe wiring See also N A Arguments sequence See the table below 3 2 67 DATE Example No example See also ACCEL AXIS AXISSTATUS CREEP DATUM IN DECEL Type Syntax Description Arguments Example See also System command DATE Prints the current date DD MM YY as a string to the port A 2 digit year description is given N A PRINT 1 DATE This will print the date in format for example 20 10 05 N A PROGRAMMING MANUAL MOTION_ERROR SPEED 62 0 BASIC commands trajexia sequence value Description 0 The DATUM 0 command will clear the motion error The currently measured position is set as the demand position this is especially useful 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 sequence Description value 6 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
64. to link distance PROGRAMMING MANUAL trajexia Acceleration Dec eleration link distance Ax Speed Speed distance distance ink speed ink speed distance The incremental distance in user units to move the base axis as a result of the measured link distance movement 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 parame ter 2 they are both reduced in proportion until the equal parameter 2 linkaxis The axis to link to link option See the table below 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 114 0 BASIC commands Example See also A flying shear cuts a roll of paper every 160 m while moving at the speed of the
65. to section 3 2 219 MARK is a flag that signals whether the position has been captured or not For the second registration input of the TJ1 FLO2 the parameter MARKB is also available For more information refer to sections 3 2 170 and 3 2 171 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 TJ1 FLO2 the parameter REG POSB is also available For more information refer to sections 3 2 217 and 3 2 218 PROGRAMMING MANUAL 262 O E Examples and tips The picture gives the sequence of executing the commands 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 PROGRAMMING MANUAL Position The trigger is active REGIST 0 ARK 1 0 REG 5 Registration Input fig 34 The position information is available REG POS Pos1 trajexia the trigger is not active The trigger is active the registration is ignored MARK 1 REG 1 REGIST 0 X MARK 0 263 0 Examples and tips Registration and windowing function The windowing function enables for registration to occur only within a specifi
66. x2 and the profiled speed as calculated from the SPEED ACCEL and DECEL parameters from the base axis and the total multi axes distance L SQR x4 x The individual speed v for axis at any time of the movement is calculated as See also vj L Arguments command can take up to 16 arguments distance i The distance to move for every axis in user units starting with the base axis Example A system is working with a unit conversion factor of 1 and has a 1000 line encoder It is therefore necessary to use the following command to move 10 turns on the motor A 1000 line encoder gives 4000 edges turn MOVE 40000 PROGRAMMING MANUAL trajexia MOVE 10 AXIS 0 MOVE 10 AXIS 1 MOVE 10 AXIS 2 In this example axes 0 1 and 2 are moved independently without interpola tion Each axis will move at its programmed speed and other axis parame ters An X Y plotter can write text at any position within its working envelope Indi vidual characters are defined as a sequence of moves relative to a start point so that the same commands can be used no matter what the plot position The command subroutine for the letter M might be as follows 0 12 gt 3 6 gt 3 6 C gt D MOVE 0 12 D gt E AXIS MOVEABS UNITS 110 0 BASIC commands 3 2 178 MOVEABS Type Syntax Description Arguments Example Example
67. AXIS flying 15 gt 1 acc 2 Activate the shear when it is in synchronization with the line Slow speed to cut 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 I I cut counter cut counter linch Return back synchronized with the master in such a way that there is no wait time line back cut length synch dist 1l 1 acc shear cut 1l 2 1 dec 2 MOVELINK shear cut line 1 4 1 dec 4 line axis AXIS flying axis GOTO loop PROGRAMMING MANUAL trajexia 297 O E UOISIASYH Examples and tips trajexia The speed time graph shows the steps of the above example The fig 60 steps are 1 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 2 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 3 This is the synchronization part the relative distance between the edge of the product and the shear remai
68. Configuration window see section 5 5 4 With manual triggering the user can see the changes of axis and system parameters in real time as the system runs A PROGRAMMING MANUAL trajexia fig 42 1 1 1 1 Master Speed Slave Speed 1 1 ET 1 1 1 1 i i 1 i 1 i i 1 1 Correction in the slave according to the latch Extra position the first Servo Period 4 cycle is equal to the lost position 1 Registration input signal 269 0 Examples and tips 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 Using the oscilloscope 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 TJ1 MC__ 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 T
69. Do not attempt to disassemble repair or modify any Units Any attempt to do so may result in malfunction fire or electric shock Caution Confirm safety at the destination unit before transferring a program to another unit or editing the memory Doing either of these without confirming safety may result in injury Caution User programs written to the Motion Control Unit will not be auto matically backed up in the TJ1 flash memory flash memory func tion gt gt A PROGRAMMING MANUAL Safety warnings and precautions trajexia Caution Pay careful attention to the polarity when wiring the DC power supply A wrong connection may cause malfunction of the system Caution 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 Operating environment precautions Caution Do not operate the Unit in any of the following locations Doing so may result in malfunction electric shock or burning Locations subject to direct sunlight Locations subject to temperatures or humidity outside the range specified in the specifications Locations subject to condensation as the result of severe changes in temperature Locations subject to corrosive or flammable gases Locations subject to dust especially iron dust or salts Locations subject to exposure to water oil or chemicals Locations subject to
70. Fn001 6 PROGRAMMING MANUAL fig 6 trajexia 232 0 Examples and tips Example 4 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 Example 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 PROGRAMMING MANUAL fig 8 233 0 Examples and tips Example 6 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 Gainz131072 VFF_GA
71. GAIN The 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 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 N A No example D GAIN 1 GAIN OV GAIN P GAIN 3 2 276 VP SPEED Type Syntax Description Arguments Example See also Axis parameter read only VP SPEED The SPEED parameter contains the speed profile speed in user units s The speed profile speed is an internal speed which is accelerated and decel erated as the movement is profiled N A Wait until at command speed MOVE 100 WAIT UNTIL SPEED SPEED AXIS MSPEED UNITS PROGRAMMING MANUAL trajexia 3 2 277 VR Type Syntax Description Arguments Example 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 TJ1 MC__ has in total 1024 VR variables The VR variables can be used for several purposes in BASIC programming The VR variables are globally shared between tasks and can be used for communications bet
72. GOSUB label label 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 then 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 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 PROGRAMMING MANUAL trajexia 0 3 2 196 Program control command Syntax ON expression GOTO label label Description 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 Arguments expression Any valid BASIC expression label Any valid label in the program Example REPEAT GET 1 char UNTIL 1 lt and lt 3 ON char GOTO mover stopper change See also N A 3 2 197 OP Type I O command Syntax OP output number value OP binary pattern OP 119 0
73. GSD Files Add Device 4 fig 10 2 OMRON TJ1 PRT Configuration Device OMRON T H PRT 050 File 09 4 850 Vendor OMRON Corporation Ident Number 009 4 Configuration Parameter Group Device Settings Station Address 1 Enable watchdog control Watchdog Interval 200 ms r Madule Configuration 16 In Pons 1 Contigured Modules 1 2 words Out No Cons 0x61 2 2 words In Cons 0x51 3 1 word In Cons 0850 4 4 words Out No Cons 0x63 5 1 ward Out No Cons length of input output data 488 Length of input output data 20 Byte Max length of input data 244 Byte Length of input data B Byte Max lenath of output data 244 Byte Length of output data 14 Byte number of modules 32 Number of modules Available Modules 1 word In Mo 0 50 2 words In No Cons 0 51 4 words In No Cons 0x53 8 words In No Cons 0 57 P Append Module Name Module Configuration Identifier OK Cancel Apply Help 170 0 Communication protocols 1 Double click the master module in the MyNetwork tree 2 Setthe Station Address and Unit Number ban Select the Slave area tab Set the Start Address field of Output Area 1 and Input Area 1 Save the project PROGRAMMING MANUAL trajexia fig 11 atl 4 C31 W PRM21 PROFI
74. INDEVICE will be used variable The variable to write to Consider the following program to receive data from the terminal INPUT 5 num PRINT 5 BATCH COUNT num 0 A possible response on the terminal could be 123 lt CR gt BATCH COUNT 123 INDEVICE GET LINPUT KEY trajexia BASIC commands ccc o 3 2 155 INT Type Mathematical function Syntax INT expression Description 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 Arguments expression Any valid BASIC expression Example gt gt PRINT INT 1 79 1 0000 See also N A 3 2 156 INVERT IN Type Syntax Description Arguments Example See also System command INVERT IN input on off The INVERT IN command allows the input channels 0 31 to be individually inverted in software This is important as these input channels can be assigned to activate func tions such as feedhold The INVERT function sets the inversion for one channel on or off It can only be applied to inputs 0 31 input A BASIC expression gt gt IN 3 0 0000 gt gt 1 3 gt gt IN 3 1 0000 PROGRAMMING MANUAL 99 0 BASIC commands 3 2 157 STEP Type Syntax Description Arguments
75. INVERTER READ module station 1 alarm number VR INVERTER READ module station 2 VR INVERTER READ module station 3 VR INVERTER READ module station 4 from length VR INVERTER READ reads the parameter speed reference torque reference or alarm from the frequency inverter connected to the system via the MECHATROLINK II bus There are five INVERTER READ functions O0 Reads an inverter parameter 1 Reads the inverter alarm 2 Reads the speed reference e 3 Reads the torque reference 4 Reads the inverter inputs To use an inverter via MECHATROLINK II you should put the command and the reference via communication option Inverter MV V7 N3 3 4 9 Inverter 7 7 1 01 3 1 02 3 Make you sure that the Inverter firmware supports the MECHATROLINK II board The command returns 1 if successfully executed and 0 if failed The result if any is returned in the selected VR 101 0 Arguments module The number of the TJ1 ML__ that the inverter is connected to 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 See the inverter manual VR The address in the VR memory of the TJ MC where the read informa tion is put When the function is 4 the result is returned as a bitwise value See the t
76. MC q is generic It does not need to match with the subnet mask of the PC Use the Ethernet command to read or write the Ethernet settings It is necessary to power off and on again the units for the changes to take effect You can check the IP address of the TJ1 MC___ with the Trajexia Tools command line and the Ethernet command the command Ethernet 0 1 0 at the command line and the IP address of the TJ1 MC__ shows the command line Note The TJ1 MC does not have DHCP functionality therefore it can not assign an IP address to a PC Note You need to set the power of the Trajexia system off and back on before the change of the IP address takes effect PROGRAMMING MANUAL 153 0 Communication protocols trajexia 421 Communicate with Trajexia directly from your computer 1 Do not change the Ethernet settings in Trajexia 2 Setthe Trajexia Tools settings as shown fig 1 Comms Parameters ENet0 Server address 32 168 0 250 IP port number 23 Canes 3 Set your computer settings as shown fig 2 Internet Protocol TCP IP Properties General You can get IP settings assigned automatically if your network supports this capability Otherwise you need to ask your network administrator for the appropriate IP settings Obtain an IP address automatically Use the following IP address IP address 192 168 0 255 Subnet mask 255255255 SU Defau
77. MPOS and DPOS values is from 0 degrees to 60 degrees PROGRAMMING MANUAL M 16 bit absolute 1 10 Gear encoder trajexia fig 20 Full turn 360 244 0 Examples and tips trajexia 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 You must initialize the absolute encoder before you use it 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 It is possible to reset the multiturn counter but it is not the motor and written to MPOS using the following con version For MPOS At power up the absolute encoder position is read from 1 Pn203 UNITS Pn202 Absolute MPOS abs position encoder e This is correct if Pn203 Pn205 1 encoder counts lt 5000000 Pn202 e If this value is greater than 5 000 000 MPOS have incorrect values at start up To avoid this prob lem add the program code DEFPOS ENCODER UNITS after all UNITS initializations PROGRAMMING MANUAL 245 0 Examples and tips traj
78. Motion Stop The program stops at the end of the CPU cycle The servo motors maintain position Stop all The Stop all command stops all programs the TJ1 MC__ controller This is not the same as Motion Stop The programs stop at the end of the CPU cycle The servo motors maintain position PROGRAMMING MANUAL trajexia 204 O E Trajexia Tools interface traj Set power up mode It is possible to make the programs in the TJ1 MC run fig 30 automatically when the system starts up Select Set Powerup Mode to open the Run On Power Up dialog window 4 rogram Select program you want to run automatically A small drop Default down menu appears to the right of the window If you want Trajexia E staRTUP Dess to allocate the process to run in choose default as the process number You can also specifically select the process Run On Power Up 5 5 4 Tools menu The Trajexia Tools tools can be accessed by the Tools Menu or the Toolbar button Tools External Option Axis parameters Intelligent Drives Oscilloscope Digital status Keypad Jog axes Table viewer VR viewer Watch variables Analogue Inputs Terminal PROGRAMMING MANUAL 205 O E Trajexia Tools interface Axis parameters The Axis Parameters window lets you monitor and change the motion parameters for any axis on the Trajexia system The window contains the pa
79. Note As the measured position is not changed initially the Following Error limit FE LIMIT should be considered If the change of demanded position is too big the limit will be exceeded N A No example AXIS DPOS FE LIMIT UNITS 3 2 104 EPROM Type Syntax Description Arguments Example See also Program command EPROM The EPROM command stores the BASIC programs in the TJ1 MC__ 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 control led by the POWER UP system parameter Note Trajexia Tools offers this command as a button on the control panel Also pop up screens will prompt to write the program data into flash memory N A No example POWER UP RUNTYPE PROGRAMMING MANUAL trajexia 3 2 105 ERROR AXIS Type Syntax Description Arguments Example See also 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 1 and the ERROR AXIS parameter will contain the number of the first axis to have the error N A No example AXISSTATUS ERRORMASK MOTION ERROR WDOG 3 2 106 ERROR LINE Type Syntax Description Argum
80. PROC STATUS PROC Example See also PROGRAMMING MANUAL PROFIBUS 0 2 1 10 16 150 31 In this example the TJ1 PRT is configured to exchange data with PROFI BUS DP master with 16 output words received from the master located at VR 10 to VR 25 and 31 input words sent to the master located at VR 150 to VR 180 N A 125 0 BASIC commands Bit Value Description 0 0 Failed configuration of I O data exchange 1 data exchange configured successfully 1 0 data not available 1 data available 2 0 Data exchange active in OPERATE mode 1 Data exchange active in CLEAR mode 3 2 214 PSWITCH Type command Syntax PSWITCH switch enable axis output number output state set position reset position Description 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 measured absolute positions There are 16 position switches each of which can be assigned to any axis Each switch is assigned its own on and off positions and output number The command can be used with 2 or all 7 arguments With only 2 arguments a given switch can be disabled PSWITCHs are calculated on each servo cycle and the output result applied to the hardware The response time is therefore 1 servo cycle period approxi mately Note An output may remain on if i
81. PROCESS 3 2 213 PROFIBUS Type Program command Type System command Syntax PROCESS Syntax PROFIBUS unit number 2 1 VR start outputs no outputs Description The PROCESS command returns the status list of all running tasks with their VR start Inputs no inputs PROFIBUS unit number 4 0 Arguments Description PROFIBUS function 2 configures the TJ1 PRT for data exchange with the PROFIBUS DP master unit and defines areas in the VR memory where Example No example exchange takes place PROFIBUS function 4 returns the data exchange sta See also HALT RUN STOP tus of the TJ1 PRT Refer to the table for the description of the bits in the data exchange status word 3 2 212 PROCNUMBER Arguments unit number Specifies the unit number of the TJ1 PRT in the Trajexia system start outputs The starting address in VR memory of the controller where the output Type Task parameter read only data from the PROFIBUS DP master is located Syntax PROCNUMBER no outputs Description PROCNUMBER parameter contains the number of the task in which the masterin Vi currently selected program is running PROCNUMBER is often required inputs The starting address in VR memory of the controller where the input data Arguments for the PROFIBUS DP master is located Example MOVE length AXIS PROCNUMBER no inputs The number of input words to the PROFIBUS DP master in VR memory See also
82. Rising edge See also AXIS MARK MARKB REG POS REG POSB OPEN WIN CLOSE WIN 7 Signal always OFF 8 Signal always ON Bit Function Flexible Axis 9toC Not used 1 0 Primary registration occurs for D Input from CN1 pin44 Falling edge 00 Z mark of the encoder E Input fi CN1 pin45 Falli d ME irish as nput from pin45 Falling edge 2 10 REG 1 input F Input from CN1 pin46 Falling edge e 11 AUX IN input EXT 2 Pn511 2 As for EXT 1 As for EXT 1 2 Set this bit to use primary registration event EXT 3 Pn511 3 As for EXT 1 As for EXT 1 3 Primary registration event occurs on signal 0 rising edge 1 falling edge Inclusive windowing lets the registration to occur only within a specified win 5 4 Secondary registration occurs for dow of axis positions With this windowing function registration events are e 00 Z mark of the encoder ignored if the axis measured position is not greater than the OPEN WIN axis e 01 REGO input parameter and less than the CLOSE WIN parameter 10 REG 1 input Exclusive windowing allows the registration to occur only outside of the speci e 11 AUX IN input fied window of axis positions With this windowing function the registration 6 Set this bit to use secondary registration event events are ignored if the axis measured position is not less than the OPEN_WIN axis parameter and greater than the CLOSE_WIN parameter 7 Secondary registration event occurs on signal t d e 0 rising edge 1 fall
83. TABLE variables Each variable will define the word or data that will be transferred The maximum data length is 29 words single frame trans fer Program execution will be paused until the response string has been received or the timeout time has elapsed The timeout time is specified by using the HLM TIMEOUT parameter The status of the transfer can be monitored with the HLM STATUS parameter Notes When using the WRITE be sure to set up the Host Link Master protocol by using the SETCOM command e Host Link Master commands are required to be executed from one program task only to avoid any multi task timing problems trajexia The specified serial port 1 5 232 serial port 1 2 RS 422A serial port 2 node The Slave node number to send the Host link command to Range 0 31 pc area The PC memory selection for the Host link command See the first table below offset The address of the specified PC memory area to write to Range 0 9999 length The number of words of data to be transferred Range 1 29 mc area The memory selection of the TJ1 MC__ to read the send data from See the second table below mc offset The address of the specified TJ1 MC memory area to read from Range for VR variables 0 1023 Range for TABLE variables 0 63999 Example WRITE 1 28 PLC EM 50 25 MC 200 This example shows how to write 25 words fr
84. Trajexia moving a single axis using MECHA TROLINK II in a test set up V7 Inverter TOEP C71060605 02 OY Describes the installation and operation of V7 inverters F7Z Inverter TOE 5616 55 1 OY Describes the installation and operation of F7Z inverters G7 Inverter TOE 5616 60 Describes the installation and operation of G7 inverters Trajexia motion control system HARDWARE REFERENCE MANUAL I51E Describes the installation and hardware specification of the Trajexia units and explains the Trajexia system philoso phy SI T MECHATROLINK inter face for the G7 amp F7 SIBP C730600 08 Describes the installation and operation of MECHATRO LINK interfaces for G7 and F7 inverters Trajexia motion control system PROGRAMMING MANUAL I52bE Describes the BASIC com mands to be used for pro gramming Trajexia explains the communication protocols and Trajexia Tools software gives practical examples and troubleshooting information ST T V7 MECHATROLINK interface for the V7 SIBP C730600 03 Describes the installation and operation of MECHATRO LINK interfaces for V7 invert ers MECHATROLINK IO Modules SIE C887 5 Describes the installation and operation of MECHATRO LINK input and output mod ules and the MECHATROLINK II repeater Sigma ll Servo Driver manual SIEP 5800000 15 Describes the installation and operation of Sigma ll servo drives SYSMAC CS CJ Series Com municati
85. a temporary base axis Note The forward motion can be stopped by executing the CANCEL or RAPIDSTOP command or by reaching the forward limit N A start FORWARD WAIT UNTIL IN 0 ON Wait for stop signal CANCEL AXIS CANCEL RAPIDSTOP REVERSE UNITS 3 2 126 FPGA VERSION Type Syntax Description Arguments Example See also Slot parameter FPGA VERSION SLOT unit number This parameter returns the FPGA version of unit with unit number in a con troller system unit number Unit numbers are 1 to 6 including 0 with 1 being the TJ1 MC__ and 0 being the unit immediately to the right of the TJ1 MC N A N A PROGRAMMING MANUAL trajexia 0 3 2 127 Mathematical function Syntax FRAC expression Description 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 3 2 128 FRAME Type System parameter Syntax FRAME value Description Used to specify which frame to operate within when employing frame transfor mations 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 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 r
86. 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 commands 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 execution IF NOT DRIVE ALARM 10 AXIS 2 THEN PRINT Failed to read alarm for Servo Driver ELSE IF VR 10 0 THEN PRINT Servo driver healthy ELSE PRINT Servo alarm 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 68 0 BASIC commands 3 2 82 DRIVE CLEAR Type Syntax Description Arguments Example See also 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 TJ1 MC and the Servo Driver and then turning it on ag
87. avoid having different parameter on the Servo Driver and in the project tevay Motion Controller Ethernet 3600 MUNIT 0 0 SNA 0 NS IS SGDH SSSMA 4 PROGRAMMING MANUAL 209 0 Trajexia Tools interface Configuration tab The Configuration tab shows a parameter editor window identical to that in CX Drive For further details check the information in CX Drive New functionality is Save button Store the current servo parameters in the Trajexia project in the prj file Cancel Registration Mode When the registration in the Servo Driver is active to obtain a quick and reliable response it is not possible to write parameters This is the same as executing REGIST 1 Launch CX Drive same as the button explained in the Status tab Oscilloscope The software oscilloscope can be used to trace axis and motion parameters This is an aid to program development and system commissioning There are four channels each capable of recording 1 sample per SERVO PERIOD with manual cycling or program linked triggering The controller records the data at the selected frequency and uploads the information to the oscilloscope to be displayed If a larger time base is used the data is retrieved in sections and the graphic is plotted in section across the display The moment the controller starts to record the requ
88. be merged with linked moves CONNECT MOVELINK and CAMBOX 2 There is a move in the next move buffer NTYPE 3 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 If the moves are short a high deceleration rate must be set to avoid the TJ1 MC__ decelerating in anticipation of the end of the buffered move N A MERGE OFF Decelerate at the end of each move MERGE Moves will be merged if possible AXIS 108 0 BASIC commands 3 2 174 MHELICAL Type Axis command Syntax MHELICAL end1 end2 centre1 centre2 direction distance3 MH end1 end2 centre1 centre2 direction distance3 Description gt 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 linear move on a third axis The first 5 parameters are similar to those of a MOVECIRC com mand 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 distances and the sixth parameter are scaled according to the cur rent unit conversion factor for each axis Arguments end1 Position on BASE axis to finish at 2 Position on next axis in BASE array to finish at centre1 Position on BASE axis about which to move centre2 Positi
89. 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 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 outputs to 0 For Flexible axis Stepper Out 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 system AXIS DISABLE GROUP 3 2 35 AXISSTATUS Type Syntax Description Arguments Example See also Axis parameter read only AXISSTATUS The AXISSTATUS axis parameter contains the axis status The AXISSTATUS axis parameter definitions are shown in the table below The AXISSTATUS parameter is used for the motion error handling of the unit N A IF AXISSTATUS AND 16 gt 0 THEN PRINT In forward limit AXIS ERRORMASK 50 0 BASIC commands trajexia Arguments Bit Description Value Character as used in Reserved for future expansion Always set this to 1 number Trajexia Tools data in Location in the TABLE where the source profile is stored 0 7 1 7 number in 1 Following error warning 2 w Number of points in the source profile 2 Servo driver
90. bit operator and so the binary action taking place is 01010 OR 10010 11010 Example IF KEY OR VR 0 2 THEN label See also N A Bit 1 Bit 2 Result 0 0 0 0 1 1 1 0 1 1 1 1 3 2 200 OUTDEVICE Type parameter Syntax OUTDEVICE Description OUTDEVICE parameter defines the default output device This device will be selected for the PRINT command when the n option is omitted The OUTDEVICE parameter is task specific The supported values are listed in the table below Arguments Example No example PROGRAMMING MANUAL trajexia See also PRINT Value Description 0 Programming port 0 default RS 232C serial port 1 RS 422A 485 serial port 2 Trajexia Tools port 0 user channel 5 Trajexia Tools port 0 user channel 6 aj N Trajexia Tools port 0 user channel 7 3 2 201 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 The value required varies depending on the maximum demand output possible If the voltage output is generated by a 16 bit DAC values an OUTLIMIT of 32767 will produce the full 10v range A MECHA TROLINK II speed axis has a 32 bit maximum demand Arguments Example No example See also AXIS S REF S REF OUT SERVO 3 2 202 GAIN Type Axis parameter Syntax OV GAIN 121 0 BASIC commands Descriptio
91. bus There are three registration inputs on the Sigma ll Servo Driver but only one hardware latch so only one input can be used at a time The physical inputs are in pins CN1 44 CN1 45 and CN1 46 on the 50 pins CN1 connector but Trajexia uses logical inputs EXT1 EXT2 and 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 parameter refer to section 3 2 219 table 1 The input used for registration is determined by the argument of the REGIST command PROGRAMMING MANUAL trajexia 260 0 Examples and tips The delay in the capture in the Sigma ll Servo Driver is about 3 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 Delay in triggering the registration 0 625 ms to 4 ms Delay in receiving the registration 3 5 ms Delay in capturing the registration 3 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 Registration in the Junma Servo Driver Registration in the Junma Servo Driver is the same as registration the Si
92. command CANCEL 1 CA 1 The CANCEL command cancels the current move on an axis 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 imme diately stopped The CANCEL command cancels the contents of the current move buffer MTYPE The command CANCEL 1 command 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 CANCEL cancels only the presently executing move If further moves buffered they will then be loaded During the deceleration of the current move additional CANCELs will be ignored 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 FORWARD WA 10000 CANCEL 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 AXIS MTYPE NTYPE PMOVE RAPIDSTOP PROGRAMMING MANUAL trajexia 3 2 44 CHECKSUM Type System parameter read only Syntax CHECKSUM Description CHECKSUM param
93. command to abort the Host link or value 2 command that is currently being processed The ABORT command does not receive a response PROGRAMMING MANUAL 3 2 140 HLM READ Type Syntax Description Communication command READ port node pc area pc offset length mc area mc offset The HLM READ command reads data from a Host Link Slave by sending a Host link command string containing the specified node of the Slave to the serial port The received response data will be written to either VR or TABLE variables Each word of data will be transferred to one variable The maximum data length is 30 words single frame transfer Program execution will be paused until the response string has been received or the timeout time has elapsed The timeout time is specified by using the HLM TIMEOUT parameter The status of the transfer can be monitored with the HLM STATUS parameter Notes When using the READ be sure to set up the Host Link Master pro tocol by using the SETCOM command The Host Link Master commands are required to be executed from one program task only to avoid any multi task timing problems 91 0 BASIC commands Arguments Example See also The specified serial port 1 RS 232C serial port 1 2 RS 422A serial port 2 node The Slave node number to send the Host link command to Range 0 31 e pc area The PC memory selection fo
94. d Example 5 This line stores the ASCII character received on the Trajexia Tools port chan nel 5 in k See also INDEVICE INDEVICE INPUT KEY LINPUT Input device Description number 0 Programming port 0 1 RS 232C serial port 1 2 RS 422A 485 serial port 2 5 Trajexia Tools port 0 user channel 5 6 Trajexia Tools port 0 user channel 6 7 Trajexia Tools port 0 user channel 7 88 0 BASIC commands 3 2 134 GLOBAL Type System command Syntax GLOBAL name vr number Description gt Declares the name as a reference to one of the global VR varia bles The name can then be used both within the program contain ing the GLOBAL definition and all other programs in the Trajexia Tools 2 project Note The program containing the GLOBAL definition must be run before the name is used in other programs In addition only that program 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 TJ1 MC 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 meaning as VR vr number Do not use the syntax VR name A maximum of 128 GLOBALSs be declared Arguments name Any user defi
95. distance on the link axis Arguments Example See also trajexia BASIC commands 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 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 link distance The distance in user units the link axis must move to complete the speci fied output movement The link distance must be specified as a positive distance link axis The axis to link to link option See the table below link position The absolute position where CAMBOX will start when link option is set to 2 No example AXIS CAM REP OPTION TABLE link option value 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 CAMBOX repeats automatically and bidirectionally This option is can celled by setting bit 1 of REP OPTION parameter REP OPTION REP OPTION OR 2 5 Combination of options 1 and 4 6 Combination of options 2 and 4 PROGRAMMING MANUAL 55 0 BASIC commands 3 2 43 CANCEL Type Syntax Description Arguments Example Example See also Axis
96. error occurs if no response is received within the time out period This indicates that the communication is lost 9 Command not This status indicates that the slave did not recognise the com recognised mand and has returned an IC response The HLM STATUS has value 0 when no problems occurred In case of a non zero value you need to program an appropriate action such as a retry or emergency stop in the user BASIC program Each port has an HLM STATUS parameter You need the PORT modifier to specify the port Examples In these examples we assume this set up PROGRAMMING MANUAL trajexia system with TJ1 MC Aslave PC with node address 13 Aconnection from the serial port of the TJ1 MC__ to the PC The serial port uses RS422 communication Example BASIC code Reading data from the PC using HLM READ Set up Host Link master for port 2 SETCOM 9600 7 2 2 2 6 Source address CIO IR 002 Amount of data 2 words Destination address VR 0 HLM_READ 2 13 PLC_IR 2 2 MC_VR 0 Host Link communication From Host Link master to Host Link slave 1 3RR0002000242 From Host Link slave to Host Link master 13RR000101010241 Result VR address 0 value 257 0000 VR address 1 value 258 0000 Example BASIC code Writing data to the PC using HLM WRITE Source address TABLE 18 Amount of data 2 words Destination address LR 014 TABLE 18 0701 0702 HLM
97. following fig 13 trajexia Unnamed CX Profibus File Edit View Device Tools Window He A el MyNetwork Ji 7 CHW PRM2T PROFIBUS Masta information Bit Value Description 0 0 Failed configuration of I O data exchange 1 data exchange configured successfully 1 0 data not available 1 data available 2 0 Data exchange active in OPERATE mode 1 Data exchange active in CLEAR mode PROGRAMMING MANUAL 172 0 Communication protocols 4 5 DeviceNet 4 5 1 Introduction DeviceNet is an international open fieldbus standard based on the CAN protocol The TJ1 DRT enables the Trajexia system to communicate to a DeviceNet network It exchanges data between a DeviceNet master and the TJ1 MC For this it uses the Trajexia VR variables 4 5 2 Communication set up The TJ1 DRT has two node number selectors You can use the node number selectors to assign a node number to the TJ1 DRT The DeviceNet node numbers range from O to 63 If you select a node number with the node number selectors that exceeds this range you will select the node number that is set by software The nodes that enable software setting are 64 to 99 To initialise the TJ1 DRT use the BASIC DEVICENET command DEVICENET unit number 2 1 output start output count input start input count where unit number is the number of the TJ1 DRT unit ou
98. has been implemented PROGRAMMING MANUAL 223 0 Trajexia Tools interface trajexia 5 5 6 Windows Menu Restore Last desktop Restore Saved Desktop Save Desktop fig 49 Clear Desktop Those are tools to quickly handle and configure Window Help your desktop according to the user needs B i cest e Clear Controller Messages Clear the Controller Messages Controller Messages window id E Tile Vertically Tile Horizontally Restore Last desktop CtrH Shift L Restore Saved Desktop Ctrh Shift R Save Desktop CtrH Shift 5 Clear Desktop Ctr Shift k Glear Controller Messages 5 5 7 Help Menu e Motion Perfect Help of the Trajexia Tools fig 50 e Trio BASIC Language Help of the BASIC commands ma pa ram eters Motion Perfect Fi Trio BASIC Language Ctrl F1 About Motion Perfect 2 Shows the version of Trajexia Tools About Motion Perfect 2 PROGRAMMING MANUAL 224 O E Examples and tips 6 Examples and tips This chapter gives 2 categories of examples and tips How to s Practical examples 6 1 How to s 6 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 num
99. 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 Combina tions of more than two axes can be made by applying ADDAX to the superim posed axis as well ADDAX works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis axis The axis to be set as a superimposed axis Set the argument to 1 to can cel the link and return to normal operation 46 0 BASIC commands Example See also A FORWARD Set continuous move ADDAX 2 Add axis 2 for correction REPEAT GOSUB getoffset Get offset to apply MOVE offset AXIS 2 UNTIL IN 2 ON Until correction is done Pieces are placed onto a continuously moving belt and further along the line are picked up A detection system gives an indication as to whether a piece is in front of or behind its nominal position and how far In this example axis 0 is assumed to be the base axis and it executes a con tinuous forward movement and a superimposed move on axis 2 is used to apply offsets according to the offset calculated in a subroutine AXIS OUTLIMIT 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 3 2 23 Type Syntax Description Argumen
100. 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 PROGRAMMING MANUAL trajexia fig 37 Mandrel for Printed mark bag forming Bw ds iiia i dicc T Vertical External encoder for slip compensation 266 0 Examples and tips 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 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 positioning 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 PROGRA
101. length is smaller than the minimum length for the applicable command 15 Entry number The data is outside the specified Correct the command data error range or too long arguments and trans fer the command again 18 Frame length The maximum frame length of Check the data and error 131 bytes is exceeded transfer the command again 19 Not executable An I O memory batch was exe Register items to read cuted when items to read were before attempting not registered batch read A3 Aborted due An FCS error occurred in the Correct the command FCS error in second or later frame data and transfer the transmission command again data 164 0 Communication protocols End code Description Probable cause Solution 4 Aborted due to The command format did not Correct the command format error in match the number of bytes in the data and transfer the transmission second or later frame command again data A5 Aborted due to There was an entry number data Correct the command entry number error in the second or later frame data and transfer the data error in or a data length error command again transmission data A8 Aborted due The length of the second or later Correct the command frame length frames exceeded the maximum data and transfer the error in trans of 128 bytes command again mission data Set up You need the SETCOM command to set up the ser
102. n machine cycle 4160 pulley revolution m motor revolution machine cycle n 13 pulley revolution 320 machine cycle 6 31 motor revolution n 13 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 In addition to limit the motion units range to the moving range of the motion part the following axis parameters must be set DIST 4260 and 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 Example 4 The mechanical system uses a servo motor with a 17 bit absolute fig 22 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 have Full turn 360 lt 3600 x tenth of degree 17 Pn202 2 encoder counts 12 24 motor revolution 1 pulley revolution _ M Pn203 E 1 motor revolution 1 machine revolution 3600 tenth of degree 7 S 17 bit absolute 1 12 24 Gear encoder E 27 42 24 encoder counts 3600 tenth of degree Therefore Pn202 4 1224 UNITS 203 360000 PROGRAMMING MANUAL 247 0
103. on Communication failure between Reset the TJ1 MC Ifthis does 7 5 2 Bus errors TJ1 MC__ and TJ1 DRT not help replace the TJ1 MC ERC LED is Unit error The TJ1 DRT is defec Replace the TJ1 DRT tiye Indication Problem Solution BF LED is on Cable failure on the MECHATRO Check MECHATROLINK II cables 7 4 2 data communication problems Indication Problem Solution NOK is flashing and NF LED is off The DeviceNet master is not com municating with the TJ1 DRT Configure and start the DeviceNet master NOK off and NF LED is on The node address duplication error Check node address Network cable error Check network cables PROGRAMMING MANUAL LINK II bus between stations connected to the unit for interruptions and irregular ities short circuit between com munication lines A and B short circuit of any communication line with shielding MECHATROLINK II bus termina tor is missing or damaged Fit a MECHATROLINK II bus ter minator 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 Check the power and MECHA TROLINK II interface of the sta tion that caused the problem Replace the station if necessary The TJ1 ML is defective Replace the TJ1 ML 304 0 Troublesh
104. on or off This can also be written as 1 or O Example FLAG 27 ON Set flag bit 27 on See also N A PROGRAMMING MANUAL trajexia 9 3 2 123 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 pro grams The 32 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 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 Bit number Decimal value 0 1 1 2 2 4 3 8 4 16 5 32 6 64 7 128 84 0 BASIC commands 3 2 124 FOR TO STEP NEXT Type Syntax Description Arguments Example Program control command FOR variable start TO end STEP increment commands NEXT variable 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 th
105. panel and the editing windows The following commands can be given on the command line to control the execution Command Function RUN Run the current selected program or a specified program optionally on a specified task number STOP Stop the current selected program or a specified program HALT Stop all programs on the system PROCESS Displays all running tasks 31 0 Trajexia system The user can explicitly allocate the task priority on which the BASIC program is expected to run When a user program is run without explicit task allocation it is assigned the highest available task priority Setting programs to run at start up Programs can be set to run automatically at different priorities when power is turned on If required the computer can be left connected as an operator interface or may be removed and the programs run stand alone Programs are set in Trajexia Tools to run automatically at start up using the Set Power Up Mode selection under the Program menu This operation sets which program to run automatically and at which priority This can also be accomplished by the RUNTYPE BASIC command The current status can be seen using the DIR command For more information on program control multitasking and cycle times refer to sections 2 2 and 2 3 of the Trajexia Hardware Reference Manual PROGRAMMING MANUAL trajexia 32 0 BASIC commands 3 BASIC com
106. paper The shear is able to travel up to 1 2 m of which 1 m is used in this example The paper distance is measured by an encoder the unit conversion factor being set to give units of metres on both axes Axis 1 is the link axis MOVELINK 0 150 0 0 1 wait distance MOVELINK 0 4 0 8 0 8 0 1 accelerate MOVELINK 0 6 1 0 0 0 8 1 match speed then decelerate WAIT UNTIL NTYPE 0 wait till last move started OP 8 ON activate cutter MOVELINK 1 8 2 0 5 0 5 1 move back In this program the TJ1 MC waits for the roll to feed out 150 m in the first line At this distance the shear accelerates to the speed of the paper coasts at the same speed then decelerates to a stop within a 1 m stroke This movement is specified using two separate MOVELINK commands The pro gram then waits for the next move buffer to be clear NTYPE 0 This indicates that the acceleration phase is complete The distances on the link axis link distance in the MOVELINK commands are 150 0 8 1 0 and 8 2 which add up to 160 m To ensure that the speeds and positions of the cutter and paper match during the cut task the arguments of the MOVELINK command must be correct Hint Consider the acceleration constant speed and deceleration phases separately As stated the acceleration and deceleration phases require the link distance to be twice the distance Both phases can be specified as MOVELINK 0 4 0 8 0 8 0 1 This move is all accel MOVELINK 0 4 0 8 0 0 8 1 Thi
107. parameters are set by the system at start up For axes controlled by the Servo Drivers connected to the system via MECHATROLINK II bus the default ATYPE value is 41 Mechatro Speed For axes controlled by the Servo Drivers connected to the system via the TJ1 FLO2 the default ATYPE value is 44 Flexible axis Servo Arguments Example ATYPE AXIS 1 45 This command will set axis 1 as Flexible axis encoder output axis See also AXIS AXIS type ATYPE value Applicable TJ1 unit Virtual 0 All PROGRAMMING MANUAL trajexia AXIS type ATYPE value Applicable TJ1 unit Mechatro Position 40 TJ1 ML LINK II Master Unit Mechatro Speed 41 TJ1 ML__ Mechatro Torque 42 TJ1 ML Flexible axis Stepper Out 43 TJ1 FLO2 Flexible axis Servo 44 TJ1 FLO2 Flexible axis Encoder Out 45 TJ1 FLO2 Flexible axis Absolute Tamagawa 46 TJ1 FLO2 Flexible axis Absolute EnDat 47 TJ1 FLO2 Flexible axis Absolute SSI 48 TJ1 FLO2 3 2 31 AUTORUN Type Program command Syntax AUTORUN Description The AUTORUN command starts all the programs that have been set to run at start up Arguments Example No example See also RUNTYPE 3 2 32 AXIS Type System command Syntax AXIS axis number 49 0 BASIC commands Description Arguments Example Example Example See also The AXIS modifier sets the axis for a single motion com
108. read when the screen is first displayed or when the parameter value is set If a parameter value is changed the value displayed may be incorrect The refresh button forces Trajexia Tools to read the complete selection again Note If you change parameter value you must refresh the display before making another change PROGRAMMING MANUAL trajexia 207 0 Trajexia Tools interface Intelligent drives The Intelligent drives gives access to the configuration and start up programs for each of the drives that can be configured The intelligent drives tool shows the Trajexia configuration detected at power up Clicking on the unit the next tab appear At the top of the window the TJ1 MC___ with its different units is displayed In the example e TJ1 MC__ with unit number 1 TJ1 ML with unit number 0 TJ1 PRT with unit number 1 TJ1 FL02 with unit number 2 If more than one TJ1 ML__ exists in the system more tabs are displayed Modify STARTUP program creates a STARTUP program for the detected configuration In the tab corresponding to the TJ1 ML you can see the information corresponding to the detected MECHATROLINK II slaves including Inverter and modules Clicking the Config button only available for servo and inverter the next window appears Status tab Drive ID Motor ID Firmware Version Shows information of the Servo Driver amp servo motor Drive Status show
109. 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 205 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 PROGRAMMING MANUAL trajexia 242 0 Examples and tips 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 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 called limited axis or finite axis A typical example of a limited axis is a ball screw as shown in fig 24 When the mechanical system always moves in the same direction it reaches the overflow of the multiturn counter In this case the va
110. sys tem 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 0 About this manual This manual describes the installation and operation of the Trajexia Motion Control System Please read this manual and the related manuals listed in the following table carefully and be sure you understand the information provided before attempting to install or operate the Trajexia Motion Control units Be sure to read the precautions provided in the following section trajexia Name Cat No Contents Sigma lll with MECHATRO LINK interface manual SIEP S800000 11 Describes the installation and operation of Sigma lll servo drives with MECHATRO LINK interface Name Cat No Contents Trajexia motion control system QUICK START GUIDE 150 Describes how to get quickly familiar with
111. task timing problems command The selection of the Host Link operation to perform See the first table below port The specified serial port 1 RS 232C serial port 1 2 RS 422A serial port 2 node for HLM MREAD HLM TEST HLM ABORT and HLM STWR The Slave node number to send the Host link command to Range 0 31 mode for STWR The specified CPU Unit operating mode 0 PROGRAM mode 2 MONITOR mode 3 RUN mode mc area for HLM MREAD The memory selection of the TJ1 MC__ to read the send data from See the second table below mc offset for HLM MREAD The address of the specified TJ1 MC__ memory area to read from Range for VR variables 0 1023 Range for TABLE variables 0 63999 PROGRAMMING MANUAL 90 0 BASIC commands Example Example Example Example See also COMMAND HLM MREAD 1 12 MC VR 233 This command reads the CPU Unit model code of the Host Link Slave with node address 12 connected to the RS 232C port The result is written to VR 233 If the connected Slave is a C200HX PC the VR 233 will contain value 12 hex after successful execution COMMAND HLM 2 23 PRINT HLM STATUS PORT 2 This command will check the Host Link communication with the Host Link Slave node 23 connected to the RS 422A port If the HLM STATUS parameter contains value 0 the communication is func tional COMMAND HLM 1 2 CO
112. the MECHATROLINK II unit affected and station is the MECHATROLINK II device number that is lost If you want to use the system without the lost device you can reconnect all available devices on the TJ1 ML To do this type MECHATROLINK n 0 in the Trajexia Tools terminal window where n is the number of the TJ1 ML that reports the error No terminator The error code U07 shows on the display To solve the problem check the terminator connection or replace the terminator if it is defective 7 2 4 Configuration errors Configuration errors show on the LED display of the TJ1 MC Cnn where nn is the number of the unit that caused the error Causes of a configuration error are The system has too many units of the same type and it does not adhere to the rules for adding units to a system e You have connected too many MECHATROLINK II stations to the TJ1 ML There are too many axes the system There are too many non axis MECHATROLINK II stations in the system To solve this problem change the system so that it adheres to the rules for adding units to a system See the Hardware Reference manual PROGRAMMING MANUAL trajexia 7 2 5 Replace the battery To replace the backup battery do these steps 1 Make sure the Power Supply Unit is set to on for at least five minutes If not the capacitor that backs up the memory of the TJ1 MC while the battery is not connected is not fully charged and you can los
113. 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 control on command line and the Trajexia Tools control button 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 setting In this case the software switch WDOG will be turned off the MOTION ERROR parameter will have value 1 and the ERROR AXIS parameter will contain the number of the first axis to have the error Note The WDOG parameter can be executed automatically by Trajexia Tools when the Drives Enable button is clicked on the control panel Arguments Example No example See also AXISSTATUS ERROR AXIS ERRORMASK MOTION ERROR SERVO PROGRAMMING MANUAL trajexia 3 2 284 WHILE WEND Type Syntax Description Arguments Example See also Program control command WHILE condition commands WEND 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 condition Any valid logical BASIC expression WHILE IN 12 OFF MOVE 200 WAIT IDLE OP 10 0FF MOVE 200 WAIT IDLE
114. the Servo Driver axis O with using only encoder feedback on axis 1 AXIS ADDAX OUTLIMIT using ADDAX or CONNECT to produce a matching demand position DPOS 3 2 22 ADDAX for both axes The servo loop gains need to be set for both axes The servo loop outputs are summed to the speed reference output of the servo axis Use ADD DAC 1 to cancel the link Type ADD DAC works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note Description 1 Be aware that the control loop gains for both axes need to be determined with care As different encoders with different resolutions are used the gains are not identical 2 Setthe OUTLIMIT parameter to the same value for both linked axes Syntax 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 BASE 0 OUTLIMIT AXIS 1 15000 ADD_DAC 1 AXIS 0 ADDAX 0 AXIS 1 WDOG ON SERVO AXIS 0 ON SERVO AXIS 1 ON Execute moves on axis 0 This example shows controlling the Servo Driver axis 0 with dual feedback control using both axis 0 and axis 1 Arguments PROGRAMMING MANUAL Axis command ADDAX axis The ADDAX command takes the demand position changes from the superim posed axis as specified by the axis argument and adds them to any move ment running on the axis to which the command is issued After the ADDAX command
115. to move the axes on the Trajexia This window takes advantage of the bi directional virtual I O channels 16 to 27 on the Trajexia to set the jog inputs The forward reverse and fast jog inputs are identified by writing to the corresponding axis parameters and are expected to be connected to NC switches This means that when the input is on 24 V applied then the corresponding jog function is DISABLED and when the input is off V then the jog function is ENABLED The jog functions implemented here disable the fast jog function which means that the speed at which the jog will be performed is set by the JOGSPEED axis parameter What is more this window limits the jog speed to the range 0 demand speed where the demand speed is given by the SPEED axis parameter Before allowing a jog to be initiated the jog window checks that all the data set in the jog window and on the Trajexia is valid for a jog to be performed Jog reverse This button will initiate a reverse jog In order to do this the following check sequence is performed e If this is a SERVO axis and the servo is off the warning message is set the WatchDog is off the warning message is set Ifthe jog speed is 0 the warning message is set Ifthe acceleration rate on this axis is 0 the warning message is set Ifthe deceleration rate on this axis is 0 the warning message is set PROGRAMMING MANUAL trajexia fig 40 Jog Axes Position J
116. 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 001 6 109 100 PROGRAMMING MANUAL trajexia 238 0 Examples and tips 6 1 3 Setting the UNITS axis parameter and gear ratio In controlling the mechanical axis with the Trajexia TJ1 MC 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 makes a rotation mo
117. valid BASIC expression uu Description Example gt gt PRINT SQR 4 2 0000 See also N A 3 2 249 SRAMP Type Axis parameter Syntax SRAMP Description The SRAMP parameter contains the S curve factor The S curve factor con trols 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 Ara ments MHELICAL and REVERSE commands 9 Notes Using S curves increases the time required for the movement to com plete S curve factor must not be changed while a move is in progress Arguments Example No example See also AXIS PROGRAMMING MANUAL 140 0 BASIC commands trajexia E d Example Two axes are set up as X and Y but the axes steps per mm are not the 3 2 253 STOP 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 resolu Type Program command tion axis so as to maintain the best accuracy for both axes Axis 0 500 counts mm 31 25 steps mm Syntax STOP program_name task_number Axis 1 800 counts per mm 50 00 steps per mm Description STOP command will halt execution of the program specified BASE 0 with program name If the progr
118. you write these outputs they become active and give a 24 VDC signal If you read these outputs they return their current status Use the command OP to write and read these outputs Digital outputs 16 31 These outputs are software outputs only They do not physically exist on the TJ1 MC 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 Digital outputs 32 255 These outputs are physically present only if additional digital units are connected to the TJ1 MC MECHATROLINK II bus Writing and reading them if they do not physically exist when the units are not connected has no effect Use the command OP to write and read these outputs PROGRAMMING MANUAL trajexia All outputs are unique to the controller They are not accessed per axis The digital input range has three parts Digital inputs 0 15 These inputs physically exist on the TJ1 MC You can physically access them on the 28 pin screwless connector on the front side of the TJ1 MC see the Hardware Reference Manual for details 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 Digital inputs 16 31 These outputs are software inputs only They d
119. 0 Examples and tips The next step is to analyze the CAM table to see which values were used for demanding the position of the slave axis To do that we change the oscilloscope configuration to show a block of values from Table 0 to Table 999 in red because these Table memory 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 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 PROGRAMMING MANUAL fig 47 trajexia Oscilloscope Configuration Oscilloscope 7 Samples per division this may be reduced by Motion Perfect
120. 0 9 2 96 OPUNE E E O 51 3 2 37 BASE 51 0 Contents PROGRAMMING MANUAL 3 2 38 3 2 39 3 2 40 3 2 41 3 2 42 3 2 43 3 2 44 3 2 45 3 2 46 3 2 47 3 2 48 3 2 49 3 2 50 3 2 51 3 2 52 3 2 53 3 2 54 3 2 55 3 2 56 3 2 57 3 2 58 3 2 59 3 2 60 3 2 61 3 2 62 3 2 63 3 2 64 3 2 65 3 2 66 3 2 67 3 2 68 3 2 69 3 2 70 3 2 71 3 2 72 3 2 73 3 2 74 3 2 75 3 2 76 3 2 77 trajexia ET Te mz E 8 s NN NEN NP IR 52 BATTERY ILOW 53 BREAK RESE E E 53 a MEM prepaid MM MM 53 SONOMA 55 c ceste dM Li I 56 cu uM E dn cM M I Ld m EM 56 CHR NR NORMA HMM 56 57 CLEAR 57 Teen 57 CLOSE 57 eT E Ve I SNR 57 COMMSERROR add tu ol pho 58 EE M IU A LM MM d 58 58 22 59 CO
121. 1 M ELSEIF TABLE count 2 79 AND TABLE count 1 275 THEN PRINT gt gt M PRINT Response OK ELSEIF vision command v date THEN resp status l PRINT 1 DATE ELSE PRINT gt gt DATE PRINT Response Uncorrect ELSEIF vision command v scene THEN resp status 2 PRINT 1 5 scene n ENDIF PRINT SCENE PRINT Response Status is resp status 0 ENDIF RETURN clear buffer Check response PRINT Clearing GOSUB read buffer WHILE 1 GET 1 k GOTO loop PRINT k read buffer WEND count 0 PRINT Cleared resp status 0 RETURN k 1 TICKS 5000 REPEAT IF KEY 1 THEN count counttl GET 1 k PROGRAMMING MANUAL 166 O E Communication protocols 4 4 PROFIBUS 441 Introduction PROFIBUS is an international open fieldbus standard The Trajexia TJ1 PRT enables the Trajexia system to communicate with a PROFIBUS network It exchanges data between the PROFIBUS master and the TJ1 MC For this it uses the VR variables 4 4 2 Communication set up The TJ1 PRT has two node number selectors You can use the node number selectors to assign a PROFIBUS network address to the TJ1 PRT You must assign an address to the TJ1 PRT before you set the power of the Trajexia system on To initialise the TJ1 PRT use the BASIC PROFIBUS command PROFIBUS unit number 2 1 output start output count input start input count where unit number is the number of the TJ1 PRT unit
122. 1 This command will print absolute encoder multi turn counts for axis 1 AXIS ENCODER ENCODER BITS PROGRAMMING MANUAL trajexia 3 2 101 ENCODER WRITE Type Syntax Description Arguments Example See also Axis command ENCODER WhRITE 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 param eter 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 error occurs this command will return 0 Writing to address 0 performs an encoder reset function For more information see EnDat absolute encoder interface specification In order to successfully write an encoder parameter with this command the ENCODER WRITE parameter should b set to 1 encoder parameter read write mode address Specifies the EnDat MRS field to write to value A BASIC expression No example AXIS ENCODER ENCODER BITS ENCODER CONTROL 3 2 102 ENDIF See IF THEN ELSE ENDIF 76 0 BASIC commands 3 2 103 ENDMOVE Type Syntax Description Arguments Example See also Axis parameter ENDMOVE The ENDMOVE axis parameter holds the position of the end of the current 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
123. 1 GAIN OV GAIN VFF GAIN PROGRAMMING MANUAL trajexia 0 3 2 204 PI Type Constant read only Syntax PI Description The PI constant returns the numerical value 3 1416 Arguments Example circum 100 PRINT Radius 2 See also N A 3 2 205 PMOVE Type Task parameter read only Syntax PMOVE Description The PMOVE parameter contains the status of the task buffers The parameter Arguments Example See also 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 buffer 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 N A No example NTYPE PROC 122 0 BASIC commands 3 2 206 POS OFFSET Type System parameter Syntax POS OFFSET value Description For Piezo Operation This keyword allows a positive offset to be applied to the output DAC signal
124. 193 3 2 194 3 2 195 3 2 196 3 2 197 trajexia INVERTER mee tbae EN 100 dzralzed icr 101 INVERTER WRITE EE 102 JOGSPEE D 103 KEY 103 LAST PAD 104 EINKAX eI ER 104 LINDO T Y U o 104 105 105 EN east Lo 106 106 MARK T 106 yo 107 EE 107 MERGE 108 109 MOD
125. 3 2 98 3 2 99 3 2 100 3 2 101 3 2 102 3 2 103 3 2 104 3 2 105 3 2 106 3 2 107 3 2 108 3 2 109 3 2 110 3 2 111 3 2 112 3 2 113 3 2 114 3 2 115 3 2 116 3 2 117 trajexia DISABLE GROUP Em 67 DISPLAY 67 DPOS eT 68 Blu ElRll 68 DRIVE CLEAR ics M 69 DRIVE CONTROL aa 69 BIER ELE 70 DRIVE MONITOR 70 DRIVE READ 71 71 DRIVE STATUS statis DLE 72 DRIVE WRITE 73 pem 73 ELSE 73 zz 73 zen 74 ENCODER BITS ee
126. 321 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 60000 1073741824 enc resolution max speed Change the rigidity Fn001 according to the mechanical system Change feedforward gain 109 if required Initial parameter of the AXIS PROGRAMMING MANUAL 284 O E Examples and tips set to 1 and Pn202 Pn203 1 the UNITS are UNITS 1 h without VFF GAIN in MECHATROLINK SP FE LIMIT 1073741824 P GAIN UNITS SPEED is set to 1 3 of max speed SPEED max speed73 enc resolution 60 ACCEL in 200ms from 0 to max speed ACCEL SPEED 0 2 DECEL in 200ms from max speed to 0 DECEL SPEED 0 2 PROGRAMMING MANUAL UNITS encoder counts Theoretical FE we will have running the motor at max speed iD trajexia 285 O E Examples and tips trajexia 6 2 3 Single axis program This program is a simple program to run one axis only fig 50 Example GO
127. 5 0 BASIC commands 3 2 99 ENCODER STATUS Type Syntax Description Arguments Example See also Axis parameter read only ENCODER STATUS This parameter returns the status of the absolute encoder This parameter is applicable only to Flexible axis absolute Tamagawa axis with ATYPE value 46 It returns both the status field SF and the ALMC encoder error field The SF field is in bits O 7 while the ALMC filed is in bits 8 15 For more information see Tamagawa absolute encoder interface specifi cation If applied to axis of ATYPE value other than 46 this parameter returns 0 N A PRINT ENCODER STATUS AXIS 1 AND 255 This command will print SF field of the Tamagawa absolute encoder for axis 1 AXIS ENCODER ENCODER BITS 3 2 100 ENCODER TURNS Type Syntax Description Arguments Example See also 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 Tamagawa axis with ATYPE value 46 and 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 pro gram using OFFPOS or DEFPOS commands as required If applied to axis of ATYPE value other than 46 or 47 the parameter returns O N A PRINT ENCODER TURNS AXIS
128. 77 DIR Type Program command Syntax DIR LS Description DIR command shows list 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 controller Arguments Example No example See also FREE POWER UP PROCESS RUNTYPE SELECT 3 2 78 DISABLE GROUP Type Syntax Description Arguments Axis command DISABLE GROUP 1 DISABLE GROUP axis 1 2 This is used to group any list of axes together for error disabling If a group of axes 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 GROUPY 1 axis i A BASIC expression that evaluates to an axis number PROGRAMMING MANUAL Example See also trajexia DISABLE GROUPY 1 DISABLE GROUP 0 1 2 3 DISABLE GROUP 4 5 6 7 WDOG ON STOP enable_b FOR ax 4 TO 7 AXIS ENABLE AXIS ax ON NEXT ax A system of 8 axes requires that axes 4 7 keep running if axes 0 3 have an error and vice versa The axes would be grouped using DISABLE GROUP Note For use with MECHATROLINK II only N A 3 2 79 DISPLAY Type System parameter Syntax DISPLAY value Description Determines the I O channels to be displayed on the front panel LEDs The DISPLAY p
129. 8 2147483648 which corresponds to a voltage range 10V 10V For Flexible axis axes T REF takes 16 bits so available range is 32768 32767 which corresponds to a voltage range 10V 10V These ranges can be limited by using the OUTLIMIT parameter The actual torque reference is depending on the servo motor N A T REF AXIS 0 21000 AXIS 5 REF 142 0 BASIC commands 3 2 256 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 TABLE 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 element is specified by address The sequence can have a maximum length of 20 elements TABLE address returns the TABLE value at that entry 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 location 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 delete
130. 80 PROGRAMMING MANUAL trajexia fig 40 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 fig 41 Slave axis Flying shear Transporting belt Master axis 268 0 Examples and tips 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 6 1 7 Tracing and monitoring Oscilloscope functionality in Trajexia Tools The software oscilloscope is a standard part of Trajexia Tools 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 section 5 5 4 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 oscilloscope tool 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 from the Oscilloscope
131. AMMING MANUAL trajexia 294 O E Examples and tips 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 RETURN 6 2 8 Flying shear program An example of the Flying shear program In this application there are three axes Axis O shear axis the advancement of the shear Axis 1 flying axis is the flying shear Axis 2 line axis transports the material PROGRAMMING MANUAL fig 58 trajexia 295 0 Examples and tips trajexia Example FLYING SHEAR program Flying shear axis slave 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 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 MOVELINK 0 cut length 2 0 0 line axis maximum line speed cut lenght 1 acc 2 ZERO POSITION Initial Y material to cut and shear both in the zero position cut counter 0 line axi
132. Allows to set and view the communication settings The settings can only be changed offline The different options are e Serial for other OMRON motion controllers C200HW MC402 E and R88 MCW151 E e USB is not used Simulation Used to work offline a virtual motion control system is simulated Ethernet is the option used for Trajexia e PClis not used Editor Edits the different options of the text editor PROGRAMMING MANUAL trajexia fig 45 Optians Window Help Communications Editor General Options CAN Drive Options Diagnostics Terminal Font Program Compare CX Drive Configuration FINS Configuration Language fig 46 7 Port C USB C Simulation C Ethemet C Cancel 221 0 Trajexia Tools interface General Options Allows to set various options of the system CAN Drive Not implemented in Options PROGRAMMING MANUAL trajexia fig 47 General options r Port and Controller Checking Desktop Check comm port against r Restore desktop on project file reconnect Check controller type against r project file r Program Auto store in EPR M if no r r Load Project Battery Backed Force Slow Project Load mi Allow program operations when running if available r r Terminal script editor Notepad exe Change Cancel
133. BASE i CANCEL 1 WA 1 CANCEL 1 NEXT i Release Run WDOG 0 Open the position loop FOR i 0 TO axis BASE i WAIT IDL SERVO 0 NEXT i RETURN PROGRAMMING MANUAL trajexia 281 O E Examples and tips reset all WHILE MOTION ERROR lt gt 0 W Wait for WAIT UNTI WAIT UNTI action 2 rising edge in READ 2 0 0 READ 2 0 1 Reset faulty servos FOR i 0 TO max axis BASE i i ESET input In case of ML II error the reset is IF AXISSTATUS AND 4 lt gt 0 THEN M WA 3000 R S ENDIF TOP DATUM 0 UN startup l1 ECHATROLINK 0 0 In case of Servo Driver error IF AXISSTATUS AND 8 lt gt 0 THEN DRIVE CLEAR NEXT i WA 100 In case of axis error DATUM 0 END project status 1 alarm status 5 action 3 RETURN start application Stopped but no error Wait for rising edge in bit 0 of VR 0 W W W W R RETURN project statu IF MOTION END HILE READ BI IF MOTION END UN APPLICAT ION 5 3 PROGRAMMING MANUAL HILE READ BIT 0 0 0 _ERROR lt gt 0 T 0 0 1 _ERROR lt gt 0 TH Applica EN RET EN RET tion r URN URN unning trajexia 282 O E Examples and tips 6 2 2 Initialization program
134. BASE 0 SERVO ON CONNECT 0 25 1 AXIS CANCEL CLUTCH_RATE CONNECT RAPIDSTOP trajexia BASIC commands 3 2 55 CONSTANT Type Syntax Description Arguments Example See also System command CONSTANT name value Declares the name as a constant for use both within the program containing the CONSTANT definition and all other programs in the Trajexia Tools project Note The program containing the CONSTANT definition must be run before the name is used in other programs In addition only that program should be running at the time the CONSTANT 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 CONSTANT is declared the declaration remains active until the next TJ1 MC__ reset by switching the power off and back on or by executing the EX command A maximum of 128 CONSTANTS be declared Any user defined name containing lower case alpha numerical under Score characters value The value assigned to name CONSTANT 515 CONSTANT start button 5 IF IN start_button ON THEN OP led1 ON IF key charznak THEN GOSUB no ack received N A 3 2 56 CONTROL Type Syntax Description PROGRAMMING MANUAL System parameter read only CONTROL The CONTROL parameter contains the type of TJ1 MC___ in the system The value of t
135. BUS Master Configuration E ul Device Setup Master Setup Bus Parameters Slave Area omrRon Cancel Communication Settings Station Address 2 Unit Number Information OMRON Corporation Description CJTw PRM21 Firmware Version Save fig 12 Device Setup Master Setup Bus Parameters Slave Area K ares Dutput Allocation Allocation Module Addr 2words output consi 103200 4 words output No consi 103202 1 words output consi 103206 Output Area 2 1 2 words output No consist 2 words output No consist H 1 4words output No consist 4 words output consist 4 words output No consist 4 words output consist 1 1 words output No consist z Area cio 7 Occupied 0007 Words Area cio 7 Occupied 0000 Words Start Address 3200 Start Address 3400 Length 100 c 5 Length 100 171 O E Communication protocols 6 7 Click the Device Online Offline Toggle toolbar button to go on line Click the Device Download toolbar button to download the parameters 443 Communication Status TJ1 PRT can provide status information to the TJ1 MC You can retrieve the status information in BASIC with the command PROFIBUS unit 4 0 The result provides the
136. C Auto Connection User Setup Use Poll Connection OUT Size Con 8 Size 8 Byte 4VR ou 7 Con Path 177 0 Communication protocols 4 5 3 Communication Status TJ1 DRT can provide status information to both the TJ1 MC___ and the DeviceNet master You can retrieve the status information in BASIC with the command DeviceNet unit_number 4 0 The result provides the following information Bit Value Description 0 0 DeviceNet unit_number 2 not executed yet 1 DeviceNet unit_number 2 executed without error 1 0 No DeviceNet I O connection 1 DeviceNet I O connection running 2 0 VR variables in the output data range have been updated 1 VR variables in the output data range have not been updated yet 3 0 DeviceNet I O connection size matches the Device Net unit_number 2 command 1 DeviceNet I O connection size does not match the Device Net unit number 2 command 4 7 0 Always zero 0 Network power OK 1 Network power failure 9 0 No BUSOFF occurred 1 BUSOFF occurred 10 0 No node address duplication error 1 Node address duplication error 11 0 Reserved You can retrieve the status information in the DeviceNet master by selecting a connection path that includes status information The status information includes one bit Bit 2 indicates that the network voltage has dropped below P
137. CEL 100 Set acceleration rate PRINT Acceleration rate ACCEL mm s s ACCEL AXIS 2 100 Sets acceleration rate for axis 2 See also ACCEL DECEL UNITS 3 2 20 ACOS Type Mathematical function Syntax ACOS expression Description 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 Arguments expression Any valid BASIC expression Example 2 PRINT ACOS 1 3 1416 See also N A 45 0 BASIC commands 3 2 21 ADD DAC Example Type Axis command Syntax ADD DAC axis Description ADD DAC command can provide dual feedback control by allowing a secondary encoder to be used on the servo axis The command allows the output of 2 servo loops to be summed to determine the speed reference to the Servo Driver This command is typically used in applications such as a roll feed where a secondary encoder would be required to compensate for slippage For using ADD DAC it is necessary for the two axes with physical feedback to link to a common axis on which the required moves are executed Typically this would be achieved by running the moves on one of the two axes and See also trajexia BASE 0 OUTLIMIT AXIS 1 15000 ADD_DAC 1 AXIS 0 ADDAX 0 AXIS 1 WDOG ON SERVO OFF S REF 0 BASE 1 SERVO ON Execute moves on axis 1 This example shows controlling
138. Cat No 152E EN 03 Trajexia motion control system TJ1 MC04 TJ1 MC16 0 Notice OMRON products are manufactured for use according to proper procedures by a qualified operator and only for the purposes described in this manual The following conventions are used to indicate and classify precautions in this manual Always heed the information provided with them Failure to heed precautions can result in injury to people or damage to property Definition of precautionary information Indicates an imminently hazardous situation which if not avoided will result in death or serious injury WARNING Indicates a potentially hazardous situation which if not avoided could result in death or serious injury Caution Indicates a potentially hazardous situation which if not avoided may result in minor or moderate injury or property damage A Trademarks and Copyrights PROFIBUS is a registered trademark of PROFIBUS International MECHATROLINK is a registered trademark of Yaskawa Corporation DeviceNet is a registered trademark of Open DeviceNet Vendor Assoc INC CIP is a registered trademark of Open DeviceNet Vendor Assoc INC Trajexia is a registered trademark of OMRON Motion Perfect is a registered trademark of Trio Motion Technology Ltd PROGRAMMING MANUAL trajexia OMRON 2007 All rights reserved No part of this publication may be reproduced stored in a retrieval
139. DE value Syntax When this parameter is set to 0 the axis will cause a MOTION ERROR immediately when the FE exceeds the FE LIMIT value Description If FE LIMIT MODE is set to 1 the axis will only generate a MOTION ERROR when the FE exceeds FE LIMIT during 2 consecutive 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 O N A No example N A Sigma Il Axis parameter Sigma 111 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 Inm This range is used as a first indication for fault conditions in the application compare FE LIMIT N A No example AXIS AXISSTATUS ERRORMASK FE UNITS PROGRAMMING MANUAL trajexia 3 2 119 FHOLD Axis parameter FHOLD IN FH IN The FHOLD axis parameter contains the input number to be used as the feedhold input The valid input range is 0 to 31 Values 0 to 15 represent phys ically present inputs of TJ1 MC___ I O connector and are common for all axes Values 16 to 27 represent software inputs which can be freely used in pro grams and commands such as IN and OP These are also common for all axes Values 28 to 31 are directly mapped to driver inputs present on CN1 connector and they are unique for each axis Which driver in
140. DLE See also AXIS UNITS PROGRAMMING MANUAL trajexia 3 2 221 REMOTE ERROR Type Syntax Description Arguments Example See also Axis parameter REMOTE ERROR Returns the number of errors on the digital communication link of a driver N A gt gt PRINT REMOTE ERROR 1 0000 N A 3 2 222 RENAME Type Syntax Description Arguments Example See also Program command RENAME old program name new program name The RENAME command changes the name of a program in the TJ1 MC__ directory The program names can also be specified without quotes Note This command is implemented for an offline VT100 terminal Within Trajexia Tools users can select the command from the Program menu old program name The current name of the program new program name The new name of the program RENAME car voiture COPY DEL NEW 130 0 BASIC commands 3 2 223 REP DIST Type Syntax Description Arguments Example See also Axis parameter REP DIST The REP DIST parameter contains the repeat distance which is the allowa ble 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 OPTION The DIST can have any 0 positive value When the measured position has reached its limit the TJ1 MC will adjust the absolute positions without affecti
141. Description The DRIVE RESET command resets the Servo Driver connected via the MECHATROLINK II bus Arguments Example No example See also N A Caution A 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 71 0 BASIC commands 3 2 88 DRIVE STATUS Type Axis parameter read only Syntax DRIVE STATUS Description For MECHATROLINK II axes this parameter is set from the STATUS field the MECHATROLINK II communication frame and is updated every servo period Those bits can be seen in the Intelligent drives configuration window in Trajexia Tools and can be used in programs The explanation of each bit is given in the table below Note Only bits relevant to MECHATROLINK II axes are listed For detailed explanation for these status bits see the MECHATROLINK II manual 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 Arguments 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 O
142. E REVERSE FORWARD max limit switch 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 PROGRAMMING MANUAL 258 0 Examples and tips Static origin search forcing a position from an absolute encoder This origin search procedure sets the actual position to the position of an absolute encoder It does not perform any physical move It is only possible with an axis with an absolute encoder in a control loop 6 1 6 Registration 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 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 s
143. ED lights and the COMM LED lights Communication is now active RUN ERH To configure the CJ1 PRM21 with the CX PROFIBUS do these steps PROGRAMMING MANUAL 168 O g Communication protocols 1 Start the CX PROFIBUS software tool 2 Right click the MyNetwork tree 3 Select Add Device 4 Select the PROFIBUS master board 5 Click OK 6 Open the Device Catalogue from the View menu PROGRAMMING MANUAL fig 6 trajexia al Unnamed CX Profibus File Edit View Device Tools Window Help oea Aes s gt Add Upload Parameters Download Parameters Export Eo HTML Properties fig 7 Select Device 200HW PRM21 77 04 1998 10 01 Corporation PROFIBUS 2 xe 2005 08 09 OMRON Corporation C1W PRM21 PROFIBUS V1 8 2005 08 09 OMRON Corporation CS1W PRM21 PROFIBUS V2 xx 2005 08 09 OMRON Corporation CS1W PRM21 PROFIBUS Viw 20050808 OMRON Corporation g fig 8 Unnamed CX Profibus File Edit view Device Tools Window Hel Network View Device C Catalogue v Tool Bar CER Status Bar v Error Logging Monitoring 169 0 Communication protocols 7 10 11 12 13 14 Click Install GSD Files The GSD file
144. ELINK command creates a linear move on the base axis linked 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 deceleration The link acceleration and deceleration distances are specified by the link acceleration and link deceleration parameters The constant 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 command 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 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
145. ER RATIO where absolutely necessary For all other axis scaling use UNITS PROGRAMMING MANUAL Arguments Example See also trajexia denominator A number between 0 and 16777215 that is used to define the denomina tor in the above equation numerator A number between 0 and 16777215 that is used to define the numerator in the above equation ENCODER RATIO 8192 7200 UNITS 20 A rotary table has a servo motor connected directly to its centre of rotation An encoder is mounted to the rear of the servo motor and returns a value of 8192 counts per rev The application requires the table to be calibrated in degrees but so that one degree is an integer number of counts N A 3 2 98 ENCODER READ 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 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 10 memory location AXIS ENCODER ENCODER BITS 7
146. EVICE will be used See the table below variable The first VR variable to write to 104 0 BASIC commands Example Consider the following line in a program LINPUT 5 VR 0 Entering lt gt will give VR 0 83S VR 1 84T VR 2 65A VR 3 82R VR 4 84T VR 5 13 lt CR gt See also GET INPUT VR Value Input device 0 Programming port 0 RS 232C serial port 1 RS 422A 485 serial port 2 Trajexia Tools port 0 user channel 5 Trajexia Tools port 0 user channel 6 Tools port 0 user channel 7 PROGRAMMING MANUAL trajexia 9 3 2 166 LIST Type Program command Trajexia Tools command line only Syntax LIST program name 1 TYPE program Description For use only with the terminal window LIST is used as an immediate com mand line command only and must not be used in programs The LIST command prints the current selected program or the program spec ified 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 VT100 terminal Within Trajexia Tools users can use the terminal window Arguments name The program to be printed Example No example See also SELECT 3 2 167 LIST GLOBAL Type Syntax Description Arguments Sys
147. Example See also Axis parameter INVERT STEP INVERT STEP is used to switch a hardware inverter into the stepper pulse output circuit This can be necessary in for connecting to some stepper driv ers The electronic logic inside the Trajexia stepper pulse generator 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 N A No example N A PROGRAMMING MANUAL trajexia 3 2 158 INVERTER COMMAND Type System command Syntax INVERTER COMMAND module station 7 operation signals INVERTER COMMAND module station 1 alarm number Description INVERTER COMMAND controls inputs and clears alarm of the frequency inverter connected to the system via the MECHATROLINK II bus There are two INVERTER COMMAND functions 1 Clears an alarm e T Controls operation signals 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 Inverter F7 G7 1 01 3 1 02 3 Make you sure that the Inverter firmware supports the MECHATROLINK II board The command re
148. F This parameter contains the speed reference value which is applied directly Description 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 MECHATRO LINK axes 5 REF takes 32 bits so the available range is 2147483648 2147483648 which corresponds to a voltage range 10V 10V For Flexible axis axes S REF takes 16 bits so the available range is 32768 32767 which corresponds to a voltage range 10V 10V These ranges can be lim ited by using the OUTLIMIT parameter The actual speed reference is depending on the servo motor To determine the speed reference in rounds per minute RPM multiply the parameter value with the 5 RATE parameter value A _ rguments The value currently being applied to the driver can be read using the S REF OUT axis parameter Example N A See also 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 negative movement with a period of approximately 500ms on axis 0 AXIS S REF OUT OUTLIMIT SERVO PROGRAMMING MANUAL trajexia 3 2 2365 REF OUT Axis parameter read only DAC OUT S REF OUT The S 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 out
149. F constant returns the numerical value 0 Arguments Example OP lever OFF The above line sets the output named lever to OFF See also N A 3 2 193 OFFPOS Type Syntax Description Arguments Example See also Axis parameter OFFPOS The OFFPOS parameter contains an offset that will be applied to the demand position DPOS without affecting the move in any other way The measured position will be changed accordingly in order to keep the Following Error OFFPOS effectively adjusts the O position of the axis 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 commands do not assume the position shift has occurred This can be done by using the WAIT UNTIL statement see example N A The following lines define the current demand position as 0 OFFPOS DPOS WAIT UNTIL OFFPOS 0 Wait until applied This example is equivalent to DEFPOS 0 AXIS DEFPOS DPOS MPOS UNITS 118 0 BASIC commands 3 2 194 ON Type Constant read only Syntax ON Description ON constant returns the numerical value 1 Arguments Example OP lever ON The above line sets the output named lever to ON See also N A 3 2 195 ON GOSUB Type Syntax Description Arguments Example See also Program control command ON expression
150. FWD JOG REV JOG UNITS 3 2 162 KEY Type parameter Syntax KEY n Description KEY parameter returns TRUE or FALSE depending on if a character has been received at the serial port buffer or not A TRUE result will reset when the character is read with the GET command Channels 5 to 7 are logical channels that are superimposed on the program ming port O when using Trajexia Tools Note Channel 0 is reserved for the connection to Trajexia Tools and or the command line interface Please be aware that this channel may give prob lems for this function Arguments n The specified input device When this argument is omitted the port as specified by INDEVICE will be used See the table below Example WAIT UNTIL KEY 1 GET 1 Beware that for using KEY 1 in an equation may require parentheses the statement in this case WAIT UNTIL KEY H TRUE 103 0 BASIC commands See also GET Value Input device 0 Programming port 0 RS 232C serial port 1 RS 422A 485 serial port 2 Trajexia Tools port 0 user channel 5 Trajexia Tools port 0 user channel 6 aj N Trajexia Tools port 0 user channel 7 3 2 163 LAST_AXIS Type Syntax Description Arguments Example See also System parameter LAST_AXIS read only The LAST_AXIS parameter contains the number of the last axis processed by the system Most systems do not use all the available
151. 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 0 22 VR 0 THEN GOTO exceeds length IF IN 0 ON THEN count count 1 PRINT COUNTS count fail 0 ELSE fail 7 fail 1 ENDIF IF IN stop ON THEN 8 VR cycle_flag 0 ELSEIF IN start_cycle ON THEN VR cycle_flag 1 ELSEIF IN step1 ON THEN VR cycle_flag 99 ENDIF PROGRAMMING MANUAL trajexia Example IF key charz 31 THEN GOSUB char 1 ELSEIF key 32 THEN GOSUB char 2 ELSEIF key 33 THEN GOSUB char 3 ELSE PRINT Character unknown ENDIF See also N A 3 2 151 IN Type I O function Syntax IN input number input number IN Description The IN function returns the value of digital inputs N input number final input number will return the binary sum of the group of inputs The two arguments must be less than 24 apart N input number with the value for input number less than 32 will return the value of the particular channel IN without arguments will return the binary sum of the first 24 inputs as IN 0 23 Arguments input number The number of the input for which to return a value Value An integer between 0 and 31 final input number The number of the last input for which to return a value Value An integer between 0
152. HLM READ HLM READ reads data from the Host Link slave to either VR or TABLE memory HLM STATUS HLM STATUS gives the status of the last command of the Host Link master HLM TIMEOUT HLM TIMEOUT defines the Host Link master timeout time HLM WRITE HLM WRITE writes data to the Host Link slave from either VR or TABLE memory SETCOM SETCOM configures the serial communication port and enables the Host Link protocols PROGRAMMING MANUAL trajexia Commands These Host Link commands are supported for the Host Link Master protocol Type Header code Name Function I O memory RR CIO AREA READ Reads the specified number of reading words beginning with the designated CIO IR word RL LR AREA READ Reads the specified number of words beginning with the designated LR word RH HR AREA READ Reads the specified number of words beginning with the designated HR word RD DM AREA READ Reads the specified number of words beginning with the designated DM word RJ AR AREA READ Reads the specified number of words beginning with the designated AR word RE EM AREA READ Reads the specified number of words beginning with the designated EM word 159 0 Communication protocols mand response only Type Header code Name Function memory WR CIO AREA Writes the specified data in word writing WRITE units beginning w
153. HREE THINGS N A Special character The symbol is used to specify a communications channel to be used for serial input output commands Note Communications Channels greater than 3 will only be used when run ning the Trajexia Tools software N A PRINT 1 RS232 PRINT 2 Port 2 IF KEY 1 THEN GET 1 k Check keypad on RS232 port N A 44 0 BASIC commands 3 2 17 ABS Type Mathematical function Syntax ABS expression Description ABS function returns the absolute value of an expression Arguments expression Any valid BASIC expression Example IF ABS A 100 THEN PRINT A is outside range 100 100 See also N A 3 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 Accel eration and deceleration rates are recommended to be set with the ACCEL and DECEL axis parameters Arguments rate The acceleration rate in units s 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 PROGRAMMING MANUAL trajexia 0 3 2 19 ACCEL Axis parameter Syntax ACCEL expression Description ACCEL axis parameter contains the axis acceleration rate The rate is set in units s The parameter can have any positive value including zero Arguments Example BASE 0 AC
154. IN 1573500 Fn001 6 Example 7 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 PROGRAMMING MANUAL trajexia 234 0 Examples and tips Example 8 Opposite to the 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 Gainz131072 VFF_GAIN 1650000 Fn001 6 Position mode examples In this mode the position and speed loop are closed in the Servo Driver The TJ1 ML__ 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 Demand Position in cycle n with the Measured Position in cycle n The Trajexia for the internal handling continues to use its own position loop so the Following Error that read in the Axis parameter in Trajexia is not the real one in the Servo drive To re
155. IPLICATION Multiplies two expressions DIVISION Divides two expressions POWER Takes the power of one expression to the other expression IS EQUAL TO Checks two expressions to see if they are equal ASSIGNMENT Assigns an expression to a variable IS NOT EQUAL TO Checks two expressions to see if they are different 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 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 is Name Description 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 expressio
156. If this port is not accessible you can change the port with the command Ethernet 1 1 12 new port n WARNING As the TJ1 MC__ can communicate with different sources at the same time the commands from two sources can interfere with each other PROGRAMMING MANUAL trajexia Unlike the standard Ethernet commands this command takes effect immediately after execution The port changes to default at power on Therefore this command needs to be included in any program that is executed at power on The FINS commands allow communications between nodes in different networks A FINS master device can read and write the Trajexia VR variables and TABLE memory variables with FINS commands These commands use the Ethernet connection of the TJ1 MC The FINS server protocol is UDP only Note The maximum length of a FINS command over an Ethernet con nection is 2012 bytes Trajexia uses these FINS commands 0101 Read memory 0102 Write memory Read command The FINS read command has this format 01 01 i x 00 fixed command code var type start address element count The parameters can have the following values Parameter Values hex 01 01 82 TABLE memory in 16 bit integer format C2 TABLE memory in 32 bit IEEE floating point format VR memory in 16 bit integer format command code var type start address 0 lt lt start address lt number of varia
157. Introduction Trajexia Tools is the software tool that allows to program the Trajexia system This software allows the Application Engineer to handle Trajexia projects and to edit programs It includes some useful tools described later in this chapter as Run Stop Step individual programs add breakpoints execute direct commands read write variables Oscilloscope functions and program the Servo Drivers The connection to the TJ1 MC is via Ethernet It is necessary to set the communication settings before connecting to a unit The Trajexia Tools software tool has been designed to work on line with one TJ1 MC The Trajexia Tools includes Software Tool for the TJ1 MC__ Motion Perfect 2 e CX Server e CX Drive to program and setup the Servo Drivers and Inverter The Trajexia Tools can be used to program via serial communication other OMRON motion controllers C200HW MC402E R88A MCW 151 E and R88A MCW151 DRT E 5 2 Specifications and connections 5 2 1 The PC specification for the use of Trajexia Tools are PC Specifications Description Minimum specification Recommended specifi cation CPU Pentium 300MHz Pentium 1GHz RAM 64 MB 256 MB Hard drive space 140 MB 140 MB Operating system Windows TM 98 Windows XP PROGRAMMING MANUAL trajexia Description Minimum specification Recommended specifi cation Display 800 x 600 1024 x 768 256 colours 24 bit colour Communicat
158. LC mem ory area remote 982 is read starting from DM1000 remote 1000 and is written in the Trajexia VR memory in integer format local 0 starting from VR 500 offset2500 So values in PLC memory range DM1000 to DM1019 are placed in Trajexia memory VR 500 to VR 519 The timeout is set to 5 seconds When you execute the command FINS_COMMS 1 0 12 0 80 50 10 0 300 3000 192 168 0 12 10 words length 10 of Trajexia VR mem ory as integers local 0 starting from VR 300 local offset 2300 are written to the CIO area of the PLC remote area 80 starting from CIO50 remote offset 50 So values in Trajexia memory range VR 300 to VR 309 are placed in memory CIO50 to CIO59 of the PLC The timeout is set to 3 seconds N A 83 0 BASIC commands 3 2 122 FLAG Type System command Syntax FLAG flag number value Description FLAG command is used to set and read a bank of 32 flag bits The FLAG command can be used with one or two parameters With one parameter spec ified 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 com mand is provided to aid compatibility with earlier controllers and is not recom mended for new programs Arguments number The flag number is a value from 0 31 value If specified this is the state to set the given flag to i e
159. MMAND HLM 2 4 These two commands perform the Host Link INITIALIZE and tions on the RS 422A port 2 The Slave has node number 4 HLM COMMAND HLM STWR 2 0 2 When data has to be written to a PC using Host Link the CPU Unit can not be in RUN mode The HLM COMMAND command can be used to set it to MONITOR mode The Slave has node address 0 and is connected to the RS 232C port READ HLM COMMAND HLM STATUS TIMEOUT HLS NODE HLM WRITE SETCOM trajexia command value Description HLM INIT This performs the Host Link INITIALIZE command to initialize the or value 3 transmission control procedure of all Slave Units HLM STWR This performs the Host Link STATUS WRITE SC command to change or value 4 the operating mode of the CPU Unit mc area value Data area MC TABLE TABLE variable array or value 8 MC VR Global VR variable array or value 9 command value Description MREAD This performs the Host Link PC MODEL READ MM command to read or value 0 the CPU Unit model code The result is written to the TJ1 MC variable specified by mc area and mc offset HLM TEST This performs the Host Link TEST TS command to check correct com or value 1 munication by sending string MCW151 TEST STRING and checking the echoed string Check the HLM STATUS parameter for the result HLM ABORT This performs the Host Link ABORT XZ
160. MMING MANUAL trajexia fig 38 After 1 bag After 20 bag After 100 bag fig 39 267 0 Examples and tips The motion profile and its modification due to the registration mark are shown in fig 39 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 0 IF MARK THEN end position REG POStdistance after mark MOVEMODIFY position Correct the distance according to the mark ENDIF Example Starting a slave axis in precise position of a 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 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 3 2 1
161. N for axis 3 ENDIF See also AXIS MARK MARKB REGIST trajexia Bit Description MECHATROLINK II 5 Machine Lock 6 Home Position 7 At Position Speed 8 Output Completed 9 Torque Limit 10 Latch Completed 11 In Range Speed Limit Bit Description Flexible axis MARK MARKB REG 0 selected current value REG 1 selected current value AUX IN current value REG 0 current value om A Ww N REG 1 current value Bit Description MECHATROLINK II 0 Alarm 1 Warning 2 Ready 3 Servo on 4 Power on PROGRAMMING MANUAL 72 0 BASIC commands 3 2 89 DRIVE WRITE Type Syntax Description Arguments Example Axis command DRIVE WRITE parameter size value mode The DRIVE WRITE function writes to the specified parameter of the Servo Driver the MECHATROLINK II bus Upon successful execution this com mand 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 the driver needs to be powered off and on again The DRIVE RESET 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 thi
162. NSTABIT ares 59 CONTROL teers dct UP EM MM ME DIM E M E 59 MEMENTO MEM 60 15 RM 60 CREEP E 60 Pc PIDE 60 Prae RTT ERHIELT 61 N MW 61 DAC MERERI 61 61 DACS bac eer deci PVP 61 62 DATES Mcd WM 62 uM LL En LR E E ace 62 D RR ANE EHE CHEM MV MM MM 63 DAV al C uA MM ad 64 DAYS NNNM NECEM HMM MM HMM 64 64 ROMPE NORMEN 64 sche MM 65 DEMAND EDGE Siei retama aia i ene iie A Edu aaa aa 65 65 e 67 0 Contents PROGRAMMING MANUAL 3 2 78 3 2 79 3 2 80 3 2 81 3 2 82 3 2 83 3 2 84 3 2 85 3 2 86 3 2 87 3 2 88 3 2 89 3 2 90 3 2 91 3 2 92 3 2 93 3 2 94 3 2 95 3 2 96 3 2 97
163. OSB parameter stores the position in user units at which the sec ondary registration event occurred N A PRINT REG POSB AXIS 2 This will print registration position in user units for axis 2 AXIS MARKB REGIST PROGRAMMING MANUAL trajexia E d 3 2 219 REGIST Type Axis command Syntax REGIST mode Description REGIST command sets up the registration operation The command cap tures an axis position when a registration signal is detected With a TJ1 FLO2 the capture is done by the hardware so software 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 Flexible Axis REGIST command can capture two registration positions using separate registration inputs When a primary registration event has occurred the MARK axis parameter is set to on and the position is stored in the REG POS axis parameter For the secondary registration event the MARKB axis parameter is set to on and the position is stored in the REG POSB axis parameter This command is applicable only to flexible axis 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 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 parame
164. OTO start Square rel MOVE 0 100 100 0 0 100 100 0 WAIT IDLE WA 1000 RETURN MOVE E PROGRAMMING MANUAL fig 54 trajexia x speed iu A Square_rel MOVEABSG 200 MOVEABS 0 400 290 O E Examples and tips 6 2 6 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 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 PROGRAMMING MANUAL fig 55 trajexia 291 O E Examples and tips Example BAG FEEDER program 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 0 again 5 27 100 EL 1000 ECEL 1000 EP DIST 1000000 EP OPTION 1 ERVO ON
165. OUTSIDE THE WINDOW INSIDE THE WINDOW 1 OUTSIDE MARK TRUE REG POS 27 264 0 Examples and tips 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 receives the latch e Trajexia decides to trigger the latch again 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 PROGRAMMING MANUAL fig 36 Position CLOSE_WIN OPEN_WIN i No Registration the position REGIST 0 is outside the window The trigger is active 0 MARK 1 0 REG 5 REG POS XXX trajexia t The trigger is active REGIST 0 MARK 1 REG POS Pos1 Registration Input 265 0 Examples and tips Example Correcting the position of an axis 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
166. QR x x where x ax The individual speed for axis at any time of the movement is calculated as v Vp L See also The command can take up to 16 arguments distance i The position to move every axis to in user units starting with the base axis MOVEABS 20 350 An X Y plotter has a pen carousel whose position is fixed relative to the plot ter origin To change pen an absolute move to the carousel position will find the target irrespective of the plot position when the command is executed PROGRAMMING MANUAL trajexia A pallet consists of a 6 by 8 grid in which gas canisters are inserted 85mm 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 using the DEFPOS command The part of the program to position the canisters in the pallet is as follows xloop FORx 0TO5 yloop FOR y 0TO7 MOVEABS 340 516 5 Move to pick up point GOSUB pick Go to pick up subroutine PRINT MOVE TO POSITION x 6 y 1 MOVEABS x 85 y 85 GOSUB place Go to place down subroutine NEXT y NEXT x AXIS MOVE MOVEABS UNITS 111 0 BASIC commands 3 2 179 MOVECIRC Type Axis command Syntax MOVECIRC end 1 end 2 1 centre 2 direction MC end 1 end 2 1 centre 2 direction Description MOVECIRC command interpolates 2 orthogonal axes in a circular arc The path of the movement is
167. ROGRAMMING MANUAL trajexia the level set in the TJ1 DRT DeviceNet parameters You can set the TJ1 DRT DeviceNet parameters using a DeviceNet configurator The default level is 11V 178 0 Communication protocols 4 6 MECHATROLINK II The MECHATROLINK II protocol is a serial bus that is made to control motion in a deterministic way The number of MECHATROLINK II devices determines the data exchange cycle time For 1 to 4 devices the cycle time can be 0 5 ms 1 ms or 2 ms e For 5 to 8 devices the cycle time can be 1 ms or 2 ms e For 9 to 16 devices the cycle time is 2 ms The cyclic transmission has two stages The TJ1 ML__ sends the reference command to the MECHATROLINK slaves The slaves send feedback and status information to the TJ1 ML MECHATROLINK II uses a synchronization clock and broadcast messaging to make sure that all the slaves execute the commands at the same time In addition other information is transferred at a lower rate for example the reading and writing of parameters There are specific BASIC commands to address MECHATROLINK slave units directly DRIVE CLEAR This command resets one alarm in a MECHATROLINK Servo Driver via a MECHATROLINK message 45 This command sets to on one output in a remote MECHATROLINK module PROGRAMMING MANUAL trajexia 179 0 Trajexia Tools interface 5 Trajexia Tools interface 5 1
168. ROM are overwritten This feature changes POWER UP to 1 the RAM is overwritten with the contents of the EPROM after power up In this mode the programs cannot be edited This feature is only available when POWER 0 Load System Software Trajexia has a flash EPROM to store both the user programs and the system software Use Load System Software to upgrade the system software to a newer version A dialog window opens that makes sure you make a back up copy of the project and that you wish to continue A standard file selector opens Select the file you need OMRON recommends that you load a new version of the H system software only when you are advised to do so by your distributor or by OMRON Caution Do not load software is not specified for the Trajexia motion controller Only load versions that are specifically designed for use with Trajexia All other versions do not work A windows dialog box opens to make sure you wish to continue Press OK to start The flash EPROM process will take approximately 7 minutes Caution Do not stop the software upgrade process A break in the communication process will damage the Trajexia unit If you cannot recover the Trajexia unit after the flash EPROM process contact your sales representa tive PROGRAMMING MANUAL trajexia 201 0 Trajexia Tools interface traj exia When the download is complete a check sum confirms that the flash EPROM proc
169. RRT S 17 salety unit dS SEITIDIV S scietis 21 MAM RUN 158 Servo driver characteristics example R DN aos 251 OEMS MN RAIN 279 PROGRAMMING MANUAL 310 0 noe trex Singl axis example Wet cc rN T 286 Speedimode example ERN EM S 230 Starnt p example erc 225 STARTUP program Modi ev P rer rM tr 208 erecek T 22 Huy dee RE mr 219 Iracing and montonng example 269 2 12 compare S 192 Trajexia Tools protocol EQ 156 U Units example RR RE m 239 User defined MEME P 165 V ee
170. SE MOVECIRC and MHELICAL will decelerate to a stop with the deceleration 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 During the deceleration of the current moves additional RAPIDSTOPs will be ignored Arguments Example No example See also CANCEL MTYPE NTYPE 3 2 216 READ BIT Type Syntax Description Arguments Example See also System command READ BIT bit number vr number The READ BIT command returns the value of the specified bit in the speci fied VR variable either O or 1 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 No example CLEAR BIT SET BIT 127 0 BASIC commands 3 2 217 POS 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 pri mary registration event occurred N A PRINT REG POS AXIS 2 This will print registration position in user units for axis 2 AXIS MARK REGIST 3 2 218 POSB Type Syntax Description Arguments Example See also Axis parameter read only REG POSB The REG P
171. SUB 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 202 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 because the speed is a derivative of the position 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 gt DIST the position jumps to 0 if REP 1 or to REP DIST if REP gt 0 PROGRAMMING MANUAL 286 0 Examples and tips Following Error is proportional to the speed if you use only Proportional Gain in the position loop The torque which is given by DRIVE MONITOR as a percentage of the nominal torque of the motor when you set DRIVE CONTROL 711 is proportional to the acceleration according to the formula Torque total Yiotal X 2 Torque friction where Torque fiction is usually small is the angular acceleration and J the inertia of the system 6 2 4 Position with product detection A ballscrew moves forward at a creep speed until it reaches a product a microswitc
172. Save table file Te Saves a Ist or bas file from TABLE values to the project directory Load program file Cancel Loads a file that contains code that can be executed in a task Save program file Saves the program file as in txt format Recent projects You can open the recent projects that have been edited by the Trajexia Tools software Exit Closes the Trajexia Tools application PROGRAMMING MANUAL 197 0 Trajexia Tools interface 5 5 2 Controller menu The Controller menu lets you set the communication between the PC and the Trajexia system and control the Trajexia system Connect Connect to the Trajexia system and starts the project manager Available if the Trajexia Tools is disconnected from the system Disconnect Disconnects from the Trajexia system Available when the Trajexia Tools is connected to the system Connect to simulator Not fully implemented for Trajexia Reset the controller Do a software reset on the Trajexia system The Trajexia Tools application disconnects from the Trajexia system Recover project from EPROM Resets the Trajexia system and restores the programs that are on the EPROM to the PC PROGRAMMING MANUAL trajexia Controller Program Tools External Options Connect Ctrl Alt G Disconnect Ctrl Alt D Gonnect to simulator Ghril Alt s Reset the controller Recover project from EPROM Controller configuration CANIO Status
173. 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 Tools the menu Reset the controller under the Controller menu performs the equivalent of an EX command N A No example EX 98 0 3 2 154 INPUT Type Syntax Description Arguments Example See also I O command INPUT n variable variable The INPUT command will assign numerical input string values to the specified variables Multiple input string values can be requested on one line sepa rated by commas or on multiple lines separated by carriage return The pro gram execution will be paused until the string is terminated with a carriage return after the last variable has been assigned If the string is invalid the user will be prompted with an error message and the task will be repeated The maximum amount of inputs on one line has no limit other than the line length Channels 5 to 7 are logical channels that are superimposed on the RS 232C programming port 0 when using Trajexia Tools Note Channel 0 is reserved for the connection to Trajexia Tools and or the command line interface Please be aware that this channel may give prob lems for this function n The specified input device When this argument is omitted the port as specified by
174. TABLE variable array DAY Prints the current day as a string TABLEVALUES Returns list of values from the TABLE memory DEVICENET Configures the TJ1 DRT DeviceNet Slave Unit for data Prints the current time as a string exchange or returns the data exchange status of the TJ1 DRT TRIGGER Starts a previously set SCOPE command ETHERNET Reads and sets various parameters of TJ1 MC__ Ethernet port VR Writes and reads data to and from the global VR variables EX MNE CONOIS VRSTRING Combines VR memory values so they can be printed as a string FLAG reads bankot 32 bits WA Holds program execution for the number of milliseconds speci FLAGS Read and sets FLAGS as a block fied FREE Returns the amount of available memory WAIT IDLE Suspends program execution until the base axis has finished GLOBAL Declares a reference to one of VR variables executing its current move and any buffered move HALT Stops execution of all programs currently running WAIT LOADED Suspends program execution until the base axis has no moves buffered ahead other than the currently executing move INITIALISE Sets all axes and parameters to their default values WAIT UNTIL Repeatedly evaluates the condition until it is TRUE INVERT IN Inverts input channels 0 31 in the software INVERTER COMMAND Reads and clears alarm of the frequency inverter INVERTER READ Reads parameter alarm speed and torque reference o
175. The Initialization program sets the parameters for the axes These parameters are dependant upon the Motor Encoder resolution and the motor maximum speed Note H Refer to the Servo Driver and the motor data sheet for this information EXAMPLE OF INITIALIZATION PROGRAM THIS VERSION IS DESIGNED FOR MECHATROLINK SERVOS ADAPT THIS PROGRAM ACCORDING TO YOUR APPLICATION BASE x restart 0 inertia ratio set load inertia ratio EXAMPLE 1 SGMAH 01AAA61D OY motor data enc resolution 2 13 13 bit encoder max speed 5000 5000 rpm max speed Pas D X E 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 10 lt gt 50012 THEN DRIVE WRITE 110 2 0012 1 PROGRAMMING MANUAL trajexia 283 O E I Examples and tips trajexia Pn110 0012h autotuning disabled restart 1 ENDIF DRIVE READ 202 2 10 IF VR 10 lt gt 1 THEN 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 511 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 81E 2 4
176. Trajexia input 6 CN1 44 N A 7 CN1 45 N A 8 CN1 46 N A 12 CN1 40 28 13 CN1 41 29 14 CN1 42 30 15 CN1 43 31 With this default value the mapping is as follows for the Junma Servo Driver DRIVE MONITOR bit Connector signal Trajexia input 2 CN1 2 26 6 CN1 1 27 Servo driver inputs mapped into Trajexia space like this are accessed within the program per axis and cannot be accessed in usual way by using 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 FWD IN and REV The inputs of the axis Servo Driver are used depending on the axis of which the parameters are set Example We have two Sigma ll drivers assigned to controller axes 0 and For both axes we want to use input signal CN1 41 to serve as reverse limit input We can do this with these commands REV 5 0 29 REV IN AXIS 3 29 Note that even though REV IN parameters for both axes have the same value 29 the real inputs used are not the same For axis 0 the CN1 41 input of the first driver assigned to that axis is used but for axis 3 the same input PROGRAMMING MANUAL trajexia CN1 41 of the other driver the one 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
177. WRITE 2 13 PLC LR 14 2 MC TABLE 18 Host Link communication From Host Link master to Host Link slave 13WL0014070107025F From Host Link slave to Host Link master 13WLO0059 Result LR address 0 value 701 hex LR address 1 value 702 hex 162 0 Communication protocols Example BASIC code Host Link communication Result Example BASIC code Host Link communication Result Example BASIC code Host Link communication Result Send TS test command to PC using HLM COMMAND HLM COMMAND HLM TEST 2 13 From Host Link master to Host Link slave 13TSMCW151 TEST STRING2A From Host Link slave to Host Link master 13TSMCW151 TEST STRING2A HLM STATUS PORT 2 0 which implies correct communication Set PC in MON mode using HLM COMMAND HLM_COMMAND HLM_STWR 2 13 2 From Host Link master to Host Link slave 135 0250 From Host Link slave to Host Link master 135 0052 The runs MON mode Note that this is necessary for writing data to the PC using HLM WRITE Reading PC model code using HLM COMMAND timeout HLM TIMEOUT 500 Destination address VR 100 HLM COMMAND HLM MREAD 2 13 MC VR 100 From Host Link master to Host Link slave 13MM42 From Host Link slave to Host Link master no response Because the master has not received a response from the PC STATUS PORT 2 has value 256 bit 8 is set after 500 servo cycl
178. able below alarm number 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 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 15 Hex 8000 External BB command trajexia BASIC commands 3 2 160 INVERTER WRITE Type Syntax Description System command INVERTER WRITE module station 0 param number param size VR mode INVERTER WRITE module station 2 value INVERTER WRITE module station 3 value INVERTER WRITE writes the parameter speed reference or torque refer ence from the frequency inverter connected to the system via the MECHA TROLINK II bus There are three INVERTER WRITE functions 0 Writes an inverter parameter 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 4 9 Inverter 7 7 1 01 3 1 02 3 Make you sure that the Inverter firmware supports the MECHATROLINK II board The command ret
179. able memory locations 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 in the Oscilloscope Configuration window Example 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 3 2 237 and 3 2 265 PROGRAMMING MANUAL trajexia 270 0 Examples and tips 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 ed 255 1 cos 2 999 where 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 3 2 42 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 pos 15
180. ad other than the currently executing 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 Arguments Example Switch output 8 ON at start of start of MOVE 500 and OFF at end MOVE 800 MOVE 500 WAIT LOADED OP 8 ON MOVE 400 WAIT LOADED OP 8 OFF See also AXIS WAIT IDLE 3 2 282 WAIT UNTIL Type System command Syntax WAIT UNTIL condition Description 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 Arguments condition Any valid BASIC logical expression 150 0 BASIC commands Example 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 Example The expressions evaluated can be as complex as you like provided they fol low BASIC syntax for example WAIT UNTIL DPOS AXIS 2 lt 0 OR IN 1 The above line would wait until the demand position of axis 2 is less than or equal to 0 or input 1 is on See also N A 3 2 283 WDOG Type System parameter Syntax WDOG Description WDOG parameter contains the software switch which enables
181. ad 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 PROGRAMMING MANUAL TJ1 MC16 i Profile generator Trajexia Position Loop is desactivated Gains not used trajexia fig 11 fig 12 1 TJ1 ML16 i i SERVO i i 1 1 Position E gt Position Loop Command 1 1 Speed Loop Torque Loop 1 r 1 Demanded Following Position Error Command Measured 7 Position 235 0 Examples and tips tuning is more simple only the rigidity Fn001 and if necessary the feedforward gain Pn109 needs to be set position loop in the servo is faster 250us than Trajexia 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 individually 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 Example 1 The Following Error is proportional
182. ain N A No example DRIVE STATUS Caution Be sure 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 3 2 85 DRIVE CONTROL Type Syntax Description Arguments Axis parameter DRIVE CONTROL When applied to axis controlled by the Servo Driver connected to the system via the MECHATROLINK II bus this parameter selects the data to be moni tored by DRIVE MONITOR according to the table below If a Servo Driver for the axis is connected using the TJ1 FLO2 this parameter sets outputs of the TJ1 FLO2 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 N A PROGRAMMING MANUAL trajexia 2 DRIVE CONTROL AXIS 2 256 In this example OUT O0 is switched on for axis 2 connected using the TJ1 02 See also N A 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 Torq
183. ajexia 72 TJ1 MC_ 7 2 1 System errors System errors show on the LED display of the TJ1 MC as Enn where nn is the error code Error Cause Solution code E00 BASIC SRAM error Description Hardware failure ofthe Replace the TJ1 MC TJ1 MC E01 System SRAM low Hardware failure of the Replace the TJ1 MC word error TJ1 MC E02 System SRAM high Hardware failure of the Replace the TJ1 MC word error TJ1 MC E03 Battery low error The battery voltage is too low Replace the battery Hardware failure of the TJ1 MC Hardware failure Replace the TJ1 MC Note Please refer to section 3 2 254 for more information 7 2 2 Axis errors Axis errors show on the LED display of the TJ1 MC___ as Ann where is the number of the axis that caused the error There are two possible causes Incorrect or out of range value of axis parameter set Error or alarm on Servo Driver assigned to the axis The two causes with their solutions are as follows e Incorrect or out of range axis parameter value Error or alarm on Servo Driver assigned to the axis PROGRAMMING MANUAL 300 O E Troubleshooting Incorrect or out of range axis parameter value If the value of an axis parameter is incorrect or out of range an axis error occurs No alarm or error shows on the display of the Servo Driver assigned to the axis You can see the cause of the error
184. ajexia Tools checks that the two versions of the project are identical using a cyclic redundancy check If the two differ Trajexia Tools allows copying the TJ1 MC version to disk or vice versa Programs on the computer are stored in ASCII text files They may therefore be printed edited and copied using a simple text editor The source programs are held the TJ1 MC in a tokenised form and as a result the sizes of the programs will be less on the TJ1 MC compared to the same programs on the computer Storing programs PROGRAMMING MANUAL trajexia Programs in the TJ1 MC held in the battery powered RAM memory and are preserved during power off This is similar to VR and TABLE memory The content of the program RAM memory is preserved when the battery is the TJ1 MC The programs are also preserved when changing the battery if this is done quickly To preserve programs without the battery for a longer period the current programs must be copied to the Flash memory of the controller using the EPROM command and read back during power up which is determined by the POWER UP system parameter Program commands The TJ1 MC has a number of BASIC commands to allow creation manipulation and deletion of programs Trajexia Tools provides buttons which also perform these operations so the use of those commands is normally not required in the programs Command Function SELECT Selects a program for
185. ajexia Tools will disconnect in such a case The PMOVE task parameter will be set to TRUE when the task buffers are full and will be reset to FALSE when the task buffers are available again H If the task buffers are full the program execution is 2 4 2 gt Sequencing On each servo cycle interrupt see section 2 6 3 the motion generator examines the NTYPE buffers to see if any of them are available If there are any available then it checks the task buffers to see if there is a move waiting to be loaded If a move can be loaded then the data for all the specified axes is loaded from the task buffers into the NTYPE buffers and the corresponding task buffers are marked as idle This process is called sequencing 2 4 3 Move loading Once sequencing has been completed the MTYPE buffers are checked to see if any moves can be loaded If the required MTYPE buffers are available then the move is loaded from the NTYPE buffers to the MTYPE buffers and the NTYPE buffers are marked as idle This process is called move loading If there is a valid move in the MTYPE buffers then it is processed When the move has been completed the MTYPE buffers are marked as idle PROGRAMMING MANUAL fig 2 Task buffers Task 1 MOVECIRC AX FORWARD AXIS 1 IS 0 Task 2 Task 3 MOVE 15 0 Move buffers trajexia Motion Generator Axis 0 1 2 Next Move NTYPE MOVE
186. al axes in a helical move CLOSE WIN Defines the end of the window in which a registration mark is MOVE Moves one or more axes at the demand speed acceleration and expected deceleration to the position specified as increment from the current CLUTCH RATE Defines the change in connection ratio when using the position CONNECT command MOVEABS Moves one or more axes at the demand speed acceleration and CREEP Contains the creep speed deceleration to the position specified as absolute position D GAIN Contains the derivative control gain MOVECIRC Interpolates 2 orthogonal axes in a circular arc DAC SCALE Sets scale and polarity applied to DAC values MOVELINK Creates a linear move the base axis linked via a software gear DATUM IN Contains the input number to be used as the origin input box to the measured position of a link axis DECEL Contains the axis deceleration rate MOVEMODIFY Changes the absolute end position of the current single axis linear move MOVE or MOVEABS DEMAND_EDGES Contains the current value of the DPOS axis parameter in encoder edges RAPIDSTOP Cancels the current move on all axes DPOS Contains the demand position generated by the move com REGIST Captures an axis position when a registration input or the Z mark on mands the encoder is detected REVERSE M Ivi ti CEDERE DRIVE CONTROL Selects data to be monitored using DRIVE MONITOR for axes REED bis Pea conne
187. am name is omitted then the cur STEP RATIO 500 800 rently selected program will be halted The program name can also UNITS 800 be specified without quotes BASE 1 In case of multiple executions of a single program on different tasks UNITS 800 the task number be used to specify the specific task to be See also N A stopped Arguments 3 2 252 STEPLINE The name of the program to be stopped task number The number of the task with the program to be stopped Range 1 14 Type Program command Example 2 STOP progname Syntax STEPLINE program name task number Example The lines from label on will not be executed in this example Description STEPLINE command executes one line steps in the program STOP specified by program name The program name can also be specified with label out quotes If STEPLINE is executed without program name on the command PRINT var line the current selected program will be stepped If STEPLINE is executed RETURN without program name in a program this program will be stepped If the program is specified then all occurrences of this program will be See also HALT RUN SELECT stepped A new task will be started when there is no copy of the program run ning 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 run ning on the specified task then one wi
188. ameter read write mode AXIS ENCODER ENCODER BITS 74 0 BASIC commands 3 2 96 ENCODER ID Type Syntax Description Arguments Example See also Axis parameter read only ENCODER 0 This parameter returns the ID value of an absolute encoder for the axis This parameter is applicable only to Flexible axis absolute Tamagawa axis with ATYPE value 46 It returns ENID parameter from the encoder which is set to 17 For more information see Tamagawa absolute encoder interface specification If applied to axis of ATYPE value other than 46 this parameter returns O N A gt gt ENCODER AXIS 1 17 0000 This command will print absolute encoder ID value for axis 1 AXIS ENCODER ENCODER BITS 3 2 97 ENCODER RATIO Type Syntax Description Axis parameter ENCODER RATIO denominator numerator 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 both MOVECIRC and CAMBOX Note Large ratios should be avoided as they will lead to either loss of resolu tion or much reduced smoothness in the motion The actual physical encoder count is the basic resolution of the axis and the use of this command may reduce the ability of the Motion Controller t accurately achieve all positions Note ENCODER RATIO does not replace UNITS Only use ENCOD
189. and 31 97 0 BASIC commands Example 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 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 Example In this example a single input is tested test WAIT UNTIL IN 4 ON Conveyor is in position when ON GOSUB place See also OP 3 2 152 INDEVICE Type parameter Syntax INDEVICE Description The INDEVICE parameter defines the default input device This device will be selected for the input commands when the n option is omitted The INDEVICE parameter is task specific The supported values are listed in the table below Arguments N A Example No example See also GETGET INPUT LINPUT KEY trajexia ect 9 Value Description 2 RS 422A 485 serial port 2 5 Trajexia Tools port 0 user channel 5 6 Trajexia Tools port 0 user channel 6 7 Trajexia Tools port 0 user channel 7 Value Description 0 Programming port 0 default 1 RS 232C serial port 1 PROGRAMMING MANUAL 3 2 153 INITIALISE Type Syntax Description Arguments Example
190. and is used to specify a temporary base axis The base axis is effective until itis changed again with 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 parameter 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 3 4 5 6 7 8 9 10 11 12 13 14 15 at start up or when a program starts running on a task The BASE command without any arguments returns the current base order grouping Note If the BASE command does not specify all the axes the BASE com mand will fill 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 will set the internal array of 16 axes to 2 6 10 11 12 13 14 15 0 1 3 4 5 7 8 9 The command can take up to 16 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 ACCEL 10000 Set acceleration rate f
191. and uses the GLOBAL command to declare the name as a reference to one of the global VR variables The name can then be used from within the program containing the GLOBAL definition and all other programs Take care that the program containing the GLOBAL definition must be run before the name is used in other programs The best practice is to define global names in the start up program Using this approach the example above becomes PROGRAMMING MANUAL 26 0 Trajexia system The declaration in start up program GLOBAL length 3 In other programs executed after the start up program start MOVE length PRINT length start length x 2 3 4 Mathematical specifications Number format The TJ1 MC__ has two main formats for numeric values single precision floating point and single precision integer The single precision floating point format is internally a 32 bit value It has an 8 bit exponent field a sign bit and a 23 bit fraction field with an implicit 1 as the 24th bit Floating point numbers have a valid range of 5 9 10 39 to 3 4 108 Integers are essentially floating point numbers with zero exponent This implies that the integers are 24 bits wide The integer range is therefore given from 16 777 216 to 16 777 215 Numeric values outside this range will be floating point Hexadecimal format The TJ1 MC supports assigning and printing hexadecimal values A hexadecimal number is inpu
192. any buffered move The com mand 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 temporary 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 0 PRINT Movement finished The print statement is printed most of the times BEFORE the movement starts and sometimes when the movement is finished Motion programs and motion sequence work in parallel and unsynchronized 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 when you check 0 it is 0 because the movement HAS NOT STARTED YET not because it has finished AXIS WAIT LOADED Note WAIT IDLE is a command specifically designed to wait until the previous movement has been finished so it is handles the delay from when the previous command is executed in the program until the command is correctly loaded in the motion buffer PROGRAMMING MANUAL trajexia 0 3 2 281 WAIT LOADED Type System command Syntax WAIT LOADED Description The WAIT LOADED command suspends program execution until the base axis has no moves buffered ahe
193. apped automatically starting from OP 32 Input Output Banks These represent virtual 1 that you can use inside the program as user flags Setting one of those virtual outputs makes the corresponding virtual input to be set too If an indicator is grey then its corresponding input or output is off If it is coloured yellow green orange red cyan or magenta then its corresponding input or output is on Different colours are used to represent different types of input and output Clicking on an indicator representing an output or linked input and output results in that output changing state Clicking on an indicator representing an input has no effect Some output circuits require an external power source In this case the input state of internally linked is not indicated correctly if the external supply is not present because even if fig 39 Digital IO Status Digital 10 Configuration Inputs 0 31 Outputs 8 31 trajexia Show Description PROGRAMMING MANUAL 216 O E Trajexia Tools interface an output is on the input state does not change The same situation exists if an output goes into a current limit due to a fault or overload Show description Checking the Show Description check box will toggle between descriptions on and descriptions off Descriptions are stored in the project file Keypad Not applicable for Trajexia Jog Axes This window allows the user
194. ar the FIFO queue 95 0 BASIC commands Example See also HW PSWITCH 2 This command will clear FIFO queue if loaded previously AXIS 3 2 146 GAIN Type Axis parameter Syntax GAIN Description The GAIN parameter contains the integral gain for the axis The integral out put contribution is calculated by multiplying the sums of the Following Errors with the value of the 1 GAIN parameter The default value is O Adding integral gain to a servo system reduces positioning error when at rest or moving steadily 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 Arguments Example No example See also D GAIN GAIN OV GAIN P GAIN VFF GAIN 3 2 147 IDLE See WAIT IDLE PROGRAMMING MANUAL trajexia 3 2 148 IEEE IN Type Syntax Description Arguments Example See also Mathematical function IEEE IN byteO 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 byteO0 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 3 2 149 IEEE OUT Type Syntax Description Arguments Example
195. arameter may be used to select which bank of I O should be dis played The values are in the table below Arguments Example DISPLAY 5 Shows outputs 8 15 See also N A value Description 0 Inputs 0 to 7 default 1 Inputs 8 to 15 2 Inputs 16 to 23 3 Inputs 24 to 31 67 0 BASIC commands value Description 4 Outputs 0 to 7 not used on Trajexia 5 Outputs 8 to 15 6 Outputs 16 to 23 7 Outputs 24 to 31 3 2 80 DPOS Type Axis parameter read only Syntax DPOS Description 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 parameter DPOS is reset to 0 at start up Arguments Example gt gt PRINT DPOS AXIS 0 34 0000 The above line will return the demand position in user units See also AXIS DPOS DEFPOS DEMAND EDGES FE MPOS REP DIST REP OPTION OFFPOS UNITS PROGRAMMING MANUAL trajexia 3 2 81 DRIVE ALARM Type Syntax Description Arguments Example See also Axis command DRIVE ALARM VR The DRIVE ALARM function reads the current
196. arp 25 BASIC commands RR 33 BASIC a WING MEET ecce 24 jedes M m 30 Mettre Cer 302 CAM table example mt 293 Caution Salely RR RU Pcr C 16 Command AXIS it RENTRER E e 33 XC ILC LU 36 36 airs o 2 E ee ee eee ee 37 Program TU t T 38 SySIEmM MM EAM UD DEUM c LM 38 40 Command MG WM MR ER emm 30 RC C e 36 Correction SAS t o om Nen 298 D DEVICENET COMMUNICANOM Em mmm 173 ComM nicatlon Statys 178 EIOS
197. as following gt gt UNITS 1000 4 5 See also AXIS ENCODER RATIO 3 2 271 UNLOCK See LOCK 3 2 272 UNTIL See REPEAT UNTIL PROGRAMMING MANUAL trajexia ccc o 3 2 273 VERIFY Type Axis parameter Syntax VERIFY Description verify axis parameter is used to select different modes of operation on a stepper encoder axis Encoder count circuit is connected to the STEP and DIRECTION hard ware 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 VERIFYZON Encoder circuit is connected to external Z signal Note On the TJ1 FLO2 when VERIFY OFF the encoder counting circuit is configured to accept STEP and DIRECTION signals hard wired to the encoder A 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 Example VERIFY AXIS 3 ON See also N A 3 2 274 VERSION Type System parameter read only Syntax VERSION Description VERSION parameter returns the current firmware version number of the current system installed in the TJ1 MC Arguments Example gt gt PRINT VERSION 1 6100 See also N A 147 0 BASIC commands 3 2 275 GAIN Type Syntax Description Arguments Example See also Axis parameter
198. ation du AC Drives B Communications Ade 8 3G3RV P10ST8 5 3GSF7DRM21 3 C200Hw DRM2 51 C200Hw DRT2 21 28 5001 4 3 2 51004 CPM2C S110C4 CS1W DRM21 5 5 DAT1 ARM21 iy 00 Create Delete Save 34 Find Offline 176 0 Communication protocols 8 11 14 14 18 19 20 21 Register the slave to the master right click on the 201TJ1 DRT icon Double click on the Master Icon Select the TJ1 DRT device Click Advanced Setup 12 13 Click Use Poll Connection 15 16 Click Connection tab Click User Setup Select Con Path Select the number of variables that has been selected for the DeviceNet communication Click OK to confirm all dialog boxes Select Work Online from the Network menu Select Parameter from the Component menu Right click on the Master icon Select Parameter Download PROGRAMMING MANUAL trajexia Ele Edit View Insert Network Component Tools Windows Help b 85 E 3 NewProject 22 Network 1 DeviceNet 001 Component Type amp 85 00 CJ1W DRM21 Export X cut Copy Delete Change Node address Change Device Comment Comment Start Special Application 87 Properties 75 Newokctto Off line Advanced setting Device Information Connection
199. ave from either VR or TABLE var iable array HLS NODE Defines the Slave unit number for the Host Link Slave protocol SETCOM Sets the serial communications PROGRAMMING MANUAL Name Description FALSE Equal to the numerical value O OFF Equal to the numerical value O ON Equal to the numerical value 1 PI Equal to the numerical value 3 1416 TRUE Equal to the numerical value 1 3 1 5 I O commands functions and parameters Name Description 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 INDEVICE Parameter defines the default input device INPUT Waits for a string to be received and assigns the numerical value to variable KEY Returns TRUE or FALSE depending on if character is received LINPUT Waits for a string and puts it in VR variables OP Sets one or more outputs or returns the state of the first 24 out puts OUTDEVICE Defines the default output device 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 36 0 BASIC commands 3 1 6 Mathematical functions and operands trajexia Name Description ADDITION Adds two expressions SUBTRACTION Subtracts two expressions MULT
200. 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 TJ1 MC will task moves on the 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 processed whichever of the two is larger N A No example AXIS BASE PROGRAMMING MANUAL trajexia 0 3 2 164 LINKAX Axis parameter read only Syntax LINKAX Description Returns 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 Arguments Example No example See also CONNECT CAMBOX MOVELINK 3 2 165 LINPUT Type I O command Syntax LINPUT n vr variable Description LINPUT command assigns the ASCII code of the characters to an array of variables starting with the specified VR variable Program execution will be paused until the string is terminated with a carriage return which is also stored The string is not echoed by the controller Channels 5 to 7 are logical channels that are superimposed on the program ming port O when using Trajexia Tools Note Channel 0 is reserved for the connection to Trajexia Tools and or the command line interface Please be aware that this channel may give prob lems for this command Arguments n The specified input device When this argument is omitted the port as specified by IND
201. bers agrees Checks if all devices are connected and have power non agreement the program stops e Sets the correct ATYPE as selected in the intelligent axis window Sets the mode Run or Commisioning How to use the Startup program The recommended way to use the STARTUP program is as follows PROGRAMMING MANUAL trajexia 225 O g Examples and tips trajexia 1 Click the Intelligent drives button A fig 1 Motion Perfect 4 Project Controller Pr gram Tools External Options Window Help Controller status C Editable Drives Enabled Avis status error Bl cj Selected Program gt Free Memory 505354 46 Motion Stop TJI MC16 ENet0 192 168 0 250 C1 AProjecto1lProjectO1 prj 2 2 Click the Modify STARTUP program button 3 Atthe end of the section created automatically put your own application code Typically variable initialisation and axes parameters 4 Atthe end of the STARTUP program run your application lli programs It is recommended to run the SHELL program explained later in this section ml 5 Setthe STARTUP program to run at power on c cas 0 0 0 Model SGDH SGDH SGDH Version 0042 0042 0042 Config Config Modify STARTUP program PROGRAMMING MANUAL 226 0 H OMRON recommends that the sta
202. ble below PROGRAMMING MANUAL trajexia DIRECTION 1 FET E ECL CHAT Y DIRECTION 0 112 0 BASIC commands Example See also Note The MOVECIRC computes the radius and the total angle of rotation from the centre and end point If the end point does not lie on the calculated 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 The command sequence to plot the letter 0 might be as follows MOVE 0 6 Move gt MOVECIRC 3 3 3 0 1 Move B gt MOVE 2 0 Move C gt D MOVECIRC 3 3 0 3 1 Move D gt E MOVE 0 6 Move gt MOVECIRC 3 3 3 0 1 Move gt G MOVE 2 0 Move G gt H MOVECIRC 3 3 0 3 1 Move H gt A AXIS ENCODER_RATIO UNITS Direction Right hand axis Left hand axis 1 Negative Positive 0 Positive Negative PROGRAMMING MANUAL trajexia SPECIFIED END POINT 113 0 BASIC commands 3 2 180 MOVELINK Arguments Type Axis command Syntax 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 Description MOV
203. bles 1 lt FFFF 156 0 Communication protocols Parameter Values hex element count 1 lt element count lt number of variables start address The TJ1 MC 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 TJ1 MC__ responds with e fvar type is 82 or BO trajexia 01 02 00 command c var start fixed total words word 1 ode type address e fvar type is C2 01 02 C2 00 command c var t start fixed total words dword 1 ode ype address e fvar type is 30 01 01 00 00 command code response code word 1 word 2 01 02 30 00 command var address total bits bit code type num If var type is C2 and the response code is 0000 the TJ1 MC__ responds with 01 01 00 00 command code response code dword 1 Note The returned words and dwords are in big endian format Write command The FINS write command has these formats PROGRAMMING MANUAL The parameters can have the following values Parameter
204. bove line turns the scope function off SCOPE_POS TABLE TRIGGER 136 0 BASIC commands 3 2 238 SCOPE POS Type System parameter read only Syntax SCOPE POS Description SCOPE POS parameter contains the current TABLE position at which the SCOPE command is currently storing its first parameter Arguments Example No example See also SCOPE 3 2 239 SELECT Type Program command Syntax SELECT program name Description SELECT command specifies the current program for editing running list ing etc SELECT makes a new program if the name entered does not exist The program name can also be specified without quotes When program is selected the commands COMPILE DEL EDIT LIST NEW RUN STEPLINE STOP and TROFF will apply to the currently selected program unless a program is specified in the command 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 an offline VT100 terminal Trajexia Tools automatically selects programs when you click on their entry in the list in the control panel Arguments Example gt gt SELECT PROGRAM PROGRAM selected RUN See also COMPILE DEL EDIT LIST NEW RUN STEPLINE STOP TROFF PROGRAMMING MANUAL trajexia Dd 3 2 240 SERVO Type Axis parameter Syntax SERVO Description SERVO para
205. celeration 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 origin return limit Arguments Example back REVERSE WAIT UNTIL IN 0 ON Wait for stop signal CANCEL See also AXIS CANCEL FORWARD RAPIDSTOP PROGRAMMING MANUAL trajexia 3 2 231 RS LIMIT Type Axis parameter Syntax RS LIMIT RSLIMIT Description RS LIMIT parameter contains the absolute position of the reverse soft ware 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 TJ1 MC__ will decelerate to 0 and then cancel the move Bit 10 of the AXISSTATUS axis parameter will be turned on while the axis position is smaller than below RS LIMIT Arguments Example No example See also AXIS FS LIMIT UNITS 3 2 232 RUN Type Program command Syntax RUN program name task number Description RUN command executes the program in the TJ1 MC as specified with program name RUN with the program name specification will run the cur rent selected program The program name can also be specified without quotes The task number specifies the task number on which the program will be run If the task
206. cision 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 is 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 The means used to detect limit positions of the moving part sensors switches etc e Origin home position or reference Possible positions of the moving part related to limit positions and origin position Trajexia includes some pre defined basic homing sequences DATUM 0 This is not really an origin search This command sets DPOS MPOS and cancels the axis errors DATUM 1 This does an origin search in forward direction using the Z mark of an encoder as homing switch DATUM 2 trajexia Does an origin search in reverse direction using the Z mark of an encoder as homing switch DATUM 3 Does an origin search in forward direction using the input selected in DATUM as homing switch DATUM 4 Does an origin search in reverse direction using the input selected in DATUM as homing switch e DATUM 5 Does an origin search in forward direction using the input selected in DATUM s
207. communication error 4 a data out Location in the TABLE where the expanded profile will be stored 3 Servo driver alarm 8 m expansion ratio 4 Forward limit 16 f 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 5 Reverse limit 32 r 10 6 Datuming 64 d Example No example 7 Feed hold input 128 h See also N A 8 Following error limit 256 e 9 Forward software limit 512 x 3 2 37 BASE 10 Reverse software limit 1024 y 11 Cancelling move 2048 Axis command 12 Encoder out overspeed 4096 Syntax BASE BASE axis 1 axis_2 axis 3 axis 4 axis 3 2 36 SPLINE T BA axis 1 2 axis 3 axis 4 axis Type Axis command Syntax B SPLINE type data in number in data out Description gt Expands an existing profile stored in the TABLE area using the B Spline math ematical function by a configurable expansion factor 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 PROGRAMMING MANUAL 51 0 BASIC commands Description Arguments Example 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 com m
208. computer cables may cause failures in external devices or the Motion Control Unit Caution Outputs may remain on due to a malfunction in the built in transis tor outputs or other internal circuits As a countermeasure for such problems external safety measures must be provided to ensure the safety of the system Caution The TJ1 will start operating in RUN mode when the power is turned on and if a BASIC program is set to Auto Run mode 20 0 Safety warnings and precautions 1 6 Unit assembly precautions Caution Install the unit properly Improper installation of the unit may result in malfunction Caution Be sure to mount the Termination Unit supplied with the TJ1 MC to the right most Unit Unless the Termination Unit is properly mounted the TJ1 will not function properly PROGRAMMING MANUAL trajexia 21 0 Trajexia system 2 Trajexia system 2 1 Introduction Trajexia is OMRON s motion platform that offers you the performance and the ease of use of a dedicated motion system Trajexia is a stand alone modular system that allows 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 Trajexia offers control of up to 16 axes over a MECHATROLINK II motion bus or traditional a
209. cription 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 Notes MECHATROLINK II command fails then the MECHATROLINK II sta tion will go into warning alarm state All subsequent commands will then return this warning alarm state even if the command is question is per formed correctly warning alarm state can only be cleared by the ALM CLR com mand There is ALM CLR subcommand so in order to send the ALM CLR you must enter commissioning mode Syntax Arguments Example No example See also N A Arguments Example See also PROGRAMMING MANUAL Axis parameter MERGE The MERGE parameter is a software switch that can be used to enable or disable the merging of consecutive moves With 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 example merging a forward move with a reverse move will cause an attempted instan taneous 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
210. cted via the MECHATROLINK II bus For axes connected HUNE via the TJ1 FLO2 DRIVE CONTROL sets outputs of the TJ1 STEP RATIO Sets the ratio for the axis stepper output FLO2 3 1 2 Axis parameters DRIVE INPUTS Holds data of the driver connected to MECHATROLINK II bus Data is updated every servo cycle DRIVE MONITOR Monitors data of the Servo Driverr connected to MECHATRO LINK 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 connected to TJ1 FL02 ENCODER CONTROL Controls operating mode of the EnDat absolute encoder ENCODER ID Returns the ID value of the absolute encoder connected to TJ1 FLO2 Name Description ACCEL Contains the axis acceleration rate ADDAX_AXIS Contains the number of the axis to which the base axis is cur rently linked to by ADDAX ATYPE Contains the axis type AXIS DISPLAY Selects information that are represented by the LEDs on the front cover of the TJ1 FL02 AXIS ENABLE Enables and disables particular axis independently of other axis AXISSTATUS Contains the axis status ENCODER RATIO Sets scaling value for incoming encoder counts PROGRAMMING MANUAL ENCODER STATUS Returns the status of the Tamagawa absolute
211. d and significant fluctuations which can occur particularly at low speeds It can be worthwhile to average several readings if a stable value is required at low speeds N A No example AXIS SERVO PERIOD VP SPEED UNITS PROGRAMMING MANUAL trajexia 3 2 184 MTYPE Type Syntax Description Arguments Example See also Axis parameter read only MTYPE The MTYPE parameter contains the type of move currently being executed The possible values are given in the table below MTYPE can be used to determine whether a move has finished or if a transi tion 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 N A No example AXIS NTYPE 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 116 0 lt BASIC commands Move number Move type 21 CONNECT 22 MOVELINK 3 2 185 NAIO Type System parameter read only Syntax NAIO Description This parameter returns the number of analogue input channels connected on the MECHATROLINK II expansion bus For example TJ1 MC__ will return 8 if the
212. d 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 parameter is set to the end of the previous move Example Assume that a motion is required to follow the position equation t x x 25 10000 1 cos x Here x is in degrees This example is for a TABLE that pro vides a simple oscillation superimposed with a constant speed To load the TABLE and cycle it continuously the following code would be used GOSUB camtable trajexia See also loop CAM 1 19 1 200 GOTO loop The subroutine camtable would load the data in the table below into the TABLE array ACCEL AXIS CAMBOX SPEED TABLE PROGRAMMING MANUAL 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 9000 54 0 3 2 42 CAMBOX Type Syntax Description Axis command CAMBOX start point end point table multiplier link distance link axis link option link position The CAMBOX command is used to generate m
213. d with by using DEL TABLE or NEW TABLE on the command line Notes A Applications like the CAM command CAMBOX command and the SCOPE command in Trajexia Tools all use the same TABLE as the data area Do not use the same data area range for different purposes 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 pro gram writes to the global variable at a time The TABLE and VR data in RAM will be lost when the power is switched off Arguments address The first location in the TABLE to read or write Range 0 63999 value The value to write at the given location and at subsequent locations PROGRAMMING MANUAL trajexia Een d Example TABLE 100 0 120 250 370 470 530 550 The above line loads an internal table as below 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 Table entry Value 100 0 101 120 102 250 103 370 104 470 105 530 106 550 3 2 257 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 Tools t
214. determined by the 5 arguments which are incre mental from the current position The arguments end 1 and centre 1 apply to the base axis and end 2 and centre 2 apply 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 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 Arguments 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 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 O to produce positive motion about the third possibly imagi nary orthogonal axis If the two axes involved in the movement form a left hand axis set direction to O to produce negative motion about the third possibly imaginary orthogonal axis See the ta
215. ds Mode Description 5 Host Link Slave protocol 6 Host Link Master protocol 3 2 244 SGN Type Mathematical function Syntax SGN expression Description The SGN function returns the sign of a number It returns value 1 for positive values including 0 and value 1 for negative values Arguments expression Any valid BASIC expression Example gt gt PRINT SGN 1 2 1 0000 See also N A 3 2 245 SIN Type Mathematical function Syntax SIN expression Description SIN function returns the sine of the expression Input values in radi ans and may have any value The result value will be in the range from 1 to 1 Arguments expression Any valid BASIC expression Example gt gt PRINT SIN PI 2 1 0000 See also N A PROGRAMMING MANUAL trajexia 9 3 2 246 SLOT Type Slot modifier Syntax SLOT Description gt Modifier specifies the unit number for a parameter such as COMMSTYPE Trajexia unit numbers are 0 to Arguments Example No example See also N A 3 2 247 SPEED Type Axis parameter Syntax SPEED Description SPEED parameter contains the demand speed in units s It can have any positive value including 0 The demand speed is the maximum speed for the speed profiled motion commands Arguments Example SPEED 1000 PRINT Set speed SPEED See also ACCEL AXIS DATUM DECEL FORWARD MOVE MOVEABS MOVECIRC MOVEMODIFY REVERSE UNITS 139 0
216. during power off The VR memory is also preserved when changing the battery if this is done quickly TABLE memory TABLE is commonly used if some data or value needs to be global which means that it is accessible from all programs in the project at the same time Whereas the VR memory is used for similar purposes to define several global data and values TABLE memory is used for much bigger amounts of global data which also need to be arranged in a certain order For this reason TABLE memory is commonly used for storing TABLE data motion profiles logging data etc Some BASIC commands that provide this type and size of data for example SCOPE CAM CAMBOX etc require use of TABLE memory to write their results The size of this memory is 64000 slots with indexes to 63999 The TABLE is accessible for reading and writing too but the way it is accessed differs for those two operations Before being read a particular TABLE memory slot needs to be defined and written first PROGRAMMING MANUAL trajexia using the command TABLE x value value2 where x is the index of the start TABLE memory slot to define and value value2 are the values written into the TABLE memory at indexes x x 1 Once defined and written the TABLE memory slot can be read using the TABLE x command where x is the index of the TABLE memory slot An attempt to read an undefined TABLE memory slot results in an error reported by the TJ1 MC__ The TABLE memo
217. e 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 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 PROGRAMMING MANUAL Showrumene trajexia 274 0 Examples and tips 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 happen most of the time when t
218. e Converting expressions into Reverse Polish Notation format for execution e Precalculating variable locations Calculating and embedding loop structure destinations As the compiling process requires some free memory expected compiling errors may be occurring when the amount of free memory is not sufficient PROGRAMMING MANUAL trajexia 2 6 3 Program execution The timing of the execution for the different tasks and the refreshing of the of the TJ1 MC__ revolves around the servo cycle period of the system The servo cycle period is determined by the SERVO PERIOD system parameter The TJ1 MC will either have a servo cycle period of 0 5 1 0 or 2 0 ms refresh The I O status of the TJ1 MC is refreshed at the beginning of every servo cycle captured status of the digital inputs is transferred to the IN system input variable Note that this is the status captured in the previous servo cycle analogue outputs for the speed references are updated The digital outputs are updated conform the status of the OP system output variable status of the digital inputs is captured Note that no automatic processing of the signals is taking place except for registration This implies that all actions must be programmed in the BASIC programs Relevant commands Trajexia Tools provides several ways of executing pausing and stopping the programs using buttons on the control
219. e SCOPE com mand is writing raw data to the TABLE array For example a The parameters are written in encoder edges per second and therefore 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 PROGRAMMING MANUAL Arguments Example Example See also trajexia 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 P1 Optional second parameter to store P2 Optional third parameter to store 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 parameter 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 a
220. e data in memory 2 Pull the top of the lid of the battery compartment away from the unit to open the battery compartment Pull the red and white wires to pull out the old battery Make sure you complete the next 2 steps within 30 seconds to prevent data loss in the RAM memory Disconnect the wires from the old battery Attach the wires to the new battery Insert the new battery into the battery compartment Close the lid of the battery compartment Dm o A g 7 3 1 7 3 1 System errors Indication Problem Solution No LEDs are on The power is off Turn the power on or flashing The TJ1 PRT is defective Replace the TJ1 PRT ERH LED is on Communication failure between Reset the TJ1 MC__ If this does TJ1 MC__ and TJ1 PRT not help replace the TJ1 MC ERC LED is on Unit error The TJ1 PRT is defec Replace the TJ1 PRT tive 302 0 Troubleshooting T 3 2 data communication problems trajexia Indication Problem Solution COMM LED is off and BF LED is on The PROFIBUS configuration is incorrect there is no communica tion with the master Check that the TJ1 PRT has the same station address as in the configuration of the master Check that no station address is used twice The PROFIBUS wiring is not cor rect e Check that the correct pins of the CN1 connector are connected Check that there are
221. e is in continuous mode the table data is not re read only the motion parameters are con tinuously read back from the controller Enabling Disabling of oscilloscope controls Whilst the oscilloscope is running all the oscilloscope con trols except the trigger button are disabled Hence if it is necessary to change the time base or vertical scale the oscilloscope must be halted and re started Display accuracy The controller records the parameter values at the required sample rate in the table and then passes the information to the oscilloscope Hence the trace displayed is accurate with respect to the selected time base How ever there is a delay between when the data is recorded by the controller and when it is displayed on the oscillo scope due to the time taken to upload the data via the communication link PROGRAMMING MANUAL trajexia 214 0 Trajexia Tools interface Samples per division The oscilloscope defaults to recording five points per horizontal time base grid division This value can be adjusted using the adjacent scroll bar To achieve the fastest possible sample rate reduce the number of samples per grid division to 1 and increase the time base scale to its fastest value 1 servo period per grid division Table range used for data capture The controller records the required parameter data values as table data prior to uploading these values to the window By default the lowest oscill
222. e 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 values 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 if the destination is another Trajexia system 0x00 Inte ger VR value 0x01 Integer TABLE value 0x02 float TABLE value PROGRAMMING MANUAL Example See also trajexia 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 argu ment timeout The number of milliseconds to wait for a response from the destination FINS server before timing out 1 1 IP2 IP3 4 Optional parameters that define the remote destination server IP address These arguments must be used if both the Trajexia system and the destination FINS server do not belong to same network A Trajexia system and an OMRON 1 PLC with Ethernet Unit CJ1W ETN11 System are connected to the same network The IP address of Trajexia sys tem is 192 168 0 5 The IP address of the PLC Ethernet Unit is 192 168 0 12 When you execute the command COMMS 0 0 12 0 82 1000 20 0 500 5000 192 168 0 12 20 words length 20 of DM P
223. e number of inputs outputs fitted to the system or connected on the MECHATROLINK II expansion bus A TJ MC with no MECHATROLINK II will return 32 The built in inputs are channels 0 to 15 The built in outputs are channels 8 to 15 Channels 16 to 27 can be used as virtual I Os which are connected together Input channels 28 to 31 are reserved to allow each axis to use the MECHATROLINK II driver input channels for axis control functions Arguments Example No example 117 0 BASIC commands See also N A 3 2 190 NOT Type Mathematical operation Syntax NOT expression Description 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 Arguments expression Any valid BASIC expression Example gt gt PRINT 7 AND NOT 1 6 0000 See also N A Bit Result 0 1 1 0 3 2 191 NTYPE Type Axis parameter read only Syntax NTYPE Description 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 MTYPE axis parameter NTYPE is cleared by the CANCEL 1 command Arguments Example No example PROGRAMMING MANUAL trajexia 0 See also AXIS MTYPE 3 2 192 OFF Type Constant read only Syntax OFF Description OF
224. e or more axes Axis parameters determine and monitor how an axis reacts on commands given and how it reacts to the outside world Every axis has a set of parameters so that all axes can work independently of each other The motion control commands are able to control one or more of the axes simultaneously while every axis has its own behavior The axis parameters are reset to their default values for each startup The commands and parameters work on some base axis or group of axes specified by the BASE command The BASE command is used to change this base axis group and every task has its own group which can be changed at any time The default base axis is O Individual axis dependent commands or parameters can also be programmed to work on a temporary base axis by including the AXIS function as a modifier in the axis dependent command A temporary base axis is effective only for the command or parameter after which AXIS appears Task statements The task parameters apply to a single task The task parameters monitor the task for example for error handling The PROC modifier allows the user to access a parameter of a certain task Without PROC the current task is assumed The BASE command see above is task specific and can be used with the PROC modifier System statements These statements govern the overall system features which are basically all statements which do not belong to the first two groups 2 3 2 Memory areas Three main me
225. e output start is the start address of the output data range of VR variables Output count is the number of VR variables in the output data range input start is the start address of the input data range of VR variables input count is the number of VR variables the input data range Note H The maximum number of VR variables to exchange data is 122 PROGRAMMING MANUAL trajexia 167 O E Communication protocols After you have executed the command PROFIBUS unit number 2 data arrays are automatically exchanged The data exchanged between the TJ1 PRT and the PROFIBUS master is in 16 bit integer format Each word exchanged ranges from 32768 to 32767 A VR variable can hold a 24 bit number and it can also hold fragments The exchange with the PROFIBUS master does not support values outside the range 32768 32767 and fragments An example sequence to configure the TJ1 PRT unit is as follows 1 Setthe unit number with the two rotary switches of the TJ1 PRT unit 2 Switch on the power to the system The RUN LED lights The fig 5 trajexia ERH LED flashes 3 Create a BASIC Program containing the command PROFIBUS 2 2 1 10 7 150 3 In this example the system initializes a TJ1 PRT unit with unit number 2 The system sends seven output words from the master to the VR s 10 to 16 and three input words from the VR s 150 to 152 to the master 4 the configuration is successful the RUN L
226. e 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 Note If using Flexible axis absolute encoder axis it is essential to set this parameter for the axis before setting the ATYPE Arguments Example 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 PROGRAMMING MANUAL Example See also trajexia 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 3 2 95 ENCODER_CONTROL Type Syntax Description Arguments Example Example See also Axis parameter ENCODER_CONTROL value The ENCODER_CONTROL parameter is applicable only applicable only to Flexible axis absolute EnDat axis with ATYPE value 47 The parameter con trols the mode in which EnDat encoder return their position The encoder can be set to either cyclically return its position of it can be set to a parameter read write mode The default after initialization is cyclic position return mode For more information see EnDat absolute encoder interface specification N A ENCODER CONTROL AXIS 1 0 This command sets cyclic position return mode ENCODER CONTROL AXIS 1 1 This command sets par
227. e value is assumed to be 1 While variable is less than or equal to end the block of commands is repeat edly executed until variable is greater than end at which time program execu tion will continue after NEXT Note FOR NEXT statements can be nested up to 8 levels deep in a BASIC program variable A BASIC expression start A BASIC expression A BASIC expression increment A BASIC expression commands One or more BASIC commands FOR opnum 8 TO 13 OP opnum ON NEXT opnum This loop turns on outputs 8 to 13 PROGRAMMING MANUAL Example Example See also trajexia loop FOR dist 5 TO 5 STEP 0 25 MOVEABS dist GOSUB pick up NEXT dist The STEP increment can be positive or negative 1 1 8 loop2 FOR 12 4 6 MOVEABS 11 100 12 100 GOSUB 1000 NEXT 12 NEXT 11 FOR TO STEP NEXT statements can be nested up to 8 levels deep pro vided the inner FOR and NEXT commands are both within the outer FOR TO STEP NEXT loop REPEAT UNTIL WHILE WEND 85 0 BASIC commands 3 2 125 FORWARD Type Syntax Description Arguments Example See also 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
228. eNet master is located no outputs The number of output words from the DeviceNet master in VR memory start inputs The starting address in VR memory of the controller where the input data for the DeviceNet master is located no inputs The number of input words to the DeviceNet master in VR memory 65 0 BASIC commands Example DEVICENET 0 2 1 10 16 150 31 In this example the TJ1 DRT is configured to exchange data with DeviceNet master with 16 output words received from the master located at VR 10 to VR 25 and 31 input words sent to the master located at VR 150 to VR 180 See also N A PROGRAMMING MANUAL trajexia Bit Value Description 0 0 DEVICENET unit number 2 not executed yet 1 DEVICENET unit number 2 executed without error 1 0 No DeviceNet I O connection 1 DeviceNet connection running 2 0 VR variables in the output data range have been updated 1 VR variables in the output data range have not been updated yet 3 0 DeviceNet I O connection size matches the DEVICENET unit number 2 command 1 DeviceNet I O connection size does not match the DEVICENET unit number 2 command 4 7 0 Always zero 8 0 Network power OK 1 Network power failure 9 0 No BUSOFF occurred 1 BUSOFF occurred 10 0 No node address duplication error Node address duplication error 66 0 BASIC commands 3 2
229. ectively 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 yencoder counts UNITS Pn203 units where y is the number of encoder counts and x is the amount in user units PROGRAMMING MANUAL fig 18 Trajexia MOVE x reference units the minimum unit you can set internally to the servo driver UNITS trajexia Servo Driver encoder counts the ultimate minimum distance you can recognize and depends on the encoder Pn202 Pn203 240 0 Examples and tips Example 1 The mechanical system consists of a simple rotary table A servo 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 s 13 1 revolution 2 encoder counts 10 motor revolution 1 machine cycle 1 360 13 bit incremental 1 10 Gear The combination of these equations results in encoder 13 Pn202 ms 2
230. ed 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 3 2 49 3 2 198 and 3 2 219 There are two types of windowing 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 internal 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 15 the captured position inside the inclusive window or outside the exclusive window e If yes MARK 1 and REG POS is updated df not return to point 2 trigger the latch again transparently to the user PROGRAMMING MANUAL trajexia fig 35 OPEN WIN 20 CLOSE WIN 40
231. editing deleting etc NEW Deletes the current selected program a specified program or all programs DIR Lists the directory of all programs COPY Duplicates a specified program RENAME Renames a specified program DEL Deletes the current selected program or a specified program LIST Lists the current selected program or a specified program 30 0 Trajexia system 2 6 2 Program compilation TJ1 MC q system compiles programs automatically when required It is not normally required to force the TJ1 MC___ to compile programs but programs can be compiled under the Program menu in Trajexia Tools The TJ1 MC automatically compiles programs at the following times selected program is compiled before it is executed if it has been edited selected program is compiled if it has been edited before switching the selected program to another program e selected program is compiled by using the COMPILE command The program syntax and structure are checked during compilation If compilation is unsuccessful a message will be provided and no program code will be generated A red cross will appear in the Trajexia Tools directory box Programs cannot be run when compilation errors occur The errors should be corrected and the program recompiled The compilation process also includes the following Removing comments Compiling numbers into the internal processor format
232. ee also System command SET BIT bit number vr number The SET BIT command sets the specified bit in the specified VR variable 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 PROGRAMMING MANUAL trajexia 9 3 2 243 SETCOM Type Communication command Syntax SETCOM baud rate data bits stop bits parity port number mode Description SETCOM command sets the serial communications for the serial ports The command will enable the Host Link protocols or define the general pur pose communication The serial ports have 9 600 baud 7 data bits 2 stop bits even parity and XON XOFF enabled for general purpose communication by default These default settings are recovered at start up Arguments rate 1200 2400 4800 9600 19200 38400 data bits 7 8 stop bits 1 2 parity 0 None 1 2 Even port number See the first table below mode Select one of the modes listed in the second table below for serial ports 1 and 2 Example No example See also N A port_number value Description 1 RS 232C serial port 1 2 RS 422A 485 serial port 2 Mode Description 0 General purpose communication no XON XOFF mechanism 138 0 BASIC comman
233. ence value being applied to the Servo MERGE Is a software switch that can be used to enable or disable the Driver for both open as closed loop merging of consecutive moves SERVO Determines whether the axis runs under servo control or open MPOS Is the position of the axis as measured by the encoder loop SPEED Contains the demand speed in units s PROGRAMMING MANUAL 35 0 BASIC commands 3 1 4 Constants trajexia Name Description SRAMP Contains the S curve factor REF Contains the torque reference value which is applied to the servo motor TRANS DPOS Contains axis demand position at output of frame transforma tion 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 3 1 3 Communication commands and parameters Name Description FINS COMMS Sends FINS Read Memory and Write Memory to a designated FINS server unit HLM COMMAND Executes a specific Host Link command to the Slave HLM READ Reads data from the Host Link Slave to either VR or TABLE var iable array HLM STATUS Represents the status of the last Host Link Master command HLM TIMEOUT Defines the Host Link Master timeout time HLM WRITE Writes data to the Host Link Sl
234. encoder 34 0 BASIC commands trajexia Name Description Name Description ENCODER TURNS Returns the multi turn count of the absolute encoder MSPEED Represents the change in the measured position in the last ENDMOVE Holds the position of the end of the current move servo period ERRORMASK Contains the mask value that determines if ERROR Contains the type of move currently being executed occurs depending on the axis status NTYPE Contains the type of the move in the Next Move buffer FAST JOG Contains the input number to be used as the fast jog input OFFPOS Contains an offset that will be applied to the demand position FASTDEC Defines ramp to zero deceleration ratio when an axis limit switch without affecting the move in any other way or position is reached OPEN WIN Defines the beginning of the window in which a registration FE Contains the Following Error markis expected FE_LATCH Contains the FE value which caused the axis to put controller in 2 limit thatrestricts the speed rererence Output from MOTION_ERROR state FE LIMIT Contains the maximum allowable Following Error OV_GAIN Contains the output velocity control gain FE LIMIT MODE Defines how FE influences ERROR state P GAIN Contains the proportional control gain FE RANGE Conta
235. ended for personnel with knowledge of electrical systems electrical engineers or the equivalent who are responsible for the design installation and management of factory automation systems and facilities 1 2 General precautions The user must operate the product according to the performance specifications described in this manual 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 safety equipment petrochemical plants and other systems machines and equipment that can have a serious influence on lives and property if used improperly consult your OMRON representative 1 3 A Safety precautions WARNING Do not attempt to take the Unit apart and do not touch any of the internal parts while power is being supplied Doing so may result in electrical shock WARNING Do not touch any of the terminals or terminal blocks while power is being supplied Doing so may result in electric shock A PROGRAMMING MANUAL gt gt gt PB gt trajexia WARNING Never short circuit the positive and negative terminals of the bat teries charge the batteries disassemble them deform them by applying pressure or throw them into a fire The batteries may explode combust or leak liquid WARNING Fail safe measures must be taken by the customer to ensure safety in the event of incorrect missing or abn
236. ents Example See also 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 modifier to access the parameter for a certain task Without PROC the current task will be assumed N A gt gt PRINT ERROR LINE PROC 4 23 0000 BASICERROR PROC RUN ERROR 77 0 BASIC commands trajexia ccc o 3 2 107 ERRORMASK 3 2 108 ETHERNET Type Axis parameter Type System command Syntax ERRORMASK Syntax ETHERNET function unit number parameter values Description ERRORMASK axis parameter contains a mask value that is ANDed bit Description command ETHERNET is used to read and set certain functions of Ether by bit with the AXISSTATUS axis parameter on every servo cycle to deter mine if a motion error has occurred When a motion error occurs the enable switch WDOG will be turned off the MOTION ERROR parameter will have value 1 and the ERROR AXIS 4 Arguments 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 Arguments Example No example See also AXIS AXISSTATUS MOTION ERROR WDOG Example Caution Itis up to the user to define in wh
237. er program running on a different task can read that same value from VR 25 This is very useful for synchronizing two or 25 0 Trajexia system more tasks but care must be taken to avoid more than one program writing to the same variable at the same time The controller has 1024 global variables VR 0 to VR 1023 The variables are read and written using the VR command Local variables Named variables or local variables can be declared in programs and are local to the task This means that two or more programs running on different tasks can use the same variable name but their values can be different Local variables cannot be read from any task except for the one in which they are declared Local variables are always cleared when a program is started The local variables can be cleared by using either the CLEAR or the RESET command A maximum of 255 local variables can be declared Only the first 16 characters of the name are significant Undefined local variables will return zero Local variables cannot be declared on the command line The TABLE and VR data can be accessed from the differ ent running tasks When using either VR or TABLE varia bles make sure to use only one task to write to one particular variable This to avoid problems of two program tasks writing unexpectedly to one variable Labels The BASIC programs are executed in descending order through the lines Labels can be used to alter this execu
238. ers off The above programming can also be written as follows OP OP AND 65280 PROGRAMMING MANUAL Example See also trajexia 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 out puts by using masking IN 3 2 198 OPEN WIN Type Axis parameter Syntax OPEN WIN OW Description 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 Arguments N A Example No example See also CLOSE WIN REGIST UNITS 3 2 199 OR Type Mathematical operation Syntax expression1 OR expression2 Description The OR operator performs the logical OR function between corresponding bits of the integer parts of two valid BASIC expressions The logical OR function between two bits is defined as in the table below Arguments 1 Any valid BASIC expression expression2 Any valid BASIC expression 120 0 BASIC commands Example Example 1 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 equivalent to the following result 10 OR 18 Therefore result will contain the value 26 Example 2 Example result 10 OR 18 The OR is a
239. ers presented here can be found in chapter 3 2 3 The BASIC language consists among others of commands functions and parameters These BASIC statements are the building blocks provided to control the TJ1 MC operation Commands are words recognized by the processor that perform a certain action but do not return a value For example PRINT is a recognized word that will cause the value of the following functions or variables to be printed on a certain output device Functions are words recognized by the processor that perform a certain action and return a value related to that action For example ABS will take the value of its parameter and return the absolute value of it to be used by some other function or command For example ABS 1 will return the value 1 which can be used by the PRINT command for example to generate a string to be output to a certain device Parameters are words recognized by the processor that contain a certain value This value can be read and if not read only written Parameters are used to determine and monitor the behavior of the system For example ACCEL determines the acceleration rate of a movement for a certain axis BASIC programming 2 3 4 Axis system and task statements The commands functions and parameters apply either to one of the axes the tasks running or the general system PROGRAMMING MANUAL trajexia Axis statements The motion control commands and the axis parameters apply to on
240. es PROGRAMMING MANUAL 4 3 2 HostLink slave trajexia If the TJ1 MC is the Host Link slave a Host Link master for example a programmable terminal can read data from the TJ1 MC write data to it The mapping between the slave and the master is TJ1 MC memory Host Link mapping Address range VR CIO 0 to 1023 TABLE DM 0 to 63999 You can use these BASIC commands BASIC command Description SETCOM SETCOM configures the serial communication port and it enables the Host Link protocols HLS NODE HLS NODE defines the slave unit number for the Host Link Slave protocol HLS MODEL HLS MODEL defines the TJ1 MC__ model code for the Host Link Slave protocol Commands The commands supported for the Host Link Slave protocol are given in the table below The protocol supports single frame transfer and multiple frame transfer Type Header code Name Function I O memory read RR CIO AREA Reads the specified number of ing READ words from VR memory begin ning with the designated word RD DM AREA Reads the specified number of READ words from TABLE memory beginning with the designated word 163 0 Communication protocols mand response only Type Header code Name Function I O memory WR CIO AREA Writes the specified data in word writing WRITE units to VR memory begin
241. es the unit conversion factor to allow the positions to be set in convenient units First the unit conversion factor must be calculated and set Each pulse on an encoder gives four edges for the TJ1 MC 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 en The switch must be enabled to work set the enable to 1 axis The shaft is controlled by axis O 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 REPDIST 360 REP OPTION ON PSWITCH 0 ON 0 11 0N 80 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 PROGRAMMING MANUAL trajexia 0 3 2 215 RAPIDSTOP Syntax RAPIDSTOP RS Description RAPIDSTOP command cancels the current move on all axes from the current move buffer MTYPE Moves for speed profiled move commands MOVE MOVEABS MOVEMODIFY FORWARD REVER
242. ess is successful To complete the process select Yes in the dialog confirmation window Open the Controller Configuration window to check the new system version Full directory Use to check the contents and file structure of the TJ1 MC__ directory recton es Type Source Code Run Proc Program Status tine Lock Unlock RE RTUP BASI PRI STAF 945 708 Man Lock the Trajexia system to prevent unauthorised access When the Trajexia system is locked it is not possible to list edit or save any of the Trajexia programs The Trajexia system is not available through the Trajexia Tools software although the terminal and unlock dialog boxes are available Type a 7 digit number to lock the system Use the same number to unlock the system PROGRAMMING MANUAL 202 0 Trajexia Tools interface 5 5 3 Program menu The program menu contains menu items to enable programming a Trajexia project New Creates a new program Edit Opens a project for editing You can also launch the editor from the control panel From the program menu you will first be prompted with a program selector dialog to confirm the file you wish to edit The Trajexia Tools Editor is designed to operate in a similar manner to any simple text editor found on a PC Standard operations such as block editing functions text search and replace and printing are all supported and conform to the s
243. et port of the PC 4 Connect the Ethernet cable to the Ethernet port of the TJ1 MC__ The IP address of the TJ1 MC__ shows 4 times in the LED display 5 When you start Trajexia tools software it tries to communicate with the controller When you start Trajexia Tools for the first time the communication settings are not the suitable ones so you have to cancel see fig 12 and set your communication settings PROGRAMMING MANUAL 00000000 8 d Un Si cz un B ua 168 uma HEE ET utis uma 186 O E Trajexia Tools interface tra y 6 Start the Trajexia Tools program on your Select from the fig 12 Windows Start menu Programs omnon OMRON 2 Trajexia Tools Motion Perfe 4 09909 Trajexia Tools cra 7 Trajexia Tools startup screen shows Wait until the Cancel button is visible Then click Cancel Checking 1 9500 7 2 gt No controller found COM1 8 Select the menu fig 13 Options Motion Perfect 2 E Communications Project Controller Program Tools External els m Loca 4 Controller status General Options Fived Editable CAN Drive Options n FERAI j stics Drives Enabled Diagno Terminal Font T 5 Program Compare CX Drive Configuration FINS Configuration Se
244. eter 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 will not run Arguments Example No example See also N A 3 2 45 CHR Type I O command Syntax CHR x Description 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 Arguments x A BASIC expression Example gt gt PRINT CHR 65 A See also N A 56 0 BASIC commands 3 2 46 CLEAR Type System command Syntax CLEAR Description The CLEAR command resets all global VR variables to 0 When you use it in a program it also resets the local variables on the current task to 0 Arguments Example No example See also RESET VR 3 2 47 CLEAR BIT Type System command Syntax CLEAR BIT bit number vr number Description CLEAR command resets the specified bit in the specified VR varia ble to 0 Other bits in the variable keep their values Arguments 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 Example No example See also READ BIT SET BIT VR 3 2 48 CLEAR PARAMS Type System command Syntax CLEAR PARAMS Description Clears all variables and parameters stored in flash EPROM to their defau
245. ether 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 3 1 1 Axis commands Name Description ACC Changes the ACCEL and DECEL at the same time ADD DAC Sum to the DAC value of one axis to the analogue output 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 cur rently being executed B SPLINE Expands the profile stored in TABLE memory using the B Spline mathematical function FORWARD Moves an axis continuously forward at the speed set in the SPEED parameter HW PSWITCH Sets and off the hardware switch on output 0 of the TJ1 FLO2 when predefined positions are reached PROGRAMMING MANUAL MECHATROLINK Initializes MECHATROLINK II bus and performs various operations on MECHATROLINK II stations connected to the bus 33 0 BASIC commands trajexia Name Description Name Description MHELICAL Interpolates 3 orthogon
246. exia Example 3 The mechanical system uses a servo motor with an 17 bit absolute fig 21 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 M The mechanical measurement units must be mm This means that c all axis parameters and commands given to Trajexia are expressed 17 bit absolute 1 6 31 in mm Using the same procedure as in example 1 the equation Gear 320 2 1 expressing the relationship between user units and encoder counts 1 turn 320mm move is Total length perimeter of belt 4160 17 Pn202 2 counts 6 31 motor revolution 1 revolution Pn203 1 motor revolution 1 pulley revolution 320mm 7 17 2 6 31 encoder counts 320 mm Therefore Pn202 27 6 34 2 631 4 631 42 631 9 631 UNITS 2 227 2 Pn203 320 2 1000 8 125 25425 125 One solution is UNITS 2 512 Pn202 631 Pn203 125 Note that we have not used the pulley radius in the calculation This is to avoid the use of x 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 PROGRAMMING MANUAL 246 0 Examples and tips trajexia m motor revolution
247. f the agreement JMPORTANT By installing this package you agree to be bound by the following Software License Agreement If you do not agree please return the enclosed software Software without installing this package to the shop where you bought the Software The warranty service set forth in Section 7 of the Software License Agreement and any information on the Software and its revision and new version will not be provided to you unless you register as an user of the Software by the enclosed user registration card Please promptly fill in the card and send it to OMRON Corporation Do you accept all the terms of the preceding License Agreement If you Print select No the setup will close To install TrajexiaTools you must accept this agreement 7 Type your name in the Name field fig 4 8 Type your company name in the Company field 9 Type your user licence number in the Licence fields Your user User Information licence number is on the label attached to the jewel case of the En Traj exi a Too Is C D 3 Please enter your name the name of the company for whom you work and the product licence number shown on the CD case 10 Click Next Name Your name Company Your company Licence lt Back Cancel 11 Click Yes fig 5 Registration Confirmation You have provided the following registration information Name Your name Company Your company Serial Number
248. f the fre quency inverter 3 1 11 System parameters INVERTER WRITE Writes to parameter speed and torque reference of the fre quency inverter LIST GLOBAL Shows all GLOBAL and CONSTANT variables LOCK Prevents the programs from being viewed or modified PROFIBUS Configures the TJ1 PRT PROFIBUS DP Slave Unit to exchange data with the master and returns the status of the TJ1 PRT READ BIT Returns the value of the specified bit in the specified VR varia ble RESET Resets all local variables on a task PROGRAMMING MANUAL Name Description AIN Holds the value of the analog channel AOUT Holds the value of the analog channel BATTERY LOW Returns the current status of the battery condition CHECKSUM Contains the checksum for the programs in RAM COMMSERROR Contains all the communications errors that have occurred since the last time that it was initialised CONTROL Contains the type of TJ1 MC in the system D ZONE MAX Controls the DAC output in conjunction with the Following Error value 39 0 BASIC commands trajexia 3 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 particular process to be accessed Na
249. finitelly lost program alarm 3 STOP ENDIF ENDIF ENDIF Wait until the feed movement has finished WAIT IDLE GOTO loop I 6 2 7 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 PROGRAMMING MANUAL trajexia 293 0 Examples and tips motion provides a smooth acceleration without sudden acceleration changes so the material slip is minimized It gives a fast deceleration so the cycle time is reduced During deceleration there is no material slip and the friction helps to the stop to zero Example Start GOSUB filltable WDOG 1 Set servos to RUN BASE 1 SERVO 1 Enable position loop in axis 1 BASE 0 SERVO 1 Enable position loop in axis O0 The position counter counts from 0 to 11999 then back to 0 again D EP OPTION 1 EP DIST 12000 PEED 200 FORWARD BASE 1 loop CAMBOX in tbl end tbl l lnk dst master opt start WAIT IDLE GOTO loop T filltable The shape of the CAM is stored in TABL 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 e to PROGR
250. following values depending on the outcome of the execution 1 The command executed successfully command failed 1 Request was not sent because the client or the FINS protocol is busy 2 One or more of the request parameters is invalid 3 Invalid source memory area PROGRAMMING MANUAL trajexia 4 Request was sent but no response from the remote server was received within the timeout period 5 Anerror response code was received from the remote server 4 3 Serial protocol The TJ1 MC TJ1 MC has a DB 9 connector that contains two serial ports Port 1 RS232 Port 2 RS422 or RS485 depending on the switch settings See the Trajexia Hardware Reference manual for details Both ports can independently support these protocols Host Link master e Host Link slave e User defined protocol Note The serial port port 1 CANNOT be used for program ming the unit 4 3 1 If the TJ1 MC is the Host Link master you can send BASIC commands to a Host Link slave for example a PC When you send a BASIC command to a Host Link slave the execution of the next BASIC command waits until the Host Link slave sends a response Host Link master You can use these BASIC commands BASIC command HLM COMMAND Description HLM COMMAND executes a specific Host Link command to the slave 158 0 Communication protocols BASIC command Description
251. forward TRIGGER Start tracing and storing of parameters WHILE NOT MOTION ERROR Cambox that will start in AXIS 0 position 1 CAMBOX 0 999 UNITS 10 0 2 1 WAIT UNTIL MPOS AXIS 0 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 m U 2 HI R R F D S A D D S d I I PROGRAMMING MANUAL 272 0 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 J To view the capture result in the oscilloscope of Trajexia Tools you must make the settings in the Oscilloscope Configuration window as given in the figure You must also disable further capturing to avoid mixing the results of two different captures in the same Table memory entries trajexia Examples and tips fig 44 Oscilloscope Configuration Oscilloscope Samples per division this may be reduced by Motion Perfect due to limitations imposed by the system servo period p F Table range used for data capture From 15000 14999 Table Data Graph Points per division Fit to displa
252. from the servo loop The offset is applied after the DAC SCALE function An offset of 327 will represent an offset of 0 1 volts It is suggested that as offset of 6596 to 7096 of the value required to make the stage move in an open loop situation is used Arguments Example No example See also N A 3 2 207 POWER UP Type System parameter Syntax POWER UP Description 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 cannot be included in programs This value is normally set by Trajexia Tools Arguments Example No example See also EPROM PROGRAMMING MANUAL trajexia 3 2 208 PRINT Type Syntax Description Arguments Example Example Example command PRINT expression expression expression expression The PRINT command outputs a series of characters to the serial ports PRINT can output parameters fixed ASCII strings and single ASCII characters By using PRINT n any port can be selected to output the information to Multiple items to be printed can be put on the same line separated by a comma or a semi colon A co
253. g DNS server addresses Preferred DNS server Alternate DNS server PROGRAMMING MANUAL 190 Trajexia Tools interface trajexia 5 3 Projects 5 3 1 Trajexia Tools Projects Projects makes the design and development process of an fig 20 Archivo Edici n favoritos Herramientas gt application easier A hard disk copy of all the programs parameters and data is available on the PC that is used to program the system 0 The user defines a project Trajexia Tools keeps the consistency between the project on the PC and the Trajexia system Programs that are edited are automatically duplicated on the PC A Trajexia Tools project consists of a project prj that contains the Trajexia configuration the Servo Driver parameters and a set of bas programs Those files are stored in a folder with the same name or the file Note EH A program that is made on one computer cannot be cor rectly opened in another To avoid this problem copy the complete project directory from one computer the other PROGRAMMING MANUAL B squeda G Carpetas Direcci n D Mis documentos ymynewproject backup B LastOpen txt gt MYAPPLICATION bas e mynewnproject prj gt STARTUP BAS 5 objeto s 4 57 KB Mi Pc 191 0 Trajexia Tools interface 5 3 2 gt Check Project window Trajexia Tools
254. gma ll Servo Driver with one difference There is only physical input and one logical latch too so no settings of Servo DriverServo Driver parameters are necessary The physical input is associated to logical latch EXT1 and only the rising signal edge can be used for registration Registration in the TJ1 FL02 The TJ1 FLO2 has two physical registration inputs and two latch circuits per encoder input 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 TJ1 FLO2 at the same time refer to sections 3 2 170 3 2 171 3 2 217 3 2 218 and 3 2 219 The delay in the capture is 0 5 us Because the encoder position is read continuously from the line drive encoder input interpolation is not necessary The delay for the transmission of the captured information is just one SERVO PERIOD cycle PROGRAMMING MANUAL fig 33 trajexia Latch input Position gt Interpolated position 261 O E Examples and tips trajexia 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
255. gt mE 29 2 9 Commatid line Interface eee RE ERE 30 2 6 BASIC gt 11 ce 30 2 6 1 Managing amp MM 30 202 Program comlhpllation can uda Eu Ra ae 31 2 0 9 Programi execution 2 ee reo pP p b rote S prete 31 3 BASIC commands m R 33 31 33 3 1 4 AXIS COMMIMANGS seuss X 33 3 1 2 1002 110 ai a a 34 3 1 3 Communicatiori commarids and 22 a ES 36 36 3 1 5 lO commands furictioris and parameters 36 3 1 6 Mathematical functions and
256. h 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 PROGRAMMING MANUAL fig 51 trajexia 287 0 Examples and tips Example start WAIT UNTIL 1 SPEED 10 FORWARD WAIT UNTIL 2 PRINT Product Position SPEED 100 MOVEABS 0 WAIT IDLE GOTO start PROGRAMMING MANUAL prod pos fig 52 INO trajexia IN 2 speed A Forward CANCEL WAIT IDLE N SPEED 10 FORWARD WAIT UNTIL 2 Moveabs Start WAIT UNTIL 1 WAIT UNTIL 1 PRINT Product position SPEED 100 MOVEABS 0 WAIT IDL E 288 0 Examples and tips 6 2 5 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 PROGRAMMING MANUAL fig 53 trajexia 289 O E Examples and tips Example nozzle 8 start FOR 0 4 FOR y 0 TO 4 MOVEABS x 200 y 200 WAIT IDLE OP nozzle ON GOSUB square rel OP nozzle OFF NEXT y NEXT x G
257. hanged using the AXIS modifier like with all the other axis commands 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 parame ter 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 num bers are hexadecimal The format of the data can be found in the Servo Driver manual size For most parameters the size is normally 2 bytes Some special parame ters 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 successful execution 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 PROGRAMMING MANUAL A trajexia Caution Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Driver when executing this command Oth erwise the program task will be paused until the connection of the other device to the Servo Driver is removed 3 2 87 DRIVE RESET Type Axis command Syntax DRIVE RESET
258. he Following Error 3 2 69 DATUM IN Type Syntax Description Sigma 11 Sigma 111 PROGRAMMING MANUAL Axis parameter DATUM IN DAT IN The DATUM 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 TJ1 MC O connector and are common for all axes Values 16 to 27 represent software inputs which can be freely used in programs and commands such as IN and OP These are also common for all axes Values 28 to 31 are directly mapped to driver inputs present on CN1 connector and they are unique for each axis Which driver inputs are mapped to inputs 28 to 31 depends on Servo Driver parameter Pn81E setting Recommended setting is Pn81E 0x4321 with the following mapping 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 input 28 1 40 input 29 CN1 41 input 30 CN1 42 input 31 CN1 43 input 28 CN1 13 input 29 CN1 7 input 30 1 8 input 31 CN1 9 63 0 BASIC commands Junma input 26 1 2 input 27 CN1 1 For more information on setting driver parameter Pn81E refer to the Servo Driver manual As default the parameter is set t
259. he 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 devices are connected and initialized For an example of a start up program see section 6 1 1 It is recommended to let the start up program when it is finished start only one program that takes care of the safety and integrity
260. he last time that it was initialized The bits in COMMSERROR are given in the table below Arguments Example No example See also N A Bit Description Error location 8 Port 1 Rx data ready Serial port 1 9 Port 1 Rx Overrun Serial port 1 10 Port 1 Parity Error Serial port 1 11 Port 1 Rx Frame Error Serial port 1 12 Port 2 Rx data ready Serial port 2 13 Port 2 Rx Overrun Serial port 2 14 Port 2 Parity Error Serial port 2 15 Port 2 Rx Frame Error Serial port 2 PROGRAMMING MANUAL trajexia 3 2 52 COMMSTYPE Type Syntax Description Arguments Example See also Slot parameter COMMSTYPE SLOT unit number This parameter returns the type of unit in a controller unit The table below lists the return values unit number Unit numbers are 0 to 6 with 0 being the unit immediately to the right of the TJ1 MC No example N A Return value Description 0 Unused unit 31 TJ1 ML__ 33 TJ1 FLO2 34 TJ1 PRT 35 TJ1 DRT 3 2 53 COMPILE Type Syntax Description Arguments Example See also Program command COMPILE The COMPILE command forces the compilation the current program to inter mediate code Program are compiled automatically by the system software prior to program execution or when another program is selected N A No example N A 58 0 3 2 54 CONNECT Type Syntax Description Arguments
261. he 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 Example 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 See also DEL NEW TABLE 146 0 BASIC commands 3 2 270 UNITS Type Axis parameter Syntax UNITS Description UNITS parameter contains the unit conversion factor The unit conversion 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 a user unit Axis parameters like speed acceleration deceleration and the Axis com mands 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 system Arguments Example 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 One rev is equal to 5mm Therefore there are 4 000 5 800 edges mm UNITS is thus set
262. hile keeping the devices under one motion bus PROFIBUS DP The PROFIBUS DP slave allows connectivity to the PROFIBUS network in your machine DeviceNet The DeviceNet slave allows connectivity to the DeviceNet network in your machine 2 1 2 This manual This Programming Manual gives the dedicated information for description and use of the BASIC commands communication protocols necessary for the Trajexia system The use and description of the parts of the Trajexia Tools interface Program examples and good programming practices e Troubleshooting and fault finding 2 2 Multitasking BASIC programming The TJ1 MC units Motion Controller Unit feature a multitasking version of the BASIC programming language The motion control language is largely based upon a tokenised BASIC and the programs are compiled into the tokenised form prior to their execution 23 0 Trajexia system Multitasking is simple to set up and use and allows very complex machines to be programmed Multitasking gives the TJ1 MC significant advantage over equivalent single task systems It allows modular applications where the logically connected processes can be grouped together in the same task program thus simplifying the code architecture and design The TJ1 MC can hold up to 14 programs if memory size permits The execution of the programs is user controlled using BASIC The BASIC commands functions and paramet
263. his system parameter for the TJ1 MC 5 262 59 0 BASIC commands Arguments Example See also N A No example N A 3 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 specified without quotes Note This command is implemented for an offline VT100 terminal Within Trajexia Tools users can select the command from the Program menu 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 3 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 Arguments expression Any valid BASIC expression Example gt gt PRINT COS 0 1 0000 PROGRAMMING MANUAL trajexia See also N A 3 2 59 CREEP Type Axis parameter Syntax CREEP Description 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 O The creep speed is entered in units with the unit conversion factor UNITS For example if the unit conversion factor is set to
264. iables PRINT PRINT outputs a series of characters to a serial output device Example Assume a set up with system with TJ1 MC An OMRON Vision system F500 Aconnection from the serial port of the TJ1 MC to the F500 The serial port uses RS232 port 1 communication This program sends a Vision command through the serial port reads the response from the Vision system writes it to VR variables and prints the results in the Terminal window of Trajexia Tools PROGRAMMING MANUAL 165 O E Communication protocols trajexia med In the STARTUP program PRINT k count Setting RS232 port for the vision system TABLE count k SETCOM 38400 8 1 0 1 0 PRINT count In the application program UNTIL 5 lt 0 k 13 Trigger rising edge in virtual system PRINT Received count 0 characters WAIT UNTIL 30 0 FOR i 1 TO count WAIT UNTIL 30 1 IF TABLE i lt gt 13 THEN Clear screen PRINT CHR TABLE 1 PRINT CHR 27 2J ELSE PRINI Clear buffer ENDIF GOSUB clear buffer NEXT i IF TICKS 0 THEN Send command to the serial port according to VR 10 PRINT Timeout in the communication with the F500 IF vision command v measure THEN resp status 3 PRINT 4
265. ial port of the TJ1 MC for the Host Link Slave protocol Set the command as follows SETCOM baudrate data bits stop bits parity port 5 After you have set this command the TJ1 MC responds to Host Link commands from the master with the specified node number You can set this node number with the HLS NODE parameter Example In this example we assume this set up system with a TJ1 MC An NS8 programmable terminal Aconnection from the serial port of the TJ1 MC to the programmable terminal The serial port uses RS232C communication Example Configuration of the Host Link slave trajexia BASIC code Define Host Link slave node HLS NODE 15 Define Host Link slave model code HLS MODEL FA Set up Host Link slave for port 1 SETCOM 9600 7 2 2 1 5 Result The TJ1 MC__ can communicate with the programmable terminal 4 3 3 User defined protocol You can implement a user defined communication protocol with these commands BASIC command Description SETCOM SETCOM configures the serial communication port and it enables the Host Link protocols GET GET assigns the ASCII code of a received character to a variable INPUT INPUT assigns numerical input string values to the specified varia bles KEY KEY returns TRUE or FALSE when a character has been received or has not been received LINPUT LINPUT assigns the ASCII code of received characters to an array of var
266. ich cases a motion error is TERT ated 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 PROGRAMMING MANUAL net communications The ETHERNET command should be entered on the command line with Trajexia Tools in disconnected mode via the serial port Note You will have to cycle power to Trajexia to enable the new parameters function 0 Read 1 Write unit number 1 parameter 0 IP Address 2 Subnet Mask 3 MAC address 8 Gateway 11 ARP cache read only values The required parameter for a write ETHERNET 1 1 0 192 200 185 2 Set the Trajexia IP address to 192 200 185 002 N A 78 0 BASIC commands 3 2 109 EX Type System command Syntax EX option Description 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 Arguments Example No example See also N A 3 2 110 EXP Type Mathematical function Syntax EXP expression Description EXP function returns the exponential value of the expression Arguments expression Any valid BASIC expression Example 2 print exp 1 0 2 7183 See also N A PROGRAMMING MANUAL trajexia 3 2 111 FALSE Ty
267. id BASIC expression Example IF a lt 10 THEN label1 If variable a contains a value less than or equal to 10 program execution con tinues at label label1 Otherwise program execution continues with the next statement See also N A 43 0 BASIC commands 3 2 13 Hexadecimal input Type Syntax Description Arguments Example See also System command hex num The command makes the number that follows a hexadecimal number hex 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 3 2 14 Comment field Type Syntax Description Arguments Example See also Program command marks all that follows it on a line as comment and not program code Com ment 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 PROGRAMMING MANUAL trajexia 3 2 15 Statement separator Type Syntax Description Arguments Example See also 3 2 16 Type Syntax Description Arguments Example Example See also 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 T
268. illoscope continues to run until the trigger button is clicked for a second time Trigger halt data capture When the trigger button is clicked the oscilloscope is enabled If it is in manual mode the controller immediately commences recording data If it is in program mode it waits until it encounters a trigger command in a running program After the trigger button has been pressed the text on the button changes to Halt If the oscilloscope is in the one shot mode then after the data has been recorded and plotted on the display the trigger button text returns to Trigger indicating that the operation has been completed The oscilloscope can be halted at any time when it is running and the trigger button is displaying the Halt text Clear configuration The current scope configuration the state of all the controls is saved when the scope window is closed and retrieved when the scope window is next opened trajexia PROGRAMMING MANUAL 212 0 Trajexia Tools interface The configuration reset button located at the bottom right hand side of the scope control panel resets all controls to their default values The status indicator The status indicator is located in between the options and configuration reset buttons This lamp changes colour according to the current status of the scope as follows Red Oscilloscope stopped Black The controller waits for the oscilloscope to complete the rec
269. in screen editor allowing a program in the controller to be modified using a 100 Terminal The currently selected pro gram will be edited The editor commands are as follows This command is implemented for an offline VT100 terminal Within Trajexia Tools users can select the command from the Program menu Quit Editor CTRL K and D Delete Line CTRL Y Arguments line number The number of the line at which to start editing Example No example See also SELECT 3 2 91 ELSE See IF THEN ELSE ENDIF 3 2 92 ELSEIF See IF THEN ELSE ENDIF PROGRAMMING MANUAL 73 0 BASIC commands 3 2 93 ENCODER Type Axis parameter read only Syntax ENCODER Description The ENCODER axis parameter contains a raw copy of the encoder The MPOS axis parameter contains the measured position calculated from the ENCODER value automatically allowing for overflows and offsets Arguments Example No example See also AXIS MPOS 3 2 94 ENCODER BITS Type Axis parameter Syntax ENCODER BITS value Description This axis parameter configures the interface for the number of encoder bits for Flexible axis 55 and EnDat absolute encoder axes The parameter is appli cable 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 b
270. in search sequence is given below BASE 0 DRIVE CONTROL 11 Monitor torque with DRIVE MONITOR SERVO ON WDOG ON S R PEED CREEP EVERSE WA 1 WAIT UNTIL DRIVE MONITOR 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 overload fig 30 e trajexia PROGRAMMING MANUAL 257 0 lt Examples and tips trajexia Origin search using encoder reference pulse 2 Mark This origin search procedure performs origin search by searching fig 31 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 moving part encoder min limit switch OFF lt limit switch 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 encoder 2 pulses The program example that does this origin search sequence is pc EUER given below Origin and left limit switch INO Right limit switch REV IN 1 BASE 0 D S min limit switch ATUM 0 ERVO ON WDOG ON DATUM 6 WA 1 4 gt WAIT IDL
271. ing edge The mode parameter specifies the registration input and event for use and the 9 8 Windowing function choice signal edge the registration event occurs The mode parameter also specifies 00 No windowing the use of the windowing function and filtering 01 Inclusive windowing The mode parameter differs between MECHATROLINK II and Flexible Axis 10 Inclusive windowing The functions for each bit in the mode parameter is explained in the tables e 11 Exclusive windowing below 10 Set this bit to use filtering function PROGRAMMING MANUAL 129 0 BASIC commands Bit Function MECHATROLINK II 1 0 Primary registration occurs for 00 Z mark of the encoder 01 EXT1 input CN1 pin programmed with Pn511 1 10 EXT2 input CN1 pin programmed with Pn511 2 11 EXT3 input CN1 pin programmed with Pn511 3 2 7 Not used 9 8 Windowing function choice 00 No windowing e 01 Inclusive windowing e 10 Inclusive windowing e 11 Exclusive windowing 10 Not used 3 2 220 REMAIN Type Axis parameter read only Syntax REMAIN Description 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 com pleted REMAIN is defined in user units Arguments Example To change the speed to a slower value 5mm from the end of a move start SPEED 10 MOVE 45 WAIT UNTIL REMAIN 5 SPEED 1 WAIT I
272. ins the Following Error warning range limit REG POS Contains the position at which a registration event occurred FHOLD IN Contains the input number to be used as the feedhold input REG POSB 2 the position at which the secondary registration event occurred FHSPEED Contains the feedhold speed REMAIN Is the distance remaining to the end of the current move FS_LIMIT Contains the absolute position of the forward software limit REMOTE ERROR Returns number of errors on MECHATROLINK II connection of FWD IN Contains the input number to be used as a forward limit input the Servo Driver FWD JOG Contains the input number to be used as a jog forward input REP DIST Contains or sets the repeat distance Contains the integral control gain REP OPTION Controls the application of the REP DIST axis parameter INVERT STEP Switches a hardware inverter into the stepper output circuit REV IN Contains the input number to be used as a reverse limit input JOGSPEED Sets the jog speed REV JOG Contains the input number to be used as a jog reverse input LINKAX Contains the axis number of the link axis during any linked RS LIMIT Contains the absolute position of the reverse software limit move S REF Contains the speed reference value which is applied when the MARK Detects the primary registration event on a registration input axis is in open loop MARKB Detects the secondary registration event on a registration input S REF OUT Contains the speed refer
273. ions Ethernet 10BaseT Ethernet 100BaseT Internet Explorer V5 0 Explorer V6 0 Use the most recent version of Trajexia Tools Updates are available from your local distributor The software is also available from the Trajexia web site www trajexia com 180 0 Trajexia Tools interface 5 2 2 Install the Trajexia Tools software 1 2 3 Insert the Trajexia Tools CD into the CD ROM drive of the PC The Trajexia Tools Setup program starts automatically If the Trajexia Tools Setup program does not start automatically start it manually execute setup exe in the root directory of the CD Select the language you want to use from the drop down list Click OK The Trajexia Tools Setup window shows Click Next PROGRAMMING MANUAL fig 1 Choose Setup Language choices Select the language for this installation from the bel low English fig 2 TrajeXia Tools v1 0 Setup 1 Cancel Welcome to the InstallShield Wizard for TrajexiaTools The InstallShield Wizard will install TrajexiaT ools on your computer To continue click Next 1 181 0 Trajexia Tools interface trajexia 6 Click Yes to accept the licence agreement and continue fig 3 TrajeXia Tools v1 0 Setup License Agreement Please read the following license agreement carefully tra et a 2 m Press the PAGE DOWN key to see the rest o
274. ired data depends if the controller is in manual or program trigger mode Program mode The oscilloscope starts to record data when a trigger instruction from the program on the controller is sent Manual mode The oscilloscope starts to record data immediately Oscilloscope channels Each channel of the oscilloscope has controls for all four channel control blocks Each channel control block has a colour border to indicate the colour of the display for that channel The controls are as follows PROGRAMMING MANUAL fig 36 Mechatrolink Drive SGDH 01AE OY Address 0x47 Axis 6 Pn000 1 Control Method Selection Do not change Close fig 37 Oscilloscope NONE 52 Auto 0 01 0 01 150 ms 41 ptions RE 210 0 Trajexia Tools interface Parameter to display The parameters that the oscilloscope can record and display are selected from the drop down menu in the upper left corner of each channel control block The parameter type sets the next label between axis Ax and channel Ch To plot the points stored in the controller TABLE select the TABLE parameter and select the channel that has the first and last points configured by the advanced optio
275. is on the Trajexia Tools CD It can also be found in the Download Center on the OMRON website Click Update The TJ1 PRT shows in the list Select the OMRON TJ1 PRT from the list and click Add Device Double click the TJ1 PRT slave module in the MyNetwork tree Set the node number in the Station Address field Add Insert input and output modules to the configuration list below Make sure that the quantity of input words and output words in the selected modules are equal to the quantity selected with the PROFIBUS command Click OK To configure the CJ1W PRM21 with the CX PROFIBUS do these steps PROGRAMMING MANUAL trajexia ed fig 9 1015 Device Types Device Dae Vende Vendors C200Hw PRM21 v1 04 1998 10 01 OMRON Corporation Groups 2 C200Hw PRT21 v1 0 2000 04 20 OMRON Corporation Protocols lE PROFI V2 xx 2005 08 09 OMRON Corporation CITw PRM2I PROFI Vix 2005 08 09 OMRON Corporation 2 v1 0 20020312 OMRON Corporation 4 COMT PRT21 v1 0 2000 04 20 OMRON Corporation CS1W PRM21 PROFI V2 xx 2005 08 09 OMRON Corporation CSTw PRM21 PROFI 2005 08 09 OMRON Corporation 2 150 v1 0 2002 01 14 OMRON Corporation 4 OMRON CJTW PRT21 22 2004 11 25 OMRON Corporation 2 PATISCUIT V3 4 20050222 OMRON Corporation 2 OMRON TJ1 PRT 2005 08 25 2 OMRON 1 E 2 PRTI COM EI 9 Update Install
276. is reset The axis continues at creep speed until the Z marker of the encoder is encountered The demand position is then reset to 0 and the measured posi tion corrected so as to maintain the Following Error The axis moves at creep speed forward until the Z marker is encountered The demand position is then reset to 0 and the measured position is corrected to maintain the Following Error The axis moves at creep speed reverse until the Z marker is encountered The demand position is then reset to 0 and the measured position is corrected 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 until the datum switch is reset 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 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 0 and the measured 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 at creep speed until the Z marker of the encoder is encoun tered The demand position is then reset to 0 and the measured position cor rected so as to maintain t
277. isabled and off for the reverse jog to be enabled In order to respect this when this is set to a valid input number the corresponding output is set on and then the corresponding REV JOG axis parameter is set PROGRAMMING MANUAL trajexia 218 0 6 Trajexia Tools interface traj exia Axes This displays an axis selector box which enables the user to fig 41 select the axis to include in the jog axes display By default the Enable Disable Axes x physical axes fitted to the controller will be displayed v Cancel TABLE viewer The TABLE and VR Editor tools are very similar A range of values in memory is shown in a spread sheet style interface and can be SEE modified Address Value To modify a value click on the existing value with the mouse and 0 3402823273761818500 type in the new value and press return The change will become active immediately and can be made whilst programs are running Options Range Both tools have the option to set the start and end of the range to view In the TABLE view tool the max value displays the highest readable value this is the system parameter TSIZE If the range of values is larger than the dialog box can display then the list will have a scroll bar to enable all the values to be Seen Refresh Button This screen does not update automatically so if a TABLE or VR is changed by the program you will not see the new value until the display is refreshed Wa
278. ith the designated CIO IR word WL LR AREA WRITE Writes the specified data in word units beginning with the designated LR word WH HR AREA Writes the specified data in word WRITE units beginning with the designated HR word WD DM AREA Writes the specified data in word WRITE units beginning with the designated DM word WJ AR AREA Writes the specified data in word WRITE units beginning with the designated AR word WE EM AREA Writes the specified data in word WRITE units beginning with the designated EM word CPU unit SC STATUS WRITE Changes the operating mode of the status CPU unit Testing TS TEST Returns unaltered a single block that was sent from the master PC model MM PC MODEL Reads the model code of the CPU code reading READ unit Host Link 2 Aborts the operation that is communica command only formed by a Host Link command tions and returns to the initial status processing A INITIALIZE Initializes the transfer control proce mand only dures for all Host Link units IC Undefined com This is the response when the com mand header code is invalid PROGRAMMING MANUAL Note The Host Link Master protocol supports the commands only in single frame The following table shows how you can use the Host Link protocol with the BASIC commands and for which CPU unit operating mode RUN MON or PROG the command is valid support FINS trajexia The Host Link protocol supports onl
279. jexia Motion Controller SubnetMask 255 25 and the PC must be the same Default Gateway 0 0 Default gateway A node on the network that serves as an Pe uie l E entrance to another network This is only required if Trajexia is gp needed to communicate with device another subnet MAC address Media Access Control address a hardware Na mpeg Coe address that uniquely identifies each node of the network This uU address is read only Cancel Normal Communications Port Number The TCP port used to communicate with Trajexia Tools Token Communications Port Number The TCP port used to communicate with PC Motion ActiveX control Enable features Not implemented for Trajexia Enable editing Sets the Trajexia to work with the RAM version of the programs In this mode the programs can be edited Trajexia keeps the programs stored in RAM and global variables using the backup battery This option changes internally the POWER UP parameter If POWER UP is set to O at start up Trajexia uses the programs stored in RAM by the back up battery even if the programs were saved in flash This feature is only available when POWER 1 PROGRAMMING MANUAL 200 0 Trajexia Tools interface Fix project into EPROM Copy the programs on the controller to the flash EPROM All programs that are currently in the EP
280. jexia system to the PC and saves as to a directory on the hard drive of the PC Check project A check is made between the Project on the Trajexia system and the PC The checksums and program content are compared Revert to backup Whenever Trajexia Tools connects to the MC16 it compares the project in the controller and on the PC and then makes a backup copy Revert to backup can be used when you want to cancel all modifications done to the project and BASIC programs while connected to the controller PROGRAMMING MANUAL trajexia fig 23 Project Controller Program Tools External New project Load project Save project as Check project Ctrl Alt P Revert to backup Modify STARTUP program Load Table Save Table File Load Program File Save Program File Recent Projects Exit Alt F4 196 0 Trajexia Tools interface trajexia By doing so the BASIC programs will be changed to the versions in the backup directory Modify STARTUP program The Startup program checks the number of nodes in a fig 24 MECHATROLINK II system to the project Use the Modify STARTUP program to change a startup program that is made by STARTUP the Intelligent Drives window ue Load table A list of table values can be loaded from an external file with the extension Ist or bas It imports the values and stores it in TABLE Table data values Store From
281. k master HMI typically User defined This protocol is created and han dled using BASIC commands TJ1 PRT PROFIBUS PROFIBUS Slave DP VO exchange word variables with any PROFIBUS master TJ1 DRT DeviceNet DeviceNet To exchange word variables with any DeviceNet master TJ1 ML MECHATRO LINK MECHATROLINK To communicate with supported MECHATROLINK slaves This protocol is transparent to the User trajexia 4 2 Ethernet The TJ1 MC has standard 10 100 Mbps Ethernet port You can use a crossover or a patch Ethernet cable to connect the TJ1 MC to a PC To configure the interface set these parameters Item Default value Comment 192 168 0 250 255 255 255 0 0 0 0 0 IP address Set one IP address that is unique in the network Subnet mask Set the same subnet that the LAN uses Gateway The gateway is necessary to have remote access from another LAN Make sure that the IP address of the PC is in the same range as the TJ1 MC__ ifthe IP address of the TJ1 MC q is aaa bbb ccc ddd the IP address of the PC must be aaa bbb ccc xxx where xxx is 000 to 255 other than ddd You can change the IP address of the TJ1 MC to match the IP address of your PC if you connect to the PC through a network hub or switch For example of the IP address of the PC is 192 200 185 001 you can set the IP address of the TJ1 MC to 192 200 185 002 The subnet mask of the TJ1
282. lder OMRON Existing Folders Startup lt Back Cancel fig 9 TrajeXia Tools v1 0 Setup Start Copying Files Review settings before copying files tra e e d ut Setup has enough information to start copying the program files If vou want to review or change any settings click Back If you are satisfied with the settings click to begin copying files Current Settings Destination Folder C Program Files OMRONS Destination Directory OMRON 184 O g Trajexia Tools interface 17 Click Finish The CX Drive Readme File window shows Close this window PROGRAMMING MANUAL fig 10 TrajeXia Tools v1 0 Setup InstallShield Wizard Complete Setup has finished installing TrajexiaT ools on your computer trajexia 185 O E Trajexia Tools interface 5 2 3 Connection to the TJ1 MC You need a patch or crossover Ethernet cable to connect the PC to fig 11 the TJ1 MC Note H If you work off line the simulator can be used Simula tion allows the Trajexia tools to connect to a virtual controller This is the way to program offline The Sim ulator does not recognise all the specific commands for the TJ1 MC 1 Connect the Trajexia system to the mains power supply 2 If you need to see the IP address and the subnet mask of the TJ1 MC again set the power of the Trajexia system off and then again on 3 Connect the Ethernet cable to the Ethern
283. le See also The AND operator performs the logical AND function on the corresponding 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 0AND 1 0 0 1AND 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 0 AND MPOS AXIS 1 0 THEN GOTO cycle1 N A 3 2 26 AOUT Type Syntax Description Arguments Example See also System parameter AOUT analogue chan This command sets the output value of the 10V analogue output channels that are provided by connecting JEPMC AN2910 modules on the MECHA TROLINK II bus The range of the value set is 32000 32000 for voltage range 10V 10V analogue chan Analogue output channel number 0 31 No example N A PROGRAMMING MANUAL trajexia 3 2 27 ASIN Type Syntax Description Arguments Example See also Mathematical function ASIN expression The ASIN function returns the arc sine of the argument The argument must have a value between 1 a
284. lected Program i Mri Free Memory 0 M Motion Stop Set communications options Not Connected PROGRAMMING MANUAL 187 0 Trajexia Tools interface 9 Make sure ENeto0 in the list is selected 10 Click Configure 11 Type 192 168 0 250 in the Server name IP address field 12 Click OK 13 Click OK PROGRAMMING MANUAL trajexia Min m fig 14 Configure Communications NOTE Add Add Delete ports and Delete change Packet Comms only available when not Configure connected Use Packet Comms on serial link Controller system version 1 48 or greater Controller message timeout Min 2 Normal 10 Max 100 10 Comms Parameters 0 x Server name IP address 192 168 0 250 port number 23 Cancel Configure Communications NOTE Add Add Delete ports and Delete change Packet Comms only E m available when not Configure connected Packet Comms on serial link Controller system version 1 48 or greater Controller message timeout Min 2 Normal 10 Max 100 10 5 188 0 Trajexia Tools interface trajexia 14 Open the Windows Control Panel on your PC 15 Double click on the Network Connections icon 16 Right click on the Local Area Connection icon Click on the Edt Favorkes Tools Advanced AN Properties menu Address e Network Connection
285. ll 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 PROGRAMMING MANUAL 141 0 BASIC commands 3 2 254 SYSTEM ERROR Type System parameter read only Syntax SYSTEM ERROR Description SYSTEM ERROR parameter contains system errors that occurred in the TJ1 system since the last time it was initialized The bits in the SYSTEM ERROR parameter are given in the table below Arguments Example No example See also N A Bit Description 0 BASIC error 1 Battery low error 2 7 Reserved for future use 8 Configuration unit error Any unit in the system 9 Configuration device error Any device in the system 10 15 Reserved for future use 16 Unit lost error Any unit in the system 17 Terminator not fitted 18 Device lost error Any device in the system PROGRAMMING MANUAL trajexia 3 2 255 T REF Type Syntax Description Arguments Example See also Axis parameter T REF DAC The 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 axes T REF takes 32 bits so the available range is 214748364
286. ls to exchange data with the Host Link slave The user program must contain proper error handling routines to deal with communication failure and perform retries if necessary End code Description Probable cause Solution 00 Normal No problem exists N A completion 01 Not executable The command that was sent can Check the relation in RUN mode not be executed when the PC is between the com in RUN mode mand and the PC mode 13 FCS error The FCS is wrong Influence from noise transfer the command again PROGRAMMING MANUAL code Description Probable cause Solution 14 Format error The command format is Check the format and wrong transfer the command Acommand that cannotbe again divided has been divided frame length is smaller than the minimum length for the applicable command 15 Entry number The data is outside the specified Correct the command data error range or too long arguments and trans fer the command again 18 Frame length The maximum frame length of Check the command error 131 bytes is exceeded and transfer the com mand again 19 Not executable You did not obtain access rights Obtain access rights 21 Not executable The command cannot be exe Cycle the power sup due to CPU cuted because a CPU errorhas ply of the CPU error occurred 100 Host Link slave ACK timeout 200 IC command address error
287. lso N A 3 2 10 Is greater than or equal to Type Mathematical function Syntax expression1 gt expression2 Description operator gt returns TRUE if expression1 is greater than or equal to expression2 otherwise it returns FALSE Arguments expression1 Any valid BASIC expression expression2 Any valid BASIC expression Example IF a 210 THEN GOTO label1 If variable a contains a value greater than or equal to 10 program execution continues at label label1 Otherwise program execution continues with the next statement See also N A PROGRAMMING MANUAL trajexia 3 2 11 lt Is less than Type Mathematical function Syntax expression1 lt expression2 Description The operator lt returns TRUE if expression1 is less than expression2 other wise it returns FALSE Arguments 1 Any valid BASIC expression expression2 Any valid BASIC expression Example IF a 10 THEN label1 If variable a contains a value less than 10 program execution continues at label label1 Otherwise program execution continues with the next state ment See also N A 3 2 12 lt Is less than or equal to Type Mathematical function Syntax expression1 expression2 Description operator lt returns TRUE if expression is less than or equal to expression2 otherwise it returns FALSE Arguments 1 Any valid BASIC expression expression2 Any val
288. lt values CLEAR PARAM cannot be performed if the controller is locked PROGRAMMING MANUAL Arguments Example See also trajexia 0 No example N A 3 2 49 CLOSE WIN Type Syntax Description Arguments Example See also Axis parameter CLOSE WIN The CLOSE WIN axis parameter defines the end of the window inside or out side which a registration mark is expected The value is in user units N A No example AXIS OPEN WIN REGIST UNITS 3 2 50 CLUTCH RATE Type Syntax Description Arguments Example 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 compati bility with previous TJ1 MC__ units Note The operation using CLUTCH_RATE is not deterministic in position If required use the MOVELINK command instead to avoid unnecessary phase difference between base axis and linked axis N A CLUTCH_RATE 4 This setting will imply that when giving 4 1 it will take one sec ond to reach the full connection 57 0 BASIC commands See also AXIS CONNECT MOVELINK 3 2 51 COMMSERROR Type System parameter read only Syntax COMMSERROR Description COMMSERROR parameter contains the communication errors that have occurred since t
289. lt gateway 2 C DNS server address automatically Use the following DNS server addresses Preferred DNS server Alternate DNS server 5 Advanced Cancel PROGRAMMING MANUAL 154 0 Communication protocols 4 2 20 Communicate with Trajexia remotely This example shows how to connect to a local Trajexia system from a computer on a remote location Suppose the Ethernet settings of the Trajexia system are 2 10 83 50 70 is the assigned IP address of Trajexia 255 255 240 0 is the local Subnet Mask 10 83 48 1 is the local gateway The server assigns an IP address to the computers automatically Set the IP address the Subnet Mask and the gateway from the Terminal window command line in Trajexia with Ethernet 1 1 0 10 83 50 70 Ethernet 1 1 2 255 255 240 0 Ethernet 1 1 8 10 83 48 1 Check that the IP settings of the local Trajexia system and the remote computer are as shown After power on the TJ1 MC display shows alternatively the IP address and the Subnet mask After every re connection of the Ethernet cable the display shows only the IP address PROGRAMMING MANUAL trajexia fig 3 Internet Protocol TCP IP Properties General Alternate Configuration You can get IP settings assigned automatically if your network supports this capability Otherwise you need to ask your network administrator for the appropriate IP setti
290. lue 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 fig 20 It can be achieved with the following equation the smallest value of m such that n machine cycles motor revolution Because n and m are integers Pn205 m 1 This setting is explained in the following example PROGRAMMING MANUAL trajexia 243 0 Examples and tips Example 2 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 202 32 203 36 To guarantee the correct overflow both in and in the Servo Driver we must set two additional axis parameters 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
291. m command Syntax RUNTYPE program name auto run task number Description 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 one program has compilation errors no programs will be started at power up To set the RUNTYPE using Trajexia Tools select Set Power up mode from the Program menu Note The execution of the EPROM command is required to store the new RUNTYPE settings into flash memory Otherwise the new settings will be lost when the power is switched off Arguments program The name of the program whose RUNTYPE is being set auto run 0 Running manually on command 1 Automatically execute on power up All non zero values are considered as 1 task number The number of the task on which to execute the program Range 1 14 Example gt gt RUNTYPE progname 1 3 This line sets the program progname to run automatically at start up on task 3 Example gt gt RUNTYPE 0 This line sets the program progname to manual running See also AUTORUN EPROM EX 134 0 BASIC commands 3 2 235 5 REF Type Syntax Description Arguments Example See also Axis parameter Type DAC Syntax S RE
292. m the motion controller IF THEN ELSE ENDIF Controls the flow of the program base on the results of the con DIR Displays a list of the programs in the motion controller their size PME and their RUNTYPE on the standard output ON GOSUB or ON Enables a conditional jump to one of several labels EDIT Allows a program to be modified using a 100 Terminal GOTO EPROM Stores a program in the flash memory REPEAT UNTIL Loop allows the program segment to be repeated until the con dition becomes TRUE on page 146 LIST Prints the program on the standard output WHILE WEND Loop allows the program segment to be repeated until the con NEW Deletes all lines of the program in the motion controller dition becomes FALSE PROCESS Returns the running status and task number for each current task 3 1 9 Slot parameters and modifiers RENAME Changes the name of a program in the motion controller RUN Executes a program Description RUNTYPE if a program is run at start up and which task it is to COMMSTYPE Contains the type of unit in controller slot SELECT Specifies the current program FPGA_VERSION Returns the FPGA version of unit with unit_number in a control ler system STEPENE Tein a pregan SLOT Is a modifier that specifies slot number of unit STOP Halts program execution TROFF Suspends a trace at the current line and resumes normal pro 3 1 10 System commands and functions gram execution TRON Creates a breakpoin
293. magnitude of DAC SCALE is not important as the voltage applied is controlled by the DAC parame ter The polarity is still reversed however by SCALE Arguments Example DAC SCALE AXIS 3 16 See also DAC S REF 61 0 BASIC commands trajexia En d 3 2 66 DATE 3 2 68 DATUM Type System parameter Type Axis command Syntax DATE Syntax DATUM sequence Description Returns or sets the current date held by the Trajexia s real time clock Description DATUM command makes one of 6 origin searches to position an axis to number be entered in DD MM YY or DD MM YYYY format an absolute position and also reset the Following Errors A DATUM uses both the creep and demand speed for the origin search The rguments d 4 creep speed in the sequences is set with the CREEP axis parameter and the Example DATE 20 10 05 demand speed is set with the SPEED axis parameter The datum switch input or number used for sequences 3 to 6 is set by the DATUM IN parameter DATE 20 10 2005 DATUM works on the default basis axis set with BASE unless AXIS is used Example gt gt PRINT DATE to specify a temporary base axis 36956 Note The origin input set with the DATUM IN parameter is active low i e the This prints the number representing the current day This number is the origin switch is set when the input is off The feedhold reverse jog forward number of days since 1st January 1900 with 1 Jan 1900 as 1 jog
294. malfunction or burning PROGRAMMING MANUAL gt gt gt trajexia Caution Take appropriate measures to ensure that the specified power with the rated voltage and frequency is supplied Be particularly careful in places where the power supply is unstable An incorrect power supply may result in malfunction Caution Install external breakers and take other safety measures against short circuiting in external wiring Insufficient safety measures against short circuiting may result in burning Caution Do not apply voltage to the Input Units in excess of the rated input voltage Excess voltage may result in burning Caution Do not apply voltage or connect loads to the Output Units in excess of the maximum switching capacity Excess voltage or loads may result in burning Caution Disconnect the functional ground terminal when performing with stand voltage tests Not disconnecting the functional ground terminal may result in burning 18 0 gt Always connect to a class 3 ground to 1000 or less when install ing the Units Not connecting to a class 3 ground may result in electric shock Caution Always turn off the power supply to the system before attempting any of the following Not turning off the power supply may result in malfunction or elec tric shock Mounting or dismounting expansion Units CPU Units or any other Units Assembli
295. mand or a single axis parameter read write to a particular axis AXIS is effective only for the com mand or program line in which it is programmed Use the BASE command to change the base axis for all following command lines axis number Any valid BASIC expression specifying the axis number 5 0 PRINT VP SPEED AXIS 2 MOVE 300 AXIS 0 REPDIST AXIS 1 100 BASE 3 2 33 AXIS DISPLAY Type Axis parameter Syntax AXIS DISPLAY value Description AXIS DISPLAY axis parameter enables different data to be displayed by the LEDs on the front cover of the TJ1 FL02 LEDs affected by this parameter setting are two yellow LEDs showing axis status The default value of this parameter on start up for all axes is O The valid values are shown in the table below Arguments Example AXIS DISPLAY AXIS 2 2 This command will display status of OUT 0 and OUT 1 allocated to axis 2 See also N A AXIS DISPLAY value 0 1 2 3 REG 0 AUX IN OUTO ENCODERA A1 REG 1 ENCODER 2 OUT 1 ENCODER B BO REG 0 AUX IN OUTO ENCODERA PROGRAMMING MANUAL trajexia AXIS DISPLAY value 0 1 2 3 B1 REG 1 ENCODER 2 OUT 1 ENCODER B 3 2 34 AXIS ENABLE Type Syntax Description Arguments Example See also Axis parameter AXIS ENABLE ON OFF The AXIS ENABLE axis parameter is used to enable or disable particular axis independently of others This parameter can
296. mands 3 1 This section lists all BASIC commands divided by categories The categories are Axis commands Axis parameters Communication commands and parameters Constants O commands functions and parameters Mathematical functions and operations Program commands Program control commands Slot parameters and modifiers e System commands and functions e System parameters Task commands and parameters Categories The lists are quick reference guides only A complete description of the commands is given in alphabetical order in the next section trajexia Name Description 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 continuously variable software gear box CANCEL Cancels the move on an axis CONNECT Connects the demand position of an axis to the measured move ments of the axis specified for driving axis to produce an electronic gearbox DATUM Performs 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 DISABLE GROUP Groups axes tog
297. me Description D ZONE MIN Controls the DAC output in conjunction with the Following Error value DATE Sets or returns the current date held by the real time clock DAY Sets or returns the current day DISPLAY Determines I O channels to be displayed on the front panel LEDs ERROR AXIS 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 system PROC STATUS Returns the status of the process specified MOTION ERROR Contains an error flag for axis motion errors NAIO Returns the number of analogue channels connected on the MECHATROLINK II bus 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 NEG OFFSET Applies a negative offset to the DAC signal from the servo loop NIO Contains the number of inputs and outputs connected to the system POWER UP Determines whether programs should be read from flash EPROM on power up or reset POS OFFSET Applies a positive offset to the DAC signal from the servo loop SCOPE POS Contains the current TABLE position at which the SCOPE com mand is currently storing its first parameter SERVO PERIOD Sets the servo cycle
298. 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 6 1 2 PROGRAMMING MANUAL fig 25 OFF ON OFF origin limit switch moving part min limit switch ON OFF trajexia OFF ON d encoder max limit switch 254 0 Examples and tips Absolute switch origin search plus limit switches 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 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 Right limit switch IN2 BASE 0 DATUM IN 0 WAIT UNTIL 0 OR IN 1 OFF WAIT UNTIL IN 0 ON WAIT UNTIL IN 0 OFF PROGRAMMING MANUAL trajexia fig 26 OFF ON OFF origin limit switch moving part min limit switch ON OFF OFF ON max limit switch fig 27 min limit switch origin limit switch max limit switch 4 REVERSE FORWARD 255
299. meter determines whether the base axis runs under servo control SERVO ON or open loop SERVO OFF In closed loop the motion control algorithm will output a speed reference signal determined by the con trol gain settings and the Following Error The position of the servo motor is determined using the Axis commands In open loop the speed reference signal is completely determined by the S REF axis parameter Arguments Example SERVO AXIS 0 ON Axis 0 is under servo control SERVO AXIS 1 OFF Axis 1 is run open loop See also AXIS FE LIMIT 5 REF S REF OUT WDOG 3 2 241 SERVO PERIOD Type Syntax Description Arguments Example See also System parameter SERVO PERIOD The SERVO PERIOD parameter sets the servo cycle period of the TJ1 MC The timing of the execution of the program tasks and the refreshing of the control data and of the Unit are all depending on this setting The parameter is defined microseconds TJ1 MC be set in either 0 5 1 0 or 2 0ms servo cycle See the table below N A No example DRIVE RESET 137 0 BASIC commands Value Description 500 0 5ms 1000 1 0ms 2000 2 0ms Caution 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 3 2 242 SET BIT Type Syntax Description Arguments Example S
300. mma 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 character n The specified output device When this argument is omitted the port as specified by OUTDEVICE will be used See the table below expression The expression to be printed PRINT CAPITALS and lower case CAN BE PRINTED 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 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 123 0 BASIC commands
301. mon for all axes Values 16 to 27 represent software inputs which can be freely used in programs and commands such as IN and OP These are also common for all axes Values 28 to 31 are directly mapped to driver inputs present on CN1 connector and they are unique for each axis Which driver inputs are mapped to inputs 28 to 31 depends on Servo Driver parameter Pn81E setting Recommended setting is Pn81E 0x4321 with the following mapping If an input number is set and the limit is reached any 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 input 28 1 40 input 29 CN1 41 input 30 1 42 input 31 CN1 43 input 28 CN1 13 input 29 CN1 7 input 30 1 8 input 31 CN1 9 input 26 CN1 2 input 27 1 1 N A No example AXIS AXISSTATUS FWD 132 0 BASIC commands 3 2 229 REV JOG Type Axis parameter Syntax REV JOG Description REV JOG parameter contains the input number to be used as a jog reverse input The input can be from 0 to 7 As default the parameter is set to 1 no input is selected Note This input is active low Arguments Example No example See also AXIS FAST 906 FWD JOG JOGSPEED UNITS 3 2 230 REVERSE Type Axis command Syntax REVERSE RE Description REVERSE command moves axis continuously in reverse at the speed set in the SPEED parameter The ac
302. mory areas can be identified in the Trajexia Motion Controller Unit memory VR memory e TABLE memory 24 0 Trajexia system memory I O memory is used for holding the status of input and output devices connected to the Trajexia system It is divided into two sub areas one for digital memory one for analog I O memory The digital I O memory holds input and output statuses of digital I O devices Its capacity is 256 bits input points for input and 256 bits output points for outputs The inputs in this memory can be accessed using the IN command The outputs can be accessed using the OUT command The analog I O memory holds input and output values of analog I O devices Its capacity is 36 input channels and 36 output channels The analog input channels can be accessed using the AIN command The analog output channels can be accessed using the AOUT command VR memory VR memory is commonly used if some data or value needs to be global which means that it is accessible from all programs in the project at the same time The size of this memory is 1024 slots with indexes 0 to 1023 A memory slot is addressed using the VR x macro where x is index of the VR memory slot The VR memory is accessible for reading and writing Writing is done by making mathematical assignment using the command in the program The content of this memory is held in the battery powered RAM memory and is preserved
303. mware and FPGA versions of the TJ1 MC__ Connect the TJ1 MC to Trajexia Tools software Refer to the Programming Manual Open the terminal window and type the following commands Type PRINT VERSION in the terminal window The version parameter returns the current firmware version number of the motion controller Type PRINT FPGA VERSION SLOT 1 in the terminal window The parameter returns the current FPGA version number of the TJ1 MC PROGRAMMING MANUAL trajexia 0 Contents 1 Safety W rmnings and precautions ec S 16 14 Intended audience nivale ge ee ede AR cane Rug Ca ER Oe dn 16 1 2 General precautions 16 13 Safety Precautions 16 1 4 Operating environment 17 1 5 Application precautloris E Ua PE V gus 18 1 6 Unit assembly precautions ce rn nnn nnn AERAN SEENEN EEA
304. n Arguments Example See also The OV GAIN parameter contains the output velocity gain The output veloc ity output contribution is calculated by multiplying the change in measured position with the OV GAIN parameter value The default value is O Adding output velocity gain to a system is mechanically equivalent 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 In order to avoid any instability the servo gains should be changed only when the SERVO is off N A No example D GAIN GAIN VFF GAIN 3 2 203 GAIN Type Syntax Description Arguments Example See also Axis parameter P GAIN The GAIN parameter contains the proportional gain The proportional out put contribution is calculated by multiplying the Following Error with the P GAIN parameter value The default value of P GAIN for Mechatro Speed axis ATYPE 41 is 131072 The default value for Flexible axis Servo 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 Follow ing Errors Note In order to avoid any instability the servo gains should be changed only when the SERVO is off N A No example D GAIN
305. n error can be cleared executing a DATUM 0 command N A No example AXIS AXISSTATUS DATUM ERROR AXIS ERRORMASK WDOG 109 0 BASIC commands 3 2 1 77 Example Type Axis command Syntax MOVE distance 1 distance 2 distance 3 distance 4 MO distance 1 distance 2 distance 3 distance 4 Description MOVE command moves with one or more axes at the demand speed Example 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 uninterpolated unsynchronised multi axis motion can be achieved Incremental 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 x
306. nalogue or pulse control with independent position speed or torque control for every axis And its powerful motion instruction set makes programming intuitive and easy You can select from a wide choice of best in class rotary linear and direct drive servos as well as inverters The system is scalable up to 16 axes and 8 inverters amp I O modules PROGRAMMING MANUAL trajexia fig 1 CJ series PLC CX one NS series HMI Trajexia Tools PROFIBUS DP DEVICENET Master Master Ethernet E rei ee DeviceNet qmm Digital 1 Gra Hostlink MECHATROLINK II 22 0 Trajexia system 2 1 4 Trajexia hardware The Trajexia hardware is described in the Trajexia Hardware Reference manual It is recommend to read the Hardware Reference manual first The Trajexia system gives these advantages Direct connectivity via Ethernet Trajexia s Ethernet built in port provides direct and fast connectivity to PCs PLCs HMls and other devices while providing full access to the drives over a MECHATROLINK II motion bus It allows explicit messaging over Ethernet and through MECHATROLINK II to provide full transpare
307. ncy down to the actuator level and making remote access possible Keep your know how safe Trajexia s encryption method guarantees complete protection and confidentiality for your valuable know how Serial Port and Local l Os A serial port provides direct connectivity with any OMRON PLC or any other field device 16 Inputs and 8 outputs are freely configurable embedded I Os in the controller to enable you to tailor Trajexia to your machine design MECHATROLINK II Master The MECHATROLINK II master performs control of up to 16 servos inverters or 5 while allowing complete transparency across the whole system MECHATROLINK II offers the communication speed and time accuracy essential to guarantee perfect motion control of servos The motion cycle time is selectable between 0 5 ms 1 ms or 2 ms TJ1 FL02 Flexible Axis Unit The TJ1 FLO2 allows full control of two actuators via an analogue output or pulse train The module supports the main absolute encoder protocols allowing the connection of an external encoder to the system PROGRAMMING MANUAL trajexia Drives and Inverters 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 drives Remote 5 The I Os on the MECHATROLINK II motion bus provide for system expansion w
308. nd 1 The result in radians is between 2 and 2 Input values outside this range return 0 expression Any valid BASIC expression gt gt PRINT ASIN 1 1 5708 N A 3 2 28 Type Syntax Description Arguments Example See also Mathematical function ATAN expression The ATAN function returns the arc tangent of the argument expression can have any value The result is in radians and is between 2 and 2 expression Any valid BASIC expression PRINT ATAN 1 0 7854 N A 3 2 29 ATAN2 Type Syntax Mathematical function ATAN2 expression1 expression2 48 0 BASIC commands Description ATAN2 function returns the arc tangent of the non zero complex number expression2 expression1 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 expression2 The result in radians will be between and Arguments 1 Any valid BASIC expression expression2 Any valid BASIC expression Example gt gt PRINT ATAN2 0 1 0 0000 See also N A 3 2 30 ATYPE Type Axis parameter Syntax ATYPE value Description The ATYPE axis parameter sets the axis type for the axis The valid values depend on TJ1 module the Servo Driver controlling the axis is connected to See the table below The ATYPE
309. ned name containing lower case alpha numeri cal or underscore characters vr number The number of the VR to be associated with name Example GLOBAL srew pitch 12 GLOBAL ratio1 534 ratio1 3 56 screw pitch 23 0 PRINT screw pitch ratio1 See also N A PROGRAMMING MANUAL trajexia 0 3 2 135 GOSUB RETURN Type Program control command Syntax GOSUB label RETURN Description 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 execution is returned to the stored position Note Subroutines on each task can be nested up to 8 levels deep Arguments label A valid label that occurs in the program An invalid label will give a compi lation error before execution Labels can be character strings of any length but only the first 15 charac ters are significant Example main GOSUB routine GOTO main routine PRINT Measured positionz MPOS CHR 13 RETURN See also GOTO 3 2 136 GOTO Type Program control command Syntax GOTO label Description GOTO structure enables a jump of program execution GOTO jumps gram execution to the line of the program containing the label 89 0 BASIC commands Arguments label A valid label that occurs in the program An invalid label will give a compi lation error before execution Labels can be character stri
310. ng the Units Setting dipswitches or rotary switches Connecting or wiring the cables Connecting or disconnecting the connectors Caution Be sure that all mounting screws terminal screws and cable con nector screws are tightened to the torque specified in this manual Incorrect tightening torque may result in malfunction Caution Leave the dust protective label attached to the Unit when wiring Removing the dust protective label may result in malfunction PROGRAMMING MANUAL gt gt gt Safety warnings and precautions trajexia Caution Remove the dust protective label after the completion of wiring to ensure proper heat dissipation Leaving the dust protective label attached may result in malfunc tion Caution Use crimp terminals for wiring Do not connect bare stranded wires directly to terminals Connection of bare stranded wires may result in burning Caution Double check all the wiring before turning on the power supply Incorrect wiring may result in burning Caution Wire correctly Incorrect wiring may result in burning Caution Mount the Unit only after checking the terminal block completely Caution Be sure that the terminal blocks expansion cables and other items with locking devices are properly locked into place Improper locking may result in malfunction 19 0 Safety warnings and precautions gt gt gt gt Caution Confirm that no adve
311. ng the move in progress or the servo algorithm Not that the demand position can be outside the range because the measured position is used to trigger the adjustment 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 N A No example AXIS DPOS MPOS REP OPTION UNITS PROGRAMMING MANUAL trajexia 3 2 224 REP OPTION Type Axis parameter Syntax REP OPTION Description 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 Arguments Example No example See also AXIS CAMBOX MOVELINK REP DIST Bit Description 0 The repeated distance range is controlled by bit 0 of the OPTION parameter f REP OPTION bit 0 is off the range of the demanded and measured positions will be between DIST and DIST f REP OPTION bit 0 is on the range of the demanded and measured positions will be between 0 and REP DIST 1 The automatic repeat option of the CAMBOX and MOVELINK commands are con trolled by bit 1 of the OPTION parameter The bit is set on to request the sys tem software to end the automatic repeat option When the system software has set the option off it automatically clears bit 1 of REP OPTION
312. ngs C Use the following IP address adde SubHet mast Default gateway 6 Obtain DNS server address automatically C Use the following DNS server addresses refered DNS Advanced fig 4 Comms Parameters ENet0 Server name IP address 10 83 50 70 IP port number 23 155 0 Communication protocols 4 2 3 Trajexia Tools protocol The Trajexia Tools protocol is used by Trajexia Tools to program monitor and debug the TJ1 MC Trajexia Tools uses a Telnet protocol By default this connection uses port 23 If this port is not accessible you can change the port number with the command Ethernet 1 1 4 new port n Unlike the standard Ethernet commands this command takes effect immediately after execution The port changes to default at power on Therefore this command needs to be included in any program that is executed at power on The Trajexia Tools Protocol is TCP only 4 2 4 FINS server protocol FINS Factory Interface Network Service is a Proprietary OMRON communication protocol A subset of this protocol is implemented in Trajexia Refer to the Communication Commands Reference manual W342 E1 The FINS protocol enables seamless communication with other OMRON devices such as PLCs HMls and CX Drive The FINS server protocol requires no configuration settings A By default this connection uses port 9600
313. ngs of any length but only the first 15 char acters are significant Example loop PRINT Measured position MPOS CHR 13 GOTO loop See also GOSUB RETURN 3 2 137 HALT Type System command Syntax HALT Description HALT command stops execution of all program tasks currently running The command can be used both on command line as in programs The STOP command can be used to stop a single program task Arguments Example No example See also PROCESS STOP 3 2 138 HEX Type command Syntax HEX Description This command is used in a print statement to output a number in hexadecimal format Arguments Example PRINT 5 HEX IN 8 16 See also N A trajexia 3 2 139 COMMAND Type Syntax Description Arguments Communication command COMMAND command port node mc area mode mc offset 1 The HLM COMMAND command performs a specific Host link command operation to one or to all Host Link Slaves on the selected port Program execution will be paused until the response string has been received or the timeout time has elapsed The timeout time is specified by using the HLM TIMEOUT parameter The status of the transfer can be monitored with the HLM STATUS parameter Notes When using the READ be sure to set up the Host Link Master pro tocol by using the SETCOM command Host Link Master commands are required to be executed from one program task only to avoid any multi
314. ning with the designated word WD DM AREA Writes the specified data in word WRITE units to TABLE memory begin ning with the designated word Testing TS TEST Returns unaltered a single block that was sent from the master PC model code MM PC MODEL Reads the model code of the reading READ TJ1 MC as specified by the HLS MODEL parameter I O memory area QQMR REGISTER I O Registers the I O TABLE with the registration and MEMORY contents of the actual I O configu reading ration READ I O Reads the registered I O memory MEMORY words bits all at once Host Link XZ ABORT Aborts the operation that is per communications command only formed by a Host Link command processing and returns to the initial status INITIALIZE Initializes the transfer control pro command only cedures for all Host Link units IC Undefined com This is the response when the command header code is invalid PROGRAMMING MANUAL End codes These are the response end codes that are returned in the response frame trajexia Endcode Description Probable cause Solution 0 Normal No problem exists N A completion 13 FCS error The FCS is wrong Check the FCS calcu lation method If there was influence from noise transfer the command again 14 Format error The command format is Check the format and wrong transfer the command Acommand cannotbe again divided has been divided frame
315. no short circuits or line interrup tion e Check that you use the cor rect cable type e Check that the stub lines not too long Indication Problem Solution COMM LED is off The PROFIBUS configuration is e Check that you use the cor and BF LED is incorrect there is no communica rect GSD file in the master flashing tion with the master e Check the configuration and the parameter data of the slave Check that the network has been configured to commu nicate at the baud rate sup ported by the TJ1 PRT You have not selected configura tion data for the slave Check the configuration at the master The TJ1 PRT is defective Replace the TJ1 PRT You have not properly terminated the PROFIBUS network Terminate the PROFIBUS net work at the appropriate places The PROFIBUS master unit is defective Replace the master unit The TJ1 PRT is defective Replace the TJ1 PRT PROGRAMMING MANUAL 303 0 Troubleshooting trajexia 9 74 TJ1 DRT 75 7 4 4 System errors 7 5 1 System errors Indication Problem Solution Indication Problem Solution No LEDs are on The power is off Turn the power on All LEDs are off The power is off Turn the power on or flashing The TJ1 DRT is defective Replace the TJ1 DRT The TJ1 ML__is defective Replace the TJ1 ML_ ERH LED is
316. nput 26 CN1 2 input 27 1 1 For more information on setting driver parameter Pn81E see Servo Driver manual As default the parameter is set to 1 no inputs selected N A No example 87 0 BASIC commands See also AXIS AXISSTATUS REV 3 2 132FWD 906 Type Axis parameter Syntax FWD JOG Description FWD JOG axis parameter contains the input number to be used as a jog forward input The input can be set from 0 to 7 As default the parameter is set to 1 no input is selected Note This input is active low Arguments Example No example See also AXIS FAST JOG JOGSPEED REV JOG 3 2 133 GET Type command Syntax GET n variable Description GET command assigns the ASCII code of a received character to a varia ble 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 Tools Note Channel 0 is reserved for the connection to Trajexia Tools 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 as specified by INDEVICE will be used See the table below variable The name of the variable to receive the ASCII code PROGRAMMING MANUAL trajexia Ee
317. ns 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 3 1 7 Program commands EQUAL TO less than or equal to the expression on the right ABS Returns the absolute 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 COS Returns the cosine of an expression EXP Returns the exponential value of an expression Name Description COMMENT FIELD Enables a line not to be executed STATEMENT Enables more statements on one line SEPARATOR 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 controller to a new program PROGRAMMING MANUAL 37 0 BASIC commands trajexia Name Description Name Description DEL Deletes a program fro
318. ns dialog box If the channel is not needed select NONE in the parameter list box Axis Channel number A drop down list box to enable the selection of the axis or channel for a motion parameter or channel for a digital or analog input output parameter Y range down Y range UP The vertical scale is selected for each channel and can be configured for either automatic or manual mode In automatic mode the oscilloscope calculates the appropriate scale when is has completed the recording before the oscilloscope displays the trace When the oscilloscope runs with continuous triggering the oscilloscope is unable to select a suitable vertical scale The oscilloscope must be stopped and restarted In manual mode the user selects the most appropriate scale Y Shift The vertical offset value is used to move a trace vertically on the display This control is useful when two or more traces are identical Reset Y This button clears the Y shift value Enable Disable cursor bars When the oscilloscope has stopped running and a trace is shown the cursor bars can be enabled The cursor bars are two vertical bars the same colour as the channel trace These mark the maximum and minimum trace location points The values that the bars represent are shown below the oscilloscope display The cursor bars are enable and disabled by pressing the cursor button The cursor bars can be selected and moved by the mouse cursor General controls The general cont
319. ns the same The cut in the material is made This gives a new material edge 4 The deceleration part the material continues and the shear stops 5 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 A new movement starts step 2 6 2 9 Correction program This application is for a rotary labeller The constants are product arrives on a conveyor master axis that runs at a constant speed A rotary labeller that is synchronized 1 1 to the conveyor attaches the labels 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 PROGRAMMING MANUAL 298 0 Examples and tips 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 Example 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 POS expected pos MOVE correction AXIS
320. ntax Description Arguments Example See also 3 2 8 Type Syntax Description Arguments Example See also trajexia Assignment Mathematical function variable expression The operator assigns the value of the expression to the variable e variable A variable name expression Any valid BASIC expression var 7 18 Assigns the value 18 to variable var N A lt gt Is not equal to Mathematical function expression1 lt gt expression2 The operator lt gt returns TRUE if expression1 is not equal to expression2 otherwise it returns FALSE expression1 Any valid BASIC expression expression2 Any valid BASIC expression IF a lt gt 10 THEN label1 If variable a contains a value not equal to 10 program execution continues at label label1 Otherwise program execution continues with the next state ment N A 42 0 BASIC commands 3 2 9 gt 15 greater than Type Mathematical function Syntax expression1 gt expression2 Description operator gt returns TRUE if expression1 is greater than expression2 otherwise it returns FALSE Arguments expression1 Any valid BASIC expression expression2 Any valid BASIC expression Example IF gt 10 THEN label1 If variable a contains a value greater than 10 program execution continues at label label1 Otherwise program execution continues with the next state ment See a
321. number is omitted the program will run on the highest available task RUN can be included in a program to run another program Note Execution continues until one of the following occurs There are no more lines to execute HALI is typed at the command line to stop all programs STOP is typed at the command line to stop a single program STOP command in the program is encountered Arun time error is encountered 133 0 BASIC commands Arguments Example Example Example See also program name Any valid program name task number Any valid task number Range 1 14 gt gt SELECT PROGRAM PROGRAM selected 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 3 2 233 ERROR Type Syntax Description Arguments Example See also Task parameter read only RUN ERROR 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 modifier to access the parameter for a certain task Without PROC the current task will be assumed N A gt gt PRINT RUN ERROR 5 9 0000 BASICERROR ERROR LINE PROC PROGRAMMING MANUAL trajexia ccc o 3 2 234 RUNTYPE Type Progra
322. o 1 no inputs selected Arguments Example DATUM AXIS 0 5 See also AXIS DATUM 3 2 70 DAY Type System parameter Syntax DAY Description Returns the current day as a number 0 6 Sunday is 0 DAY be set by assignment Arguments Example gt gt DAY 3 gt gt DAY 3 0000 See also N A 3 2 71 DAY Type System command Syntax DAY Description Prints the current day as a string Arguments N A Example gt gt DAY 3 gt gt DAY Wednesday See also N A PROGRAMMING MANUAL trajexia 0 3 2 72 DECEL Axis parameter Syntax DECEL Description DECEL axis parameter contains the axis deceleration rate The rate is set in units s The parameter can have any positive value including O Arguments Example DECEL 100 Set deceleration rate PRINT Deceleration rate is DECEL mm s s See also ACCEL AXIS UNITS 3 2 73 DEFPOS Type Syntax Description Axis command DEFPOS pos 1 pos 2 pos_3 pos_4 DP pos 1 pos 2 pos 4 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 cur rent position to 0 DEFPOS can be used at any time As an alternative also the OFFPOS axis parameter can be used This param
323. o 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 143 0 BASIC commands 3 2 258 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 3 2 259 THEN See IF THEN ELSE ENDIF PROGRAMMING MANUAL trajexia Dd 3 2 260 TICKS Type Task parameter Syntax TICKS Description The TICKS parameter contains 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 Example delay TICKS 3000 OP 9 ON test IF TICKS lt 0 THEN OP 9 OFF ELSE GOTO test ENDIF See also N A 3 2 261 TIME Type System parameter Syntax TIME Description Returns the time from the real time clock The time returned is the number of seconds since midnight 00 00 00 Arguments Example No example See also N A 144
324. o not physically exist on the TJ1 MC 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 Digital inputs 32 255 These inputs are physically present only if additional digital I O units are connected to the TJ1 MC the MECHATROLINK II bus If you read them if they do not physically exist the I O units are not connected they return O Use the command IN to read these inputs All inputs are unique to the controller They are not accessed per axis MECHATROLINK I Servo Drivers inputs in the Trajexia I O space With the BASIC command IN you can access the physically present inputs in a BASIC program These inputs can be built in the controller or connected via the MECHATROLINK II bus Some inputs of the Servo Driver are mapped into the Trajexia space Therefore you can access these inputs from the BASIC program Trajexia only supports this for Servo Drivers connected to the Trajexia system via the MECHATROLINK II bus The selection of inputs of the Servo Driver that are mapped into the Trajexia space depends on the value of the parameter Pn81E The recommended value of Pn81E is 0x4321 With this default value the mapping is as follows for the Sigma ll Servo Driver 251 O E Examples and tips DRIVE MONITOR bit Connector signal
325. obots geometry Frame transformations to perform functions such as these need to be com piled 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 cur rently active FRAME is specified with the FRAME System parameter The default FRAME is 0 which corresponds to a one to one transformation Arguments Example FRAME 1 See also N A 86 0 BASIC commands 3 2 129 FREE Type System function Syntax FREE Description 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 TJ1 MC__ compiles programs before they are executed this means that twice the memory is required to be able to execute a program Arguments Example gt gt PRINT FREE 47104 0000 See also N A 3 2 130 FS LIMIT Type Axis parameter Syntax FS LIMIT FSLIMIT Description FS LIMIT axis parameter contains the absolute position of the forward software limit in user units A software limit for forward movement can be set from the program to control the w
326. 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 6 2 1 PROGRAMMING MANUAL trajexia 275 0 Examples and tips 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 lt gt 0 THEN HALT GOTO loop 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 Following the scenario described above with the oscilloscope settings as in fig 44 the result is given in fig 46 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 PROGRAMMING MANUAL trajexia 276
327. og speed Jog gt ES ES Warnings _ 217 0 Trajexia Tools interface the reverse jog input is out of range the warning message is set e If there is already a move being performed on this axis that is not a jog move the warning message is set Jog forward This button initiates a forward jog A check identical to jog reverse is performed If there were no warnings set then the message Forward jog set on axis is set in the warnings window the FAST JOG input is invalidated for this axis the creep is set to the value given in the jog speed control and finally the JOG output is turned off thus enabling the forward jog function Jog speed This is the speed at which the jog will be performed This window limits this value to the range from zero to the demand speed for this axis where the demand speed is given by the SPEED axis parameter This value can be changed by writing directly to this control or using the jog speed control The scroll bar changes the jog speed up or down in increments of 1 unit per second Jog inputs These are the inputs which will be associated with the forward reverse jog functions They must be in the range 8 to the total number of inputs in the system as the input channels 0 to 7 are not bi directional and so the state of the input cannot be set by the corresponding output The input is expected to be on for the jog function to be d
328. om TJ1 MC 5 VR addresses 200 224 to the PC EM area addresses 50 74 The PC has Slave node address 28 and is connected to the RS 232C port See also HLM READ HLM COMMAND HLM STATUS HLM TIMEOUT HLS NODE SETCOM pc area value Data area Host link command PLC DM DM area RD or value 0 PLC IR CIO IR area RR or value 1 PLC LR LR area RL or value 2 PROGRAMMING MANUAL 94 0 BASIC commands pc area value Data area Host link command PLC HR HR area RH or value 3 PLC AR AR area RJ or value 4 PLC EM EM area RE or value 6 mc area value Data area MC TABLE Table variable array or value 8 MC VR Global VR variable array or value 9 3 2 144 HLS NODE Type Communication parameter Syntax HLS NODE Description HLS NODE parameter defines the Slave unit number for the Host Link Slave protocol The TJ1 MC__ will only respond to Host Link Master com mand strings with the unit number as specified in this parameter The valid range for this parameter is 0 31 The default value is 0 Arguments Example No example See also N A PROGRAMMING MANUAL trajexia 3 2 145 HW PSWITCH Type Syntax Description Arguments Example Example Axis command HW PSWITCH mode direction opstate table start table end The HW PSWITCH command turns on the OUT 0 output for the axis when the predefined axis measured
329. on 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 setto 0 or 1 See MOVECIRC distance3 The distance to move on the third axis in the BASE array axis in user units Example No example See also MOVECIRC PROGRAMMING MANUAL trajexia 0 3 2 175 Mathematical function Syntax expression1 MOD expression2 Description The MOD function returns the expression2 modulus of expression1 This function will take the integer part of any non integer input Arguments 1 Any valid BASIC expression expression2 Any valid BASIC expression Example gt gt PRINT 122 MOD 13 5 0000 See also N A 3 2 176 MOTION ERROR Type Syntax Description Arguments Example See also System parameter read only MOTION ERROR 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 4464 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 and the ERROR AXIS parameter will con tain the number of the first axis to have the error A motio
330. one of the following values depending on outcome 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 is 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 82 0 BASIC commands 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 Com mands Reference Manual cat W342 E 1 Section 3 node The node of the destination FINS server For more details see the Com munication 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 Integer VR value 0x82 Integer TABLE value 0xC2 float TABLE value remote offset The memory offset on the destination FINS server Range 0 65535 Note that this range will be mor
331. ons Commands W342 Describes FINS communica tions protocol and FINS com mands JUNMA series servo drive manual TOEP C71080603 01 OY Describes the installation and operation of JUNMA servo drives JUSP NS115 manual SIEP C71080001 Describes the installation and operation of the MECHA TROLINK II application mod ule PROGRAMMING MANUAL WARNING A Failure to read and understand the information provided in this manual may result in personal injury or death damage to the prod uct or product failure Please read each section in its entirety and be sure you understand the information provided in the section and related sections before attempting any of the procedures or opera tions given 0 Functions supported by unit versions During the development of Trajexia new functionality was added to the controller unit after market release This functionality is implemented in the firmware and or the FPGA of the controller unit In the table below the overview of the applicable functionality is shown related to the firmware and FPGA version of the TJ1 MC Functionality TJ1 MC Firmware TJ1 MC__ FPGA version version Full support TJ1 FLO2 V1 6509 21 and higher Support BASIC commands V1 6509 versions FINS COMMS Support TJ1 DRT V1 6509 versions Support TJ1 MC04 V1 6607 21 and higher TJ1 ML04 Verify the fir
332. ooting Note H After removing the cause of an error make sure to re ini tialise the MECHATROLINK II bus on the unit on which the error appeared Type in the Trajexia Tools terminal window MECHATROLINK n 0 where n is the number of the unit to which the unit that caused the error is connected 7 6 TJ1 FL02 7 6 1 System errors Indication Problem Solution All LEDs are off The power is off Turn the power on The TJ1 FL02 is defective Replace the TJ1 FL02 RUN LED is on EN or B EN LED is off The axis for which EN LED is off is not enabled Enable the axis perform WDOG ON and or AXIS ENABLE on the axis RUN LED is on A EN or B EN LED flashes There is an axis error for the axis for which EN LED flashes The TJ1 MC indicates the number of the axis with an axis error Remove the cause of the axis error and clear the axis error or restart the system PROGRAMMING MANUAL trajexia 305 0 noe tre A Application CUS RS 191 Application WINdOW REEL 194 B Bag example e M 291 BASIC Data O Xl hrean 25 Mathematical specications a 0m TEN 27 c
333. or axis 2 It is possible to program each axis with its own speed acceleration and other parameters PROGRAMMING MANUAL Example Example Example Example See also trajexia 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 accelera tion rate gt gt BASE 0 2 1 On the command line the base group order can be shown by typing BASE 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 gt gt BASE 2 gt gt PRINT BASE 2 0000 Printing BASE will return the current selected base axis AXIS 3 2 38 BASICERROR Type Syntax Description Arguments System command BASICERROR 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 GOTO command This command is required to be exe cuted once in the BASIC program If several commands are used only the one executed last is effective N A 52 0 BASIC commands Example See also ON BASICERROR GOTO error routine no error 1 STOP error routine IF no error 0 THEN PRINT The error RUN ERROR 0 PRINT occurred in line ERROR_LINE 0 ENDIF STOP If an err
334. or occurs in a BASIC command in this example the error routine will be executed The IF statement is present to prevent the program going into error routine when it is stopped normally ERROR LINE ON RUN ERROR 3 2 39 BATTERY LOW Type Syntax Description Arguments Example See also System parameter read only BATTERY LOW This parameter returns the current state of the battery condition If BATTERY LOWZ ON then the battery needs to be changed If BATTERY LOWZ OFF then battery condition is ok N A No example N A PROGRAMMING MANUAL trajexia 3 2 0 BREAK RESET Type System command Syntax BREAK RESET program name Description Used by Trajexia Tools 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 3 2 41 CAM Type Axis command Syntax CAM start point end point table multiplier distance Description CAM command is used to generate movement of an axis following a position profile which is stored in the TABLE variable array The TABLE val ues 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 2 to 64000 The TJ1 MC__ moves continuously between the values in
335. ording of the acquired data Yellow Data is being retrieved from the controller Set capture options When this option button is clicked the advanced oscilloscope configuration settings dialog box is displayed Advanced Oscilloscope options General information Displaying Controller Table Points If the oscilloscope is configured for both table and motion parameters then the number of points plotted across the display is determined by the time base and samples per division If the number of points to be plotted for the table parameter is greater than the number of points for the motion parameter the additional table points are not dis played but can be viewed by scrolling the table trace using the horizontal scrollbar The motion parameter trace does not move PROGRAMMING MANUAL trajexia 213 0 Trajexia Tools interface Data Upload from the controller to the oscilloscope If the overall time base is greater than a pre defined value then the data is retrieved from the controller in blocks hence the display can be seen to be updated in sections The last point plotted in the current section is seen as a white spot If the oscilloscope is configured to record both motion parameters and also to plot table data then the table data is read back in one complete block and then the motion parameters are read either continuously or in blocks depending upon the time base Even if the oscilloscop
336. orking range of the machine When the limit is reached the TJ1 MC__ will decelerate to 0 and then cancel the move Bit 9 of the AXISSTATUS axis parameter will be turned on while the axis position is greater than FS LIMIT Arguments Example No example See also AXIS AXISSTATUS UNITS PROGRAMMING MANUAL trajexia 3 2 131 FWD IN Type Syntax Description Sigma II Sigma 111 Junma Arguments Example Axis parameter FWD_IN 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 represent physically present inputs of TJ1 MC___ I O connector and are common for all axes Values 16 to 27 represent software inputs which can be freely used in programs and commands such as IN and OP These are also common for all axes Values 28 to 31 are directly mapped to driver inputs present on CN1 connector and they are unique for each axis Which driver inputs are mapped to inputs 28 to 31 depends on Servo Driver parameter Pn81E setting Recommended setting is Pn81E 0x4321 with the following map ping 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 also be set Note This input is active low input 28 1 40 input 29 CN1 41 e input 30 CN1 42 input 31 CN1 43 input 28 CN1 13 input 29 CN1 7 input 30 1 8 input 31 CN1 9 i
337. ormal signals caused by broken signal lines momentary power interruptions or other causes Not doing so may result in serious accidents WARNING Emergency stop circuits interlock circuits limit circuits and similar safety measures must be provided by the customer as external cir i e not in the Trajexia motion controller Not doing so may result in serious accidents WARNING When the 24 VDC output I O power supply to the TJ1 is over loaded 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 WARNING The TJ1 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 16 0 A A WARNING The TJ1 will turn off the WDOG when its self diagnosis function detects any error As a countermeasure for such errors external safety measures must be provided to ensure safety in the system WARNING Provide safety measures in external circuits i e not in the Tra jexia Motion Controller referred to as TJ1 in order to ensure safety in the system if an abnormality occurs due to malfunction of the TJ1 or another external factor affecting the TJ1 operation Not doing so may result in serious accidents WARNING
338. oscope table value used is zero However if this conflicts with programs running on the controller which might also require this section of the table the lower table value can be changed The upper oscilloscope table value is subsequently automatically updated based on the number of channels in use and the number of samples per grid division If you enter a lower table value which causes the upper table value to exceed the maximum permitted value on the controller then the original value is used by the oscilloscope Table Data Graph It is possible to plot controller table values directly the table limit text boxes enable the user to enter up to four sets of first last table indices Parameter checks If analogue inputs are being recorded then the fastest oscilloscope resolution sample rate is the number of analogue channels in msec ie 2 analogue inputs infers the fastest sample rate is 2msec The resolution is calculated by dividing the time base scale value by the number of samples per grid division It is not possible to enter table channel values in excess of the controller maximum TABLE size nor to enter a lower oscilloscope table value Increasing the samples per grid division to a value which causes the upper oscilloscope table value to exceed the controller maximum table value is also not permitted If the number of samples per grid division is increased and subsequently the time base scale is set to a faster value which cause
339. otor is attached There are three main concepts Inertia ratio Rigidity e Resonant frequency These concepts are described in the Hardware Reference Manual in the chapter System Philosophy This section shows example parameter values for 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 Drive Parameter value Description Pn103 716 Inertia ratio Pn110 0012 No autotuning PROGRAMMING MANUAL trajexia 229 0 Examples and tips Drive Parameter value Description 202 1 Gear ratio numerator 203 1 Gear ratio denominator Motion Parameter values Description UNITS 71 Working in encoder counts SPEED 200000 Speed setting ACCEL 1000000 Acceleration setting DECEL 1000000 Deceleration setting MOVEMENT 81920 10 Turns Speed mode examples In this mode the position loop is closed in Trajexia and the Speed loop is closed in the Servo Driver The Speed axis parameter is sent through the MECHATROLINK II network to the Servo Driver and reads the position feedback BASE 0 ATYPE 41 MECHATROLINK Speed mode SERVO 1 WDOG 1 DEFPOS 0 loop MOVE 81920 WAIT IDLE WA 100 DEFPOS 0 GOTO loop Example 1
340. ovement of an axis following a position profile in the TABLE variable array The motion is linked to the meas ured motion of another axis to form a continuously variable software gearbox The TABLE values are absolute position 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 2 to 64000 Being able to specify the start point allows the TABLE array to be used to hold more than one pro file and or other information The TJ1 MC__ moves continuously between the values 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 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 setto the end of the previous move The REMAIN axis parameter will hold the remainder of the
341. owing 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 3 2 62 D ZONE MIN Type Syntax Description Arguments System parameter D ZONE MlN value This sets works in conjunction with D ZONE MAX to clamp the DAC 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 PROGRAMMING MANUAL trajexia Example D ZONE 3 D ZONE 10 With these 2 parameters set as above the DAC 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 See also D ZONE MAX 3 2 63 DAC See S REF 3 2 64 DAC OUT See S REF OUT 3 2 65 DAC SCALE Type Axis parameter Syntax DAC SCALE Description parameter has 2 purposes 1 value 16 on power up on the built in axes of the system This scales the values applied to the higher resolution DAC so that the gains required on the axis are similar to those required on the other controllers 2 DAC SCALE may be set negative 16 to reverse the polarity of the DAC output signal When the servo is off the
342. pe 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 3 2 112 FAST JOG Type Syntax Description Arguments Example See also 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 7 As default the parameter is set to 1 no input is selected 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 79 0 BASIC commands 3 2 113 FASTDEC Type Syntax Description Arguments Example See also 3 2 114 FE Type Syntax Description Arguments Example See also Axis parameter FASTDEC Defaults to zero If a non zero FASTDEC is specified the axis will ramp to zero at this deceleration rate when an axis limit switch or position is reached N A No example N A Axis parameter read only FE The FE axis parameter contains the position error in user units This is calcu lated by the demand position DPOS axis parameter minus the measured
343. period of the TJ1 MC 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 PROGRAMMING MANUAL 40 0 BASIC commands 3 2 All BASIC commands 3 2 1 Addition Type Syntax Description Arguments Example See also Mathematical function expression1 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 3 2 2 Subtraction Type Syntax Description Arguments Example See also Mathematical function expression1 expression2 The operator subtracts expression2 from expression1 expression1 Any valid BASIC expression expression2 Any valid BASIC expression result 10 2 Assigns the value 8 to the variable result N A PROGRAMMING MANUAL trajexia 3 23 Multiplication Type Syntax Description Arguments Example See also Mathematical function expression1 expression2 The operator multiplies two expressions expression1 Any valid BASIC expression expression2 Any valid BASIC expression result 3 7 As
344. 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 PSWITCH command are stored in FIFO queue This command is applicable only to Flexible axis axes with ATYPE values 43 44 and 45 The command can be used with either or 5 parameters Only 1 parameter is needed to disable the switch or clear FIFO queue All five parameters are needed to enable switch After loading FIFO and going through the sequence of positions in FIFO if the same sequence has to be executed again FIFO must be cleared before exe cuting HW PSWITCH command with the same parameters mode 0 disable switch 1 on and load FIFO 2 clear FIFO 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 memory starting from TABLE 21 in increasing direction When the position stored in TABLE 21 is reached the OUT 0 output will be set on and then alternatively 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 cle
345. put 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 SERVO OFF the speed reference signal is deter mined by the S REF axis parameter The actual speed reference is depending on the servo motor To determine the speed reference in rounds per minute RPM multiply the 5 REF param eter value with the 5 RATE parameter value N A gt gt PRINT 5 REF OUT AXIS 0 288 0000 AXIS 5 REF OUTLIMIT SERVO 135 0 BASIC commands 3 2 237 SCOPE Type System command Syntax SCOPE control period table start table stop P1 2 Description 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 parameters are stored in the TABLE array and can then be read back to a computer and displayed on the Trajexia Tools Oscilloscope 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 Tools uses the SCOPE command when running the Oscilloscope function 2 To minimize calculation time for writing the real time data th
346. puts are mapped to inputs 28 to 31 depends on Servo Driver parameter Pn81E setting Recom mended setting is Pn81E 0 4321 with the following mapping As default the parameter is set to 1 no input is selected Note This input is active low input 28 1 40 input 29 CN1 41 input 30 CN1 42 input 31 CN1 43 input 28 CN1 13 input 29 CN1 7 input 30 1 8 input 31 CN1 9 input 26 CN1 2 input 27 1 1 For more information on setting driver parameter Pn81E see Servo Driver manual As default the parameter is set to 1 no inputs selected 81 0 BASIC commands 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 Arguments Example No example See also AXIS AXISSTATUS UNITS 3 2 120 FHSPEED Type Axis parameter Syntax FHSPEED Description FHSPEED axis parameter contains the feedhold speed This parameter can be set to a value in user units s at which speed the axis will move when the feed hold input turns on
347. quired to unlock the system Without the security code the system can not be recovered 3 2 170 MARK Type Axis parameter read only Syntax MARK Description The MARK is set to FALSE when the REGIST command has been executed and is set to TRUE when the primary registration event occurs Arguments 106 0 BASIC commands Example See also IF MARK AXIS 1 THEN PRINT Primary registration event for axis 1 occurred ENDIF AXIS REGIST REG POS 3 2 171 MARKB Type Syntax Description Arguments Example See also Axis parameter read only MARKB The MARKB is set to FALSE when the REGIST command has been exe cuted and is set to TRUE when the secondary registration event occurs N A IF MARKB AXIS 2 THEN PRINT Secondary registration event for axis 2 occurred ENDIF AXIS REGIST REG POSB PROGRAMMING MANUAL trajexia 3 2 172 MECHATROLINK Type Syntax System command MECHATROLINK unit 0 Detects and connects devices on MECHATROLINK II unit unit It is neces sary to use it to reset the network from a communication problem and to re detect servos that have been not detected EG when the A letter in the AXISSTATUS word becomes capital red MECHATROLINK unit 3 VR Returns the number of detected MECHATROLINK II devices after a MECHATROLINK unit 0 It is used by the STARTUP program to check that the number of detected MECHATROLINK II modules corresponds with the expected
348. r 145 TRANS DPOS mE 145 TRIGGER c HH 145 TROFE 145 MP 146 Hi 146 H M 146 Bc 147 UNLOCK qe 147 Bug EP 147 VERIFY HH 147 VERSION 147 148 VP SPEED 148 M 148 PROGRAMMING MANUAL 12 0 Contents traj exia 3 2 278 VRSTRING 149 852 219 WA ciet dete 149 92 280 WAIT ID
349. r the Host link command See the first table below offset The address of the specified PC memory area to read from Range 0 9999 length The number of words of data to be transferred Range 1 30 mc area The memory selection of the TJ1 MC__ to read the send data from See the second table below mc offset The address of the specified TJ1 MC__ memory area to write to Range for VR variables 0 1023 Range for TABLE variables 0 63999 READ 2 17 PLC DM 120 20 MC TABLE 4000 This example shows how to read 20 words from the PC DM area addresses 120 139 to s TABLE addresses 4000 4019 The PC has Slave node address 17 and is connected to the RS 422A port HLM COMMAND HLM STATUS HLM TIMEOUT HLS NODE HLM WRITE SETCOM trajexia ect 9 pc area value Data area Host link command PLC AR AR area RJ or value 4 PLC EM EM area RE or value 6 mc area value Data area MC TABLE TABLE variable array or value 8 MC VR Global VR variable array or value 9 pc area value Data area Host link command PLC DM DM area RD or value 0 PLC IR CIO IR area RR or value 1 PLC LR LR area RL or value 2 PLC HR HR area RH or value 3 PROGRAMMING MANUAL 3 2 141 HLM STATUS Type Syntax Description Arguments Example Communication parameter HLM STATUS PORT n The HLM STATUS parameter contain
350. ram 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 an offline VT100 terminal Within Trajexia Tools users can select the command from the Program menu program name Name of the program to be deleted gt gt DEL oldprog COPY NEW RENAME SELECT TABLE PROGRAMMING MANUAL trajexia 3 2 75 DEMAND EDGES Type Syntax Description Arguments Example See also 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 3 2 76 DEVICENET Type Syntax Description Arguments System command DEVICENET unit number 2 1 VR start outputs no outputs VR start inputs no inputs DEVICENET unit number 4 0 DEVICENET function 2 configures the TJ1 DRT for data exchange with the DeviceNet master unit and defines areas the VR memory where I O exchange takes place DEVICENET function 4 returns the data exchange sta tus of the TJ1 DRT Refer to the table for the description of the bits in the data exchange status word unit number Specifies the unit number of the TJ1 DRT in the Trajexia system start outputs The starting address in VR memory of the controller where the output data from the Devic
351. rameters in two banks Bank 1 the upper half of the window contains parameters that can be changed by the user Bank 2 the lower half of the window contains parameters that are set by the system software of the Trajexia system as the system processes commands and monitors the status of external inputs The separator that divides the two banks of data can be moved by the mouse When the user changes a unit parameter all parameters that use this parameter value are re read and adjusted by this factor Examples of the types of parameters that are affected by this parameter are SPEED e ACCEL e MPOS The parameter axistatus shows the status of the axis The colour of the characters in the parameter value indicates the status Green No error e Error char Description w Warning FE range a Drive Comms Error m Remote Drive Error f Forward limit r Reverse limit d Datum input h Feed Hold Input PROGRAMMING MANUAL fig 32 trajexia Axis Paramet m Axis lMinimaliser 206 0 Trajexia Tools interface char Description e Following Error X Forward Soft Limit y Reverse Soft Limit Cancelling Move Encoder Error The options for the Axis Parameter window are Axes Selects the axes for which the data is displayed Refresh To reduce the load on the Trajexia system the parameters in bank 1 are only
352. re are 2 x AN2900 Units connected as each has 4 analogue input channels Arguments Example No example See also N A 3 2 186 NEG OFFSET Type Syntax Description Arguments Example See also System parameter NEG OFFSET value For Piezo Operation This allows a negative offset to be applied to the output DAC signal from the servo loop The offset is applied after the SCALE function 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 situation is used value A BASIC expression No example N A PROGRAMMING MANUAL trajexia 0 3 2 187 NEW Type Program command Syntax NEW program Description NEW command deletes all program lines of the program in the controller NEW without a program name can be used to delete the currently 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 NEW TABLE The name TABLE must be in quotes Note This command is implemented for an offline VT100 terminal Within Trajexia Tools users can select the command from the Program menu Arguments Example No example See also COPY DEL RENAME SELECT TABLE 3 2 188 NEXT See FOR TO STEP NEXT 3 2 189 NIO Type System parameter Syntax NIO Description Returns th
353. rface traj exia Axis Type selects the ATYPE for this axis The value here will be included in the STARTUP program Drive Mode or Commission When the axis is set to Run its Run status and movements are fully controlled by the programs running in the TJ1 MC When the axis is set to Commission the run and movements are controlled externally via FINS this mode is implemented for use with the Jog feature and setup from CX Drive This is to avoid conflicts with the programs During commissioning the axis is considered as a virtual axis by the programs It is possible to read and write parameter from the drive at the same time from either the programs or via FINS independently of the mode e Launch CX Drive From Trajexia Tools it is only possible to read and write parameters of a Servo Driver If more Servo Driver a ae functionality is needed for example Read alarm code Jog Set njee r jae Exar rigidity Autotuning it is necessary to launch CX Drive Clicking E a this button starts CX Drive connected to the current axis via the TJ ML The only Servo Driver functionality not supported from CX Drive through MECHATROLINK II is the Trace functionality but the Trajexia Tools oscilloscope can be used instead If you change any parameter of the Servo Driver through CX Drive Dn the Trajexia Tools does not notice automatically Be careful to
354. rols are located at the bottom left of the oscilloscope screen There controls are as follows PROGRAMMING MANUAL trajexia 211 O E Trajexia Tools interface Time base The time base value is the time value of each horizontal division of the oscilloscope The time base is selected by the up down scale buttons either side of the current time base value box If the time base is greater than a pre defined value the data is retrieved from the controller in sections and not as a continuous trace of data The sections of data are plotted on the display as they are received The last point is a white spot X shift When the trace is completed while the time base is changed to a faster value only part of the trace is displayed Use the X shift scroll bar to view the complete trace If the oscilloscope is configured to record both motion parameters and plot table data the number of points plotted across the display can be determined by the motion parameter Additional table points that are not visible can be made visible with the scroll bar The motion parameter trace cannot be moved Single continuous trigger In single mode the oscilloscope runs until the oscilloscope is triggered and one set of data recorded by the controller is retrieved and displayed In continuous trigger mode the oscilloscope continues to run and retrieve data from the controller each time the oscilloscope is triggered and new data recorded The osc
355. rse effect will occur in the system before changing the operating mode of the system Not doing so may result in an unexpected operation Caution Resume operation only after transferring to the new CPU Unit the contents of the VR and table memory required for operation Not doing so may result in an unexpected operation Caution 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 Caution Do not pull on the cables or bend the cables beyond their natural limit Doing so may break the cables Caution Before touching the system be sure to first touch a grounded metallic object in order to discharge any static build up Otherwise it might result in a malfunction or damage PROGRAMMING MANUAL trajexia Caution UTP cables are not shielded In environments that are subject to noise use a system with shielded twisted pair STP cable and hubs suitable for an FA environment Do not install twisted pair cables with high voltage lines Do not install twisted pair cables near devices that generate noise Do not install twisted pair cables in locations that are subject to high humidity Do not install twisted pair cables in locations subject to excessive dirt and dust or to oil mist or other contaminants Caution Use the dedicated connecting cables specified in operation manu als to connect the Units Using commercially available RS 232C
356. ry content is held in the battery powered RAM memory and is preserved during power off The TABLE memory is also preserved when changing the battery if this is done quickly 2 3 3 Data structures and variables BASIC programs can store numerical data in various types of variables Some variables have predefined functions such as the axis parameters and system parameters other variables are available for the programmer to define as required in programming The TABLE global and local variables of the TJ1 MC explained in this section Furthermore also the use of labels will be specified TABLE variables The TABLE is an array structure that contains a series of numbers These numbers are used for instance to specify positions in the profile for a CAM or CAMBOX command They can also be used to store data for later use for example to store the parameters used to define a workpiece to be processed The TABLE is common to all tasks the TJ1 MC This means that the values written to the TABLE from one task can be read from other tasks TABLE values can be written and read using the TABLE command The maximum length of the array is 64000 elements from TABLE 0 to TABLE 63999 The TABLE array is initialized up to the highest defined element Global variables The global variables defined in VR memory are common to all tasks on the TJ1 MC__ This means that if a program running on task 2 sets VR 25 to a certain value then any oth
357. s 2 shear 0 MOVELINK synch dist acc dec synch dist acc 2 dec 2 acc dec line axis flying axis 1 ying 2 Cut length Wd asin ace SERVO AXIS flying axis ON SERVO AXIS shear axis ON Just affer synchronization cut operation is done on the fly during synchronization WDOG ON Cut length FIRST CYCLE acc 2 synch dist Make a first material cut Just after deceleration MOVEABS end pos AXIS shear axis acc 2 synch dist dec 2 Cut length WAIT UNTIL MTYPE AXIS shear axis 2 V n E E WAIT IDLE AXIS shear axis 2 i Ta First time hav a certain wait time becaus th MOVELINK 1 12 synch dist 2 cut lenght synch dist dec acc 4 1 4 axis material has been just been cut wait distance cut lenght 1 2 MOVELINK 0 wait distance 0 0 line axis Cut length l acc 2 AXIS flying axis WAIT UNTIL MTYPE AXIS flying axis 22 PROGRAMMING MANUAL 296 0 Examples and tips We start the line FORWARD AXIS line axis loop Update the line speed every cycle SPEED AXIS line axis line speed I Cutting movement at synchronized speed line cut synch dist l 1 dec shear _cut synch dist l_ 2 1 dec 2 MOVELINK shear cut line cut l 1 dec line axis AXIS flying axis WAIT UNTIL MPOS
358. s an unobtainable resolution the oscilloscope automatically resets the number of samples per grid division PROGRAMMING MANUAL trajexia Oscilloscope Configuration Oscilloscope Samples per division this may be reduced by Motion Perfect due to limitations imposed by the system servo period 3 Table range used for data capture From 7000 7050 Table Data Graph Points per division Fit to display Table ranges to graph From 0 0 cH2 0 cua 0 215 O E UOISIASYH Trajexia Tools interface Digital IO status This window allows the user to view the status of all the IO channels and toggle the status of the output channels It also optionally allows the user to enter a description for each line Digital inputs This shows the total number of input channels on the Trajexia Digital outputs This shows the total number of output channels on the Trajexia Display The display is divided up into banks containing 8 indicators representing blocks of 8 inputs or outputs Input Bank In These represent the status of the digital inputs In 0 to In 15 are the digital inputs built in in TJ1 MC Additional Digital inputs in the system are mapped automatically starting from In 32 Output Banks Out These represent the status of the digital outputs OP 8 to OP 15 are the digital outputs built in in TJ1 MC Additional Digital outputs in the system are m
359. s command together with other com mands 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 parame ter 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 num bers 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 For most parameters the size is normally 2 bytes Some special parame ters may be 4 bytes long Sizes for each parameter can be found in the Servo Driver manual value The value to be written into driver parameter mode The write mode Possible values 0 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 See also A trajexia DRIVE READ DRIVE RESET HEXADECIMAL INPUT Caution Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Driver when executing this command Oth erwise the program task will be paused until the connection of the other device to the Servo Driver is removed 3 2 90 EDIT Type Program command Syntax EDIT line number ED line number Description EDIT command starts the built
360. s move is all decel 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 The constant speed phase can be specified as follows MOVELINK 0 2 0 2 0 0 1 This is all constant speed The MOVELINK command lets the three sections to be added by summing the distance link distance link acceleration and link deceleration for each phase to produce the command as follows MOVELINK 1 1 8 0 8 0 8 1 In the program above the acceleration phase is programmed separately This is done to let an action be done at the end of the acceleration phase MOVELINK 0 4 0 8 0 8 0 1 MOVELINK 0 6 1 0 0 0 8 1 AXIS UNITS REP_OPTION PROGRAMMING MANUAL trajexia 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 can celled by setting bit 1 of REP OPTION parameter that is OPTION REP OPTION OR 2 5 Combination of options 1 and 4 6 Combination of options 2 and 4 3 2 181 MOVEMODIFY Type Syntax Description Arguments Example See also Axis command MOVEMODIFY position MM position The MOVEMODIFY command changes the absolute end position of the cur rent single axis linear move MOVE or MOVEABS If there is no current move or the curren
361. s that the Slave did not recognize the com recognized mand and has returned a IC response PROGRAMMING MANUAL trajexia 3 2 142 HLM TIMEOUT Type Syntax Description Arguments Example See also Communication parameter HLM TIMEOUT The HLM TIMEOUT parameter specifies the fixed timeout time for the Host Link Master protocol for both serial ports A timeout error will occur when the time needed to both send the command and receive the response from the Slave is longer than the time speci fied with this parameter The parameter applies for the HLM READ HLM WRITE and HLM COMMAND commands The HLM TIMEOUT parameter is specified in servo periods Command Response Characters Timeout gt gt TIMEOUT 2000 Consider the servo period of the TJ1 MC is set to 500 ms SERVO PERIOD 500 For both serial ports the Host Link Master timeout time has been set to 1 s HLM READ HLM COMMAND HLM STATUS HLS NODE HLM WRITE SETCOM SERVO PERIOD 93 0 BASIC commands 3 2 143 HLM WRITE Arguments Type Communication command Syntax WRITE port node pc area pc offset length mc area mc offset Description WRITE command writes data from the TJ1 MC__ to a Host Link Slave by sending a Host link command string containing the specified node of the Slave to the serial port The received response data will be written from either VR or
362. s the contents of the DRIVE STATUS word for that axis Drive I O shows the contents of the DRIVE INPUTS word for that axis Drive Clear executes DRIVE CLEAR Servo Driver alarm clear for that axis Drive Reset executes DRIVE RESET Software power on for that axis Drive monitor selects the monitor to be updated in DRIVE MONITOR PROGRAMMING MANUAL trajexia fig 33 Mechatrolink li Unio Address 0x44 0x47 0x48 0 49 Axis 3 6 8 SJDE SGDH SGDH 560 Version 0001 0042 0042 0042 Config Config 3 Close Modify STARTUP program fig 34 Mechatrolink Drive SGDH 01AE OY Address 0x47 Axis Status Configuration l Drive ID SGDH 01AE O Firmware Version po Motor ID SGMAH 01AAA61D OY Drive Status 1 Drive IjO Output Completed Forward Inhibit Warning Torque Limit Reverse Inhibit Brake Ready Latch Completed T Homing Servo In Range Speed Limit Encoder Phase Power Forward Soft Limit Encoder Phase B 1012 Machine Lock Reverse Soft Limit Encoder Phase 10 13 Home Position EXT1 1014 At Position Speed EX2 1015 Axis Type Mechatrolink Speed 7 Drive Monitor 5 7 Drive Clear Drive Mode ERA Run C Commission CX Drive Drive Reset 208 O E Trajexia Tools inte
363. s the status of the last Host Link Master command sent to the specified port The parameter will indicate the status for the HLM READ HLM WRITE and HLM COMMAND commands The sta tus bits are defined in the table below The HLM STATUS will have value 0 when no problems did occur In case of a 0 value any appropriate action such as a re try or emergency stop needs to be programmed in the user BASIC program Each port has an HLM STATUS parameter The PORT modifier is required to specify the port n The specified serial port 1 RS 232C serial port 1 2 RS 422A serial port 2 gt gt WRITE 1 28 PLC EM 50 25 MC 200 gt gt PRINT HEX HLM STATUS PORT 1 1 Apparently the CPU Unit is in RUN mode and does not accept the write oper ation 92 0 BASIC commands Example HLM COMMAND HLM TEST 2 0 2 PRINT HLM STATUS PORT 2 256 0000 A timeout error has occurred See also HLM READ HLM COMMAND HLM TIMEOUT HLS NODE HLM WRITE SETCOM Bit Name Description 0 7 code The end code can be either the end code which is defined by the Host Link Slave problem in sent command string or an end code defined because of a problem found by the Host Link Master problem in received response string 8 Timeout error A timeout error will occur if no response has been received within the timeout time This indicates communication has been lost 9 Command not This status indicate
364. s v Go fig 17 LAN or High Speed Internet a Wizard E New Connecti 17 Click on the General tab 18 Select Internet Protocol TCP IP in the list 19 Click Properties General Authentication Advanced Connect using E9 Intel R PRO 1000 MT Network Conr This connection uses the following items iei Client for Microsoft Networks ivi B File and Printer Sharing for Microsoft Networks 005 Packet Scheduler Internet Protocol TCP IP sa Description Transmission Control Protocol Internet Protocol The default wide area network protocol that provides communication across diverse interconnected networks Show icon in notification area when connected Notify me when this connection has limited or no connectivity PROGRAMMING MANUAL 189 0 Trajexia Tools interface trajexia 20 Click on the General tab fig 19 21 Select Use the following IP address perties 22 Type 192 168 0 251 address in the IP address field Son 23 Type 255 255 255 0 in the Subnet mask field assigned 24 Click OK Tee eae need to ask your network administrator for 25 Click OK btain an IP address automatically 26 Close the Network Connections screen P address 192 168 0 251 Subnet mask 255 255 255 0 Default gateway Use the followin
365. shock or vibration Caution Take appropriate and sufficient countermeasures when installing systems in the following locations Inappropriate and insufficient measures may result in malfunction Locations subject to static electricity or other forms of noise Locations subject to strong electromagnetic fields Locations subject to possible exposure to radioactivity Locations close to power supplies 17 0 Safety warnings and precautions A Caution The operating environment of the TJ1 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 TJ1 System Make sure that the operating environment is within the specified conditions at installation and remains within the specified condi tions during the life of the system Application precautions WARNING Do not start the system until you check that the axes are present and of the correct type The numbers of the Flexible axes will change if MECHATROLINK network errors occur during start up or if the MECHATROLINK II network configuration changes WARNING Check the user program for proper execution before actually run ning it in the Unit Not checking the program may result in an unexpected operation Caution Always use the power supply voltage specified in this manual An incorrect voltage may result in
366. signs the value 21 to the variable result N A 3 24 Division 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 41 0 BASIC commands 3 2 5 Type Syntax Description Arguments Example See also 3 2 6 Type Syntax Description Arguments Example See also Power Mathematical function expression 1 expression 2 The power operator raises expression 1 to the power of expression 2 This operation uses floating point algorithms and may give small deviations for integer calculations expression 1 A BASIC expression expression 2 A BASIC expression result 2 5 This assigns the value 32 to variable result N A Is equal to Mathematical function expression1 expression2 The operator returns TRUE if expression1 is equal to expression2 other wise it returns FALSE expression1 Any valid BASIC expression expression2 Any valid BASIC expression IF a 10 THEN 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 PROGRAMMING MANUAL 3 2 7 Type Sy
367. starts the Check Project window when connected to the Trajexia system A comparison is made between the program files in the Trajexia system and the program files on the PC If the program files are different the Check Projects window shows Save Load e Change New Resolve Cancel Save Uploads the project that is in the Trajexia system to the PC A project of the same name on the PC is overwritten Before you save to the PC make sure that the program on the PC has a back up copy first Load Downloads the project that is in the PC to the Trajexia system The project on the Trajexia system is overwritten Before you load to the Trajexia system make sure that the program on the Trajexia system has a back up copy first Change Lets you open a project that is on your PC that is different to the default project If the project on the Trajexia system and the PC are not the same you can use Change to select a different project on the PC Trajexia Tools again checks both projects This is needed when working on multiple applications with different projects PROGRAMMING MANUAL trajexia fig 21 Check project C Program Files Trajexia Project01 Project01 prj Controller Project 191 6 191 6 PROGRAMOT STARTUP Project01 prj Reading directory from project file Comparing controller defined in project with connected Checking controller programs against project
368. t by prefixing the number with the character Valid range is from 0 0 to OXFFFFFF Example gt gt VR 0 SFF PRINT VR 0 All mathematical calculations are done in floating point format This implies that for calculations of with larger val ues the results may have limited accuracy The user should be aware of this when developing the motion con trol application PROGRAMMING MANUAL trajexia 255 0000 A value can be printed in hexadecimal by using the HEX function Negative values result in the 2 s complement hexadecimal value 24 bit Valid range is from 8 388 608 to 16 777 215 Example gt gt TABLE 0 10 65536 gt gt PRINT HEX TABLE 0 HEX TABLE 1 FFFFF6 10000 Positioning For positioning the TJ1 MC___ will round up if the fractional encoder edge distance calculated exceeds 0 9 Otherwise the fractional value will be rounded down The internal measured position and demanded position of the axes represented by the MPOS and DPOS axis parameters have 32 bit counters Floating point comparison The comparison function considers a small difference between values as equal to avoid unexpected comparison results Therefore any two values for which the difference is less than 1 19x10 9 are considered equal Precedence The precedence of the operators is given below 1 Unary minus NOT 2 2 3 4 MOD 5 6 lt gt gt gt lt lt 7 8 Leftto right
369. t in a program 3 1 8 Program control commands Name Description HEXADECIMAL INPUT Assigns a hexadecimal number to a variable Name Description FOR 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 program execution returns to the next instruction after a RETURN on page 132 is given GOTO Jumps to the line containing the label AXIS Sets the axis for a command axis parameter read or assign ment 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 PROGRAMMING MANUAL 38 0 BASIC commands trajexia Name Description Name Description CLEAR PARAMS Clears all parameter sand variables stored in flash EPROM to SCOPE Programs the system to automatically store up to 4 parameters their default values every sample period to the TABLE variable array CONSTANT Declares a constant for use in BASIC program SET BIT Sets the specified bit in the specified VR variable to one DATE Prints the current date as a string TABLE Writes and reads data to and from the
370. t line and resumes mal 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 X program The name of the program for which to suspend tracing Example gt gt TROFF lines See also SELECT TRON 145 0 BASIC commands 3 2 267 TRON Type Program command Syntax TRON Description TRON command creates breakpoint in a program that will suspend pro gram execution at the line following the TRON command The program can then for example be executed one line at a time using the STEPLINE com mand Notes e Program execution can be resumed without using the STEPLINE com mand by executing the TROFF command The trace mode can be stopped by issuing a STOP or HALT command Trajexia Tools highlights lines containing TRON in the Edit and Debug Windows Arguments Example TRON MOVE 0 10 MOVE 10 0 TRON 0 10 10 0 See also SELECT TROFF PROGRAMMING MANUAL trajexia 0 3 2 268 Constant read only Syntax TRUE Description TRUE constant returns the numerical value 1 Arguments Example test t IN 0 AND 2 IF t TRUE THEN PRINT Inputs are ON ENDIF See also N A 3 2 269 TSIZE Type System parameter read only Syntax TSIZE Description TSIZE parameter returns t
371. t move is not a linear move then MOVEMODIFY is treated as a MOVEABS command The ENDMOVE parameter will contain the posi tion 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 No example AXIS MOVE MOVEABS UNITS 115 0 BASIC commands 3 2 182 MPOS Type Syntax Description Arguments Example See also Axis parameter read only MPOS 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 O at start up The range of the measured position is controlled with the DIST and REP OPTION axis parameters N A WAIT UNTIL MPOS gt 1250 SPEED 2 5 UNITS AXIS DEFPOS ENCODER FE OFFPOS REP DIST REP OPTION UNITS 3 2 183 MSPEED Type Syntax Description Arguments Example See also Axis parameter read only MSPEED The MSPEED parameter contains the measured speed in units s It is calcu lated 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 spee
372. t was on when the PSWITCH was turned off The OP command can be used to turn off an output as follows PSWITCH 2 OFF 14 Turn OFF pswitch controlling OP 14 Note The physical switches that are used with PSWITCH are not fast hard ware switches so switching is done by software which can introduce some small delays in operation Fast hardware switching can be used only with axes connected the TJ1 FL02 Use the HW PSWITCH command PROGRAMMING MANUAL trajexia 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 126 0 BASIC commands Example See also A rotating shaft has a cam operated switch which has to be changed for differ ent 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 us
373. tandard Windows short cut keys In addition it provides BASIC syntax highlighting program formatting and program debugging facilities Debug Checks the syntax of a program and gives possible solutions The program is opened in a special trace mode that executes line by line You can set breakpoints in the program to run the program until the breakpoint is reached The current line of code is highlighted in the debug window When program runs in debug mode any open editor is set to debug mode and becomes read only Copy Copies the contents of a program to another program Rename Changes the name of a program Delete Deletes the program from the file structure fig 29 trajexia Program Tools External Options W Mew Edit Debug Ctrl N Ctrl Shift D Copy Rename Delete Delete All Compile Compile All Run Start Stepping Stop Stop All Halt Ctrl R Ctrl D Ctrl 5 Ctrl F Set Power up mode PROGRAMMING MANUAL 203 O E Trajexia Tools interface Delete all Deletes all the programs from the file structure Compile Compiles the current program in the project Compile all Compiles all programs in the project Run Executes the current program in the specified process Start stepping Execute the current program in the specified process in the step mode line by line Stop The Stop command stops the program in the TJ1 MC controller This is not the same as
374. tch variables Not implemented for Trajexia PROGRAMMING MANUAL 219 0 Trajexia Tools interface Analog inputs Monitors the value present in the remote analogue inputs module The inputs are automatically added to the system starting from AINO when one or more AN2900 module is detected Terminal The terminal window is a text editor that gives a direct connection to the Trajexia system Most of the functions that must be performed during the installation programming and commissioning of a system with a Trajexia have been automated by the options available in the Trajexia Tools menu options However if direct communication is required the terminal window may be used Select channel When Trajexia Tools is connected to the controller the terminal tool will show a dialog to select the communications channel Channel 0 is used for the Trajexia command line and channels 5 6 and 7 are used for communication with programs running on the Trajexia Select the required channel and press OK to start a terminal tool on the selected channel Only one terminal tool or keypad tool can be connected to a channel at one time PROGRAMMING MANUAL trajexia fig 43 Terminal Edit Options vri00 Log Off channel 4 Cancel 220 0 Trajexia Tools interface 5 5 5 Options menu In the Options menu the system options for the Trajexia system are set Communications
375. tem command terminal only LIST GLOBAL When executed from the command line terminal channel 0 returns all the currently set GLOBAL and CONSTANT parameters N A 105 0 BASIC commands Example In an application where the following GLOBAL and CONSTANT have been set CONSTANT cutter 23 GLOBAL conveyor 5 gt gt 115 GLOBAL Global VR conveyor 5 Constant Value cutter 23 0000 See also N A 3 2 168 LN Type Mathematical function Syntax LN expression Description LN function returns the natural logarithm of the expression The input expression value must be greater than 0 Arguments gt expression Any valid BASIC expression Example gt gt PRINT LN 10 2 3026 See also N A PROGRAMMING MANUAL trajexia ccc o 3 2 169 LOCK Type System command Syntax LOCK code UNLOCK code Description LOCK command prevents the program from being viewed modified or deleted by personnel unaware of the security code 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 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 A The security code must be remembered it will be re
376. tement RUN your program is used at the end of the Startup pro gram 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 Example THE FIRST PART OF THE PROGRAM IS GENERATED AUTOMATICALLY BY THE INTELLIGENT AXIS WINDOW IN TRAJEXIA TOOLS IT CONSISTS OF A CHECK SEQUENCE TO VERIFY THAT THE DETECTED AXIS CONFIGURATION IS THE EXPECTED ONE YES TH PROGRAM FINISHES AND STARTS SHELL 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 devices Unit 0 NOT MECHATROLINK 0 3 0 THEN PRINT Error getting device count for unit 0 STOP I ELSE IF VR 0 3 THEN PRINT Incorrect device 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 PROGRAMMING MANUAL Examples and tips trajexia 227 0 Examples and tips trajexia ELSE IF VR 0
377. ter The REGIST command enables a record of one registration event on the par ticular registration input 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 must be allocated to CN1 inputs with the driver parameter Pn511 For example 511 654 sets the connections of EXT1 to CN1 pin44 EXT2 to CN1 pin45 and EXT3 to CN1 pin46 The table below shows how to configure the external inputs individually Note To configure EXT1 EXT2 and registration signals parameter 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 128 0 BASIC commands trajexia Example REGIST 4 1 AXIS 1 Registra Parameter Parameter value Description This command selects the primary registration event that occurs on the rising tion signal number edge of REG 0 input signal for the axis 1 EXT 1 Pn511 1 0 to 3 Not used Example REGIST 48 64 128 512 1024 AXIS 2 This command selects secondary registration event that occurs on the falling Input from 1 44 Rising edge edge of AUX IN input signal with exclusive windowing and filtering function for 5 Input from CN1 pin45 Rising edge the axis 2 6 Input from CN1 pin46
378. the TABLE to allow a number of points to define a smooth profile Two or more CAM commands can be executed 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 parameters deter mine 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 53 0 BASIC commands 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 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 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 system is being pro grammed in mm an
379. the number of encoder edges inch the speed is set in inches Arguments Example BASE 2 CREEP 10 SPEED 500 DATUM 4 CREEP AXIS 1 10 SPEED AXIS 1 500 DATUM 4 AXIS 1 See also AXIS DATUM UNITS 3 2 60 D_GAIN Type Axis parameter Syntax D_GAIN Description The D_GAIN axis parameter contains the derivative gain for the axis The derivative output contribution is calculated by multiplying the change in Fol lowing Error with D_GAIN The default value is 0 Add the derivative gain to a system to produce a smoother response and the use of a higher proportional gain High values can cause oscillation Note The servo gain must only be changed when the SERVO is off Arguments 60 0 BASIC commands Example See also No example AXIS I GAIN OV GAIN P GAIN VFF GAIN 3 2 61 D ZONE Type Syntax Description Arguments Example See also System parameter D ZONE MAX value This sets works in conjunction with D ZONE MIN to clamp the DAC output to zero when the demand movement is complete and the magnitude of the Fol lowing Error is less than the D ZONE MIN value The servo loop will be reac tivated when either the Following Error rises above the D ZONE MAX value or a fresh movement is started N A D ZONE 3 D ZONE 10 With these 2 parameters set as above the DAC output will be clamped at zero when the movement is complete and the Foll
380. the power is off It would of course be necessary to provide a means of resetting completely 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 READ SET TABLE PROGRAMMING MANUAL trajexia 0 3 2 278 VRSTRING Type System command Syntax VRSTRING vr start Description Combines the contents of an array of VR variables so that they can be printed as a text string All printable characters will be out put and the string will terminate at the first null character found i e VR n contains 0 Arguments start number of first VR in the character array Example PRINT 5 VRSTRING 100 See also N A 3 2 279 WA Type System command Syntax WA time Description WA command pauses program execution for the number of milliseconds specified for time The command can only be used in a program Arguments time The number of milliseconds to hold program execution Example The following lines would turn ON output 7 two seconds after turn ing off output 1 1 WA 2000 OP 7 ON See also N A 149 0 BASIC commands 3 2 280 WAIT IDLE Type Syntax Description Arguments Example Example Explanation See also System command WAIT IDLE The WAIT IDLE command suspends program execution until the base axis has finished executing its current move and
381. time Also note that neither of these two inputs can be accessed using the command IN For example the command IN 29 returns the status of controller software input 29 unique for all axes which has a different status than Servo Driver inputs mapped to the same number You can find more information on mapping of MECHATROLINK II Servo Drivers inputs into the Trajexia space in the Trajexia Programming Manual at the BASIC commands DATUM FHOLD FWD and REV IN 252 0 Examples and tips 6 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 pre
382. tion you can prefer a degree of angle or its fraction For more information on the UNITS axis parameter see section 3 2 270 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 Conversion between encoder counts and user defined units Two very important parameters of the Sigma ll Servo Driver for conversion of encoder counts into user units are Pn202 and Pn203 If using a servo motor with an absolute encoder setting parameter Pn205 is also necessary trajexia PROGRAMMING MANUAL 239 0 Examples and tips 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 TJ1 MC 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 202 and Pn203 see the Sigma ll Servo Driver manual The UNITS axis parameter eff
383. tion flow using the BASIC commands GOTO and GOSUB To define a label it must appear as the first statement on a line and it must be ended by a colon Labels can be character strings of any length but only the first 15 characters are significant Using variables and labels Each task has its own local labels and local variables For example consider the two programs shown below trajexia start start FOR 1 to 100 a 0 MOVE a REPEAT WAIT IDLE 1 GOTO start UNTIL 300 start These two programs when run simultaneously in different tasks have their own version of variable a and label start If you need to hold data in common between two or more programs VR variables should be used Or alternatively if the large amount of data is to be held the TABLE memory can be used To make a program more readable when using a global VR variable two approaches can be taken The first is using a named local variable as a constant in the VR variable The local constant variable however must be declared in each program using the global VR variable Using this approach the example below shows how to use VR 3 to hold a length parameter common for several programs start start GOSUB Initial GOSUB Initial VR length x MOVE VR lengtnh PRINT VR length Initial Initial length 3 length 3 RETURN RETURN The other approach is even more readable
384. to the speed There is a soft profile due to the low rigidity setting low gain Note EH 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 depending on the graph Green MPOS Measured Axis position 50000 units divi sion The parameter values for the example are PROGRAMMING MANUAL trajexia 236 0 Examples and tips Motion Parameter values 001 4 109 0 Example 2 The Following Error reduces as the rigidity increases The parameter values for the example are Motion Parameter values 001 6 109 0 Example 3 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 001 8 109 0 PROGRAMMING MANUAL trajexia 237 0 Examples and tips Example 4 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 001 6 109 95 Example 5 With the feedforward set to 100 the Following Error is very small and proportional
385. tored 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 The REGIST axis command In Trajexia you do a registration with the REGIST axis command This command takes one argument This argument determines which external input is registered whether the registration is executed on the rising edge or on the falling edge of the input PROGRAMMING MANUAL trajexia 259 0 Examples and tips signal whether the windowing function is used and other options For more information on the REGIST command refer to section 3 2 219 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 Servo Driver analog interface and the TJ1 FLO2 the registration is done in the hardware of the TJ1 FLO2 The different registrations are described below Registration in the Sigma ll Servo Driver Registration in the Sigma ll Servo Driver occurs when an axis assigned to the Sigma ll Servo Driver is connected to the Trajexia system via the MECHATROLINK II
386. tput start is the start address of the output data range of VR variables Output count is the number of VR variables in the output data range input start is the start address of the input data range of VR variables input count is the number of VR variables in the input data range PROGRAMMING MANUAL trajexia 173 O E Communication protocols Note The maximum number of VR variables to exchange data is 32 Note If you use an OMRON DeviceNet master it is advised to select either input count or output count with a value of 4 8 16 or 32 for the VR variables After you have executed the command DEVICENET unit number 2 data arrays are automatically exchanged The data exchanged between the TJ1 DRT and the DeviceNet master is in 16 bit integer format Each word exchanged ranges from 32768 to 32767 A VR variable can hold a 24 bit number and it can also hold fragments The exchange with the DeviceNet master does not support values outside the range 32768 to 32767 or fragments PROGRAMMING MANUAL trajexia 174 0 Communication protocols Configure the DeviceNet network To configure the OMRON CJ1W CS1W DRM21 DeviceNet master to exchange VR variables with the Trajexia system do these steps 1 Start the CX Integrater in the CX ONE software tool 2 Select Network from the Insert menu 3 Select DeviceNet from the Select Network screen The Network view shows
387. trol panel The control panel allows a quick and easy way of accessing to the most commonly used controls to handle and commission a project 5 4 2 Menu bar The menu bar has these items Project Controller Program Tools External Options Window Help The menus are described in detail in section Menu descriptions p 196 PROGRAMMING MANUAL Took Window Heb REDBE Ata hie 6 Run RECTION SYPFOSRA v 194 0 Trajexia Tools interface 5 4 3 Toolbar B E F E w Connect Disconnect Terminal Axis Parameters Intelligent drives Oscilloscope Keypad Jog Axis Digital 10 Analog input Connects the Trajexia Tools to the Trajexia system Refer to Connect in Controller menu p 198 Disconnects the Trajexia Tools from the Tra jexia system Refer to Disconnect in the menu Controller menu p 198 Command line editor Refer to Terminal in the Tools menu p 205 Refer to Axis parameters in the Tools menu p 205 Refer to Intelligent drives in the Tools menu p 205 The software oscilloscope can be used to trace axis and motion parameters This helps to program development and system commissioning Refer to oscilloscope in the Tools menu p 205 Not implemented in Trajexia
388. ts Example See also ADDAX AXIS 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 to by ADDAX N A gt gt BASE 0 ADDAX 2 gt gt PRINT ADDAX AXIS 2 0000 ADDAX AXIS PROGRAMMING MANUAL trajexia ccc o 3 2 24 AIN Type System parameter Syntax AlN analogue chan Description 10V analogue input channels are provided by connecting JEPMC AN2900 modules on the MECHATROLINK II bus 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 Arguments analogue chan Analogue input channel number 0 31 Example MOVE 5000 REPEAT a AIN 1 IF lt 0 THEN 0 SPEED a 0 25 UNTIL 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 where the output is at 4V when the loop is at its longest See also N A 3 2 25 AND Type Mathematical operation Syntax expression1 AND expression2 47 0 BASIC commands Description Arguments Example Examp
389. turns 1 if successfully executed and O if failed The command sent to the inverter will correspond with the bits given in the table below Arguments module The number of the TJ1 ML__ that the inverter is connected to station The 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 Example No example See also N A Bit Value Command Description 0 1 Run forward 100 0 BASIC commands Bit Value Command Description 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 PROGRAMMING MANUAL trajexia 3 2 159 INVERTER READ Type Syntax Description System command INVERTER READ module station 0 param number param size VR
390. ue 40000000H with other Atype Units 95 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 69 0 BASIC commands 3 2 84 DRIVE INPUTS Type Axis parameter Syntax DRIVE INPUTS Description This parameter monitors the status of the inputs of the Servo Driver con nected via the MECHATROLINK II bus The parameter value is updated each SERVO PERIOD cycle It is a bit wise word with the bits as listed in the table below The recommended setting is 81 4321 8 511 654 Arguments Example All inputs can be monitored in this word as follows Sigma ll Servo Driver CN1 40 DRIVE INPUTS bit 12 CN1 41 DRIVE INPUTS bit 13 CN1 42 DRIVE INPUTS bit 14 CN1 43 DRIVE INPUTS bit 15 CN1 44 DRIVE INPUTS bit 06 CN1 45 DRIVE INPUTS bit 07 CN1 46 DRIVE INPUTS bit 08 Example All inputs can be monitored in this word as follows Junma Servo Driver CN1 1 DRIVE INPUTS bit 6 CN1 2 DRIVE INPUTS bit 2 CN1 3 DRIVE INPUTS bit 1 CN1 4 DRIVE INPUTS bit 0 See also N A trajexia Bit Description Sigma ll Description Junma number 6 EXT1 Signal selected with Pn511 1 EXT1 7 EXT2 Signal selected with Pn511 2 N C 8 EXT3 Signal selected with Pn511 3 N C 9 BRK Brake output BK 10 Reserved E STP 11 Reserved N C 12 1012 CN1 input signal selected in Pn81E 0
391. urns 1 if successfully executed and 0 if failed The result if any is returned in the selected VR PROGRAMMING MANUAL 102 0 Arguments Example See also module The number of the TJ1 ML that the inverter is connected to Station 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 See the inverter manual e VR The address in the VR memory of the TJ1 MC__ where the new value for the parameter is 0 just write 1 write and enter 2 write and config value The new value that is written No example N A If you have to transfer many parameters at the same time the most efficient way is to use MODE for all but the last parameter and MODE 1 for the last parameter MODE 0 is executed faster than MODE 1 PROGRAMMING MANUAL trajexia BASIC commands 3 2 161 JOGSPEED Type Axis parameter Syntax JOGSPEED Description 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 Arguments Example No example See also AXIS AXIS FAST JOG
392. virtual WAIT IDLE AXIS virtual OFFPOS label length correction REGIST 1 WAIT UNTIL 0 GOTO loop PROGRAMMING MANUAL trajexia fig 61 OFFPOS correction labeller conveyor 299 0 Troubleshooting 7 Troubleshooting 71 Voltage and analysis tools Check the voltage to the power supply input terminals Make sure the voltage is within the specified range If the voltage is outside the specified range the system can operate incorrectly To diagnose errors for the TJ1 MC__ and the TJ1 ML___ and to troubleshoot these units use the Trajexia Tools software tool To diagnose errors for the TJ1 PRT and to troubleshoot this unit use a PROFIBUS configurator and monitoring tool for example OMRON CX PROFIBUS A Caution Disconnect all cables before you check if they have burned out Even if you have checked the conduction of the wiring there is a risk of conduction due to the return circuit Caution If the encoder signal is lost the servo motor can run away or an error can be generated Make sure that you disconnect the motor from the mechanical system before you check the encoder signal When you troubleshoot make sure that nobody is inside the machine facilities and that the facilities are not dam aged even if the servo motor runs away Check that you can immediately stop the machine using an emergency stop when the motor runs away A tr
393. ween tasks Notes TABLE and VR data 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 pro gram writes to the global variable at a time TABLE and VR data in RAM will be lost when the power is switched off 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 15 VR val 1 2555 148 0 BASIC commands Example 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 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 positions are full WAIT UNTIL IN 3 ON GOTO movep load Put load in position and mark array 15 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
394. witch and searches the next Z mark of an encoder DATUM 6 Does an origin search in reverse direction using the input selected in DATUM switch and searches the next Z mark of an encoder For more details on these pre defined homing sequences see section 3 2 68 In some situations more complex homing sequences are required e Absolute switch origin search plus limit switches Origin search against limit switches Origin search against hardware parts blocking movement e Origin search using encoder reference pulse Zero Mark e Static origin search forcing a position from a user reference Static origin search forcing a position from an absolute encoder PROGRAMMING MANUAL 253 0 Examples and tips 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 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 EU For safety reasons limit switches are normally closed 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
395. with the AXISSTATUS command In the Trajexia Tools terminal window type PRINT AXISSTATUS AXIS nn where nn is the axis number The return value of the AXISSTATUS command contains the axis error code See the AXISSTATUS command You can also open the Axis Parameter window in Trajexia Tools and check the AXISSTATUS field of the axis that caused the error The bits that indicate the cause of the error show in big red letters To remove the error do these steps 1 Correct the value 2 Reset the controller or click the Axis status error button Error or alarm on Servo Driver assigned to the axis If an error or an alarm on the Servo Driver Driver assigned to the axis causes an axis error the drive alarm shows on the LED display of the drive You can also open the Axis Parameter window in Trajexia Tools and check the AXISSTATUS field of the axis that caused the error The return value of the AXISSTATUS command has the second bit bit a Servo Driver communication error and or the third bit bit m Servo Driver alarm show in big red letters To remove the error do these steps 1 Refer to the Servo Driver manual to determine the cause of the error and solve the error 2 Resetthe controller or click the Axis status error button PROGRAMMING MANUAL trajexia 7 2 3 Unit errors Unit errors show on the LED display of the TJ1 MC___ as Unn where nn is the number of the unit that caused the error There are four possible causes
396. y Table ranges to graph From To Block O 1000 1999 Block1 2000 2999 Block 2 3000 3999 Block3 009 800 PROGRAMMING MANUAL 273 0 Examples and tips The capture result is given in the figure In the example given above the value of the UNITS parameter is set to encoder counts The position of the master axis MPOS 5 0 is given in red Table Block 0 Table 1000 to Table 1999 see the settings in the Oscilloscope Configuration window 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 Table Block 1 Table 2000 to Table 2999 see the settings in the Oscilloscope Configuration window 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 Table Block 3 Table 4000 to Table 4999 see the settings in the Oscilloscope Configuration window 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 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 curv
397. y C commands It does not Header Name BASIC command RUN MON PRG code required RR CIO AREA READ HLM READ Valid Valid Valid RL LR AREA READ HLM READ Valid Valid Valid RH HR AREA READ HLM READ Valid Valid Valid RD DM AREA READ HLM READ Valid Valid Valid RJ AR AREA READ HLM READ Valid Valid Valid RE EM AREA READ READ Valid Valid Valid WR CIO AREA WRITE HLM WRITE Not valid Valid Valid WL LR AREA WRITE HLM_WRITE Not valid Valid Valid WH HR AREA WRITE HLM_WRITE Not valid Valid Valid WD DM AREA WRITE HLM_WRITE Not valid Valid Valid WJ AR AREA WRITE HLM_WRITE Not valid Valid Valid WE EM AREA WRITE HLM_WRITE Not valid Valid Valid sc STATUS CHANGE HLM COMMAND Valid Valid Valid TS TEST HLM COMMAND Valid Valid Valid MM PC MODEL READ HLM COMMAND Valid Valid Valid 2 HLM COMMAND Valid Valid Valid command only t INITIALIZE HLM COMMAND Valid Valid Valid command only 160 0 Communication protocols trajexia Header Name BASIC command RUN MON PRG code required IC Undefined command Valid Valid Valid response only Caution You must execute the Host Link master commands from one pro gram task only to avoid any multi task timing problems A End codes These are the end codes defined in the HLM_STATUS parameter Caution The Host Link master commands provide the too

Download Pdf Manuals

image

Related Search

Related Contents

Keys Fitness ET5000 User's Manual  Enermax Aurora Premium  Lyra Jukebox User`s Guide - Pdfstream.manualsonline.com  Xerox XA3-17 Monitor User Guide Manual Operating Instructions  McAfee Enterprise Security Manager 9.5.0 Produkthandbuch  APC Isolation and Step  INSTALLATION & OPERATING INSTRUCTIONS IMPINGER  

Copyright © All rights reserved.
Failed to retrieve file