Reading a freely definable table with FN 28: TABREAD

Application

With the FN 28: TABREAD NC function, you can read data from the table previously opened with FN 26: TABOPEN.

Description of function

Use the FN 28 NC function to define the table columns that the control is to read from. Within an NC block, you can specify multiple table columns, but only one table row.

Input

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

11 FN 28: TABREAD Q1 = 2 / "Length"

; Read table with FN 28

To navigate to this function:

Insert NC function All functions FN Special functions FN 28 TABREAD

The NC function includes the following syntax elements:

Syntax element

Meaning

FN 28: TABREAD

Syntax initiator for reading from a table

Parameter

Variable for the source text

The control uses this variable to save the contents from the table cells to be read.

Number

Row number in the table to be read

Number or numerical parameter

Name or Parameter

Column name in the table to be read

Text or string parameter

Use commas to separate multiple column names.

Note

If you specify multiple columns in an NC block, the control saves the read values in consecutive variables of the same type (e.g., QL1, QL2, and QL3).

Example

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

11 FN 28: TABREAD Q10 = 6/“X,Y,D“

; Read numeric values from columns X, Y and D

12 FN 28: TABREAD QS1 = 6/“DOC“

; Read the text from column DOC

The control reads the values of columns X, Y, and D from row 6 of the currently open table. The control saves the values to the Q parameters Q10, Q11, and Q12.

The content from the DOC column of the same row is saved to the QS1 QS parameter.