Writing to a freely definable table with FN 27: TABWRITE
Application
With the FN 27: TABWRITE NC function, you write to the table that you previously opened with FN 26: TABOPEN.
Related topics
- Contents and creation of freely definable tables
- Opening a freely definable table
Description of function
Use the FN 27 NC function to define the table columns to be written to by the control. Within an NC block, you can specify multiple table columns, but only one table row. You can previously define the contents to be written to the columns in variables; or you define it directly in the NC function FN 27.
Input
11 FN 27: TABWRITE 2/“Length,Radius“ = Q2 | ; Write to table with FN 27 |
To navigate to this function:
Insert NC function All functions FN Special functions FN 27 TABWRITE
The NC function includes the following syntax elements:
Syntax element | Meaning |
---|---|
FN 27: TABWRITE | Start of syntax for writing to a table |
Number | Row number of the table to be written to Fixed or variable number |
Name or QS | Column names in the table to be written to Fixed or variable name Use commas to separate multiple column names. |
= or SET UNDEFINED | |
Number, Name, or QS | Table value Fixed or variable number or name Only if = has been selected |
Notes
- If you write to multiple columns within one NC block, you need to define the values to be written to the columns in consecutive variables.
- If you try to write to a locked or a non-existing table cell, the control displays an error message.
- If you write values to multiple columns, the control can either write only numbers or only names.
- If you define a fixed value in the FN 27 NC function, the control will write the same value to each defined column.
- Using the SET UNDEFINED syntax element, you can assign the undefined status to your variables.
For example, if you program a position using an undefined Q parameter, the control will ignore this movement.
If you use an undefined Q parameter in the calculation steps of your NC program, the control will display an error message and stop the program run.
Example
11 Q5 = 3.75 | ; Define the value for the Radius column |
12 Q6 = -5 | ; Define the value for the Depth column |
13 Q7 = 7.5 | ; Define the value for the D column |
14 FN 27: TABWRITE 5/“Radius,Depth,D“ = Q5 | ; Write defined values to the table |
The control writes to the columns Radius, Depth, and D of row 5 of the currently open table. The control writes the values from the Q parameters Q5, Q6, and Q7 to the table.