Calypso 02 PCM

Download as pdf or txt
Download as pdf or txt
You are on page 1of 122

CALYPSO

Option 2
PCM technology

Operating Instructions
The design and delivered components of the CMM, its options, the pro-
gram packages, and the relevant documentation are subject to change.
This manual must not be circulated or copied, or its contents utilized and
disseminated, without our express written permission. Persons misusing
this manual are subject to prosecution.
All rights reserved, especially in cases of granting a patent or registering
a utility model.
This manual is subject to modification. All rights pertaining to changes in
the CMM and its options reserved.
All product names are registered trademarks or trademarks of the corre-
sponding proprietors.
Although utmost care has been taken in preparing the information given
in this manual, we cannot assume any liability for its completeness and
correctness, except in case of willful intent.

CALYPSO
Version 2014
Operating Instructions
2014-04-11
61212-2721102
Table of contents
Preface

Information about these operating instructions


............................................................................... Preface 1

Configuration of safety instructions .................. Preface 3

Chapter 1 Parameter-coded measuring runs (option)

Introduction to PCM ...................................................... 1‑2

PCM in CALYPSO – first steps ....................................... 1‑3


Programming with PCM ................................................................. 1‑3
Variable measurement plans in PCM ............................................... 1‑4
Parameter files for measurement plans ........................................... 1‑6
Conditions and parameters for the CNC run with CALYPSO ........... 1‑7
Sequence of PCM parameter processing ......................................... 1‑8

Variables, parameters and formulas in CALYPSO ..... 1‑10


What are variables and parameters in PCM? ................................. 1‑10
Formulas and functions in PCM .................................................... 1‑11
Programming with PCM ............................................................... 1‑12

Run control via parameters in PCM ............................ 1‑17


Run control via parameters ........................................................... 1‑17
Entering parameters for measurement plans ................................. 1‑17
Input and output parameters in PCM ............................................ 1‑19
Parameterizing space axis ............................................................. 1‑23
Properly terminating the measurement plan .................................. 1‑24
Testing a PCM expression ............................................................. 1‑24
Run control with external PCM files .............................................. 1‑25

Working with PCM ...................................................... 1‑28


Overview: Working with PCM ....................................................... 1‑28
Working with the PCM editor ....................................................... 1‑28

61212-2721102 CALYPSO Table of contents 1


Searching in the measurement plan .............................................. 1‑30
Searching for a PCM text .............................................................. 1‑31
Searching features with formulas .................................................. 1‑32
Searching features with parameters .............................................. 1‑33
Searching features with directories ............................................... 1‑34
Carrying out PCM test settings ..................................................... 1‑35
Showing formulas in the default printout ...................................... 1‑37

Examples for PCM ........................................................ 1‑38


Overview: Examples for PCM ....................................................... 1‑38
Example for PCM: Using variables ................................................. 1‑38
Example for PCM: Condition with alternative ................................ 1‑39
Example for PCM: Principle of parameterization ........................... 1‑40
Example for PCM: Parameterizing point recall using the list function
..................................................................................................... 1‑41
Example for PCM: Loading parameter values into a curve ............. 1‑42
Example for PCM: Defining curve using cosine function ................ 1‑43
Example for PCM: Rechecking characteristic in case of deviation from tol-
erance .......................................................................................... 1‑43
Example for PCM: Parameterizing an alignment ............................ 1‑45
Example for PCM: Loading a PCM file via dialog ........................... 1‑46
Example for PCM: Defining loop with linear offset ........................ 1‑47
Example for PCM: Nested loop for field (array) .............................. 1‑48
Example for PCM: Parts family and variant control ........................ 1‑49
Example for PCM: ASCII parameter file ......................................... 1‑50
Example for PCM: Transferring the machine number to Q-DAS ..... 1‑52
Example for PCM: Using the rotary table for positioning ............... 1‑53

PCM quick reference .................................................... 1‑55


Overview: PCM quick reference ................................................... 1‑55
PCM syntax .................................................................................. 1‑56
Variables in PCM .......................................................................... 1‑56
Arithmetic and comparative operators in PCM .............................. 1‑57
Mathematical functions in PCM .................................................... 1‑58
Character string functions in PCM ................................................ 1‑61
PCM functions: Input and output .................................................. 1‑62
PCM functions: File commands ..................................................... 1‑66

2 Table of contents 61212-2721102 CALYPSO


PCM functions: Measuring-specific and measurement plan-specific func-
tions ............................................................................................. 1‑75
PCM functions: CMM-specific functions and travel commands ..... 1‑88
PCM functions: System Commands .............................................. 1‑95
PCM functions: Custom printout .................................................. 1‑99
PCM functions: Conditions/Loops ............................................... 1‑101
PCM functions: Output in printout .............................................. 1‑104
Overview: Names of external PCM files ....................................... 1‑107

Alphabetic index

61212-2721102 CALYPSO Table of contents 3


4 Table of contents 61212-2721102 CALYPSO
Preface
Information about these operating
instructions
The CALYPSO program consists of a base module and additional options
for special purposes. You can customize the scope of program to fit your
requirements.
These operating instructions describe an option of CALYPSO and are
based on the assumption that the user is familiar with the operating in-
structions for the base module of CALYPSO.

NOTICE
The additional CALYPSO options are described in separate manuals.

Reference information about the windows and dialogs can be found in


the dialog reference in the CALYPSO Online Help.

Simply Measure – And what you should know to do it right, A metrology


primer
Carl Zeiss, Industrial Metrology Division,
Order no.: 612302-9002

Text conventions The following text conventions are used in these instructions.

Example Description
Features Text element of the graphics screen
display.
Comment The Comment button on the
screen.
<machine name> Variable text or dummy for a name.
C:\windows\w.ini The w.ini file in the windows direc-
tory on the C:\ drive.
For this section... A passage containing important in-
formation.
➤Preface [⇨ Preface 1] This is a cross reference. When
viewing this manual on the screen,
you will be guided to the indicated
text passage by clicking the refer-
ence.

61212-2721102 CALYPSO Preface 1


Information about these operating instructions

Example Description
Plan ® CNC-Start ® Run The Run command in the CNC-
Start submenu of the Plan menu.
CTRL+A Press the CTRL key and the letter A at
the same time.

Icons Three special symbols containing important information are used in this
manual. The icons appear in the marginal column next to the respective
text.
You will find a detailed explanation of the safety instructions under Con-
figuration of safety instructions.

2 Preface 61212-2721102 CALYPSO


Configuration of safety instructions

Configuration of safety instructions


Safety instructions indicate a personal health hazard. We distinguish three
different levels: Danger, warning and caution. All three safety instructions
are marked with the same warning symbol. The designation of the safety
instruction is shown beside the symbol. The safety instructions used are
described below.

Configuration of a safety instruction


A safety instruction may have the following components:
– Warning symbol and designation of the safety instruction (signal
word): Danger, warning or caution.
– Source and cause of the danger
– Consequences for the user due to non-observance of the safety in-
struction
– Required measures to be taken by the user to avoid possible conse-
quences
– A measure may cause an intermediate result.
– At the end of all measures, a final result may be caused.

Personal health hazard

DANGER
A »danger« indicates an imminent risk to life and limb.
Non-observance of this safety instruction when the described risk occurs
causes death or serious injuries.
Example: Electric shock due to high electric voltage.

WARNING
A »warning« indicates a possible risk to life and limb.
Non-observance of this safety instruction when the described risk occurs
may cause death or serious injuries.
Example: Risk of severe crushing of the body caused by heavy loads.

CAUTION
A »caution« indicates a personal health hazard.
Non-observance of this safety instruction when the described risk occurs
may cause slight to moderate injuries.
Example: Risk of minor crushing of the limbs caused by small loads.

Risk of material damage


If there is no personal health hazard, but the CMM or components may
get damaged, this is pointed out by the following notice.

61212-2721102 CALYPSO Preface 3


Configuration of safety instructions

This symbol refers to possible damage to the CMM.


Non-observance of this safety instruction when the event occurs may cause
damage to the CMM or one of its components.
Example: Collision of the ram with a workpiece.

4 Preface 61212-2721102 CALYPSO


1
Chapter

Parameter-coded measuring
runs (option)
.................................................................................................................

This chapter contains:


Introduction to PCM ................................................................................ 1‑2
PCM in CALYPSO – first steps .................................................................. 1‑3
Variables, parameters and formulas in CALYPSO .................................... 1‑10
Run control via parameters in PCM ........................................................ 1‑17
Working with PCM ................................................................................ 1‑28
Examples for PCM .................................................................................. 1‑38
PCM quick reference .............................................................................. 1‑55

61212-2721102 CALYPSO 1-1


Introduction to PCM

Introduction to PCM
CALYPSO uses the PCM programming language for variable control of
measuring runs. Of course you can use CALYPSO without PCM, but PCM
offers you a powerful toolset for simplification and automation, along
with part-variant programming and parameter-supported and interactive
control of measuring runs.
What is PCM? PCM is a programming language for parameterizing measuring runs.
PCM is short for “parameter-coded measurement”.
PCM enables you to simplify and rationalize measuring runs in CALYPSO:
You can program measurement plans in such a way that you can measure
various workpiece variants, and you can set parameters to influence the
automatic run of a measurement plan.

NOTICE
On account of the complexity involved, programming in PCM is only rec-
ommended if you have basic knowledge of programming structures (e.g.
Pascal or C).
PCM has functions for calculating values, for controlling the CMM, and
for interactive input/output dialogs. You can vary the way in which a
measurement plan runs by programming loops and conditions. In certain
situations you can have CALYPSO generate special messages.

NOTICE
A yellow input field in CALYPSO always contains a parameter or formula.

In CALYPSO, you use PCM when you enter a Formula in an input field for
a feature. By so doing, you automatically define a variable and assign it
parameters. The color of the input fields changes, in this case to yellow.
By the same token, when you set a condition in CALYPSO or define a
loop, you automatically create “PCM code”.

NOTICE
You also have this possibility without the PCM Technology option.

If you use the PCM Technology option and you have familiarized yourself
with the syntax, you can employ the PCM code to enter conditions and
loops or numerous other commands directly or generate files for import
into CALYPSO.

1-2 61212-2721102 CALYPSO


PCM in CALYPSO – first steps

PCM in CALYPSO – first steps


Programming with PCM
Parameterizing measurement plans
The easiest and most reliable way of generating variable measurement
plans is to begin by creating an ordinary measurement plan with fixed
coordinates and values in CALYPSO in the usual way. You can then sub-
stitute variables for the specific coordinates that vary from workpiece to
workpiece.
The various measuring runs you need derive from the formulas and pa-
rameters you enter for the variables.

Additional programming functions


Besides parameterization of measurement plans, PCM provides an ex-
tensive programming functionality:
– You can program dialogs that CALYPSO uses in the course of a CNC
run to query the operator for quantities, so that the figures supplied
in this way can subsequently be used in different ways as the run
progresses.
– You can determine measured values and system parameters and reuse
them in the measurement plan.
– In the case of conditions or loops, you are not bound to the forms
specified in the dialogs – you can enter them directly with PCM.
– You can issue direct control and motion commands to the CMM.
– Finally, you can also enable external access to measured data via an
interface.
You can use these functions in many different ways, individually and in
combinations, so these instructions cannot cover all possible circumstan-
ces in detail – remember that PCM is a programming language, designed
for you to use to the best possible effect.
This chapter, therefore, describes the basics of the run structures of CA-
LYPSO and the syntax of PCM, tells you how to enter parameters and
formulas in CALYPSO, and contains a reference library of functions and
commands.
The examples (see ➤Examples for PCM [⇨ 1‑38]) demonstrate the ver-
satility of PCM and show you how to utilize the performance of this pro-
gramming language.

61212-2721102 CALYPSO 1-3


PCM in CALYPSO – first steps

Variable measurement plans in PCM

Principle of parameterization
CALYPSO employs the principle of parameterization so that you can use
a single measurement plan to measure workpieces in CALYPSO that are
similar but not identical. This principle is based on the premise that iden-
tical values for both workpieces are defined in the measurement plan in
CALYPSO as fixed values; those varying from workpiece to workpiece, on
the other hand, are defined as variables.

Z
Y
60

80
X
40

In this way one and the same measurement plan can be used to measure
and test different workpieces: for example, a plate with either one or two
holes – even if the radii are different. Different geometries, differences in
the number of certain features, the presence or absence of features - all
these can be parameterized.

Parameters for variables in PCM


Note, however, that a measurement plan with variables cannot be run
unless the variables are assigned specific values. These specific values, the
parameters in other words, have to be known to CALYPSO: You define
them in the measurement plan before it is run. CALYPSO then uses the
coordinates or values entered for the variables in processing the meas-
urement plan.
Example The two workpieces in the illustration above are different, but “similar”:
They have some identifying characteristics in common, while others are
unique to each. The first workpiece in the illustration has a central hole
with a radius of 20, while the hole in the second workpiece, while of the
same depth, has a radius of 10 and is off-center. This workpiece, more-
over, has a second hole.

1-4 61212-2721102 CALYPSO


PCM in CALYPSO – first steps

The variables that could be used here are as follows: positions of the holes
(hole1_center, hole2_center), their radii (hole1_radius, hole2_radius) and
the number of holes (number_holes). These variables have to be assigned
values for each workpiece, so that a measurement plan can be run:

Variables Parameters for Parameters for work-


workpiece No. 1 piece No. 2
Number_holes 1 2
hole1_center point(-40.30,40,0,0 point(-20.30,40,0,0,1)
,1)
hole2_center any point(-60,30,40,0,0,1)
hole1_radius 20 10
hole2_radius any 10

Set up in this way with only five different parameters, the measurement
plan is able to measure two different workpieces.

Parameters in parameter files


The process is even more straightforward when you provide CALYPSO
with the parameters of the current workpiece or the measurement plan
variant you intend to use in the form of a prepared, reusable ASCII file.
All you have to do when a new version of a workpiece is due for meas-
urement is load a new ASCII file containing the required information.
Another advantage is that ASCII files can be edited independently of CA-
LYPSO.

61212-2721102 CALYPSO 1-5


PCM in CALYPSO – first steps

*.para

Workpiece1.para

Measurement
*.para
Plan

Workpiece2.para

*.para

Workpiece3.para

Parameterizing characteristics with PCM


Characteristics can sometimes be the same despite differences in fea-
tures, as is the case, for example, with the diameter of a circle of the same
size that only has to be measured at a different position on the workpiece.
Other characteristics can vary as a function of the parameterized meas-
urement plan.
This, in turn, means that if the value of the characteristic, and not just the
measured values of a given feature, varies from workpiece to workpiece,
you have to parameterize the characteristic as well.
You do this by defining a variable for the characteristic in question and
assigning it the corresponding value.

Parameter files for measurement plans


The advanced way of setting up variable measurement plans is to use
parameter files. A parameter file contains the set of value assignments
for the variables in a measurement plan.
When you parameterize fixed defining aspects of a workpiece, you are in
a position to measure different workpieces with a single measurement
plan: All you have to do is enter different parameters, either directly in
CALYPSO or by specifying and loading a parameter file.
You can create different parameter files for a particular measurement
plan and load whichever file you need for a given workpiece and the

1-6 61212-2721102 CALYPSO


PCM in CALYPSO – first steps

aspects you want to measure. You need a dedicated parameter file for
each workpiece.

*.para

Workpiece1.para

Measurement
*.para
Plan

Workpiece2.para

*.para

Workpiece3.para

The parameter files can be created in two ways:


– You save the entered parameters of a measurement plan.
– You create the parameter file directly with an ASCII editor.
To do so, you need experience with measurement plans and reliable
knowledge of the PCM syntax. PCM uses a functional syntax similar
to the programming languages Basic, C, Fortran etc. (see ➤PCM syn-
tax [⇨ 1‑56]).
When you create a parameter file, it is important to remember that
the file name extension has to be “.para”, so that CALYPSO can rec-
ognize it as a parameter file.

Conditions and parameters for the CNC


run with CALYPSO
CALYPSO starts running the measurement plan after CNC start. PCM
commands and parameter assignments come into effect at a very wide
variety of points.
– You can define “input and output parameters” for each feature and
each characteristic, and for the measurement plan as a whole. This

61212-2721102 CALYPSO 1-7


PCM in CALYPSO – first steps

means that you can enter PCM commands when these elements are
defined.
The “input parameters” are processed before the element is run, the
“output parameters” are processed after the run.
– You also have the opportunity of setting “start parameters” once or
loading a file before the measurement plan is run.
– You can set a condition and a loop for each characteristic.
– You can enter “input and output parameters” for each condition and
each loop.
Utilizing these CALYPSO functions in this way, therefore, you can con-
struct complex, nested structures.
Wherever you set input parameters, output parameters or start parame-
ters, moreover, you can program conditions and queries directly with
PCM.
In addition, you can have external PCM files run in certain situations of
the measurement plan run without any intervention in the measurement
plan.

Sequence of PCM parameter processing


The sequence adopted by CALYPSO to process the data is as follows:
1. The input parameters are evaluated before the measurement plan is
run; the output parameters are evaluated when the run completes.
2. CALYPSO checks each characteristic in succession, in the order in
which it appears in the list of characteristics. The condition and the
loop are processed first (depending on the order in which they were
entered) followed by the input parameters of the characteristic. Once
the characteristic has been determined, its output parameters are
evaluated.
3. Before a feature defined for a characteristic is measured, its input pa-
rameters are evaluated. The feature's output parameters are evaluat-
ed when measurement completes.
4. If input or output parameters are set for a condition or loop, the input
parameters are evaluated before the condition is checked or the loop
is run. The output parameters are evaluated after the element refer-
enced by the condition or loop.
If the condition results in a stop, the output parameters are not eval-
uated.
You might find it useful to visualize the input and output parameters as
“parentheses” bracketing the objects in question.

1-8 61212-2721102 CALYPSO


PCM in CALYPSO – first steps

NOTICE
In addition, CALYPSO checks prior to, during or after a measurement plan
run whether a certain external file with a defined name exists in the cur-
rent measurement plan directory or in the general directory for meas-
urement plans. This file is then executed.

61212-2721102 CALYPSO 1-9


Variables, parameters and formulas in CALYPSO

Variables, parameters and formulas in


CALYPSO
What are variables and parameters in
PCM?
If you want to run variable measurement plans for different workpieces
in CALYPSO, you have to use variables instead of absolute values to de-
scribe the workpiece.

What are variables?


Variables, by definition, are quantities that may vary. By means of PCM,
all defining aspects required in descriptions of workpieces or runs in
measurement plans can be characterized as variables in CALYPSO.
The variables are stored “locally” together with the element (feature,
characteristic, condition, loop) for which they were defined.
The assigned values, the parameters in other words, are stored centrally
for the entire measurement plan.
Types of variables PCM recognizes four types of variables: number, point, vector and string.
Each variable has a name consisting of alphanumeric characters (without
blanks; first character is no number), and different variables have different
names.
Examples: radius_1, set-down point, message_354
You are not allowed to use reserved names, in other words strings that
are required in the PCM syntax: “X”, “Y”, “Z”, the names of functions
and commands, and so on.
Arrays Groups of variables are called arrays. The only difference in the names of
variables in an array is the array index. Example:
radius[1], radius[2], radius[3], radius[4]
In this case, “radius” is an array with four variables.

What are parameters?


Parameters are specific values for variables. When variables are used in a
measurement plan instead of fixed numbers or texts, you can vary the
measurement plan by assigning certain fixed values (parameters) to the
individual variables.
You assign values either by entering them directly or by means of state-
ments in a file. Use the following syntax:
Variable name=value
You can enter the value using one of the following formats:

1-10 61212-2721102 CALYPSO


Variables, parameters and formulas in CALYPSO

Variable type Format for values (example)


number -3.141529
vector vector(10,12,0)
point point(-10,12.5,0,0,0,1)
string "Circle"
list list(3.1416,3.4242,-5.2323)

