HEIDENHAIN TNC 620 User Manual page 340

Klartext programming
Hide thumbs Also See for TNC 620:
Table of Contents

Advertisement

9
Example for the SQL FETCH command
Remarks:
The gray arrows and associated syntax do not directly belong to
the SQL FETCH command
Black arrows and associated syntax indicate internal processes of
SQL FETCH
Define Parameter number for result (return
values for the control):
Database: SQL access ID: Define Q parameter for
the HANDLE (for identifying the transaction)
Define Database: Index for SQL result (row
number within the result set)
The optional syntax elements IGNORE UNBOUND
and UNDEFINE MISSING are intended for the machine
manufacturer.
Example: Transfer row number in the Q parameter
11 SQL BIND Q881 "Tab_Example.Position_Nr"
12 SQL BIND Q882 "Tab_Example.Measure_X"
13 SQL BIND Q883 "Tab_Example.Measure_Y"
14 SQL BIND Q884 "Tab_Example.Measure_Z"
. . .
20 SQL Q5 "SELECT Position_Nr,Measure_X,Measure_Y,
Measure_Z FROM Tab_Example"
. . .
30 SQL FETCH Q1 HANDLE Q5 INDEX+Q2
Example: Program the row number directly
30 SQL FETCH Q1 HANDLE Q5 INDEX5
340
0: Successful read operation
1: Faulty read operation
Row number
Q parameter with the index
None defined: access to row 0
Programming Q parameters | Accessing tables with SQL statements
HEIDENHAIN | TNC 620 | Klartext Programming User's Manual | 01/2022

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 620 eTnc 620 programming station

Table of Contents