Table of contents
9.10 String parameters....................................................................................................................... 313
String processing functions................................................................................................................................ 313
Assigning string parameters............................................................................................................................... 314
Chain-linking string parameters......................................................................................................................... 315
Converting a numerical value to a string parameter..................................................................................... 316
Copying a substring from a string parameter................................................................................................ 317
Reading system data............................................................................................................................................ 318
Converting a string parameter to a numerical value..................................................................................... 319
Testing a string parameter.................................................................................................................................. 320
Determining the length of a string parameter................................................................................................ 321
Comparing the lexical order of two alphanumerical strings........................................................................ 322
Reading out machine parameters..................................................................................................................... 323
9.11 Preassigned Q parameters......................................................................................................... 325
Values from the PLC: Q100 to Q107................................................................................................................ 325
Active tool radius: Q108....................................................................................................................................... 325
Tool axis: Q109...................................................................................................................................................... 326
Spindle status: Q110............................................................................................................................................. 326
Coolant on/off: Q111............................................................................................................................................ 326
Overlap factor: Q112............................................................................................................................................. 326
Unit of measure in the NC program Q113....................................................................................................... 327
Tool length: Q114.................................................................................................................................................. 327
Measurement result from programmable touch-probe cycles: Q115 to Q119........................................ 327
Qparameters Q115 and Q116 for automatic tool measurement............................................................... 328
Calculated coordinates of the rotary axes: Q120 to Q122........................................................................... 328
Measurement results from touch-probe cycles............................................................................................. 329
9.12 Accessing tables with SQL statements....................................................................................... 333
Introduction............................................................................................................................................................. 333
Programming SQL commands........................................................................................................................... 335
Overview of functions........................................................................................................................................... 336
SQL BIND................................................................................................................................................................. 337
SQL EXECUTE......................................................................................................................................................... 338
SQL FETCH............................................................................................................................................................. 343
SQL UPDATE........................................................................................................................................................... 345
SQL INSERT............................................................................................................................................................ 347
SQL COMMIT.......................................................................................................................................................... 348
SQL ROLLBACK...................................................................................................................................................... 349
SQL SELECT............................................................................................................................................................ 351
Examples................................................................................................................................................................. 353
9.13 Programming examples.............................................................................................................. 355
Example: Rounding a value................................................................................................................................. 355
Example: Ellipse..................................................................................................................................................... 356
Example: Concave cylinder machined with ball-nose cutter....................................................................... 358
Example: Convex sphere machined with end mill.......................................................................................... 360
HEIDENHAIN | TNC620 | Klartext Programming User's Manual | 10/2023 19