HEIDENHAIN TNC 620 User Manual page 331

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

Advertisement

Programming Q parameters | Accessing tables with SQL statements
SQL transaction
In the NC software, table accesses occur through an SQL server.
This server is controlled via the available SQL commands. The SQL
commands can be defined directly in an NC program.
The server is based on a transaction model. A transaction consists
of multiple steps that are executed together, thereby ensuring
that the table entries are processed in an orderly and well-defined
manner.
Example of transaction:
Assign Q parameters to table columns for read or write access
using SQL BIND
Select data using SQL EXECUTE with the instruction SELECT
Read, change, or add data using SQL FETCH, SQL UPDATE, or SQL
INSERT
Confirm or discard interaction using SQL COMMIT or SQL
ROLLBACK
Approve bindings between table columns and Q parameters using
SQL BIND
You must conclude all transactions that have been
started—even exclusively reading accesses. Concluding
the transaction is the only way to ensure that changes
and additions are transferred, that locks are removed, and
that used resources are released.
Result set and handle
The result set contains a subset of a table file. It results from a
SELECT query performed on the table.
The result set is created when a query is executed in the SQL server,
thereby occupying resources there.
This query has the same effect as applying a filter to the table, so
that only part of the data records become visible. To perform this
query, the table file must be read at this point.
The SQL server assigns a handle to the result set, which enables
you to identify the result set for reading or editing data and
completing the transaction. The handle is the result of the query,
which is visible in the NC program. The value 0 indicates an invalid
handle, i.e. it was not possible to create a result set for that query.
If no rows are found that satisfy the specified condition, an empty
result set is created and assigned a valid handle.
HEIDENHAIN | TNC 620 | Klartext Programming User's Manual | 01/2022
9
331

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 620 eTnc 620 programming station

Table of Contents