NOTICE
The last three components of a variable of the “point” type represent the
coordinates of a normalized vector. This means that the root of the sum
of the three squares (= the length of the vector) must always be “1”.
It follows that the PCM commands listed below are value assignments:
– P1 = 10
– vector_1 = vector(10,20,30)
– corner_1 = point(10.1,20.5,30.02,0,0,1)
– text_1= "This is a text in the text_1 variable"
– LIST = list(3.1416,2.71828,0,0,0)

Value assignments and variable definitions


A value assignment also defines the variable and makes it known to CA-
LYPSO. There are no explicit variable definitions (constructors) in PCM.
If, in the measurement plan run, a variable that has not yet been defined
is to be accessed, a warning message appears.
Variables in the arrays can be defined either individually “one by one” or
in a loop instruction. Example:
– array[1] = point(-10,12.5,0,0,0,1)
array[2] = point(-12.12.5,0,0,0,1)
array[3] = point(-14.12.5,0,0,0,1)
array[4] = point(-16.12.5,0,0,0,1)
Here, “array” has been defined as an array consisting of four variables of
the point type.

Formulas and functions in PCM


As well as using individual variables in measurement plans, you also have
the option of using functions of variables and formulas with variables.

Return values
The return value is an important function of a variable: the individual parts
of a parameter have to be “addressed” so that you can work with them.
The return values of variables of the “point” type are defined as follows:

61212-2721102 CALYPSO 1-11


Variables, parameters and formulas in CALYPSO

Function Return value


variable_name.x x value of the “point” variable
variable_name.y y value of the “point” variable
variable_name.z z value of the “point” variable
variable_name.nx x value of the normal vector of the “point” variable
variable_name.ny y value of the normal vector of the “point” variable
variable_name.nz z value of the normal vector of the “point” variable

You can access variables of the vector type as follows:

Function Return value


variable_name.x x value of the “vector” variable
variable_name.y y value of the “vector” variable
variable_name.z z value of the “vector” variable

Arithmetic operators and functions


The most important operators and functions with variables are:
– Arithmetic operators:
+,-,*,/
– Comparative operators (used in conditions and loops):
<,>,==, <>, <=, >=
– Mathematical and trigonometric functions:
sqrt, squared, abs, exp, int, ln, log, mod, round, sign,
sin, cos, tan, arcsin, arccos, arctan, arctan2
– Functions for determining values (query):
getNominal, getActual
– Character string functions:
+, asc, chr, format, inStr, len, mid, strElement, val
There are also a number of functions for input and output, for run control
and for working with files, plus measurement-specific and CMM-specific
commands, system commands, CMM movement commands as well as
conditions and loops (see ➤PCM quick reference [⇨ 1‑55]).

Programming with PCM

Basics about programming


Programming conditions and loops with CALYPSO
You can vary the way in which the measurement plan runs by setting
conditions and loops.

1-12 61212-2721102 CALYPSO


Variables, parameters and formulas in CALYPSO

– A characteristic or feature with a condition is not executed unless the


condition is satisfied. The characteristic is either calculated or not cal-
culated depending on the truth value returned for the condition,
which means that the measurement plan run either proceeds or is
interrupted.
– A loop around a characteristic or a feature results in the characteristic
or feature being run repeatedly, possibly with changed variables for
each run.
You trigger these functions by selecting Condition or Loop in the context
menu and entering the settings for the condition or loop, as applicable
(see Setting conditions and Placing loops in the operating instructions for
the base module). Furthermore, you can define conditions and loops in
the function and parameter list. (See PCM functions: Conditions/Loops)

Programming conditions and loops with PCM


Over and above the options at your disposal in CALYPSO, you can use
PCM to insert conditions and loops explicitly in parameter files or in the
input and output parameters of features or characteristics.
In this way you can utilize conditions and loops much more comprehen-
sively – you are in control of the measuring run. During the CNC run, the
truth values of the conditions are determined, the loop index is incre-
mented automatically and the definitions, the value allocations and the
commands are processed accordingly.
The following control elements are available for both the input and out-
put parameters:
– the ➤Simple condition [⇨ 1‑13] (if - endif)
– the ➤Condition with alternative [⇨ 1‑14] (if - else)
– the ➤Condition with several alternatives [⇨ 1‑14] (selectCase - end-
Select)
– the ➤Specific loops [⇨ 1‑15] (for - next)
– the ➤Conditioned loop [⇨ 1‑16] (repeat - until)

Simple condition
The syntax of the simple condition is as follows:
if CONDITION then
DEFINITION
endif
Meaning:
– If CONDITION is satisfied, DEFINITION is processed.
– If CONDITION is not satisfied, DEFINITION is not processed.
The DEFINITION can be formulas, value assignments, functions or other
conditions or loops of your choice, always with line breaks as separators.

61212-2721102 CALYPSO 1-13


Variables, parameters and formulas in CALYPSO

Condition with alternative


