Table of contents
9.10 String parameters....................................................................................................................... 321
String processing functions................................................................................................................................ 321
Assigning string parameters............................................................................................................................... 322
Chain-linking string parameters......................................................................................................................... 323
Converting a numerical value to a string parameter..................................................................................... 324
Copying a substring from a string parameter................................................................................................ 325
Reading system data............................................................................................................................................ 326
Converting a string parameter to a numerical value..................................................................................... 327
Testing a string parameter.................................................................................................................................. 328
Determining the length of a string parameter................................................................................................ 329
Comparing the lexical order of two alphanumerical strings........................................................................ 330
Reading out machine parameters..................................................................................................................... 331
9.11 Preassigned Q parameters......................................................................................................... 333
Values from the PLC: Q100 to Q107................................................................................................................ 333
Active tool radius: Q108....................................................................................................................................... 333
Tool axis: Q109...................................................................................................................................................... 334
Spindle status: Q110............................................................................................................................................. 334
Coolant on/off: Q111............................................................................................................................................ 334
Overlap factor: Q112............................................................................................................................................. 334
Unit of measure in the NC program Q113....................................................................................................... 335
Tool length: Q114.................................................................................................................................................. 335
Measurement result from programmable touch-probe cycles: Q115 to Q119........................................ 335
Qparameters Q115 and Q116 for automatic tool measurement............................................................... 336
Calculated coordinates of the rotary axes: Q120 to Q122........................................................................... 336
Measurement results from touch-probe cycles............................................................................................. 337
Checking the setup situation: Q601.................................................................................................................. 340
9.12 Accessing tables with SQL statements....................................................................................... 341
Introduction............................................................................................................................................................. 341
Programming SQL commands........................................................................................................................... 343
Overview of functions........................................................................................................................................... 344
SQL BIND................................................................................................................................................................. 345
SQL EXECUTE......................................................................................................................................................... 346
SQL FETCH............................................................................................................................................................. 351
SQL UPDATE........................................................................................................................................................... 353
SQL INSERT............................................................................................................................................................ 355
SQL COMMIT.......................................................................................................................................................... 356
SQL ROLLBACK...................................................................................................................................................... 357
SQL SELECT............................................................................................................................................................ 359
Examples................................................................................................................................................................. 361
9.13 Programming examples.............................................................................................................. 363
Example: Rounding a value................................................................................................................................. 363
Example: Ellipse..................................................................................................................................................... 364
HEIDENHAIN | TNC640 | Klartext Programming User's Manual | 10/2023 19