Handling output variables
The measurement and calibration cycles contain output variables that can be used to request the result. There are two options to read out the output variables. They are described in more detail below.
Option 1: Read out the output variables per cycle variables
The first option is to create the V.CYC. output variable in the program calling the cycle. The cycle checks whether this variable already exists. If this is the case, the corresponding result value is written in the existing V.CYC. variable.
Programming Example
Read out the output variables per cycle variables
The example describes how to read out the output variables for the cycle "SysCalibTouchprobe1.ecy". Analogously, the procedure can be transferred to all measurement and calibration cycles. In the program calling the cycle, the result values must be written to the file "result.txt". For this purpose, the output variables in which the result value is written on cycle execution are created locally.
Option 2: Read out the output variables per subroutine
The post files of the cycles created by the user can also be used to read out the result values. These post files are automatically called at the end of the cycle. The output variables are visible in them.
Programming Example
Read out the output variables per subroutine
The example describes how to read out the output variables for the cycle SysCalibTouchprobe1.ecy
. Analogously, the procedure can be transferred to all measurement and calibration cycles. In the program calling the cycle, the result values must be written to the file "result.txt
". For this purpose, result variables must be created locally to receive the values of the output variables.
In order for the result values to be transferred to the variables created by the user within the cycle, the post subroutine "SysCalibTouchprobe1Post.nc" must be created by the user. It is then called automatically within the cycle.