HEIDENHAIN TNC 620 User Manual page 334

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
A transaction
In principle, a transaction consists of the following actions:
Address the table (file), select rows and transfer them to the
result set
Read rows from the result set, change rows or insert new rows
Conclude transaction. If changes/insertions were made, the
rows from the result set are transferred to the table (file)
Other actions are also necessary so that table entries can be edited
in an NC program and to ensure that other changes are not made
to copies of the same table rows at the same time. This results in
the following
transaction
1 A Q parameter is specified for each column to be edited. The Q
parameter is assigned to a column—it is "bound" (SQL BIND...)
2 Address the table (file), select rows and transfer them to the
result set. In addition, you define which columns are transferred
to the result set (SQL SELECT...). You can lock the selected
rows. Other processes can then read these rows, but cannot
change the table entries. You should always lock the selected
rows when you are going to make changes (SQL SELECT ...
FOR UPDATE)
3 Read, change and/or add new lines in the results set: – Copy
a line form the results set into the Q parameter of your NC
program (SQL FETCH...) – Prepare changes in the Q parameters
and transfer one row from the result set (SQL UPDATE...) –
Prepare new table row in the Q parameters and transfer into the
result set as a new row (SQL INSERT...)
4 Conclude transaction. – If changes/insertions have been made,
the data from the result set is placed in the table (file). The data
is now saved in the file. Any locks are canceled, and the result
set is released (SQL COMMIT...). – If table entries have
changed or inserted (read-only access), any locks are canceled
and the result set is released (SQL ROLLBACK... WITHOUT
INDEX)
Multiple transactions can be edited at the same time.
You must conclude a transaction, even if it consists
solely of read accesses. Only this guarantees
that changes/insertions are not lost, that locks are
canceled, and that result sets are released.
334
sequence:
HEIDENHAIN | TNC 620 | Conversational Programming User's Manual | 10/2015
not
been

Advertisement

Table of Contents
loading

Table of Contents