HEIDENHAIN TNC 620 User Manual page 340

Conversational programming cnc control; nc software 817600-03; 817601-03; 817605-03
Hide thumbs Also See for TNC 620:
Table of Contents

Advertisement

9
Programming: Q Parameters
9.9
Accessing tables with SQL commands
SQL FETCH
SQL FETCH reads the row addressed with INDEX from the result set,
and places the table entries in the linked (assigned) Q parameters.
The result set is addressed with the HANDLE.
SQL FETCH takes into account all columns entered in the "Select"
command.
Parameter no. for result: Q parameter in which the
SQL server reports the result:
0: No error
1: Error occurred (incorrect handle or index too
large)
Database: SQL access ID: Q parameter with the
handle
Further Information:
Database: Index for SQL result: Row number
within the result set. Table entries in this row are
read and transferred to the linked Q parameter If
you do not specify the index, the first row (n=0) is
read.
The row number is entered directly or you program
the Q parameter containing the index
340
for identifying the result set
SQL SELECT, page 338
HEIDENHAIN | TNC 620 | Conversational Programming User's Manual | 10/2015
Row number is transferred to a Q
parameter
11SQL BIND Q881
"TAB_EXAMPLE.MEAS_NO"
12SQL BIND Q882
"TAB_EXAMPLE.MEAS_X"
13SQL BIND Q883
"TAB_EXAMPLE.MEAS_Y"
14SQL BIND Q884
"TAB_EXAMPLE.MEAS_Z"
. . .
20SQL Q5 "SELECT
MEAS_NO,MEAS_X,MEAS_Y,
MEAS_Z FROM TAB_EXAMPLE"
. . .
30 SQL FETCH Q1HANDLE Q5 INDEX
+Q2
Row number is programmed directly
. . .
30 SQL FETCH Q1HANDLE Q5 INDEX5

Advertisement

Table of Contents
loading

Table of Contents