The syntax of the condition with alternative is as follows:
if CONDITION then
DEFINITION1
else
DEFINITION2
endif
Meaning:
– If CONDITION is satisfied, DEFINITION1 is processed.
– If CONDITION is not satisfied, DEFINITION2 is processed.
DEFINITION1 and DEFINITION2 can be formulas, value assignments, func-
tions or other conditions or loops of your choice, always with line breaks
as separators.
Example In the example below, the “result” variable is assigned the diameter of
circle circle_1. A message corresponding to this quantity is then output
on the screen:
result=getActual("circle_1").diameter
if result>10 then
message(“diameter circle_1 is greater than 10")
else
if result<10
then
message("diameter circle_1 is smaller than 10")
endif
endif

Condition with several alternatives


The condition with several alternatives makes it possible to program a
branch. The syntax is:
selectCase TEST PRINTOUT
case VALUE LIST 1
STATEMENTS 1
[case VALUE LIST 2
[STATEMENTS 2]]
...
[caseElse
[ELSE STATEMENTS]]
endSelect
Meaning:
– TEST PRINTOUT:
Required. Any numeric expression, character string or PCM parame-
ter.
– VALUE LIST:
Must be specified after case.

1-14 61212-2721102 CALYPSO


Variables, parameters and formulas in CALYPSO

A list separated by commas that contains one or more of the following


forms:
– Expression:
e.g. 12, "All"
– Expression1 to Expression2:
e.g. 1 to 15, "Part1" to "Part5"
The operator to defines a range of values. The smaller value must
be on the left. With a character string, the lexicographical order
applies.
– is comparative operator expression:
e.g. is > 8
– STATEMENTS:
Optional. One or more statements that are carried out if TEST PRINT-
OUT corresponds to any element in the corresponding VALUE LIST.
The condition with several alternatives is browsed from top to bottom
to find a match between TEST PRINTOUT and VALUE LIST. The STATE-
MENT of the first VALUE LIST that corresponds to TEST PRINTOUT is
executed. At the end of endSelect, the operation continues.
– ELSE STATEMENTS:
Optional. One or more STATEMENTS that are carried out if no match
between TEST PRINTOUT and a VALUE LIST is found in the case sec-
tions.

NOTICE
Conditions with several alternatives can be nested.

For example, a condition with several alternatives can look as follows:


selectCase number
case is <= 0
Message = "Number is too small"
case 1, 2, 3
Message = "Number is smaller than 4"
case 4 to 7
Message = "Number is between 4 and 7"
case is >8 AND number < 11
Message = "Number is 9 or 10"
caseElse
Message = Number is outside the range"
endSelect

Defined loop
In the case of the defined loop, the number of loops is defined unequiv-
ocally. The syntax of the defined loop is as follows:

61212-2721102 CALYPSO 1-15


Variables, parameters and formulas in CALYPSO

for index=start to end [step]


DEFINITION
next index
The following must be inserted:
– for index – the name of the loop variables (random),
– for start, end and step – whole numbers,
– for DEFINITION – random formulas, value assignments, functions or
other conditions or loops of your choice, always with line breaks as
separators.
Meaning: The functions or commands under DEFINITION are processed
(end - start + 1)/step times, whereby “step” is set to 1 if no other speci-
fication is made. At the same time, the specific value for index is always
entered in DEFINITION: at first start, then start+step, start+2*step etc. up
to end. With next i, the loop index is incremented by step each time.
Example for i=1 to 4
message(i,". step: ",step[i])
next i

Conditional loop
In the case of the conditional loop, the number of runs depends on the
fulfillment of a condition, whereby the condition is only tested after the
first run. Therefore a conditional loop must run at least once. The syntax
of the conditional loop is as follows:
repeat DEFINITION until CONDITION
Meaning:
– DEFINITION is processed. Then CONDITION is tested.
– If CONDITION is fulfilled, the loop is ended.
– If CONDITION is not satisfied, DEFINITION is processed again and
CONDITION is tested again.
The CONDITION can be set up as a logical combination of several sub-
conditions.
The DEFINITION can be formulas, value assignments, functions or other
conditions or loops of your choice, always with line breaks as separators.

NOTICE
Please note that infinite repetitions are possible with the conditional loop
if the condition is never fulfilled.

1-16 61212-2721102 CALYPSO


Run control via parameters in PCM

Run control via parameters in PCM


Run control via parameters
Control in CALYPSO In CALYPSO, you have the following possibility to control the run without
using the PCM Technology option:
– You can enter formulas directly.
– You can conveniently transfer functions and parameters from the
function and parameter list into the Formula dialog box.
– You can test the value of a formula.
– You can parameterize the space axis.
– You can set a condition for each individual characteristic.
– You can place a loop around the entire measurement plan and around
each individual characteristic to force repeated runs.
These functions are described under Formula input and run control in the
operating instructions for the base module.
Control in PCM The PCM Technology option offers the following additional functions:
– You can enter parameters for the variables of a measurement plan.
– You can use PCM variables.
– You can enter input and output parameters for features, characteris-
tics, conditions and loops.
– You can use the point generator to read in the points of a curve or
define them with a mathematical expression.
– You can enter global measurement plan parameters or load them
from external parameter files.
– You can define PCM test settings.
– You can start external programs and execute PCM files.

Entering parameters for measurement


plans

Options of parameter inputs


You enter parameters for a measurement plan in the Settings window.
In so doing you assign formulas or values to existing or newly defined
variables.
You can enter the parameters directly in the window or you can load them
from a parameter file.
You can create a parameter file by saving the parameters of a measure-
ment plan or by saving a PCM code that has been created in the PCM

61212-2721102 CALYPSO 1-17


Run control via parameters in PCM

editor. Additionally, you can explicitly generate a parameter file with an


ASCII editor.

NOTICE
In PCM and in the formula, the decimal separator is always a period (“.”;
example: “3.5 + 4.8”, and not: „3.5 + 4.8”).
The comma is used as the separator within value assignments (example:
Location = point(3.5, 4.5, 1.5, 0, 0, 1)).

How to enter parameters for a measurement


plan directly
1 Select Plan ® Advanced ® Parameter.
The Parameter Input dialog box opens.

2 Click in the (white) input field and start defining the parameters:
• Start with the variable name, followed by “=”.
• Proceed with the definition. Please observe the syntax described in
➤Formulas and functions [⇨ 1‑11] as well as the parameter syntax
(see ➤Example for PCM: ASCII parameter file [⇨ 1‑50]).
3 Click OK.
The window will be closed. The parameter is now included in the list of
all available parameters (this dialog box is fully described in Formula in
the CALYPSO dialog reference in the Online Help).

1-18 61212-2721102 CALYPSO


Run control via parameters in PCM

How to save the measurement plan


parameters in a file
Once parameters have been defined in a measurement plan, you can save
them in a file. In this way, they are readily available for subsequent use in
other measurement plans.
1 Select Plan ® Advanced ® Parameter.
The Parameter Input dialog box opens.
2 If necessary, edit the parameters, value assignments and formulas
shown.
3 Click the diskette icon.
The Save: Select Parameter File dialog box appears on the
screen.
4 Enter the name of the file (do not omit the “.para” extension), select
a directory and click Save.
The variables and parameters you selected are saved in the file.

How to load measurement plan parameters


saved beforehand
You can integrate parameters saved in a parameter file (“*.para” file
name) into your current measurement plan.

Opening a *.para file


1 Check that the Parameter Input dialog box is open (Plan ® Ad-
vanced ® Parameter).
2 Click the Open icon.
The Open: Select Parameter File dialog box appears on the
screen.
3 Select the appropriate file and click Open.
The parameters in the file are listed in the input window and are available
for your current measurement plan.

Input and output parameters in PCM

Settings (Parameter) window


Input and output parameters can be set for each characteristic and fea-
ture, and for each condition and loop. The settings in the input and output
parameters can be used to set temporary variables, print values in the
default printout, and trigger functions.
Input and output parameters are defined in the Settings (Parameter win-
dow.

61212-2721102 CALYPSO 1-19


Run control via parameters in PCM

You can define input and output parameters for the following objects in
CALYPSO:
– an entire measurement plan,
– a macro,
– a characteristic,
– a feature,
– a condition,
– a loop.
The entire PCM syntax is at your disposal for defining input and output
parameters.
Comments You can also enter comments. They will be displayed in color.
All characters of a line that start with a double backslash (//) will be in-
terpreted as a comment.
For more information on the Settings (Parameter) window, please refer
to the CALYPSO dialog reference in the Online Help.

Evaluation of input and output parameters


The commands and value assignments you enter as input parameters are
evaluated before the object in question is executed or evaluated.

1-20 61212-2721102 CALYPSO


Run control via parameters in PCM

The commands and value assignments you enter as output parameters


are evaluated after the object in question has been executed or evaluated.
An object, in turn, can consist of several other objects or be superior to
these lower-order objects, so this means that under certain circumstances
the input parameters and then the output parameters of the lower-order
objects might be evaluated first.
If the object in question is a condition and the condition leads to omission
of the characteristic or cancelation of the CNC run, the output parameters
of the condition are not evaluated.

Entering input and output parameters


In CALYPSO, you can set input and output parameters for each feature,
characteristic, condition or loop and for the entire measurement plan. To
do so, use the Settings window.

1 To open the settings for the entire measurement plan:


• Open the list of characteristics and make sure that no characteristics
are highlighted.
• Right-click and select Parameter from the context menu.
2 To open the settings for a specific characteristic:
• Highlight the characteristic in the list of characteristics.

61212-2721102 CALYPSO 1-21


Run control via parameters in PCM

• Right-click and select Parameter from the context menu.


3 To open the settings for a specific feature:
• Highlight the feature in the list of features.
• Right-click and select Parameter from the context menu.
4 To open the window for a condition:
• In the Condition window, click Settings.
5 To open the window for a loop:
• In the Loop window, click Settings.
The Settings (Parameter) window appears on the screen.
6 Enter the input parameters in the box at the top and the output pa-
rameters in the box at the bottom.
7 Click OK.
The dialog box closes and your settings are accepted.

Entering input and output parameters using a


list
You can also enter the parameters for presettings and postsettings in the
Settings dialog box using a list. To do this, use the inquireParameter-
List(...) command.
Prerequisite: A line containing the following command is contained in the
respective settings:
inquireParameterList("parameter_name1","comment1",...)
All variables that are to be entered using the list must be listed in the
brackets.
1 Select the line with the inquireParameterList(...) command.
2 In the context menu, select Calculate.
The Parameter Input dialog box appears on the screen with a list
of the parameters that are contained in the brackets of the inquire-
ParameterList command.

1-22 61212-2721102 CALYPSO


Run control via parameters in PCM

3 Enter the currently required values for the parameters or overwrite the
default values.
Note: During the measuring run, you can overwrite only the entries in
the Value column.
4 Press OK to confirm.
The dialog box is closed and the parameter values are accepted.

Parameterizing space axis


You can parameterize the space axis that is to be specified in various
features. Select in the context menu the Formula input field and enter
the desired space axis in the form of a formula. The result given by the
formula must be a number.
During run time, the result is calculated by CALYPSO and interpreted as
axis according to the following table:

Result Space Axis


-3 -Z
-2 -Y
-1 -X

61212-2721102 CALYPSO 1-23


Run control via parameters in PCM

Result Space Axis


1 X
2 Y
3 Z
all other values Z

The result of the formula defines the direction of the feature geometry.
The numerical values entered for the projected angles will not change.
After input of a formula, the text field will be highlighted in yellow.
The formula is evaluated in the CNC run during run time, the result of
the formula is then used as space axis of the feature. The normal vector
geometry thus changes during run time.

NOTICE
It is also possible to change the space axis, i.e. the normal vector geometry
during run time by a parameterized normal vector of the feature. The
parameterized normal vector has a higher priority than the parameterized
space axis.

Properly terminating the measurement


plan
PCM enables you to properly terminate the measurement plan as a func-
tion of the situation. To do this, use the endInspection() PCM function.
As soon as this function is called in the CNC run, the current feature or
characteristic will be processed completely, all intended records will be
generated and output and the measurement plan run will be concluded.

NOTICE
While the cncBreak() command is being processed, the CMM just stops.
Printouts will not be generated.

Testing a PCM expression


You can test a PCM expression in order to ascertain whether the results
are in line with your expectations or whether the PCM expression requires
improvement.
1 Make sure that the Settings window is open with the PCM expres-
sion.

Note that movement commands are executed by the CMM and that col-
lisions could result. Move the CMM slowly and stop in good time if nec-
essary.

2 Highlight the PCM expression in question and right-click.

1-24 61212-2721102 CALYPSO


Run control via parameters in PCM

3 Select Compute from the context menu.


The highlighted expression is computed or executed on the basis of
the currently valid values of the variables.
If an error is encountered or parameters for variables have not been de-
fined, messages to this effect are issued.

Run control with external PCM files

Run control with external PCM files


PCM allows you to start external programs from within the measurement
plan as well as execute PCM files, without storing the call in the meas-
urement plan.
This function makes it possible to change certain settings within one or
all measurement plans by means of PCM functions without changing the
measurement plans.
In addition, you can execute external batch files (see Run control with
external batch files in the operating instructions for the base module).
You can use two different file types:

File type Syntax File name


Batch file according to Win- *.bat
dows
PCM file PCM syntax *_pcm.txt

Conditions for the execu- The external file is executed automatically in a certain CNC run situation
tion if it has a certain name and is saved in a certain directory. You do not
need to call up the file in the measurement plan.
– If the file is stored in the general directory for measurement plans
(<user directory>\workarea\inspections) or actual values, the file is
executed each time a measurement plan is run.
– If the file is stored in the general measurement plan directory (<user
directory>\workarea\inspections\<measurement plan name>) or in
the actual values directory, the file is executed when the correspond-
ing measurement plan is run.
Order of the run If several external PCM files and external batch files with the same name
exist, the files are processed in the following order:
– PCM file in the general directory for measurement plans
– PCM file in the current measurement plan directory
– Batch file in the current measurement plan directory
– Batch file in the current directory for measurement plans
– PCM file in the current actual values directory (if this deviates from
the general directory for measurement plans)

61212-2721102 CALYPSO 1-25


Run control via parameters in PCM

– PCM file in the current actual values directory (if this deviates from
the measurement plan directory)
– Batch file in the current actual values directory (if this deviates from
the measurement plan directory)
– Batch file in the current actual values directory (if this deviates from
the general directory for measurement plans)

NOTICE
By saving external files with the corresponding names in the general di-
rectory for measurement plans, you change the run of all measurement
plans on the system without having changed the measurement plans.

Limiting the validity of external PCM files


If an external PCM file in the general directory for measurement plans
should not be executed for all measurement plans, you can control this
via a parameter query after the measurement plan name. Example:
if getRecordHead("planid") = "testplan"
<Series of PCM commands>
endif
You can also request the operator, creation data, subject number, etc.
and use them as criteria.

Reference: Names of external PCM files


PCM allows you to start external programs from within the measurement
plan as well as execute PCM files, without storing the call in the meas-
urement plan.
This function makes it possible to change certain settings within one or
all measurement plans by means of PCM functions without changing the
measurement plans.
The name of the external files defines where in the measurement plan
run the file is executed. You can use the following file names:

Call Batch file PCM file


Prior to the start dialog Inspection_pre_start_dialog.bat inspection_pre_start_dia-
log_pcm.txt
After loading the meas- inspection_post_load.bat inspection_post_load_pcm.txt
urement plan
At the beginning of the inspection_start.bat inspection_start_pcm.txt
run

1-26 61212-2721102 CALYPSO


Run control via parameters in PCM

Call Batch file PCM file


After the end of the measurement_end.bat measurement_end_pcm.txt
measurement; during the
run after features prior to
the computation of char-
acteristics
Prior to the execution of – plugin_preFeature_pcm.txt
the input parameters of
each feature
Prior to the execution of – plugin_postFeature_pcm.txt
the output parameters of
each feature
Prior to the execution of – plugin_preCharacteristic_pcm.txt
the input parameters of
each characteristic
Prior to the execution of – plugin_postCharacteristic_pcm.txt
the output parameters of
each characteristic
After the end of the com- calculation_end.bat calculation_end_pcm.txt
putation, but prior to the
report/file output
(not during the run with a
selection of features)
After the end of the run inspection_end.bat inspection_end_pcm.txt
and the report output
After completion of all (al- report_end.bat report_end_pcm.txt
so externally) created re-
ports and files, if they are
started by CALYPSO (e.g.
PDF, DFD/DFX)
(not during the run with a
selection of features)
Prior to saving the meas- inspection_pre_save.bat inspection_pre_save_pcm.txt
urement plan

61212-2721102 CALYPSO 1-27


Working with PCM

Working with PCM


Overview: Working with PCM
The PCM programming language provides you with a wide choice of
functions and commands that you can use to automate many of the rou-
tine procedures in CALYPSO.
You can edit the PCM code in the PCM editor (see ➤Working with the
PCM editor [⇨ 1‑28])
You can use the search function to search for certain PCM texts or fea-
tures with formulas, parameters or directory names (see ➤Searching in
the measurement plan [⇨ 1‑30]).
Additional debug functions are useful for locating bugs in programs (see
➤Carrying out PCM test settings [⇨ 1‑35]).
You can also have the calculated formulas, presettings and postsettings
output in the default printout. This is an additional option to verify your
programming (see ➤Showing formulas in the default print-
out [⇨ 1‑37]).

Working with the PCM editor


The CALYPSO PCM editor allows you to create the PCM code independ-
ently of features and characteristics. You do not have to create the PCM
code in a separate program.
You simply enter the PCM code in the PCM editor of CALYPSO where
you can edit it afterwards. The PCM editor offers several functions and
settings facilitating the entry of PCM expressions.

Presettings for the PCM editor


You can highlight individual PCM expressions in color in the PCM editor.
For example, you can choose to display all PCM parameters in green color
and all PCM functions in blue color. The PCM code will then be clearer.
These color settings also have effect on the entries in the presettings and
postsettings.
To preset the color highlight in the PCM code, select Extras ® Set-
tings ® Environment. Select the PCM bookmark in the notebook.

1-28 61212-2721102 CALYPSO


Working with PCM

System Set Up
File Menus

Environment For User Master

Start
Conditions Paths

Language
Loops
Dual arm
Calculation and Comparison Operators Optics

Font
PCM Parameters
Dynalog

PCM Functions Printer

Dialogs
Strings
Export DMIS

Comments Default Name

Strategies

Save

Applies to all users PCM

Load Save as...

OK Cancel Apply

You will find more information on the color highlight of PCM expressions
under System Set Up (Environment) - PCM in the CALYPSO dialog refer-
ence of the Online Help.

Editing the PCM code in the PCM editor


To open the PCM editor, select Plan ® Advanced ® PCM Editor.

61212-2721102 CALYPSO 1-29


Working with PCM

PCM Editor
File... Edit Debug

Font size

xvalue = getActual("Circlel").x
if xvalue > 1O
then display xvalue
endif

Entering the PCM code You have two options of entering PCM functions and commands:
– Enter the code manually in the text field of the PCM editor.
You can find the PCM expressions under ➤Overview: PCM quick ref-
erence [⇨ 1‑55].
– Insert codes from the function and parameter list and edit them
afterwards.
You can use the predefined PCM expression from the function and
parameter list. Open the Function and parameter list using
Edit ® Function.
Reusing the PCM code You can save the PCM code in the .txt format.
The saved file with the PCM code can then be loaded by you or other
CALYPSO users in the PCM editor.
The PCM code can be copied from the PCM editor to the clipboard and
pasted to the input and output parameters for features and characteris-
tics.

Searching in the measurement plan


CALYPSO offers several search functions applicable to the entire meas-
urement plan.
– You can look for certain character strings in PCM commands.
– You can look for features with formulas.
– You can look for features with parameters (presettings and postset-
tings).
– You can look for features and files with directory names.
CALYPSO displays the search results and enables further operations with
the search results:

1-30 61212-2721102 CALYPSO


Working with PCM

– Double-click a displayed feature to highlight it in the measurement


plan.
– You can search the search results for certain texts.
– You can copy the search results into a file for further use.

Searching for a PCM text


You can search the entire measurement plan for certain character strings
in PCM expressions.
Select Plan ® Advanced ® Search ® PCM Text.

Enter the desired character string in the PCM Text dialog box. Use
Function to open the Function and parameter list from which you
can easily take general functions and parameters as well as parameters
of the current measurement plan.
By clicking Search, CALYPSO searches all PCM expressions of the meas-
urement plan and shows the character strings found:

The Use Of <pcmtext> dialog box shows all character strings found in
a hierarchically ordered tree structure. The buttons for extending and
compressing all or selected branches make it possible to customize the

61212-2721102 CALYPSO 1-31


Working with PCM

tree structure to suit your requirements and to enable fast access to the
points of interest.
Double-click the icon of the characteristic or feature in this dialog box to
select the corresponding feature in the measurement plan.

Searching features with formulas


You can look for features with formulas in the entire measurement plan.
Select Plan ® Advanced ® Search ® Features with Formulas.

In the Features with Formulas dialog box, CALYPSO shows all ele-
ments containing a formula (features, characteristics, base alignments,
rotary table functions, navigation paths, etc.) in a hierarchical tree struc-
ture.

The buttons for extending and compressing all or selected branches make
it possible to customize the tree structure to suit your requirements and
to enable fast access to the points of interest.
Double-click the icon of the characteristic or feature in this dialog box to
select the corresponding feature in the measurement plan.
You have the following options:

1-32 61212-2721102 CALYPSO


Working with PCM

– Click the Save icon to save the search results in a CSV file in any
directory.
– Click the Copy search results displayed icon or use CTRL+C to
copy the displayed structure to the clipboard and use CTRL+V or SHIFT
+INSERT to insert it in another program such as Word.
– By clicking the Search icon you open the Search window allowing
you to search for any character string in the expanded tree structure.
– Click the Update icon to refresh the display without reopening the
window.

Searching features with parameters


You can look for features with parameters (presettings and postsettings)
in the entire measurement plan.
Select Plan ® Advanced ® Search ® Features with parame-
ters.

CALYPSO shows all elements containing presettings or postsettings (fea-


tures, characteristics, navigation paths) in a hierarchical tree structure in
the Features with parameters dialog box. The measurement plan
parameters (presettings and postsettings) are displayed additionally..

The buttons for extending and compressing all or selected branches make
it possible to customize the tree structure to suit your requirements and
to enable fast access to the points of interest.
Double-click the icon of the characteristic or feature in this dialog box to
select the corresponding feature in the measurement plan.
You have the following options:

61212-2721102 CALYPSO 1-33


Working with PCM

– Click the Save icon to save the search results in a CSV file in any
directory.
– Click the Copy search results displayed icon or use CTRL+C to
copy the displayed structure to the clipboard and use CTRL+V or SHIFT
+INSERT to insert it in another program such as Word.
– By clicking the Search icon you open the Search window allowing
you to search for any character string in the expanded tree structure.
– Click the Update icon to refresh the display without reopening the
window.

Searching features with directories


You can look for features with directories in the entire measurement plan.
Select Plan ® Advanced ® Search ® Features with directo-
ries.

Features with directories

PCM search 5 for OI

Parameter

Path=".\protocols\"

Presettings

Check file contents: runPCMFile(pcmFilename)

Close

CALYPSO shows all features and characteristics containing directory


names in a hierarchically ordered tree structure in the Features with
directories dialog box:
– Measurement plan features
– Features
– Characteristics
– Global parameters

1-34 61212-2721102 CALYPSO


Working with PCM

– Presettings and postsettings of the measurement plan, features,


characteristics and navigation
– Names of output files
– External PCM files

The buttons for extending and compressing all or selected branches make
it possible to customize the tree structure to suit your requirements and
to enable fast access to the points of interest.
Double-click the icon of the characteristic or feature in this dialog box to
select the corresponding feature in the measurement plan.
You have the following options:
– Click the Save icon to save the search results in a CSV file in any
directory.
– Click the Copy search results displayed icon or press CTRL+C to
copy the displayed structure to the clipboard. It can be inserted again
in another program, e.g. Word, using CTRL+V or SHIFT+INSERT.
– By clicking the Search icon you open the Search window allowing
you to search for any character string in the expanded tree structure.
– By clicking the Replace icon you open the Replace window allow-
ing you to replace any character string in the expanded tree structure
by another character string.
– Click the Update icon to refresh the display without reopening the
window.

Carrying out PCM test settings


The test settings allow you to activate different modes for the execution
of PCM commands, e.g. the logging process or the execution of print
commands.
1 Select Plan ® Advanced ® PCM-Test settings.
The PCM-Test settings window appears on the screen.

61212-2721102 CALYPSO 1-35


Working with PCM

2 Activate PCM Test Printout to log the execution of each formula.


Each time a value is assigned or a variable calculated, the new value is
output in the default printout.
Bear in mind that PCM Test Printout makes the program run more
slowly.
3 Tick Activate print command to activate the print commands in
your PCM inputs.
The print command is not executed unless this check box is activated.
In this way you can print the current values of the variables at any point
in your measurement plan.
4 Activate Open PCM dialogs in CNC mode only to activate the
opening of PCM dialogs exclusively in the CNC mode.
After having entered PCM functions, the functions are called and, for
example, the value of PCM variables is updated. Also those PCM com-
mands are executed that open a dialog. If this is not necessary, activate
this check box.
5 Click OK.
The window will be closed. The settings are used the next time the meas-
urement plan is run.

NOTICE
You will be able to use CALYPSO's speed to best effect if you bear the
following in mind:
– Activate the print command only for test purposes.
– Activate the PCM test printout only for test purposes.

1-36 61212-2721102 CALYPSO


Working with PCM

Showing formulas in the default


printout
You can have the calculated formulas, presettings and postsettings out-
put in the default printout. This is an additional option to verify your pro-
gramming.
1 Select Resources ® Characteristics Settings Editor.
The Measurement Plan Editor Characteristics opens.
2 Select Printout ® Formulas in default printout and set the
value to Yes.
From now on, all formulas, presettings and postsettings will also be out-
put in the default printout.

61212-2721102 CALYPSO 1-37


Examples for PCM

Examples for PCM


Overview: Examples for PCM
The examples below illustrate the versatility at your disposal using PCM
with CALYPSO.
– ➤Using variables [⇨ 1‑38]
– ➤Condition with alternative [⇨ 1‑39]
– ➤Principle of parameterization [⇨ 1‑40]
– ➤Parameterizing point recall using the list function [⇨ 1‑41]
– ➤Loading parameter values into a curve [⇨ 1‑42]
– ➤Defining curve using cosine function [⇨ 1‑43]
– ➤Rechecking characteristic in case of deviation from toler-
ance [⇨ 1‑43]
– ➤Parameterizing alignment [⇨ 1‑45]
– ➤Loading a PCM file via dialog [⇨ 1‑46]
– ➤Defining loop with linear offset [⇨ 1‑47]
– ➤Nested loop for field (array) [⇨ 1‑48]
– ➤Parts family and variant control [⇨ 1‑49]
– ➤ASCII parameter file [⇨ 1‑50]
– ➤Transferring the machine number to Q-DAS [⇨ 1‑52]
– ➤Using the rotary table for positioning [⇨ 1‑53]

Example for PCM: Using variables


This example shows how to define variables, how to access them, and
how to use them in computations or other operations.
– The measurement plan contains the following variables:
– P1 = 10
– vector_1 = vector(10,20,30)
– point_1 = point(10.1,20.5,30.02,0,0,1)
– text_1= "This is a text in the text_1 variable"
– Parameter accesses to vector_1:
– vector_1.x => return value is 10
– vector_1.y => return value is 20
– vector_1.z => return value is 30
– Parameter accesses to point_1:
– point_1.x => return value is 10.1
– point_1.y => return value is 20.5

1-38 61212-2721102 CALYPSO


Examples for PCM

– point_1.z => return value is 30.02


– point_1.nx => return value is 0
– point_1.ny => return value is 0
– point_1.nz => return value is 1
– Examples for calculations with variables:
– Pnew = P1 *2. The return value is 20
– Pnew = (vector_1.x-point_1.z)/2. The return value is -10.01
– r = type051_n0.x/2
– zdelta = (r1-r)/tanphi
– norm = (nx4*nx4)+(ny4*ny4)
– Examples for output in the default printout:
– print("Radius_1 has the value: ",radius_1)
CALYPSO outputs the following string (example):
Radius_1 has the value: 26.2655
– print("r1 = ",r1,", r = ",r,",tanphi = ",tanphi)
CALYPSO outputs the following string (example):
r1= 23.5, r = 46, tanphi = 0.7874

NOTICE
The Print command is not executed unless you have ticked the Test
printout check box in Plan ® Advanced ® PCM Test settings.

Example for PCM: Condition with


alternative
You can enter conditions with alternatives (IF - ELSE) in the input and
output parameters.
The syntax is:
if CONDITION then
DEFINITION1
else
DEFINITION2
endif
Meaning: If CONDITION is satisfied, DEFINITION1 is processed; if not sat-
isfied, DEFINITION2 is processed.
DEFINITION1 and DEFINITION2 can be formulas, value assignments, func-
tions or other conditions of your choice, always with line breaks as sep-
arators.
The example below shows how this syntax is used:
message("Test if with PCM")
P1 = 1
message("value is:" ,P1)
//----------------------------------------------------------

61212-2721102 CALYPSO 1-39


Examples for PCM

if P1 == 1 then
message("is equal. Value was:" ,P1)
endif

if P1 < 1 then
message("is smaller than 1: Value was:" ,P1)

else
if P1 > 1 then
if P1 > 5 then
message("is greater than 5: Value was:" ,P1)
endif
message("is greater than 1: Value was:" ,P1)
endif
endif
//---------------------------------------------------------
test = point(1,2,3,0,0,1)
message("X" ,test.x, "Y",test.y, "Z",test.z, "nx",test.nx,
"ny" ,test.ny, "nz" ,test.nz)
if test.x == 1
then
message("X value is:" ,test.x)
endif

Example for PCM: Principle of


parameterization
The example below illustrates the principle of parameterization.
1 You begin by compiling an ordinary measurement plan:
• Take a perforated plate, define the base alignment at the top left
front and probe twice in -Z.
• For the two probing points “point_A” and “point_B”, define the
two corresponding features “Z-value_A” and “Z-value_B”.
2 Define the variables so that the positions of the probing points can be
parameterized:
• Select Plan ® Advanced ® Parameter, and enter the follow-
ing:
X_value_point_A = 10
Y_value_point_A = 25
Z_value_point_A = 0
X_value_point_B = 30
Y_value_point_B = 40
Z_value_point_B = 0

• Click OK to terminate the input.

1-40 61212-2721102 CALYPSO


Examples for PCM

The positions of probing points “point_A” and “point_B” can now be


parameterized.
3 You do this by substituting variables for the fixed X, Y and Z coordi-
nates:
• Open probing point “point_A”, click in the input field for the X
value and select Formula from the context menu.
• Click Settings in the formula window.
The variables you defined beforehand are listed.
• Click X_value_point_A.
Instead of X the measurement plan now contains a variable with 10
as its parameter value.
• Repeat the entire procedure for the Y and Z values of A.
Parameters have now been substituted for the fixed X, Y and Z values
of probing point “point_A”.
• Proceed in precisely the same way to substitute parameters for the
fixed X, Y and Z values of probing point “point_B”.
4 Run the measurement plan.
The CMM moves to the coordinates.
If you now assign other parameters to the variables

X_value_point_A = 18
Y_value_point_A = 37
Z_value_point_A = 0
X_value_point_B = 44
Y_value_point_B = 23
Z_value_point_B = 5

and restart the measurement plan, the CMM will move to the new co-
ordinates.

Example for PCM: Parameterizing point


recall using the list function
The “Recall Feature Points” function supports the recall of any measured
points of other already defined features to evaluate them in a different
manner. You can recall individual points, individual paths, specific areas
(specified in coordinates) or all points of one or more features.
When recalling points, you can parameterize the features to be recalled
and their ranges by using the list function of PCM.
In the following example, the list of the points to be recalled is defined
differently depending on the desired accuracy.

61212-2721102 CALYPSO 1-41


Examples for PCM

Example if (Variable_Accuracy> 0.02)


a=list("Circle1","Circle2")
else
a=list("Circle1","Circle2","Line1","Line2","Line3","Line4")

Example for PCM: Loading parameter


values into a curve
This example illustrates how to generate a curve from 12 individual points,
using the point generator.
1 Create the following parameter file:
type103[1]=point(-65.386, -46.674, 139.666, -0.019, -0.022, 1.0)
type103[2]=point(-81.733, -58.343, 139.007, -0.026, -0.028, 0.999)
type103[3]=point(-98.08, -70.011, 138.154, -0.034, -0.033, 0.999)
type103[4]=point(-114.426, -81.68, 137.101, -0.043, -0.039, 0.998)
type103[5]=point(-130.773, -93.348, 135.821, -0.053, -0.046, 0.998)
type103[6]=point(-147.12, -105.017, 134.29, -0.063, -0.054, 0.997)
type103[7]=point(-163.466, -116.685, 132.499, -0.073, -0.061, 0.995)
type103[8]=point(-179.813, -128.354, 130.44, -0.084, -0.069, 0.994)
type103[9]=point(-196.159, -140.023, 128.113, -0.094, -0.077, 0.993)
type103[10]=point(-216.593, -154.608, 124.829, -0.107, -0.087, 0.99)
type103[11]=point(-220.679, -157.525, 124.122, -0.109, -0.089, 0.99)
type103[12]=point(-224.766, -160.442, 123.4, -0.112, -0.092, 0.99)

These lines define the 12 points from which the curve will be gener-
ated.
• If you want to include a comment for each curve point, add the
following lines to the parameter file:
name103[1] = "type103_n1_p1"
name103[2] = "type103_n2_p2"
name103[3] = "type103_n3_p3"
name103[4] = "type103_n4_p4"
name103[5] = "type103_n5_p5"
name103[6] = "type103_n6_p6"
name103[7] = "type103_n7_p7"
name103[8] = "type103_n8_p8"
name103[9] = "type103_n9_p9"
name103[10] = "type103_n10_p10"
name103[11] = "type103_n11_p11"
name103[12] = "type103_n12_p12"

• You must also open the Point Generator dialog box (see below)
and define the “name103[index]” variable in the Comment box.
2 Open the definition template of the “curve”.
3 Go to Nominal Data and select Parameter Data.
The Point Generator window is opened.

1-42 61212-2721102 CALYPSO


Examples for PCM

4 Enter the following values in the Point Generator dialog box:


• Start Index = 1
• End Index = 12
• Increment = 1
5 Click the Point input field and use the context menu to open the
Formula input window.
6 Enter the following variable name:
type103[index]
You have now entered a changeable variable name. The point gener-
ator replaces “[index]” with the current value of the loop counter in
each step, starting with the start index.
7 Close the Formula Interface window.

Example for PCM: Defining curve using


cosine function
You can use the point generator to define a curve by its mathematical
description. This example, by way of illustration, shows how to define a
curve with the aid of the cosine function. When you do this you are using
implicit variable definition and value assignment by means of a formula.

Defining a curve
1 In the point generator, enter 1 as the Start Index, 50 as the End Index,
and 1 as the Increment.
2 Right-click in the Point input field to open the Formula input window.
3 Enter the following:
point(index*10,50*cos(index*10),0,0,0,1)
This formula defines a series of 50 points with changing X and Y values,
all situated on the plane Z=0 and having the same vector (0,0,1).
“point(x,y,z,nx,ny,nz)” defines a point variable. Use the “index” loop
counter of the point generator as the argument in the cosine function.
In each of the points the x value is index*10, the y value is 50*cos(in-
dex*10), and the z value is 0.
4 Close the Formula input window.

Example for PCM: Rechecking


characteristic in case of deviation from
tolerance
You can use PCM to recheck a characteristic in the event of an excursion
past a tolerance limit. This is useful, for example, if the excursion is due
to the presence of foreign matter. Once the foreign matter has been re-

61212-2721102 CALYPSO 1-43


Examples for PCM

moved by cleaning, a repetition of the measurement will furnish the ac-


tual values.
The characteristic in this example is the roundness of a hole. If the char-
acteristic goes out of tolerance, you want to remove foreign matter from
the hole and repeat the measurement.

Task with PCM functions


1 Place a loop with 6 repetitions around the characteristic.
2 Point to the Break Condition field, open the shortcut menu and
select Formula...
The Formula dialog box appears on the screen.
3 In the Boolean Expression (Yes / No Test) field, define “sta-
tus_5==1” as the abortion condition and click OK.
4 Write the following program code into the field for the output pa-
rameters of the characteristic:

1-44 61212-2721102 CALYPSO


Examples for PCM

//
************************************************************************************
************
// Measure Circle hole_5 , check roundness; if out of tolerance, interrupt CNC and
request next
// task: repeat feature or measure next feature or terminate CNC run.
//
************************************************************************************
************
// Defining starting conditions
status_5 = 2
hole_5 = getActual("DIN Round_hole_5").actual
// If out of tolerance, open a window and inquire CNC End, Continue or Repeat
if hole_5 > 0.01 then
message("DIN Roundness of hole_5 is:" ,hole_5)
status_5 = inquire("1=CNC-End, 2=Continue, 3=Repeat. Enter a number")
message(status_5,"Is your entry correct?", "DIN-Roundness of hole_5 is", hole_5)
if status_5 == 2
then
message("CNC run will be continued")
status_5 = 2
endif
endif

if status_5 == 1 then
message("The CNC run will be terminated due to excess tolerance in hole_5.")
cncBreak()
endif

if status_5 == 3 then
message("The circle measurement is repeated.")
if LOOP1 == 5 then
message("CNC run will be terminated due to too many loop runs in hole_5.")
cncBreak()
endif
endif
print("Status is",status_5, "DIN Roundness of hole_5 is", hole_5)

5 You can now run the measurement plan.

Example for PCM: Parameterizing an


alignment
You can parameterize the angle of rotation of a system of coordinates.
This entails creating the angle as a value of a variable in radian measure.
You can also parameterize the offset of a system of coordinates.

61212-2721102 CALYPSO 1-45


Examples for PCM

In this example, the system of coordinates has to be rotated 180 or 0


degrees, depending on the value of a variable.
You accomplish this by assigning a value of 0 or 1 to a variable, for ex-
ample “PartRotationActive”, in the input parameters at the respective
points in the measurement plan.
1 Open the base alignment.
2 Select Change active Base Alignment and click Special.
3 In the Special Functions window, click Rotate by an angle.
4 Right-click in the input field for the angle to the context menu, open
the Formula dialog box and enter the following:
3.14159265359 * PartRotationActive
In radian measure, 180° corresponds to the number π = 3.14159265359.
The result of the formula depends on the variable PartRotationActive.
– When “PartRotationActive=0” is set, the formula’s return value is
3.14159265359 * 0 = 0°.
The base alignment is not rotated.
– When “PartRotationActive=1” is set, the formula’s return value is
3.14159265359 * 1 = 180°.
The base alignment is rotated 180°.

Example for PCM: Loading a PCM file via


dialog
You can manually load a PCM file for the current measurement plan by
clicking Plan ® Advanced ® Parameter. With the readPCMFile
command, you can have the same function run automatically.
If you are using character string functions and polls, you can ask for the
required file name in the dialog.
With the following lines, you can implement a poll for the desired pa-
rameter file and the loading of the relevant file:
// Select file
FILE_SELECTION = inquireList("Which file do you want to use?",
"parameter_record_1", "parameter_record_2")
// Check cancelation
if FILE_SELECTION == ""
cncBreak()
endif
// Specify path for files
PATH = ("C:\Users\Public\Documents\Zeiss\CALYPSO\PCM_Files\")
// Load PCM file
readPCMFile(PATH + FILE_SELECTION)

1-46 61212-2721102 CALYPSO


Examples for PCM

Example for PCM: Defining loop with


linear offset
Let us assume that you want to parameterize a hole pattern with linear
offset in X. You can use the Pattern function or PCM to accomplish this
task. The PCM is illustrated here. You must parameterize the X, Y and Z
coordinates along with the diameter and the offset in X.
1 Select Plan ® Advanced ® Parameter and enter the following
values:
Circle_position = point(20.5,15.5,-5,0,0,1)
OffsetX = 10
Circle diameter = 50
2 Parameterize the circle:
• Define the base alignment.
• Define the circle with measurement strategy.
• Open the feature definition template for a circle and enter param-
eters in the Formula input window.
• Input field X: circle_position.x
• Input field Y: circle_position.y
• Input field Z: circle_position.z
• Input field D: circle diameter
3 Define the “Diameter” characteristic and place a loop over it.
If more than one characteristic is needed, e.g. X value, Y value, and
diameter, you have to parameterize the nominals for all characteristics.
Then combine the characteristics in a group and place the loop around
the group.
4 Parameterize the nominal.
5 Place a loop over the characteristic:
• Start = 1
• End = 5
• Increment = 1
The next step is to update the feature with loop counter and offset
parameter.
6 In the “Circle” definition template, select “Formula” from the context
menu opened by right-clicking in the X Nominal field.
The field for the X value contains the “circle_position.x” variable. You
want to increment this value by the “offsetX” value each time the loop
is run.
Enter the following in the formula:
circle_position.x + ((LOOP1 - 1) * offsetX)

61212-2721102 CALYPSO 1-47


Examples for PCM

LOOP1 is the loop variable of the 1st loop; you can transfer it into the
formula by clicking Loop. The start index for LOOP1 is the value from
the Start input field for the loop.
7 Run the measurement plan.
The loop is run. The expression for the X value assumes the following
values one after the other: 20.5, 30.5, 40.5, 50.5, 60.5.

Example for PCM: Nested loop for field


(array)
In this example, a perforated plate is to be parameterized. The number
of holes and the positions of the holes are both random. Build up the
circles as an “array” (field) and use a loop in the measurement plan which
you use to pass through the array index.
An array can be obtained by indexing a variable with square brackets. The
array will, of course, have to be set as a parameter for the actual proc-
essing process. In this case, use the LOOP1 loop index.
1 Create the following ASCII file for PCM:
// Circle coordinates as points with values for x,y,z
//
CirclePos[1] = point(10,20,-5,0,0,1)
CirclePos[2] = point(15,30,-5,0,0,1)
CirclePos[3] = point(22,28.3,-5,0,0,1)
CirclePos[4] = point(40.5,30.8,-5,0,0,1)
Circle_diameter[1] = 70
Circle_diameter[2] = 50
Circle_diameter[3] = 25
Circle_diameter[4] = 22
NumberCircles = 4
// Comment strings for each circle
textCircle[1] = "This is circle A"
textCircle[2] = "This is circle B"
textCircle[3] = "This is circle C"
textCircle[4] = "This is circle D"
The ASCII parameter file can be generated e.g. using the Notepad ed-
itor in Windows NT.
2 Save this file as “perplate_A.para”.
3 Create a measurement plan with base alignment and a circle.
The elements of the base alignment can also be parameterized. They
are omitted here for the sake of clarity.
4 Define a circle with measurement strategy.
5 Define each of the variables contained in the parameter file described
above as an array (with square brackets and the LOOP1 loop variable)
and read in the “perplate_A.para” parameter file.
The parameters from the file are assigned to the variables.

1-48 61212-2721102 CALYPSO


Examples for PCM

6 Open the feature definition template for the circle.


• In the X Nominal input field, enter “CirclePos[LOOP1].x”.
• In the Y Nominal input field, enter “CirclePos[LOOP1].y”.
• In the Z Nominal input field, enter “CirclePos[LOOP1].z”.
• In the D Nominal input field, enter “Circlediameter[LOOP1]”.
• Open the commentary field with Formula in the Name/Com-
ment window and enter the “textCircle[LOOP1]” text parameter.
7 Define the characteristics X value, Y value and diameter. The nominal
values are parameterized using Formula.
8 Combine the characteristics in a group.
9 Place a loop over the group:
• Start = 1
• End = NumberCircles
You can import the “NumberCircles” variable into the End field using
the Formula input window.
• Increment = 1.
10Start the measurement plan.
Depending on the content of the parameter file, you can use this meas-
urement plan to measure different numbers of circles with different po-
sitions and diameters.

Example for PCM: Parts family and


variant control
PCM enables you to measure different variants of a workpiece using a
single measurement plan.
Let us assume, for example, that a workpiece has two variants, A and B.
Variant B has three extra holes with a diameter of 0.39 in.
1 Create a complete measurement plan, including the three holes.
2 Combine all characteristics of the three holes in the group called “Ad-
ditional hole pattern variant B”.
Selection of the variant is controlled by means of a PCM parameter as
a switch.
3 Select Plan ® Advanced ® Parameter and enter the following:
// Measure additional hole pattern variant B when parameter is 1
MeasureAdditionalHolePatternActive = 1

4 Highlight the “Additional hole pattern variant B” group and set a con-
dition:
• Select Condition from the context menu.

61212-2721102 CALYPSO 1-49


Examples for PCM

• Click in the input box for the condition to open the context menu
and open the Formula input window.
• In the Formula input window, click Settings.
• Confirm the MeasureAdditionalHolePatternActive varia-
ble.
• Insert “== 1” as an additional entry.
The condition is now defined: the “Additional hole pattern variant B”
group is measured only when the “MeasureAdditionalHolePatternAc-
tive” variable is equal to 1.
5 Run the measurement plan.
The “Additional hole pattern variant B” group is measured.
6 Select Plan ® Advanced ® Parameter and enter the following:
// Measure additional hole pattern variant B when parameter is 1
MeasureAdditionalHolePatternActive = 0

7 Run the measurement plan again.


The “Additional hole pattern variant B” group is not measured in this run.

Example for PCM: ASCII parameter file


Example of an ASCII parameter file (*.PARA file):

1-50 61212-2721102 CALYPSO


Examples for PCM

// Text-Parameters -------------------------------------------
who = "File generated by ZEISS-IMT Training Center"
nameOfCircle_1 = "Circle_1"
nameOfCircle_2 = "Circle_2"
nameOfCircle_3 = "Circle_3"
text1 = "type034_n2_p2"
nextText = "This is in Front"
// Text-Parameters as an array ---------------------
name101[1] = "type101_n1_p1"
name101[2] = "type101_n2_p2"
name101[3] = "type101_n3_p3"
name101[4] = "type101_n4_p4"
name101[5] = "type101_n5_p5"
name101[6] = "type101_n6_p6"
name101[7] = "type101_n7_p7"
name101[8] = "type101_n8_p8"
name101[9] = "type101_n9_p9"
name101[10] = "type101_n10_p10"
// Numeric-Parameters ------------------------------
Partnumber = 10
PartRotationAktiv = 1
CREATION_DATE = 950516
CREATION_TIME = 0000
DESIGN_DATE = 950516
NUMBER = 772209709750
PART_HEIGHT = 316.000
PLACE = 2
X_Circle_1 = 10
Y_Circle_1 = 20
Z_Circle_1 = 15
D_Circle_1 = 40
X_Circle_2 = 250
Y_Circle_2 = 40
Z_Circle_2 = -15
D_Circle_2 = 25
X_Circle_3 = -12
Y_Circle_3 = -20
Z_Circle_3 = 50
D_Circle_3 = 12
// Numeric-Parameters as an array type vector -------------------
type086[1] = vector( 10.0, 0.0, 0.0 )
type086[2] = vector( 0.0, -20.0, 0.0 )
type086[3] = vector( 30.0, 20.0, 10.0 )
type086[4] = vector( 17.5, 13.8, 50.0 )
// Numeric-Parameters as an array type point --------------------
CurveFront[1] = point( 216.023, 0.0, 69.698, 0.984, -0.0, 0.176 )
CurveFront[2] = point( 206.34, 0.0, 102.988, 0.916, -0.0, 0.401 )
CurveFront[3] = point( 180.14, 0.0, 141.726, 0.707, -0.0, 0.707 )
CurveFront[4] = point( 130.593, 0.0, 181.254, 0.575, -0.0, 0.818 )

61212-2721102 CALYPSO 1-51


Examples for PCM

CurveFront[5] = point( 107.046, 0.0, 197.639, 0.57, -0.0, 0.822 )


CurveFront[6] = point( 80.825, 0.0, 216.02, 0.557, -0.0, 0.83 )

Example for PCM: Transferring the


machine number to Q-DAS
This example illustrates how to transfer the machine number to the Q-
DAS interface using PCM commands. The following commands are writ-
ten into the input parameters:
// EXAMPLE OF PCM-COMMANDS TO TRANSFER THE MACHINE-ID TO Q-DAS
// TO ACTIVATE PUT IT INTO THE PRE-PARAMETER OF THE INSPECTION
// OR INTO THE FILE 'inspection_start_pcm.txt'
// IN THE DIRECTORY OF THE TESTPLAN

// Testassignment (normally from FACS)


OP10_machine="4711"
OP20_machine="0815"
OP30_machine="007"
OP40_machine="abc"

// Function for calculationg machine id for Q-DAS


defineFunctionStart("CALC_MACH_NR")
OP_NAME=getCFAttribute("u_k0053operation")
PARA_NAME="OP"+OP_NAME+"_machine"
MACH_ID=getParameterNamed(PARA_NAME)
defineFunctionEnd("MACH_ID")

// Function for calculationg machine id for Q-DAS


defineFunctionStart("CALC_MACH_NR2")
OP_NAME=getCFAttribute("u_k0053operation")
PARA_NAME="OP"+OP_NAME+"_machine"
MACH_ID=getParameterNamed(PARA_NAME)+"m"
defineFunctionEnd("MACH_ID")

// Generate new column 'u_machine_id' in table file


generateTableColumn("u_machine_id","CALC_MACH_NR")
generateTableColumn("u_2machine_id","CALC_MACH_NR2")

// Activate multiQdasOutput and set columnID for file splitting


outputMultiQdas("u_k0053operation")

LISTE=readListFile("liste.txt")
// LISTE=list("Radius Tangential","Radius Hüll",
// "Gruppe: best fit of bore pattern")
addCF(LIST)
// addME("PlaFroTop", "PlaBack")
// setRunID("Run3er", "RunGAU PFER")
The central “outputMultiQdas” command generates additional columns
in the table file:

1-52 61212-2721102 CALYPSO


Examples for PCM

AB AC
u_machine_id u_2machine_id
0815 0815m
abc abcm
007 007m

Example for PCM: Using the rotary table


for positioning
You can use the rotary table as positioning unit for the measurement of
equal workpieces. You must create the positioning procedure for a work-
piece only once and must change the rotary table position and the work-
piece position, if necessary, via loops.
Example of application This graphic shows a case in which both options are used: the workpiece
position is changed once via an offset for the rotary table position and
the measurement plan is processed five times using different rotary table
positions.

1 workpiece

Thus, the number of equal workpieces which can be measured in this way
is double the number of parameterized rotary table positions.

Procedure
If you wish to use the rotary table to measure several equal workpieces
in one measurement plan, you must proceed as follows:
Defining the rotary table You prepare the entry of the rotary table position in the presettings. To
position do this, use the rtPositionOffset PCM function.

NOTICE
You can also enter a formula as the argument of the PCM function. For
example, the angle can be calculated as a function of a part index which
is prompted every time you start. You can also predefine the angle in
AutoRun.

61212-2721102 CALYPSO 1-53


Examples for PCM

RT home position If you entered the rtPositionOffset PCM function in a measurement plan,
you must home the RT prior to the CNC run.
The offset angle is saved in the measurement plan and will keep its value
also after deleting the function. Every time when changing to another
measurement plan or when removing the rtPositionOffset PCM function
from this measurement plan or adding it again, you must home the RT
manually. By doing this, the internal value is reset.

NOTICE
It is not absolutely necessary to home the RT between the individual runs
of a measurement of series.

1-54 61212-2721102 CALYPSO


PCM quick reference

PCM quick reference


Overview: PCM quick reference
You need the following information in order to program with PCM:
– ➤PCM syntax [⇨ 1‑56]
– ➤Variables in PCM [⇨ 1‑56]
– ➤Arithmetic and comparative operators in PCM [⇨ 1‑57]
– Overview of PCM functions:
– ➤Mathematical Functions [⇨ 1‑58]
Contains the syntax for mathematical functions such as sine, co-
sine, etc.
– ➤Character String Functions [⇨ 1‑61]
Contains the syntax for functions using character strings such as
asc, chr, len, etc.
– ➤Input and Output [⇨ 1‑62]
Contains the functions that control screen input and output.
– ➤File Commands [⇨ 1‑66]
Contains the functions required for working with files and direc-
tories.
– ➤Measuring-specific and measurement plan-specific func-
tions [⇨ 1‑75]
Contains the functions that process measured values generated
by a measurement plan run and that read measurement plan-
specific data such as stylus properties.
– ➤CMM-specific functions and travel commands [⇨ 1‑88]
Contains the functions for querying CMM-specific data and for
controlling the CMM.
– ➤System Commands [⇨ 1‑95]
Contains the system calls.
– ➤Custom Printout [⇨ 1‑99]
Contains the functions for activating and deactivating the custom
printout and for determining the formats.
– ➤Conditions/Loops [⇨ 1‑101]
Contains the syntax for conditions and loops.
– ➤Output in printout [⇨ 1‑104]
Contains the functions for the definition of the output in print-
outs.
– Overview of the ➤names of external PCM files [⇨ 1‑107]

61212-2721102 CALYPSO 1-55


PCM quick reference

PCM syntax
Like the programming languages Basic, C, Fortran and so on, PCM uses
a functional syntax with the following rules:
– Definitions and value assignments as follows:
variable name=value
– Blanks are not permitted in names and formulas; the syntax is case-
sensitive, so it distinguishes between uppercase and lowercase letters.
– Multiplication and division precede addition and subtraction when
formulas are resolved.
– The decimal separator is the point (example 3.85).
– In functions, the function parameters (the arguments) are in paren-
theses and separated by commas.
– In commands (procedure calls), the function parameters (the argu-
ments) can be omitted. Example: getActual().
– Comments can be entered in each line: everything following the “//”
string is ignored.

Variables in PCM
There are five types of variable in PCM. The type of variable is defined
implicitly by the value assignment:

Variable type Examples of value assignments


number e = 2.71828
Variable2 = 2.0
P1 = 80
vector Axis = vector(10,12,0)
point CylinderB = point(-10,12.5,0,0,0,1)
string Text_1 = "Circle"
Text_2 = "Enter the number:"
list coll=list("Circle1","Circle2","Circle3")
range=list(name1,name2,name3,name4)

Arrays Arrays can also be defined with variables using special value assignments
with square brackets. An array consists of several variables of the same
type. Example:

1-56 61212-2721102 CALYPSO


PCM quick reference

array[1] = point(-10,12.5,0,0,0,1)
array[2] = point(-12.12.5,0,0,0,1)
array[3] = point(-14.12.5,0,0,0,1)
array[4] = point(-16.12.5,0,0,0,1)

In this case, “array” is an array consisting of 4 variables of the point type.


The array index in square brackets can also be specified by a variable (of
type number, as an integer). You can therefore define an array of any
length in a single loop instruction. Example:

for I = 1 to numberTeeth
type[I] = inquireNumber("Which tooth type is in position number ",I)
next I

You can gain direct access to a specific element in an array by specifying


the array index. Example:

Length = output values[4]

Arithmetic and comparative operators in


PCM
You can use the following arithmetic operators in PCM:

Operator Result
+ Sum
- Difference
* Product
/ Quotient
** Power

You can use the following comparative operators for conditions in PCM:

Operator Result
< Truth value of “a < b”
> Truth value of “a > b”
<> Truth value of “a not equal to b”
== Truth value of “a = b”
>= Truth value of “a ≥ b”
<= Truth value of “a ≤ b”

61212-2721102 CALYPSO 1-57


PCM quick reference

Mathematical functions in PCM


Angle conversions
You can use the following functions to convert angle values in PCM:

Function Result
rad(DegreeAngle) Radian value from degree angle
deg (RadianAngle) Gon angle value of radian angle
angle (angular degree) Angular degree (decimal) of angular degrees

The angular degree is indicted in


Degrees[,Minutes[,Seconds]]

Trigonometric Functions
PCM supports the following trigonometric functions:

Function Result
sin (DegreeAngle) Sine value
sinRad (RadianAngle) Sine value
cos (DegreeAngle) Cosine value
cosRad (RadianAngle) Cosine value
tan (DegreeAngle) Tangent value
tanRad (RadianAngle) Tangent value
arcsin (value) Arc sine in degrees
radArcsin (value) Arc sine in rad
arccos (value) Arc cosine in degrees
radArccos (value) Arc cosine in rad
arctan (value) Arc tangent in degrees
radArctan (value) Arc tangent in rad
arctan2 (value1,value2) Arc tangent from the quotient value1/value2 in degrees
radArctan2 (value1,value2) Arc tangent from the quotient value1/value2 in rad

Logical operators
CALYPSO supports the following logical operators:

1-58 61212-2721102 CALYPSO


PCM quick reference

Operator Result
(Expression1) and (Expres- Logical AND of the truth values of both expressions
sion2)
(Expression1) or (Expres- Logical OR of the truth values of both expressions
sion2)
not (expression) Logical negation of the truth value of the expression

Examples:
If var1 = 0 and var2 = -7, then
– (var1=0) and (var2>0) = false
– (var1=0) or (var2>0) = true
– not (var2>0) = true
If t=true, f=false, and i=9, then
– bed1 = (i>1) and (i>10) = false
– bed2 = t and f = false
– bed3 = t and (i>10) = false
– bed4 = true or (i>10) = true

Bit operations
CALYPSO supports the following bit operations on integral values:

Operator Result
bitAnd(number1,number2) Bitwise AND of the double representation of the two numbers
bitOr(number1,number2) Bitwise OR of the double representation of the two numbers
bitXor(number1,number2) Bitwise excluding OR of the double representation of the two num-
bers

Examples:
– bitAnd(12,4) = 4
– bitOR(12,4) = 12
– bitXor(12,4) = 8

Other functions
Other mathematical functions are available:

Operator Result
squared(value) Value squared
sqrt(value) Square root of value
exp(value) evalue
ln(value) Natural logarithm of value

61212-2721102 CALYPSO 1-59


PCM quick reference

Operator Result
log(value) Common logarithm of value
mod(value1,value2) Value1 modulo value2
int(value) Integral proportion of value
abs(value) |Value| (=absolute value of the value)
round(value[,figures]) Value, rounded to the given number of places; if specification of
number of places omitted: 0 places
sign([value1,]value2) Value1 multiplied by sign of value2 (default of value1 = 1):
- value1, if value2 < 0
+ value1, if value2 ≥ 0
signWithZero([value1,]val- Value1 multiplied by sign of value2 (default of value1 = 1):
ue2) - value1, if value2 < 0
0, if value2 = 0
+ value1, if value2 > 0
max(value1[,value2[, ... ]]) Maximum of the indicated values
min(value1[,value2[, ... ]]) Minimum of the indicated values
ord(BooleanValue) 1 for true0 for false

Examples:
squared(3) = 9
sqrt(225) = 15
exp(0) = 1
ln(1) = 0
log(10000) = 4
mod(22,8) = 6
int(34.5674) = 34
abs(-35.335) = 35.335
round(35.335,2) = 35.34
sign(-12,-34) = 12
sign(-12) = -1
max(1,2,5,8,3) = 8

Generating functions
The following functions generate geometric objects:

1-60 61212-2721102 CALYPSO


PCM quick reference

Function Result
point(x,y,z[,nx,ny,nz]) Point with the x, y, z coordinates and (optionally) the normal vector
(nx,ny,nz)
vector(x,y,z) Vector with the coordinates x, y and z
calculatePointOnHelx(r,in- Points on the cylinder's and cone's lateral surface or tapered thread
dex,g,tw,kw) with radius r, lead g, trapezoid angle tw and cone angle kw.

Character string functions in PCM


You can use the following character string functions and operations in
PCM:

Function Result
character string1 + character string2 Character string3 of the following characters of
character string1 and character string2
asc(character) ASCII code (number) of specified character
chr(number) Character with the given ASCII code
cr() Line Break
format(number) Character string consisting of the figures and char-
acters of the number
formatL (Number [,Total Number Places [,Num- The number as a rounded decimal number with
berDecimalPlaces]]) the specified decimal places in the form of a char-
acter string with the minimum length “Places”
(decimal point is not considered), left-justified for-
mat
formatR(Number [,Total Number Places [,Num- The number as a rounded decimal number with
berDecimalPlaces]]) the specified decimal places in the form of a char-
acter string with the minimum length “Places”
(decimal point is not considered), right-justified
format
inStr([startIndex,] character string1, character Position of the first occurrence of character string2
string2) within character string1 after the startIndex-th
character or the first character
len(CharacterString) Length of character string
mid(character string,startIndex[,length]) Character string, consisting of the characters from
the startIndex-th character to the end of the char-
acter string or to the (startIndex+length-1)-th char-
acter
qm() Represents double inverted commas (quotes) as
character string.

61212-2721102 CALYPSO 1-61


PCM quick reference

Function Result
strElement(n,char,character string) The n-th element of the character string, when
char is regarded as a separator between the ele-
ments
subStr(character string,startIndex,endIndex) Character string, consisting of the characters from
the startIndex-th character to the endIndex-th
character
text(value1[,Value2,Value3]) Character string from all transferred parameters
val(CharacterString) Number represented by the character string

Examples:
"diameter" + text(1) = "diameter1"
asc("8") = 56
chr(111) = "o"
format(3278,45) = "3278,45"
formatL(12345.6789,10,2) = "12345.68" (three blanks)
formatL(12345.67,10,4) = "12345.6700" (one blank)
formatR(12345.67,10,6) = "12345.670000" (length here > 10)
val("3278,45") = 3278,45
len("This is a character string") = 26
qm()+"c:\zeiss\calypso\modul 4\hugo.bat"+qm() is interpreted as char-
acter string “"c:\zeiss\calypso\modul 4\hugo.bat"”
inStr(3,"Position","o") = 7
inStr("Position","o") = 2
mid("PCM functions",1,3) = "PCM"
strElement(4,",","hello,here,we,are,again") = "are"
strElement(4,"e","here,we,are,again") = "ar"
subStr("This is a test",4,9) = "s is a"

PCM functions: Input and output


confirm
Displays the Question ! window on the screen and shows true after
clicking Yes and false after clicking No. The syntax is:
confirm("question")

display
Outputs a text in a screen window. The CNC run is not interrupted. Ad-
ditionally, certain parameters can be used to suppress and reenable the
execution of the display commands. The syntax is:
display(parameter)

1-62 61212-2721102 CALYPSO


PCM quick reference

parameter Function
Text Opens a new Display window for
text output.
"#displayCLOSE" Closes all Display windows.
"#displayOFF" Ignores additional display com-
mands until the next dis-
play("#displayON") command.
Subsequently, all control outputs
are deactivated with one line.
"#displayON" Switches the consideration of the
display commands on again.

Examples:
display("Group A")
Displays the “Group A” text on the screen.
para="Group B"
display(para)
Displays the “Group B” text on the screen.

inquire
Corresponds to the inquireNumber command, but is supported by
PCM only for the sake of upwards compatibility. The syntax is:
variable name = inquire("Dialog text for poll")

inquireList
The inquireList command can be used to create a menu for querying
a character string. The syntax is:

variable name = inquireList("Menu title","Menu item1","Menu item2",...,"Menu itemn")

The command causes the appearance of a menu with the given title line
on the screen. As a value, the variable is assigned the character string of
the menu item which has been selected with a mouse click or the arrow
keys and confirmed with OK.
Examples:

NameForPrintoutheader = inquireList("Name for printout header","Test printout","De-


fault printout",)

inquireNumber
The inquireNumber command can be used to create a dialog for
querying a numeric value. The syntax is:

variable name = inquireNumber("poll text for workpiece number")

61212-2721102 CALYPSO 1-63


PCM quick reference

or

variable name = inquireNumber("line1"[,cr()],"line2"[,cr()],...,"lines")

Here the “cr()” optional elements each cause a line break on the screen.
Example 1:

1 = inquireNumber("Enter 1 to continue measuring")


if P1 == 1 then
message("You have entered 1, so I will continue measuring")
else
if P1 <> 1 then
message("You do not want to continue measuring!!")
endif
endif

Example 2:

number = 10
P1 = inquireNumber("Last value was: ",number,cr(), "Enter new number:")
message("You have entered the number:",P1)

Example 3:

type = inquireNumber("Cone tooth = 1", cr(),


"Cylinder form tooth = 2", cr(),
"Long cylinder tooth = 3", cr(),
"Cylinder form tooth = 4", cr(),
"Please enter number")

inquireParameterList
If the inquireParameterList command is contained in the presettings
or postsettings, the user can open a dialog box and enter the parameters
in it using a list. The syntax is:
inquireParameterList("p1","k1",...,"pn","kn")
All variables (p1 to pn) that are to be entered via the list must be contained
in the brackets together with comments k1 to kn.
To open the dialog box, the user must highlight the line containing the
command and select Calculate in the context menu.

inquirePasswordText
Opens the dialog box for entering a text. The entered text is masked (in
the form of asterisks). The function supplies the return value of the en-
tered text. The syntax is:
inquirePasswordText("dialogtitle")
The character string entered for dialogtitle is written in the title bar of
the dialog box.

1-64 61212-2721102 CALYPSO


PCM quick reference

Example:
enteredText = inquirePasswordText("password:")
While the command is being processed, a dialog box with the title “Pass-
word:” opens. The character string entered is written in the entered-
Text variable.

inquireText
The inquireText command can be used to create a dialog for querying
a character string. The syntax is:

variable name = inquireText("text line")

or

variable name = inquireText("text line1"[,cr()],"text line2"[,cr()],...,"text lines")

Here the “cr()” optional elements each cause a line break on the screen.
Examples:

string1 = inquireText("Enter the name")

list
Creates a list from the transferred features. This list is required for the
formula input for Recall and Recall Feature points. Access to the features
is not possible. The syntax is:
list(Feature1,Feature2,Feature3,...)
Example: coll=list("Plane1","Plane2","Plane3")
A list of the specified texts is stored in the “coll” variable.

message
Outputs the current values of one or more variables. The syntax is:
message(variable,variable,variable,...)
Inserting “cr()” instead of a variable causes a line break on the screen.
Example:

message("The value of variable P1 is: ", P1, cr(), "The value of variable P2 is: ", P2)

print
Prints the current values of one or more variables in the printout.
The syntax is:
print(variable;variable;variable;...)

61212-2721102 CALYPSO 1-65


PCM quick reference

NOTICE
The print command will not be active unless you have ticked the Acti-
vate print command check box after selecting Plan ® Ad-
vanced ® PCM Test Settings in the PCM Test Functions window.
This means you can use the command for test purposes.
Examples:
print("Print this dialog text in the printout")
print("Print the value of variable P1 in the printout"; P1)

redrawCAD
Recalculates all features and updates the CAD window. The syntax is:
redrawCAD()

PCM functions: File commands


addToFile
Adds a line to a file. If the file does not exist, it will be specially created.
The syntax is:
addToFile(file name,value1,...)
Whenever the file name is used without path name, this function will
access the directory of the current measurement plan. If the name of the
drive is missing, the current directory will be used.
Example: addToFile(wd+"\info.txt","line",1)
Here wd is a variable that contains a path specification.

copyFile
Copies a file, i.e. saves a copy of the file under a name to be specified.
The syntax is:
copyFile("file name1","file name2")
Whenever the file name is used without path name, this function will
access the directory of the current measurement plan. If the name of the
drive is missing, the current directory will be used.

NOTICE
If a file with the name “file name2” already exists, this will be overwritten.

Example: copyFile("test.txt","test2.txt") creates a copy of


test.txt in the current measurement plan directory and saves it under
the name test2.txt.

deleteFile
Deletes the specified file. The syntax is:
deleteFile(file name)

1-66 61212-2721102 CALYPSO


PCM quick reference

Whenever the file name is used without path name, this function will
access the directory of the current measurement plan. If the name of the
drive is missing, the current directory will be used.

directoryPath
Returns the path in the file system for the specified directory. The syntax
is:
directoryPath(directory name)
The following values are possible for the Directory name parameter:

Value Meaning
actuals The directory for actual values.
actualInspection The directory of the current measurement plan.
applicationData The user directory.
Up to CALYPSO 5.4: \home\om
From CALYPSO 5.6: installation directory (e.g. C:\Users\Pub-
lic\Documents\Zeiss\CALYPSO\).
defaultInspections The default directory of measurement plans (\workarea\in-
spections).
defaultResults The default directory of results. (\workarea\results).
formplott The directory of CALYPSO form plots.
inspections The user-defined directory of measurement plans.
programFiles The directory of program data.
Up to CALYPSO 5.4: \opt\om
From CALYPSO 5.6: installation directory (C:\Programs\Zeiss
\CALYPSO v.v, v.v being the current version number).
protform The directory of printout templates.
results The user-defined directory of results.
workarea The workarea directory.

exportCharacteristicsHierarchy
Outputs a hierarchically structured list of all characteristics contained in a
measurement plan to an ASCII file called cfHierarchy.txt in the current
measurement plan directory. This file can be used to define selection lists
(e.g. for FACS). The syntax is:
exportCharacteristicsHierarchy()
One characteristic per line is written to the file. For hierarchy representa-
tion, the name of the characteristic is preceded by one blank per group
depth.

61212-2721102 CALYPSO 1-67


PCM quick reference

NOTICE
In combination with the automatic PCM file call function (see below),
writing occurs each time before the measurement plan is saved.

exportPoints
Exports actual values and, if necessary, nominal values and deviations
from a feature into a file. The syntax is:
exportPoints("feature_name","path_and_file_name")
The format and scope of output are defined in the Export Points dialog
box for every individual feature. The default setting is as follows: text file,
actual values + normal vectors, base alignment, contact points.
The path and file name can be specified absolutely or relative to the cur-
rent measurement plan directory. Examples:
exportPoints("feature_name","geoactuals\Circle1")
exportPoints("feature_name","c:\temp\points.txt")

fileExists
Checks whether a file exists in a certain path and returns a Boolean value.
The syntax is:
fileExists("path_and_filename")
The path and file name can be specified absolutely or relative to the cur-
rent measurement plan directory. Examples:
fileExists("geoactuals\Circle1")
fileExists("c:\temp\points.txt")

generateTableColumn
Writes additional columns in the characteristics table file (*chr.txt). The
contents of the corresponding field results from the return value of the
function name function. The syntax is:
generateTableColumn(column ID,function name)
Within the function name function, you can use getCFAttribute() to ac-
cess attributes of the current characteristic.

getActualInspectionDir
Returns the directory of the current measurement plan. The syntax is:
getActualInspectionDir()

getWD
Returns the current directory. The syntax is:
getWD()
Example: wd = getWD()

1-68 61212-2721102 CALYPSO


PCM quick reference

readCTFile
Imports a CT dataset (only with the Metrotomography option). The syntax
is:
readCTFile(file name)

readListFile
Creates a list loaded from an ASCII file. The syntax is:
readListFile(file name)
The values in the ASCII file are read line by line and summarized in a list.
Whenever the file name is used without path name, CALYPSO searches
first in the directory of the current measurement plan and then in the
general directory for measurement plans.
Example: Definition of the scope of measurement via a file. The created
list can be used directly for the addCF PCM function.
THE_LIST=readListFile(scope4711.txt)
addCF(THE_LIST)

readPCMFile
Reads in a PCM file. The syntax is:
readPCMFile(file name)
Whenever the file name is used without path name, this function will
access the directory of the current measurement plan. If the name of the
drive is missing, the current directory will be used.
The new parameters which are read in will, in each case, overwrite the
current parameters of the same name.

NOTICE
The parameters which were available before the CNC run will only be
temporarily overwritten. The original start setting will be used for the next
CNC run.
The file name can also be entered in the form of several parameters. The
parameters will, depending on the type, be put together to form a string.
Example 1:
readPCMFile("testparameter.para ")
Example 2:
P1 = "c:"
P2= "zeiss\calypso\ "+"test.para "
readPCMFile(P1,P2)
Example 3:
readPCMFile("c: ", "zeiss\calypso\ ", "test.para ")

61212-2721102 CALYPSO 1-69


PCM quick reference

readUserAttributes
Reads the characteristic attributes from an external ASCII file. The syntax
is:
readUserAttributes(file name)
The characteristic attributes will then be available for further use in CA-
LYPSO.
The file is a table file. It contains lines and columns separated by tabulator.
– The first line contains the column headings (1st column: identifier,
2nd to nth column: keyword of the respective characteristic attribute).
– Any further line contains the characteristic name in the first column
and the values of the corresponding attributes in the other columns.

NOTICE
Save in simple ASCII format a file that has been edited in a spreadsheet
program and use tabulators as separators.

NOTICE
If you also want to edit the imported characteristic attributes in CALYPSO,
the “userattributes.ini” configuration file must contain the correspond-
ing entries with the same keywords (see User-defined characteristic at-
tributes in the operating instructions for the base module).

renameFile
Renames a file. The syntax is:
renameFile("file name old","file name new")
Whenever the file name is used without path name, this function will
access the directory of the current measurement plan. If the name of the
drive is missing, the current directory will be used.
Example: renameFile("test.txt","Test2.txt") renames the test.txt
file test2.txt.

runPCMFile
Processes a text file with PCM commands and returns a numerical value.
The syntax is:
runPCMFile("filename")
Whenever the file name is used without path name, this function will
access the directory of the current measurement plan. If the name of the
drive is missing, the current directory will be used.
The file must contain a normal PCM syntax.

NOTICE
The function can only be called if the PCM Technology option is available.

1-70 61212-2721102 CALYPSO


PCM quick reference

After a successful call, the function returns 0 as result, in case of an error,


the result will be 9999. If the file is not available, the CNC run will be
stopped.
Example 1:
res=runPCMFile("C:\temp\PCMTest.txt")
Processes the PCMTest.txt file in the specified path, res is 0 if the file exists,
if not, the result is 9999.
Example 2:
res=runPCMFile("PCMTest.txt")
Processes the PCMTest.txt file in the measurement plan directory. The
value of res is 0 if the file exists, otherwise the value is 9999.

saveViewToFile
This function is used to save a CAD view stored via
CAD ® View ® Save View as jpeg file under the name view_name.
The syntax is:
saveViewToFile(view name,file name)

waitForFile
Stops the run until one of the following events occurs:
– A “File name” file is available
– A set waiting time has been reached
– The system generates the message “Directory does not exist”
The syntax is:

waitForFile(file_name[,message,flag1,timeout,report text,flag2])

Meaning of the parameters:

Parameter Meaning
file name File name with absolute or relative path
message This text is displayed on the screen during the waiting time.
flag1 0: Do not show file name
1: Show file name
timeout Waiting time in seconds
report text Message in the report when the waiting time has been
reached.
flag2 0: No check whether directory exists
1: Check whether directory exists

The return values have the following meaning:

61212-2721102 CALYPSO 1-71


PCM quick reference

Return value Meaning


0 File is available
1 Waiting time has been reached
2 Directory does not exist

writeActualsToFile
Saves filtered actual values with stylus radius and status in the specified
file. For each line in the file, the coordinates and the nominal vector of
the point as well as the stylus radius and the status are included. A status
not equal to 0 means “outlier”.
The syntax is:

writeActualsToFile(["characteristic",][true|false,[alignment,]] "file_name")

The function supplies “true” as soon as saving is completed, otherwise


the function supplies “false”.
– The name of characteristic is optional. If no characteristic name is in-
dicated, the current characteristic will be used.
– The alignment is optional. If no alignment is specified, the base align-
ment will be used.
– writeActualsToFile(["characteristic",]"file_name") exports sty-
lus center point coordinates.
– writeActualsToFile(["characteristic",][true|
false,]"file_name") exports surface points in case of “true” and, in
case of “false”, stylus center point coordinates.
Examples:
writeActualsToFile("diameter1",true,"c:\test.txt")
exports surface points.
writeActualsToFile("diameter1","c:\test.txt")
exports stylus center point coordinates.
writeActualsToFile("diameter1",false,"c:\test.txt")
exports stylus center point coordinates.

writeActualsToVDA
Saves filtered actual values in VDA format in the specified file.
The syntax is:

writeActualsToVDA(["characteristic",][true|false,[alignment,]] "file_name")

The function supplies “true” as soon as saving is completed, otherwise


the function supplies “false”.

1-72 61212-2721102 CALYPSO


PCM quick reference

– The name of characteristic is optional. If no characteristic name is in-


dicated, the current characteristic will be used.
– The alignment is optional. If no alignment is specified, the base align-
ment will be used.
– writeActualsToVDA(["characteristic"],"file_name") exports sty-
lus center point coordinates.
– writeActualsToVDA(["characteristic",][true|
false,]"file_name") exports surface points in case of “true” and, in
case of “false”, stylus center point coordinates.
Examples:
writeActualsToVDA("diameter1",true,"c:\test.vda")
exports surface points.
writeActualsToVDA("diameter1","c:\test.vda")
exports stylus center point coordinates.
writeActualsToVDA("diameter1",false,"c:\test.vda")
exports stylus center point coordinates.

writeBliskFinishFile
Writes the bliskfinish.xml file for the communication with BLADE PRO.
The syntax is:
writeBliskFinishFile("blisk name")
“blisk name” can be any name. Therefore, the “blisk name” must be used
in the corresponding writeBliskStartFile command.
You use this command in the postsettings if you defined a “Turbine
Blade” element in a loop.

writeBliskStartFile
Writes the bliskstartup.xml file for the communication with BLADE PRO.
The syntax is:
writeBliskStartFile("blisk name")
“blisk name” can be any name. Therefore, the “blisk name” must be used
in the corresponding writeBliskFinishFile command.
You use this command in the presettings if you defined a “Turbine Blade”
element in a loop.

writeCurveDistanceAsPlaneToFile
Writes curve points and the associated curve distances from a “curve dis-
tance” characteristic in the form of coordinates of a measured virtual
plane to a file. The syntax is:

writeCurveDistanceAsPlaneToFile("characteristic",axis number,"file name")

61212-2721102 CALYPSO 1-73


PCM quick reference

The axis number may be 1, 2, or 3, corresponding then to X, Y, or Z. The


curve distances pertaining to the nominal points of the inner curve (cal-
culation method as defined in the characteristic) are used as coordinates
in the specified axis direction; the other two coordinates of the plane
points to be generated are filled with the corresponding coordinates of
the inner curve's nominal points.
Example:

writeCurveDistanceAsPlaneToFile("Curve distance1",1,"c:\A\testfile.txt")

The Y and Z values of the nominal points are complemented in the X


coordinate by the corresponding curve distances and written to the c:\A
\testfile.txt file.

writeDiffCoordSysToFile
Calculates the difference matrix of two coordinate systems and outputs
it as a file. The difference matrix of the two coordinate systems has the
following structure:

a11 a12 a13 x


a21 a22 a23 y
a31 a32 a33 z
0 0 0 1

The output file is composed of the anm components of the matrix, ap-
pearing line-by-line, and of the X, Y and Z vector components. A blank is
used as a separator. Thus, the file contains a line with the following struc-
ture:
a11 a12 a13 a21 a22 a23 a31 a32 a33 x y z
Each one of the twelve numbers is output with 14 decimal places.
The syntax is:

writeDiffCoordSysToFile([Name1,[Index1,][Actual1,]] Name2,[Index2,][Actual2,]file_name)

Meaning of the parameters:

Parame- Meaning
ter
Name1 Name of the first coordi- Optional.
nate system If no name is specified, the base alignment will be used. In
this case, Index1 and Actual1 are not needed either.
Index1 Loop index of the first co- optional if Name1 is specified.
ordinate system Default value: the current loop index.

1-74 61212-2721102 CALYPSO


PCM quick reference

Parame- Meaning
ter
Actual true: actual coordinate Optional.
system Default value: “true”.
false: nominal coordinate
system
Name2 Name of the second coor- Name2 is mandatory.
dinate system
Index2 Loop index of the second Optional.
coordinate system Default value: the current loop index.
Actual2 true: actual coordinate Optional.
system Default value: “true”.
false: nominal coordinate
system
File name Path and file name of the Absolute or relative specification possible. With a relative
output file path specification, the actual value directory of the meas-
urement plan is used as the basis.

writePointsCloudToFile
Writes the points of a point cloud into a session file. The syntax is:
writePointsCloudToFile([point_cloud_name,]file_name)
“point cloud name” is the name of a point set or a graphic point set.
If no parameter is indicated, the current feature will be used. This, how-
ever, is only practical if the command is located in the postparameters of
a point cloud or a graphic point cloud.

PCM functions: Measuring-specific and


measurement plan-specific functions
NOTICE
Coordinate values returned by getActual, getNominal and measure al-
ways refer to the base alignment of the current feature.

addCF
Adds additional characteristics to the scope of measurement. The syntax
is:
addCF(characteristic name1,characteristic name2, …)
Or
addCF(list name)
You can specify individual characteristics or groups as characteristic
name.

61212-2721102 CALYPSO 1-75


PCM quick reference

NOTICE
Characteristics added in this way are always checked even if they were
not selected during the CNC start.

addME
Adds additional features to the scope of measurement. The syntax is:
addME(feature_name1,feature_name2, …)

NOTICE
Only effective if “From Feature List” is selected under Order of run.

baseSystem
Returns characteristics of the base alignment. The syntax is:
baseSystem().characteristic
Possible values of “characteristic” are: “x”, “y”, “z”, “valueA”, “euler1”,
“euler2” and “euler3”:

Function Return value


baseSystem().x X value of base alignment
baseSystem().y Y value of base alignment
baseSystem().z Z value of base alignment
baseSystem().valueA valueA value of base alignment
baseSystem().euler1 euler1 of base alignment in rads (angle of
inclination)
baseSystem().euler2 euler2 of base alignment in rads (angle of
inclination)
baseSystem().euler3 euler3 of base alignment in rads (angle of
inclination )

The formula for calculating the plane angle of the base alignment is:
plane angle = (euler1 - euler3) * 180˚ / π
Example: result=baseSystem().x
The X value of the base alignment is written into the “result” variable.

clearCAD
Deletes the contents of the CAD window. The syntax is:
clearCAD()

clearParameter
Deletes all or individual variables. The syntax is:
°clearParameter([parameter_name1,parameter_name2, ...])
Examples:

1-76 61212-2721102 CALYPSO


PCM quick reference

clearParameter("Value_A") deletes the variable Value_A


clearParameter("Value_A","Value_B") deletes the variables Value_A and Value_B
clearParameter() deletes all variables

The clearParameter function guarantees that no old undesired values are


assigned to variables. If the formula accesses a deleted variable, CALYPSO
issues the same warning as for a variable that is not assigned.

compute
Computes the value of a term or a single PCM parameter indicated as
character string. The syntax is:
°compute(CharacterString)
Example:
Given:
– A_Hugo=4711
– Part1="A"
– Part2="Hugo"
– Compl_para=Part1+Part2
Then “compute(Compl_para)” return the value 4711.

defineRecheckPartNumber
Defines the special part number for the repeat measurement (variable
“part number”) The syntax is:
defineRecheckPartNumber(PCM expression)
By default, the “Incremental part Number” is the identification for the
unique assignment of the data in the repeat measurement. If this default
is to be deviated from, you can define an own identification with defin-
eRecheckPartNumber.
The function can thus be used for the definition of an own “badElement-
Formula” function for the control of repeat measurements.
Example:
// Define recheck-partnumber by PCM-term
RECHECK_PARTNB_TERM="getRunID()+getRecordHead("order")"
defineRecheckPartNumber(RECHECK_PARTNB_TERM)

defineFunctionEnd
Marks the end of the function definition. The syntax is:
defineFunctionEnd(return value)

defineFunctionStart
Marks the beginning of the function definition. The syntax is:
defineFunctionStart(function name)

61212-2721102 CALYPSO 1-77


PCM quick reference

differenceSystem
Returns characteristics of an iterative alignment. The syntax is:
differenceSystem().characteristic
Possible values of “characteristic” are: “x”, “y”, “z”, “valueA”, “euler1”,
“euler2” and “euler3”:

Function Return value


differenceSystem().x Difference of the last two x values
differenceSystem().y Difference of the last two y values
differenceSystem().z Difference of the last two z values
differenceSystem().valueA Difference of the last two valueA values
differenceSystem().euler1 Difference of the last two euler1 in rads (angle of
inclination)
differenceSystem().euler2 Difference of the last two euler2 in rads (angle of
inclination)
differenceSystem().euler3 Difference of the last two euler3 in rads (angle of
inclination)

The formula for calculating the plane angle of the alignment is:
plane angle = (euler1 - euler3) * 180˚ / π
Example: result=differenceSystem().x
The difference of the x values of the last two iterations is written into the
“result” variable.

endInspection()
Properly terminates the measurement plan. Contrary to canceling via
cncBreak(), the current characteristic or feature will be processed, the
measurement plan will be terminated and the intended printouts will be
generated. The syntax is:
endInspection()
Example: endInspection()
The measurement plan run is concluded

executeFunctionNamed
Executes a function that has been previously defined between define-
FunctionStart and defineFunctionEnd. The syntax is:
executeFunctionNamed(function name)
The function must have been previously defined between defineFunc-
tionStart(function name) and defineFunctionEnd(return value).
Example:

1-78 61212-2721102 CALYPSO


PCM quick reference

defineFunctionStart("SUM")
C=A+B
defineFunctionEnd("C")

A=13
B=5
ERG=executeFunctionNamed("SUM")
The ERG value is here 18.

getActual
Used without an argument, it returns the current value of the character-
istic. The syntax is:
getActual()
In conjunction with an argument, it returns a certain current value of a
feature, coordinate system or bore pattern.
The syntax is:

getActual(feature_name[,[loop_index][,step_number]]).attribute

The “feature name” is a character string and can be indexed directly or


with a variable (for example, a loop variable):
getActual("Cone",3).x
Or
getActual("Cone",LOOP3).x
The “Step Number” is only used for the stepped cylinder:
getActual("StepCylinder1",,4).diameter
“attribute” is a dummy for the following:

Attribute Return value


x X value of the reference point
X value of the origin for coordinate systems and bore patterns
y Y value of the reference point
Y value of the origin for coordinate systems and bore patterns
z Z value of the reference point
Z value of the origin for coordinate systems and bore patterns
a1 Angle 1
a2 Angle 2
inclinationAngle Inclination angle
rotationAngle Rotation angle
diameter Diameter
diameter2 Diameter two of the ellipse

61212-2721102 CALYPSO 1-79


PCM quick reference

Attribute Return value


radiusD2 Radius 2
radius Radius
expansionA Length (rectangle or slot)
expansionB Width (rectangle or slot)
angleForDisplay Angle
angleSegment Angle range
endAngleUAxis Angle of the second touch point (circle in contour best fit)
gap Gap thickness between contour and fitted circle
len Length
coordPolRadius Polar coordinate, radius
coordPolAngle Polar coordinate, angle
coordPolHeight Polar coordinate, height
endPointX x value of the end point of a 2D line
endPointY y value of the end point of a 2D line
endPointZ z value of the end point of a 2D line
endPointA Angle of the end point in polar coordinates
endPointH Height in the z axis of the end point in polar coordinates
endPointR Radius of the end point in polar coordinates
length Length of a curve
distance Distance of a symmetry point
focus1X x value of the first focal point of an ellipse
focus1Y y value of the first focal point of an ellipse
focus1Z z value of the first focal point of an ellipse
focus2X x value of the second focal point of an ellipse
focus2Y y value of the second focal point of an ellipse
focus2Z z value of the second focal point of an ellipse
focus1A Angle of the first focal point in polar coordinates
focus1H Height in the z axis of the first focal point in polar coordinates
focus1R Radius of the first focal point in polar coordinates
focus2A Angle of the second focal point in polar coordinates
focus2H Height in the z axis of the second focal point in polar coordinates
focus2R Radius of the second focal point in polar coordinates
midPoint Center point of a circle / 2D line
deviation Deviation in the set tolerance mode
sigma Deviation

1-80 61212-2721102 CALYPSO


PCM quick reference

Attribute Return value


form Form error
maxDev Maximum error
minDev Maximum error
xMaxDev Maximum error in the X direction
yMaxDev Maximum error in the Y direction
zMaxDev Maximum error in the Z direction
xMinDev Minimum error in the X direction
yMinDev Minimum error in the Y direction
zMinDev Minimum error in the Z direction
getOffsetValue Shape of zone of the curve form
getOffsetKind Tolerance offset of the shape of zone
apexAngle Cone angle
apexAngleHalf Half cone angle
boreIsMissing “true” in case of missing bore, “false” if a bore exists (see Recogniz-
ing a missing bore in the operating instructions for the base module)
elementIsMissing “true” if the element could be measured and “false” if the element
could not be measured (no probing) (see Continue at missing probing
in the operating instructions for the base module)

getCFAttribute
Returns the current value of an attribute. Without definition of the char-
acteristic name only usable within functions. The syntax is:
getCFAttribute(AttributeName)
Or
getCFAttribute(characteristic name,attribute name)

getCFGroupname
Returns the currently highest group name to the characteristic. Without
definition of the characteristic name only usable within functions. The
syntax is:
getCFGroupname(characteristic name)
Or
getCFGroupname()

getCFGroupname2
Returns the currently lowest group name to the characteristic. Without
definition of the characteristic name only usable within functions. The
syntax is:
getCFGroupname2(characteristic name)
Or

61212-2721102 CALYPSO 1-81


PCM quick reference

getCFGroupname2()

getCornerPointFromCAD
Returns one of two extreme corner points of the CAD model in the base
alignment. The desired corner point must be defined. The syntax is:
getCornerPointFromCAD("extremum")
“extremum” is a dummy for the following:

extremum Result
min Vector of the XYZ minimum
max Vector of the XYZ maximum

getFunctionObjectName
Returns the name of the current characteristic. The syntax is:
getFunctionObjectName()
Can be used in own programmed PCM functions to enable access to the
current characteristic. An example is the programmed “badElementFor-
mula” function used for the definition of a repeat measurement criterion.

getMaxActual
Returns the value of the highest error of all position evaluations for a best
fit of bore pattern and the calculated maximum for the 2 point diameter
or the corresponding angle. The syntax is:
– Best fit of bore pattern:

getMaxActual("name of best fit").deviation

– 2 point diameter, maximum:

getMaxActual("feature_name[,loop_index]").actual

– 2 point diameter, maximum angle:

getMaxActual("feature_name[,loop_index]").angleOfRadiusPoint

Enter the name of the characteristic without the “^Max” suffix.

getMinActual
Returns the calculated minimum for a 2 point diameter or the corre-
sponding angle. The syntax is:
– 2 point diameter, minimum:

getMinActual("feature_name[,loop_index]").actual

– 2 point diameter, minimum angle:

1-82 61212-2721102 CALYPSO


PCM quick reference

getMinActual("feature_name[,loop_index]").angleOfRadiusPoint

Enter the name of the characteristic without the “^Min” suffix.

getNominal
Returns a certain nominal of a feature. The syntax is:
getNominal("feature_name").characteristic
See the table above for the possible values of “characteristic”.

getParameterNamed
Returns the value of the parameter whose name is the value of the pa-
rametername character string variable. The syntax is:
getParameterNamed(Parameter name)
To ensure access to parameter values, you can only use fixed parameter
names in expressions. This function allows you to define a variable pa-
rameter name.
Example 1:
diameter7 = 34.12
i = 7
parameter name = "diameter" + text(i)
Length = getParameterNamed(Parameter name)
Then the “Length” variable has the current value 34.12.
Example 2:
color7="yellow"
i=7
CurColor="color" + text(i)
Basic color = getParameterNamed(CurColor)
Now, the “Basic color” variable has the value of the "yellow" character
string.

getRecheckMode
Returns the current mode for repeat measurements. The syntax is:
getRecheckMode()
The return value is 1 if repeat measurements are activated and it is 0 if
repeat measurements are deactivated.

getRESULTS
Returns the directory in which the results of the measurement plan are
stored. The syntax is:
getRESULTS()

61212-2721102 CALYPSO 1-83


PCM quick reference

getRunID
Returns the name of the mini-plan selected for the CNC start. The syntax
is:
getRunID()

inspectionToleranceState
Supplies the tolerance status of the measurement plan, as far as it has
been defined. It makes sense to call the function in the postsettings of
the measurement plan to query the status.
The syntax is:
inspectionToleranceState()
Possible return values are:

Return value Meaning


#notDefined Status has not been defined yet.
#inTolerance Measurement plan in tolerance: All features are within the specified
tolerances.
#outOfTolerance Measurement plan outside tolerance: At least one feature of the
measurement plan is outside the specified tolerances.
#outOfLimit Measurement plan outside the limits: At least one feature of the
measurement plan is outside the specified warning limits.

Example:
inspectionToleranceState()
Supplies the tolerance status of the measurement plan.

loadCADFile
Loads a file of the *.sab or *.sat type.
The syntax is:
loadCADFile(file name)
The complete file path is indicated as “file name”.
Example:
loadCADFile(getActualInspectionDir()+"\model.sab")

measure
In conjunction with an argument, it returns a certain current value of a
feature, coordinate system or bore pattern.
The syntax is:
°measure("feature_name"[,loop_index]).characteristic
The “feature name” can be indexed directly or with a variable (for ex-
ample, a loop variable):

1-84 61212-2721102 CALYPSO


PCM quick reference

measure("Cone",3).x
Or
measure("Cone",LOOP3).x
See the table above for the possible values of “characteristic”.
Used without an argument, it returns the current value of the character-
istic. The syntax is:
measure()

measuringForce
Allows setting or reading the measuring force in a feature or in the meas-
urement plan. The unit for the measuring force is mN.
The syntax is:
measuringForce([measuring_force_in_mN,]["feature"])
– If the function is called without parameters, the measuring force of
the current feature will be returned (“current feature” stands here for
the Feature if the function is called in the presettings or postsettings
of a feature; otherwise it stands for the Measurement Plan).
– When the name of a feature is given as parameter, the measuring
force of this feature will be returned.
– If the function is called in the presettings or postsettings of the meas-
urement plan and if the measuring force is specified as parameter, the
measuring force will be set for the entire measurement plan. If the
function is called with a measuring force in the presettings and post-
settings of a feature, the measuring force of the feature will be set.
– If the measuring force and the name of a feature have been specified
as parameters, the measuring force of the feature will be set directly.
Examples:
myForce=measuringForce()
Returns the measuring force of the current feature or of the measurement
plan and saves the value in the myForce variable.
myForce=measuringForce("Cylinder1")
Returns the measuring force of the “Cylinder1” feature and saves the
value in the myForce variable.
measuringForce(100)
Sets the measuring force of the current feature or of the measurement
plan to 100 mN.
measuringForce(100,"Cylinder1")
Sets the measuring force of the “Cylinder1” feature to 100 mN.

outputMultiQdas
Creates a separate Q-DAS evaluation according to a predefinable char-
acteristic attribute. The syntax is:

61212-2721102 CALYPSO 1-85


PCM quick reference

outputMultiQdas(attribute name)

setCF
Defines the characteristics belonging to the scope of measurement. The
syntax is:
setCF(characteristic name1,characteristic name2, …)
Or
setCF(list name)
You can specify individual characteristics or groups as characteristic
name.

NOTICE
The characteristics defined in this way replace all previously selected
characteristics.

setCFAttribute
Sets a characteristic attribute on a certain value for the current charac-
teristic. The syntax is:
setCFAttribute (keyword, value)
The characteristic attributes are written as an additional column in the
table file for characteristics (*chr.txt).
Example:
The postsettings of the “Diam_4711” characteristic contain a value as-
signment for ParamX as well as setCFAttribute:
setCFAttribute ("u_resultX",ParamX)
Result: An additional column labeled with “u_resultX” is created in the
table file. The line of the “Diam_4711” characteristic in this column con-
tains the assigned value of ParamX.

setElementStrategy
Defines the current strategy. The syntax is:
°setElementStrategy([feature_name],strategy_name)
– In the input parameters of a feature, this command has effect on the
current feature.
– In the input parameters of the measurement plan, this command has
effect on the specified feature.

setGeometryInnerOuter
Defines the feature as an inside or outside feature. The syntax is:
setGeometryInnerOuter("Feature ID")
This means:

1-86 61212-2721102 CALYPSO


PCM quick reference

Feature ID Effect
OUTER Set to outside feature
INNER Set to inside feature

This command only acts on the feature in whose input parameters it is


contained.

NOTICE
A text parameter enables variable specification of feature IDs.

setInspectionStrategy
Defines the current strategy for the entire measurement plan. The syntax
is:
setInspectionStrategy(strategy name)
This command must be contained in the input parameters of the meas-
urement plan. A blank strategy name will cause selection of the evasion
strategy.

setMissingBore
Defines a search distance and reduces the travel speed until reaching the
search distance before the first probing. The syntax is:
setMissingBore ([feature_name,]search_distance)
The feature name can be omitted in the pre-parameters of the current
feature.
You will be informed about a missing bore via
getActual("feature_name").boreIsMissing
The return value is true or false.

setRecheckMode
Sets the mode for repeat measurement for the measurement plan. The
syntax is:
setRecheckMode(Recheck[,Reset][,Maximum])
The parameters have the following meaning:

Parameter Meaning
Recheck = 0 Repeat measurement deactivated
Recheck = 1 Repeat measurement activated
Reset = 0 No reset of part numbers
Reset = 1 All part numbers are reset
Maximum The maximum number of repeat measurements.
0 = no limitation

61212-2721102 CALYPSO 1-87


PCM quick reference

setRunID
Sets the mini-plans selected for the CNC start. The syntax is:
°setRunID(characteristic group name1,characteristic group
name2, …)
The previously saved selection is overwritten. When defining several mini-
plans in a call, the total selection forms the scope of measurement.

setShaded
Renders the displayed CAD model. The syntax is:
setShaded()

setWireframe
Shows the displayed CAD model as wire frame model. The syntax is:
setWireframe()

PCM functions: CMM-specific functions


and travel commands
cmmCanUseNavigator
Returns as logical value whether the VAST navigator option can be used.
The syntax is:
cmmCanUseNavigator()
The return value is true if the CMM is suitable for the VAST Navigator
option and the VAST Navigator option is available or CALYPSO runs in
the Simulation mode. Otherwise, the return value is false.

cncBreak
Breaks off the CNC run. The syntax is:
cncBreak()
The CNC run is broken off, the stop light changes to red.

displayPositionCMM
Opens the Position dialog box, in which the current coordinates of the
probe are displayed in the machine coordinate system in the same way
as with a dial gage.
The syntax is:
displayPositionCMM()
This dialog allows the user to set each coordinate or all coordinates to
“0”. In terms of calculation, this means that the local vector of the posi-
tion at which zeroing took place is subtracted from the respective current
position in the displays in the further course of the process.

1-88 61212-2721102 CALYPSO


PCM quick reference

After closing with OK, the dialog returns the most recently displayed co-
ordinate as the result.
Example: starting_point=displayPositionCMM()assigns the “start-
ing_point” variable the value [email protected]@200.311123d.

getActualSide
Supplies the current clearance plane. The syntax is:
°getActualSide()

getCNCMode
Supplies the travel mode of the CMM: "manual" or "cnc". The syntax is:
getCNCMode()

getNextStylusSystemName
Supplies the next required stylus system for stylus system change. The
syntax is:
getNextStylusSystemName()

getPositionCMM
Supplies the current position of the probe in machine coordinates as the
result. The syntax is:
getPositionCMM()
Example: starting_point=getPositionCMM() assigns the “start-
ing_point” variable the value [email protected]@200.311123d.

getProbe
Returns stylus properties. The syntax is:
getProbe("stylus_name","plate_name").characteristic
Stylus name and plate name must be strings enclosed in straight quotes
("). The possible values of “characteristic” are: “radius” or “probeName”.
The current stylus name can be omitted.
Examples:

Command/assignment Return value/effect


getProbe().radius The current probe radius is returned.
getProbe("probe_+Y").radius The stylus radius of “probe_+Y” is returned.
getProbe("probe_+Y", "plate_A").radius The radius of “probe_+Y” is returned from
“plate_A”.
StylusDiameter=getProbe("probe_+Y", The “StylusDiameter” variable receives the radius
"plate_A").radius of “probe_+Y” from “plate_A”.

61212-2721102 CALYPSO 1-89


PCM quick reference

getProbeRadiusFromActual
Returns the current stylus radius associated with the indicated measure-
ment in the form of a numerical value in mm. The syntax is:

getProbeRadiusFromActual(feature_name[,point_index[,feature_index]])

The default value for point_index is 1. The Element index is important for
patterns.
Examples:

Command/assignment Return value/effect


getProbeRadiusFromActual("cone1") Stylus radius of the 1st measuring point of the fea-
ture
getProbeRadiusFromActual("cone1",5) Stylus radius of the 5th measuring point of the
feature
getProbeRadiusFromActual("CiRiTop",1,4) Stylus radius of the 1st measuring point of the 4th
feature of the CiRiTop pattern

getRackAssignment
Supplies the active rack assignment. The syntax is:
°getRackAssignment()

getRTOffset
Returns the rotary table offset. The rotary table offset represents the dif-
ference between the relative rotary table position in the measurement
plan and the rotary table position in absolute machine coordinates. The
syntax is:
getRTOffset()

getRTPosition
Returns the actual value of the last rotary table position. The syntax is:
getRTPosition()
(Relative value for features in the measurement plan which can be set)

getRTPositionCMM
Returns the position of the rotary table in absolute machine coordinates.
The value cannot be set. The syntax is:
getRTPositionCMM()

getTemperatureCorrection
Returns characteristics of the temperature correction object. The syntax
is:
getTemperatureCorrection().characteristic

1-90 61212-2721102 CALYPSO


PCM quick reference

See the table for the possible values of “characteristic”:

Function Return value


temperatureCorrection Boolean value: temperature correction is active or not
active
coefficientPart Thermal expansion coefficient of the component
temperaturePart1 Temperature of workpiece sensor 1
temperaturePart2 Temperature of workpiece sensor 2
temperatureProbe Temperature of the temperature stylus
temperatureTableFrontBottom Sensor temperature at the bottom front of the table
temperatureTableFrontTop Sensor temperature at the top front of the table
temperatureTableRearBottom Sensor temperature at the bottom rear of the table
temperatureTableRearTop Sensor temperature at the top rear of the table
temperatureX1 Temperature of sensor 1 on the X scale
temperatureX2 Temperature of sensor 2 on the X scale
temperatureX Temperature of the scale in the X axis
temperatureY Temperature of the scale in the Y axis
temperatureZ Temperature of the scale in Z axis
tempWp Temperature value of the workpiece used in the CNC run

isManProbeChange
Query for manual stylus system change. The syntax is:
°isManProbeChange()
Supplies TRUE if manual stylus system change is performed and FALSE in
the opposite case.

lowerableRT
Lowers and lifts the lowerable rotary table. The syntax is:
°lowerableRT("function")

Function Effect
UP The LRT is lifted.
DOWN The LRT is lowered.
STATUS The status of the LRT is queried. The return value
is UP” or “DOWN”.

If the command is used without lowerable rotary table, the error message
“9999” will be returned.

61212-2721102 CALYPSO 1-91


PCM quick reference

measureMTMValue
Performs a measurement of the mass moment of inertia of the loaded
rotary table if a suitable rotary table has been installed and logged in. The
syntax is:
measureMTMValue()
This allows you to determine yourself the moment of the mass moment
of inertia measurement.

measVolumeIlluminationOff
Deactivates measurement area illumination for O-Inspect. The syntax is:
measVolumeIlluminationOff()
It makes sense to use this command in the parameters of the feature.

measVolumeIlluminationOn
Activates measurement area illumination for O-Inspect. The syntax is:
measVolumeIlluminationOn()
It makes sense to use this command in the parameters of the feature.

positionCMM
Moves the probe to the specified position (in machine coordinates). If no
axis sequence is specified, the CMM moves in Z first, then Y, and finally
X.

This is a direct movement command addressing the CMM. Risk of collision.


The probe moves directly to the position; the clearance planes are ignored.

The syntax is:


positionCMM(x,y,z,["axis1","axis2","axis3"])
The parameters 4 to 6 define the sequence in which the coordinates are
executed.
Application: For example, you can define movements to pickup positions
in the output parameters of the measurement plan.
Example: positionCMM(500,-100,-200)
The CMM moves first in Z to -200 mm, then in Y to -100 mm and then
in X to +500 mm in the machine’s system of coordinates.
Example: positionCMM(200,-200,-10,"Y","Z","X")
The CMM moves first in Y to -200 mm, then in Z to -10 mm and then in
X to 200 mm.

positionRS
Moves the probe with the specified stylus to the specified coordinates in
the applicable alignment. (Standard: base alignment). The syntax is:

1-92 61212-2721102 CALYPSO


PCM quick reference

positionRS(X,Y,Z,[coordinate_system,stylus])

readActualWPTemperature
Reads the current temperature of the specified workpiece sensor in the
CNC run and returns it in degree Celsius. The syntax is:
readActualWPTemperature([temperature_sensor])
In this case, “temperature sensor” is a character string comprising one or
more sensor numbers connected by "+". Values for “temperature sen-
sor” are, for example, "1", "2" and "1+2".
Examples:

Command/assignment Return value/effect


readActualWPTemperature() The temperature sensors selected in the dialog are
read
readActualWPTemperature("1") Temperature of workpiece sensor 1
readActualWPTemperature("1+2") Average value of the temperatures of sensor 1 and
sensor 2

You can include the read value in the printout or, for example, compare
it with the initial value which is available via the getTemperatureCorrec-
tion().tempWp function.

readWPTemperature
Reads the current temperature of the workpiece sensor and blocks trans-
fer of the temperature immediately before probing the first feature. This
requires previous activation of the temperature compensation function.
The syntax is:
readWPTemperature()
If this function is entered in the input parameters of the measurement
plan, the temperature transmitted by the sensor will be transferred. This
allows bringing forward the temperature transfer. The function may be
used only once in the measurement plan.

rtAxisDefinition
Overwrites the current settings for loading or qualification of the RT axis
in the Rotary Table window. The syntax is:
rtAxisDefinition(rtmode)
Values for rtmode: "load" or "measure".

rtPositionOffset
Moves the rotary table to the specified position. The syntax is:
rtPositionOffset(offset angle in rad)

searchDistance
Defines the probing search path. The syntax is:

61212-2721102 CALYPSO 1-93


PCM quick reference

searchDistance(distance)
In this case, “distance” is the distance traveled by the probe before nom-
inal probing. This value must be entered in 0.1 mm. It applies until it is
overwritten or canceled by a reset (stop light goes from green to red and
then back to green).
Examples:
searchDistance(10.000) => Search distance before nominal probing is
1 mm
searchDistance(60.000) => Search distance before nominal probing is
6 mm

setCNCMode
Sets the travel mode of the CMM. The syntax is:
setCNCMode(mode)
Values for mode: "manual" or "cnc".

setInspectionDrivingSpeed
Defines the speed for traveling between the features. The syntax is:
setInspectionDrivingSpeed(speed)
The value for speed is given in mm/s.
For safety reasons, it will never be possible to reach a higher speed than
the one specified at CNC start, even if you set a higher speed using this
function.
This does not affect the speed settings for the individual features.

setMTMValue
Sets the mass moment of inertia of the loaded rotary table to a defined
value. CALYPSO will then use the given value. The syntax is:
setMTMValue(mtm)
“mtm” is here the value of the mass moment of inertia in kgm2.

setNavigationPath
Sets the path from or to the transfer point of the stylus system changer.
The syntax is:
setNavigationPath(direction,path name)
The value for “direction” is either "fromProbeChange" or "toProbe-
Change". For “path name”, a valid name of a previously defined path
must result.
If “path name” does not supply a valid path name, CALYPSO will auto-
matically determine the path.

1-94 61212-2721102 CALYPSO


PCM quick reference

setWPTemperature
Replaces the previously used workpiece temperature value (sensor value
or value entered after CNC start) by the specified value. The syntax is:
setWPTemperature(temperature)
“temperature” is here the temperature value in °C.
The command will only be evaluated if it is used in the measurement plan
defaults. It will only take effect if the temperature compensation option
has been enabled in the defaults.
Example:
// DEFAULT DIALOG
//TEMP_VALUE=inquireNumber("WorkpieceTemp. =")
// or
// LOAD FILE
ALIST=readListFile("wp_temp_value.txt")
// Access to the 1st value of the list parameter
TEMP_STRING=getParameterNamed(ALIST,1)
// Conversion of string to number
TEMP_VALUE=val(TEMP_STRING)
// DEFAULT OF TEMP. VALUE
setWPTemperature(TEMP_VALUE)

stepRS
Moves the probe along X, Y, Z relative to the current position in the
specified alignment (standard: base alignment). The syntax is:
stepRS(X,Y,Z,[coordinate_system])

Commands for intervention in the control


Certain configurations require interventions in the CMM control during
the measurement plan run.
For this purpose, PCM offers a special command. If you require this call,
you should contact Carl Zeiss, Industrial Metrology Division, for additional
information.

PCM functions: System Commands


actCalypsoWindowName
Returns the name of the CALYPSO window in the Windows operating
system. Thus, it can e.g. be minimized by external applications such as
HOLOS. The syntax is:
actCalypsoWindowName

closeSocket
Closes the communication channel between CALYPSO and the external
application again. The syntax is:

61212-2721102 CALYPSO 1-95


PCM quick reference

closeSocket()
It is used together with the “systemCallForResultAccess” command. It
serves to close the “CalypsoInterface” which is used for taking over
measurement data from CALYPSO.
For information on using the PCM commands and programming the ap-
plication that accesses measured data from CALYPSO, see in the operat-
ing instructions for the base module under Programmed access to meas-
uring results.

date
Returns the current date in the respective country language. The syntax
is:
date()
Example: date() = "7 December 2003"

dateAndTime
Returns system date and time. The syntax is:
dateAndTime()
Example: date=dateAndTime(). Date and time are written into the date
variable (of the “string” type) in the format defined by the system.

dateInNumbers
Returns the current date as numerical values. The syntax is:
dateInNumbers()
Example: dateInNumbers() = "12/07/03"

expandCalypso
Maximizes again the CALYPSO program window or has it displayed in the
foreground on the screen. The syntax is:
expandCalypso

facsIsActive
Returns whether FACS is active. The syntax is:
facsIsActive()

language
Returns the abbreviation for the currently defined language of the CA-
LYPSO user interface. The syntax is:
°language()
Example:
For a German user interface, language() returns the character string
"de".

1-96 61212-2721102 CALYPSO


PCM quick reference

millisecondClockValue
Accesses the millisecond counter of CALYPSO and returns the current
value. The syntax is:
millisecondClockValue()
This function allows you to measure time in millisecond resolution.

openSocket
Opens a communication channel between CALYPSO and an external ap-
plication. The syntax is:
openSocket()
It is used together with the “systemCallForResultAccess” command. It
serves to open the “CalypsoInterface” used for taking over measurement
data from CALYPSO.
For information on using the PCM commands and programming the ap-
plication that accesses measured data from CALYPSO, see in the operat-
ing instructions for the base module under Programmed access to meas-
uring results.

systemCall
Calls system commands. The syntax is:
systemCall("filename")
The “filename” file is called and immediately executed. “filename” must
be an executable file, e.g. a batch file or a program. You can use this
function to copy results to another computer, for example.
Example: systemCall("D:\philips\main\help.bat")
The statements in the help.bat file are executed.

NOTICE
CALYPSO is not stopped during execution of the system command. Any
CNC run will continue.

systemCallForResultAccess
Calls system commands and waits for them to be processed. The syntax
is:

systemCallForResultAccess("executable command that starts an *.exe")

Starts an application. This application can access CALYPSO data while the
measurement plan is not being processed further. By contrast, “system-
CallWithWait” does not permit access to CALYPSO data and “system-
Call” does not stop the CNC run.
This command must be used together with the “openSocket” and “close-
Socket” commands.

61212-2721102 CALYPSO 1-97


PCM quick reference

In the example below, commands are sent to CALYPSO by the “Simple-


BasicTest” Visual Basic Script via the Weprom interface:
openSocket()
systemCallForResultAccess("WScript c:\temp\SimpleBasicTest.vbs")
closeSocket()
For information on using the PCM commands and programming the ap-
plication that accesses measured data from CALYPSO, see in the operat-
ing instructions for the base module under Programmed access to meas-
uring results.

systemCallIcon
Calls system commands and waits for them to be processed. The syntax
is:
systemCallIcon("filename")
The “filename” file is called and executed. The executing program is re-
duced to an icon on the screen. CALYPSO waits until the “filename” file
has been processed.
“filename” must be an executable file, e.g. a batch file or a program.
Example: systemCallIcon("D:\philips\main\help.bat")
The statements in the help.bat file are executed. CALYPSO will wait until
the batch file has been processed.

NOTICE
It is not possible to access the measured data of the current measurement
plan with this command.

systemCallWithWait
Calls system commands and waits for them to be processed. The syntax
is:
systemCallWithWait("filename")
“filename” file is called and executed in a program window. CALYPSO
will wait until the file “filename” has been processed.
“filename” must be an executable file, e.g. a batch file or a program.
Example: systemCallWithWait("D:\philips\main\help.bat")
The statements in the help.bat file are executed. CALYPSO will wait until
the batch file has been processed.

NOTICE
It is not possible to access the measured data of the current measurement
plan with this command.

time
Supplies the current time. The syntax is:
time()

1-98 61212-2721102 CALYPSO


PCM quick reference

Example: time() = "9:46:28"

timeInSeconds
Supplies the current time in seconds. The syntax is:
timeInSeconds()
Example: timeInSeconds() = "35246"

wait
Interrupts the measurement plan run for nSeconds seconds. The syntax
is:
wait(nSeconds)
Example:
wait(10)
The measurement plan run is stopped for 10 seconds.

PCM functions: Custom printout


getRecHdForFil
Returns the current value of a printout header variable in a form suitable
for file names. All characters of the printout header parameter that are
not permitted or undesired in file names are replaced with permitted
characters. The syntax is:
getRecHdForFil("PrintoutHeaderVariable")
Example:
The printout header variable “dateshort” has in English the value
“3/15/07”. If this character string is used as part of a file name, you will
unintentionally create subdirectories.
By accessing the variable via getRecHdForFil, the forbidden characters will
be replaced with underscores, thus creating in this case “3_15_07”.

getRecordHead
Returns the current value of a printout header variable. The syntax is:
getRecordHead("PrintoutHeaderVariable")
If the value of the printout header variable is intended for further use as
a file name, the getRecHdForFil command must be used.
For a complete list of all printout header variables, please refer to the
operating instructions for the base module under Reference: Printout
header data.

presentationOff
Switches off a custom printout. The syntax is:
presentationOff()

61212-2721102 CALYPSO 1-99


PCM quick reference

Example: You want a graphic to appear only when certain characteristics


are measured. To accomplish this, you define a custom printout with a
graphic. You switch off the custom printout by default in the start pa-
rameters of the measurement plan. You then request the custom printout
for the characteristics in question by opening the Settings window and
specifying “presentationOn()” in the input parameters.

presentationOn
Switches on a custom printout. The syntax is:
presentationOn()

setElementsForProtocol
Defines the characteristics to be printed using the following command
“displayGraphicsWhileSelection”. The syntax is:
setElementsForProtocol

setProtocolOutput
Controls the output in printout (listing and printing) independently of the
CNC start settings. The syntax is:
setProtocolOutput("printout type","output function")
– Values for printout type: "compactProtocol", "presentationProto-
col", "workingProtocol".
– Values for output function: "list" or "print"
With this command, the CNC start settings will be overwritten and rede-
fined.

setProtocolSetting
Defines the settings for the custom printout. The syntax is:
setProtocolSetting("setting","value")
The following can be set for “setting” and “value”:

setting value
outputFormat Name of the desired output format
userDefinedPages Name of the custom defined page to be attached to the custom
printout. Prerequisite: User Defined Pages in the Format Cus-
tom Printout dialog box is activated.

Examples:
setProtocolSetting("outputFormat","default")
defines the “default” format as the output format.
setProtocolSetting("userDefinedPages","userProtocol1.gra")
attaches the “userProtocol1.gra” page to the existing printout.

1-100 61212-2721102 CALYPSO


PCM quick reference

setRecordHead
Sets the value of a printout header variable. The syntax is:
setRecordHead("PrintoutHeaderVariable","Value")
For a complete list of all printout header variables, please refer to the
operating instructions for the base module under Reference: Printout
header data.

setViewsForProtocol
Defines the CAD views to be output in the printout. The syntax is:
setViewsForProtocol(view name1,view name2,...,view names)

PCM functions: Conditions/Loops


for_next
Defines a certain loop. The defined loop has the following syntax:
for index=start to end [step]
DEFINITION
next index
The following must be inserted:
– for index - the name of the loop variables (random),
– for start, end and step - whole numbers,
– for DEFINITION - random formulas, value assignments, functions or
other conditions or loops of your choice, always with line breaks as
separators.
Meaning: The functions or commands under DEFINITION are processed
(end - start + 1)/step times, whereby “step” is set to 1 if no other speci-
fication is made. At the same time, the specific value for index is always
entered in DEFINITION: at first start, then start+step, start+2*step etc. up
to end. With next i, the loop index is incremented by step each time.
Example:
for i=1 to 4
message(i,". step: ",step[i])
next i

if_else_endif
Defines a condition with alternative. The syntax of the condition with
alternative is as follows:
if CONDITION then
DEFINITION1
else
DEFINITION2
endif
Meaning:

61212-2721102 CALYPSO 1-101


PCM quick reference

– If CONDITION is satisfied, DEFINITION1 is processed.


– If CONDITION is not satisfied, DEFINITION2 is processed.
DEFINITION1 and DEFINITION2 can be formulas, value assignments, func-
tions, conditions or loops of your choice, always with line breaks as sep-
arators.
Example:
message("Test if with PCM")
P1 = 1
message("value is:",P1)
//----------------------------------------------------------
if P1 == 1 then
message("is equal. Value was:" ,P1)
endif
if P1 < 1 then
message("is smaller than 1: Value was:" ,P1)
else
if P1 > 1 then
if P1 > 5 then
message("is greater than 5: Value was:" ,P1)
endif
message("is greater than 1: Value was:" ,P1)
endif
endif
//----------------------------------------------------------
test = point(1,2,3,0,0,1)
message("X" ,test.x, "Y",test.y, "Z" ,test.z, "nx" ,test.nx,
"ny" ,test.ny, "nz" ,test.nz)

if_endif
Defines a simple condition. The syntax of the simple condition is as fol-
lows:
if CONDITION then
DEFINITION
endif
Meaning:
– If CONDITION is satisfied, DEFINITION is processed.
– If CONDITION is not satisfied, DEFINITION is not processed.
A DEFINITION can be formulas, value assignments, functions, conditions
or loops of your choice, always with line breaks as separators.

repeat_until
Defines a conditional loop. The conditional loop has the following syntax:
repeat DEFINITION until CONDITION
Meaning:

1-102 61212-2721102 CALYPSO


PCM quick reference

– 1.) DEFINITION is processed. Then CONDITION is tested.


– 2.) If CONDITION is fulfilled, the loop is ended.
– 3.) If CONDITION is not satisfied, DEFINITION is processed again and
CONDITION is tested again. Continues with 2.).
The CONDITION can be set up as a logical combination of several sub-
conditions.
The DEFINITION can be formulas, value assignments, functions or other
conditions or loops of your choice, always with line breaks as separators.
As the condition is only tested after the first run, a conditional loop must
run at least once.

NOTICE
Please note that infinite repetitions are possible with the conditional loop
if the condition is never fulfilled.

selectCase_endSelect
Defines a condition with several alternatives. The syntax of the condition
with several alternatives is as follows:
selectCase TEST PRINTOUT
case VALUE LIST 1
STATEMENTS 1
[case VALUE LIST 2
[STATEMENTS 2]]
...
[caseElse
[ELSE STATEMENTS]]
endSelect
Meaning:
– TEST PRINTOUT:
Required. Any numeric expression, character string or PCM parame-
ter.
– VALUE LIST:
Must be specified for case.
A list separated by commas that contains one or more of the following
forms:
– Expression:
e.g. 12, "All"
– Expression1 to Expression2:
e.g. 1 to 15, "Part1" to "Part5"
– is comparative operator expression:
e.g. is > 8

61212-2721102 CALYPSO 1-103


PCM quick reference

The operator to defines a range of values. The smaller value must be


on the left. For a character string, sorting takes place in alphabetical
order.
– STATEMENTS:
Optional. One or more statements that are carried out if TEST PRINT-
OUT corresponds to any part in the corresponding value list. At the
end of endSelect, the operation continues. If TEST PRINTOUT corre-
sponds to a value list in several case sections, then only the statement
after the first match will be executed.
– ELSE STATEMENTS:
Optional. One or more statements that are carried out if no match
between TEST PRINTOUT and a value list is found in the case sections.

NOTICE
Conditions with several alternatives can be nested.

For example, a condition with several alternatives can look as follows:


selectCase number
case is <= 0
Message = "Number is too small"
case 1, 2, 3
Message = "Number is smaller than 4"
case 4 to 7
Message = "Number is between 4 and 7"
case is >8 and number < 11
Message = "Number is 9 or 10"
caseElse
Message = "Number is outside the range"
endSelect

PCM functions: Output in printout


defineProtocol
Used for the definition of the output. The syntax is:
defineProtocol (printout parameter,value)
Several values can be entered for the "#medium" output parameter:
defineProtocol ("#medium",value1, ... ,valuen)
For the complete definition of an output, use several lines with this com-
mand and define one output property on each line. Example:
defineProtocol("#name","Test PP1")
defineProtocol("#type","presentationProtocol")
defineProtocol("#medium","printer")
defineProtocol("#elements","allCF")
defineProtocol("#order","likeList")

1-104 61212-2721102 CALYPSO


PCM quick reference

NOTICE
The “defineProtocol” PCM function disables the set printout via Re-
sources ® Define Printout.

NOTICE
This function is suitable for use in external PCM files. Thus you can simplify
the PCM printout for several measurement plans.

Possible function values per output parameter


You can assign the following values to the output parameters:

Parameter Possible values


"#name" User-definable character string
"#type" "compactProtocol" "presentationProtocol" "workingProtocol"
"#format" "<format name for "<format name>" –
printout header>"
"#elements" "allME" "allCF" –
"allMENom" "allCFLimit"
"allCF" "allCFOutTol"
"allCFLimit"
"allCFOutTol"
"#order" "alphabetic" "likeList" -
"elementType" "alphabetic"
"rangeOfTolAndDev" "elementType"
"likeRun" "rangeOfTolAndDev"
"likeRun"
"#medium" "screen" "screen" "screen"
"printer" "printer" "printer"
"pdf" "pdf" "pdf"
"ps" "ps" "ps"˚
"#warningLimitCF" Percentage

Meaning of the individual function values


The table contains the meaning of the individual function values.

Function value Meaning


compactProtocol Compact printout
presentationProtocol Custom Printout
workingProtocol Default printout
allME All features and all characteristics

61212-2721102 CALYPSO 1-105


PCM quick reference

Function value Meaning


allMENom Only features with characteristics
allCF All Characteristics
allCFLimit Characteristics from warning limit
allCFOutTol Characteristics outside tolerance
likeList Like Program
alphabetic Alphabetic
elementType By Type
rangeOfTolAndDev Positive To Negative
likeRun After run
screen Display
printer Printer
pdf PDF output
ps PostScript

Function of the defineProtocol command


The line with the “#name” output parameter defines the output action.
As long as no other name has been defined, all following defineProtocol
functions have an effect on the so-called output action.
If the definition of an output action does not contain all possible func-
tions, the last defined value applies or if no value has been defined, the
value set under Resources ® Define printout applies.
Thus you can create several outputs on the same output medium with
different formats and output scopes. Example:
// 1st output action
defineProtocol("#name","Test PP1")
defineProtocol("#type","presentationProtocol")
defineProtocol("#medium","printer")
defineProtocol("#elements","allCF")
defineProtocol("#order","likeList")
// 2nd output action
defineProtocol("#name","Test PP2")
defineProtocol("#order","rangeOfTolAndDev")
defineProtocol("#type","presentationProtocol")
defineProtocol("#medium","printer")
defineProtocol("#elements","allCFOutTol")
These PCM functions create two outputs: The custom printout is printed
twice.
In the first printout (“Test PP1”), all characteristics ("#elements","allCF")
are output in the order of the list ("#order","likeList"). In the second
printout (“Test PP2”), the characteristics which are out of tolerance ("#el-

1-106 61212-2721102 CALYPSO


PCM quick reference

ements","allCFOutTol") are output in the order of the tolerance exceed-


ing ("#order","rangeOfTolAndDev").

Overview: Names of external PCM files


External PCM files are executed automatically in certain measurement
plan run situations if they have a certain name and are saved in a certain
directory.

Files in ... are executed ...


directory of a measurement plan <user_directory> during the run of the corresponding measure-
\workarea\inspections\<measure- ment plan
ment_plan_name>
global measurement plan directory <user_directo- during the run of each measurement plan
ry>\workarea\inspections

The name of the external files defines where in the measurement plan
run the file is executed.

Execution PCM file name


Prior to the start dialog inspection_pre_start_dialog_pcm.txt
After loading the measurement plan inspection_post_load_pcm.txt
At the beginning of the run inspection_start_pcm.txt
After the end of the measurement; during the run measurement_end_pcm.txt
after features prior to the computation of charac-
teristics
Prior to the execution of the input parameters of plugin_preFeature_pcm.txt
each feature
Prior to the execution of the output parameters of plugin_postFeature_pcm.txt
each feature
Prior to the execution of the input parameters of plugin_preCharacteristic_pcm.txt
each characteristic
Prior to the execution of the output parameters of plugin_postCharacteristic_pcm.txt
each characteristic
After the end of the computation, but prior to the calculation_end_pcm.txt
report/file output (not during the run with a selec-
tion of features)
After the end of the run and the report output inspection_end_pcm.txt

61212-2721102 CALYPSO 1-107


PCM quick reference

Execution PCM file name


After completion of all (also externally) created re- report_end_pcm.txt
ports and files if they are started by CALYPSO (e.g.
PDF, DFD/DFX) (not during the run with a selection
of features)
Prior to saving the measurement plan inspection_pre_save_pcm.txt

1-108 61212-2721102 CALYPSO


Alphabetic index
A D
actCalypsoWindowName 1‑95 date 1‑96
addCF 1‑75 dateAndTime 1‑96
addME 1‑76 dateInNumbers 1‑96
addToFile 1‑66 defineFunctionEnd 1‑77
Alignment defineFunctionStart 1‑77
Parameterizing (example) 1‑45 defineProtocol 1‑104
Arithmetic operators (reference) 1‑57 defineRecheckPartNumber 1‑77
Array deleteFile 1‑66
Via loop (example) 1‑48 differenceSystem 1‑78
ASCII parameter file (example) 1‑50 Directories
Searching in features 1‑34
B directoryPath 1‑67
display 1‑62
baseSystem 1‑76
displayPositionCMM 1‑88

C E
Changing control in CNC 1‑95
endInspection 1‑78
Characteristics
executeFunctionNamed 1‑78
Rechecking (example) 1‑43
expandCalypso 1‑96
clearCAD 1‑76
exportCharacteristicsHierarchy 1‑67
clearParameter 1‑76
exportPoints 1‑68
closeSocket 1‑95
External PCM files
CMM travel commands (PCM) 1‑88
Names 1‑26, 1‑107
cmmCanUseNavigator 1‑88
Run control 1‑25
CNC run
~ structure 1‑7
Terminating properly 1‑24 F
cncBreak 1‑88 facsIsActive 1‑96
Comparative operators (reference) 1‑57 Features
compute 1‑77 Searching with directories 1‑34
Conditions Searching with formulas 1‑32
With alternative (example) 1‑39 Searching with parameters 1‑33
Conditions/loops File commands (reference) 1‑66
PCM commands 1‑101 File names
confirm 1‑62 External PCM files 1‑107
copyFile 1‑66 for_next 1‑101
Curve Formula
Defining via function (example) 1‑43 For space axis 1‑23
Loading parameters (example) 1‑42 Formulas
Custom printout Definition 1‑11
PCM commands 1‑99 Functions and operators 1‑12
In the default printout 1‑37
Searching in features 1‑32

61212-2721102 CALYPSO Alphabetic index 1


Functions (PCM) Input/output parameters
Character string~ (reference) 1‑61 Entering 1‑21
Introduction 1‑11 Entering ~ using a list 1‑22
Mathematical (reference) 1‑58 Processing sequence 1‑8
Measuring-specific 1‑75 inquire 1‑63
inquireList 1‑63
G inquireNumber 1‑63
inquireParameterList 1‑64
generateTableColumn 1‑68
inquirePasswordText 1‑64
getActual 1‑79
inquireText 1‑65
getActualInspectionDir 1‑68
inspectionToleranceState 1‑84
getActualSide 1‑89
isManProbeChange 1‑91
getCFAttribute 1‑81
getCFGroupname 1‑81
getCFGroupname2 1‑81 L
getCNCMode 1‑89 language 1‑96
getCornerPointFromCAD 1‑82 list 1‑65
getFunctionObjectName 1‑82 Example of point recall 1‑41
getMaxActual 1‑82 loadCADFile 1‑84
getMinActual 1‑82 Loading a PCM file
getNextStylusSystemName 1‑89 Via dialog (example) 1‑46
getNominal 1‑83 Loops
getParameterNamed 1‑83 Linear offset (example) 1‑47
getPositionCMM 1‑89 Nested for array (example) 1‑48
getProbe 1‑89 lowerableRT 1‑91
getProbeRadiusFromActual 1‑90
getRackAssignment 1‑90 M
getRecHdForFil 1‑99
measure 1‑84
getRecheckMode 1‑83
Measurement plan
getRecordHead 1‑99
Parameterizing 1‑3
getRESULTS 1‑83
Processing sequence 1‑8
getRTOffset 1‑90
Terminating properly 1‑24
getRTPosition 1‑90
With input/output parameters 1‑8
getRTPositionCMM 1‑90
Measurement plans
getRunID 1‑84
Variable 1‑4
getTemperatureCorrection 1‑90
With variant control (example) 1‑49
getWD 1‑68, 1‑69
measureMTMValue 1‑92
Measuring linear offset via loop (example)
I 1‑47
measuringForce 1‑85
if_else_endif 1‑101
measVolumeIlluminationOff 1‑92
if_endif 1‑102
measVolumeIlluminationOn 1‑92
Input/output commands (reference) 1‑62
message 1‑65
millisecondClockValue 1‑97

O
openSocket 1‑97
Output commands (reference) 1‑62

2 Alphabetic index 61212-2721102 CALYPSO


Output parameters Programming
Entering 1‑21 Options in CALYPSO 1‑3
Entering ~ using a list 1‑22
outputMultiQdas 1‑85 Q
Q-DAS
P Transferring machine number (exam-
ple) 1‑52
Parameter files 1‑6
Parameters
ASCII file (example) 1‑50 R
Definition 1‑10 readListFile 1‑69
Entering 1‑21 readWPTemperature 1‑93
Entering ~ using a list 1‑22 redrawCAD 1‑66
Entering directly 1‑18 renameFile 1‑70
For run control 1‑17 repeat_until 1‑102
Functions and operators 1‑12 Return values 1‑11
Input options 1‑17 Rotary table
Loading 1‑19 Positioning with ~ 1‑53
Loading values into curve (example) rtAxisDefinition 1‑93
1‑42
rtPositionOffset 1‑93
Order of evaluation 1‑20
Run control
Saving 1‑19
External PCM files 1‑25
Searching in features 1‑33
Via parameters 1‑17
Parts family, measuring (example) 1‑49
runPCMFile 1‑70
PCM
Basics 1‑2
Colors for the ~ editor 1‑28 S
Creating code 1‑28 saveViewToFile 1‑71
Debugging and testing 1‑35 Saving
Intervention in control 1‑95 Parameters 1‑19
Programming 1‑12 searchDistance 1‑93
Searching for text 1‑31
Syntax (reference) 1‑56
Testing expression 1‑24
Variables (reference) 1‑56
PCM code
In the default printout 1‑37
PCM editor
Working with 1‑28
PCM files, external
For run control 1‑25
Names 1‑26, 1‑107
Point recall
Using the list function 1‑41
positionCMM 1‑92
Positioning
With rotary table 1‑53
positionRS 1‑92
presentationOff 1‑99
presentationOn 1‑100
print 1‑65

61212-2721102 CALYPSO Alphabetic index 3


Searching T
Features with directories 1‑34 time 1‑98
Features with formulas 1‑32 timeInSeconds 1‑99
Features with parameters 1‑33 Transferring the machine number to Q-DAS
For PCM text 1‑31 (example) 1‑52
In the measurement plan 1‑30 Travel commands (PCM) 1‑88
selectCase_endSelect 1‑103
setCF 1‑86 V
setCFAttribute 1‑86
Variables
setCNCMode 1‑94
Definition 1‑10
setElementsForProtocol 1‑100
Examples 1‑38
setElementStrategy 1‑86
Reference 1‑56
setGeometryInnerOuter 1‑86
Variant control (example) 1‑49
setInspectionDrivingSpeed 1‑94
setInspectionStrategy 1‑87
setMissingBore 1‑87 W
setMTMValue 1‑94 wait 1‑99
setNavigationPath 1‑94 waitForFile 1‑71
setProtocolOutput 1‑100 writeActualsToFile 1‑72
setProtocolSetting 1‑100 writeActualsToVDA 1‑72
setRecordHead 1‑101 writeBliskFinishFile 1‑73
setRunID 1‑88 writeBliskStartFile 1‑73
setShaded 1‑88 writeCurveDistanceAsPlaneToFile 1‑73
setViewsForProtocol 1‑101 writeDiffCoordSysToFile 1‑74
setWireframe 1‑88 writePointsCloudToFile 1‑75
setWPTemperature 1‑95
Space axis
Parameterizing 1‑23
stepRS 1‑95
System commands (PCM) 1‑95
systemCall 1‑97
systemCallForResultAccess 1‑97
systemCallIcon 1‑98
systemCallWithWait 1‑98

4 Alphabetic index 61212-2721102 CALYPSO

You might also like