HEIDENHAIN TNC 620 User Manual page 342

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

Advertisement

9
Example for the SQL UPDATE command
The gray arrows and associated syntax do not directly belong to the SQL
UPDATE
Black arrows and associated syntax show internal processes of SQL
UPDATE
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)
When writing to tables, the control checks the lengths of
the string parameters. If the entries exceed the length of
the columns to be described, then the control outputs an
error message.
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
40 SQL UPDATE Q1 HANDLE Q5 INDEX5
342
0: Change was successful
1: Change failed
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