Download Print this page

HEIDENHAIN MANUALplus 620 Technical Manual page 1633

Hide thumbs Also See for MANUALplus 620:

Advertisement

Application
example for SQL
commands
Read data from
table
January 2012
To determine the positions in a measuring cycle, calibration data of a touch
probe are to be transferred from the tchprobe.tp table.
The center offsets are indicated in the CAL_OF1 and CAL_OF2 columns.
BIND links the Q parameters with column names:
SQL BIND Q63 "TCHPROBE.CAL_OF1"
SQL BIND Q64 "TCHPROBE.CAL_OF2"
SELECT chooses those columns from the table (TNC:\table\tchprobe.tp)
that are to be assigned to the active touch probe (WHERE ACTNR==1):
SQL Q5 "SELECT CAL_OF1,CAL_OF2 FROM 'TNC:\table\tchprobe.tp' WHERE
ACTNR==1"
FETCH reads a row from the result set (HANDLE Q5) and assigns the data
to the bound parameters. With INDEX0, the first row of the selected data is
read:
SQL FETCH Q80 HANDLE Q5 INDEX0
Safety check (Q80 is equal to zero?)
The data is assigned to Q parameters:
Q43 = Q63
Q44 = Q64
ROLLBACK releases the selected data:
SQL ROLLBACK Q80 HANDLE Q5
Safety check (Q80 is equal to zero?)
Following that, the bindings are undone:
SQL BIND Q63
SQL BIND Q64
8.12 Tables
1633

Advertisement

loading