Wop PJ
Wop PJ
Manufacturer Documentation
Target Group 0
Screen Forms 3
Graphic Macros 4
Interface Description of 7
Planning Guide the Existing Configur-
ation
Tools for Testing 8
Manufacturer Documentation
Appendix A
Valid for
09.96 Edition
SINUMERIK® documentation
Printing history
Brief details of this edition and previous editions are listed below.
Siemens quality for software and training Other functions not described in this documentation might be executable in the
to DIN ISO 9001, Reg. No. 2160-01 control. This does not, however, represent an obligation to supply such functions
with a new control or when servicing.
This publication was produced with WinWord V 6.0 and Designer V 4.0. We have checked that the contents of this document correspond to the hardware
and Designer V 3.1. and software described. Nonetheless, differences might exist and therefore we
The reproduction, transmission or use of this document or its contents is not cannot guarantee that they are completely identical. The information contained in
permitted without express written authority. Offenders will be liable for damages. this document is, however, reviewed regularly and any necessary changes will
All rights, including rights created by patent grant or registration of a utility model or be included in the next edition. We welcome suggestions for improvement.
design, are reserved.
Subject to change without prior notice.
© Siemens AG 1993, 1994, 1995, 1996. All Rights Reserved.
1. System Overview................................................................................................................ 2
1.1 Function of the programming system ................................................................................... 2
1.2 Individual components and the way they interact .................................................................. 2
1.3 Configuring WOP at the PC................................................................................................. 4
1.4 Configuring WOP at the SINUMERIK 840C control ............................................................... 7
1.4.1 Sequence of operation ..................................................................................................... 7
1.4.2 The operating system editor 'EDITOR' .............................................................................. 9
4. Macros................................................................................................................................ 53
4.1 The task of macros ............................................................................................................. 53
4.2 Macro syntax...................................................................................................................... 53
4.2.1 General rules................................................................................................................... 53
4.2.2 Jump/call......................................................................................................................... 55
4.2.3 Logical branches.............................................................................................................. 57
4.2.4 Loops.............................................................................................................................. 58
4.2.5 Input screen forms........................................................................................................... 60
4.2.6 Graphics macros ............................................................................................................. 60
4.2.7 NC macros ...................................................................................................................... 62
4.3 Example of a graphics macro/NC macro .............................................................................. 63
A. Appendix............................................................................................................................ 140
A.1 Conversion table MF2 keyboard <-> operator panel ............................................................. 140
0. Target Group
This documentation has been produced for users responsible for making settings to or
expanding the system and who therefore have to make changes to screen forms, macros
and machine files.
The information that they contain is not required by the machine end user who uses the
system for programming.
1. System Overview
The NC programming system for the SINUMERIK 840C control is a graphics programming
system.
The job of the system is to create an NC program from a geometric description without the
user having to enter the machine commands himself. Company-specific machining methods
and the existing machine park along with its tools can be taken into account.
During the construction phase, it is not necessary to know on what machine the part is to be
manufactured. As long as the tool or machine data in the strict sense are not accessed, the
inputs are machine-independent. This concerns the internal geometry description and entry
of the machining processes. A geometric object can be described in a uniform way
regardless of whether it is to be turned or milled later.
You can find a more precise description of the G functions mentioned in this documentation
in the "SINUMERIK 840C Programmer's Guide".
Basic note: Throughout the entire documentation the key designations refer to the
MF2 keyboard!
The appendix contains a conversion table for the operator panel !
It is only possible to enter ASCII sequences or other characters not on the operator
panel by using the MF2 keyboard!
The MF2 keyboard must not be connected to the control via the operator panel but via a
direct interface because the operator panel <-> control interface cannot transfer all key
combinations.
ASCII sequences to the MF2 keyboard are entered via ALT + number, e.g. ALT + 179 => .
The programming system comprises several components that can be subdivided as follows
from the point of view of the user:
On the one hand there is a permanently programmed basic system that controls and
manages the entire program run. On the other hand, accessible, configurable components
are available to the user that are available for data input/output and function expansions
(screen forms, macros, machine file).
Screen forms: Each screen form is described in a separate file. When a screen form is
displayed, values stored in the empirical value file or from previous
screen form calls. User inputs are taken over and converted into internal
variables.
Geometry file: In the geometry file, all entries required to create a workpiece are
recorded by the basic system in a special "geometric language".
When a workpiece is read in and calculated the entries of the geometry
file are interpreted step by step and displayed as graphic elements on the
screen using the basic system and graphics macros.
During NC block generation, too, the geometry file executed, only in this
case, the NC code is generated using the machine file and NC macros.
NC macros: The NC macros are used to generate NC code beyond that provided by
the basic system (e.g. approach and retraction movements, bridging of
discontinuities (gaps)). The internal variables assigned by the screen
forms are evaluated, the NC code is generated.
Machine file: Blocks and words are defined for NC block generation in the machine file.
Words can be activated by NC macros and by the basic system, blocks
only be the basic system.
Configuration file:
Variable preassignment for machine-dependent data.
Pockets: The pocket calculator is used for all calculation that are required in the
screen forms, macros or geometries. But it can also be called directly
from the program.
The following diagram shows the interaction between the individual system components:
WOP
Data input/output
via Screens
call
processed in
Visualization :
Graphics macros are called and generate the screen graphics. The graphics macros are
used wherever approach and retraction paths (even motion within the infeed axis!) have to
be calculated to machine a contour.
NC code generation :
The system generates the NC code while evaluating the geometry files. During execution of
the geometry file, the NC words / NC blocks are either fetched directly from the machine file
(code generation by the basic system) or the NC code is generated by macro calls, where
words from the machine file are also accessed in the macro.
The user can configure screen forms, macros and the machine file, i.e. adapt them to his
special requirements and wishes.
The are two ways of doing this:
• Changing within the base system (SINUMERIK 840C). Description of the operating
sequence in Section 1.4.
• Changing external on PC
The following information about the path and names is required for this:
FlexOS-PC (only screen forms, macros, empirical value and configuration file):
To allow the user to make changes without original data being lost there is a separate
data tree under /mmc.001/user.005/... :
Screen forms: /mmc.001/user.005/wop.006/msks.007/deutsch.008/*.009
Empirical value file: /mmc.001/user.005/wop.006/exam.033/erfahr.034
Configuration file: /mmc.001/user.005/wop.006/exam.033/projekt.034
NC macros: /mmc.001/user.005/wop.006/oemncmac.032
Graphics macros: /mmc.001/user.005/wop.006/oemgrafik.035
Changes must only be made in this user area!
Directory structure:
\
mmc.001
...
siem.069
...
wop.006
wkz.016
...
ncmac.032
Siemens turning or milling data
exam.033
erfahr.034
projekt.034
msks.007
user.005
...
wop.006
wkz.016
...
ncmac.032
Adaptation machine user
exam.033
erfahr.034
projekt.034
msks.007
DOS-PC:
To allow the user to make changes without original data being lost there is a
subdirectory for each machine in the directory \wop\t.006:
Screen forms: \wop\t.006\typ_a.006\msks.007\deutsch.008\*.009
Empirical value file: \wop\t.006\typ_a.006\exam.033\erfahr.034
Configuration file: \wop\t.006\typ_a.006\exam.033\projekt.034
NC macros: \wop\t.006\typ_a.006\oemncmac.032
Graphics macros: \wop\t.006\typ_a.006\oemgrafik.035
Machine file: \wop\t.006\typ_a.006\masch.036
Before you can make changes, you must copy the file in question into the user
directory "by hand".
Directory structure:
\
...
wop
m.006 (milling)
t.006
wkz.016
...
ncmac.032
Siemens turning data
exam.033
erfahr.034
projekt.034
msks.007
typ_a.006
wkz.016
...
ncmac.032
typ_b.006
wkz.016
...
ncmac.032
The original Siemens data of the entire WOP configuration are in the directory
"/mmc.001/siem.069/wop.006". Parallel with this, there is a directory "/mmc.001/user.069/
wop.006" in which the user can make changes.
The following rule applies: The system first searches the USER path for a file and if it is not
found it used the SIEMENS file.
Exception: For the macro files (graphics macro/NC macro file), the empirical values and the
configuration file, the files from the USER and the SIEMENS branch are "fused", i.e. only the
changes are stored in the USER file. The USER file is read in after the SIEMENS file and
"overlays" the data defined there..
To be able to adapt the individual parts to the WOP configuration, the following operator
actions are necessary:
1 Restore/Backup
2 Setup/Configure Options
3 DR DOS shell
4 MMC system check (service mode)
5 End (load MMC)
If you select menu item 1 the following menu is displayed from which it is possible to edit
parts of the WOP configuration.
If the machine file does not yet exist in the user branch, it is copied to the user branch from
the Siemens tree.
The program for machine file adaptation is automatically called with the machine file in the
user branch.
For a description of operating the program see Section 5.1, "Program adapting the machine
file ".
If the graphics macro file does not yet exist in the user branch it is copied there from the
Siemens tree.
After this, the graphics macro file in the user branch is automatically called up in the
operating system editor "EDITOR" (=DR DOS editor). (No longer on MMC base system
V4.1!).
For a description of the macro syntax see Section 4.2, "Syntax of the macros".
4 Edit NC macro:
If the NC macro file does not yet exist in the user branch it is copied there from the Siemens
tree.
After this, the NC macro file in the user branch is automatically called up in the operating
system editor "EDITOR". (No longer on MMC base system V4.1!).
For a description of the macro syntax see Section 4.2, "Syntax of the macros".
The user must enter which screen form he wants to edit in what language.
The selected screen form file is copied from the Siemens tree to the user branch if it does
not already exist there and is then automatically called up in the "EDITOR". (No longer on
MMC base system V4.1 and higher!).
For a description of the screen form file syntax, see Section 3.1, "Building up a screen form
file".
For a list of all screen form files in the system see Section 3.6.
6 Edit heuristics:
If the configuration file does not yet exist in the user branch, it is copied there from the
Siemens tree. (No longer on MMC base system V4.1 and higher!).
The configuration file in the user branch is automatically called up in the "EDITOR".
The empirical value file can only be changed via the base system through the menu items
"Programming -> Empirical values".
7 Edit joblist:
If the joblist does not yet exist in the user branch, it is copied there from the Siemens tree.
The joblist in the user branch is automatically called up in the "EDITOR".
A sub menu is displayed via which you can either delete the entire user area or individual
files.
To be able to use the operating system editor (=DR DOS editor), you require an MF2
keyboard because Ctrl sequences can be entered via the operator panel.
When the editor is called in insert mode, text input is possible immediately. The individual
commands are described in the following table:
Key Function
Help:
Ctrl + J Online help (exit with ESC)
Save file:
Ctrl + KX Save file and exit
Ctrl + KS Save file only
Ctrl + KD Save file and return to main menu
Ctrl + KQ Back to the main menu without saving
Cursor motion:
Ctrl + D / Î Cursor 1 column to the right
Ctrl + S / Í Cursor 1 column to the left
Ctrl + E / Ï Cursor 1 line up
Ctrl + X / Ð Cursor 1 line down
Ctrl + A Cursor 1 word to the left
Ctrl + F Cursor 1 word to the right
Ctrl + R / PgUp Cursor 1 page up
Ctrl + C /PgDn Cursor 1 page down
Ctrl + QS Cursor to the beginning of the line
Ctrl + QD Cursor to the end of the line
Ctrl + QR / Home Cursor to the beginning of the file
Ctrl + QC / End Cursor to the end of the file
Delete text:
Ctrl + G / Del Delete character at cursor position
Ctrl + H / Backsp. Delete character to the left of cursor
Ctrl + T Cursor at the beginning of a word => delete whole word
Cursor within a word => delete word from cursor position
Ctrl + Y Delete line
Block operations:
Ctrl + KB Mark the beginning of a block
Ctrl + KK Mark the end of block
Ctrl + KV Move block:
The marked block is deleted at is original position and inserted
a the cursor position.
Ctrl + KY Delete marked block
Ctrl + KC Insert marked block at the cursor position
Ctrl + KW Write marked block to another file
Other commands:
ESC In the main menu => exit editor
Ctrl + R Display of the file edited previously
Ctrl + N Insert new line; cursor remains in the current line
Ctrl + P All subsequent Ctrl entries are interpreted as Ctrl characters
Ctrl + QN Entry in decimal or hexadecimal (0X...) code
Ctrl + V / Ins Switchover between insert mode / overwrite mode
Ctrl + KR Read in file
With the pocket calculator it is possible to perform the most varied types of calculation from
certain points in the program without having to leave the screen form you have selected.
Intermediate results can be stored in the pocket calculator by assignment of a variable and
called up later. This saves you making and collecting written notes.
The calculator can be called up from any enter field with the key combination CTRL N or with
the " " key on the operator panel of the control.
The pocket calculator can also be user inside geometries and macros (formula interpreter).
Here it is used for calculations that are performed between two vertical lines ("|"). The results
of such calculations are then used and interpreted in the geometry of macro.
The pocket calculator works with the basic rules of mathematics as described below.
After you have called the pocket calculator, an enter field appears at the beginning of which
there is a cursor. In this field you can make entries and therefore also perform calculations.
As many characters are displayed as the enter field can contain.
The option of entering long calculations is not limited by the length of the enter field:
When the beginning or the end of the enter field is reached, the text is scrolled behind the
enter field (window function). The current input is therefore always displayed, the numbers
and characters entered first disappear out of view but are still calculated.
The following keys are available for editing the enter field:
Key Function
Î: The cursor is moved one position to the right but not further than the first free
position after the input.
Í: The cursor is moved one position to the left but no further than the beginning of
the enter field.
Ð: The cursor is put in the first free position after the text already entered.
End : The cursor is put in the last character in the window. If the input is shorter than
the window, the cursor is put in the first free position behind the text.
Õ: With the backspace key, the character to the left of the cursor is deleted. If the
cursor is on the first character this key has no effect.
F9 : The text from the last time the calculator was called is brought up again.
↵: Entry is concluded with the RETURN key and calculation of the expression is
started.
ESC : Cancellation of the pocket calculator and return to the program or to the original
content of the enter field from which the calculator was called.
If no error occurs during calculation of the expression entered, the result is displayed when
the return key is pressed.
If the pocket calculator has been called from an enter field, the calculator is exited and the
result put in the enter field the second time you press return.
With the ESC key, the pocket calculator is cancelled without entering the result.
If an error occurs, the pocket calculator is not exited but the cursor automatically moves to
the position with the error.
The entry can then be corrected or the calculator can be cancelled with the ESC key.
The mathematical rules described in this section apply both to the calculations with the
pocket calculator during work with WOP and to calculations in the screen form language and
screen form instructions.
Symbol Operation
+ Addition
- Subtraction
* Multiplication
/ Division
Addition and subtraction have a lower priority than division and multiplication.
Example:
5+5*2
Symbol Operation
^ Raise to the power of
% Percentage increase/decrease
Raising to powers has an even higher priority than division or multiplication, i.e.. the solution
of the expression
2*2^2
Percentage increase or decrease has the highest priority of all the operators, i.e. this
operation is always executed first in an expression.
2*200%10
For a decrease, a negative number must be used, i.e. a 20 per cent decrease is entered like
this: 200%-20.
2.2.3 Signs
The sign "+" or "-" can be placed in front of any number, variable or operation. Signs cannot
be used in front of functions and brackets.
2.2.4. Brackets
Brackets can be used to control execution of an expression. The round brackets are used as
bracket symbols for all levels.
2.5*(3+100)
2.2.5 Functions
The function set includes the trigonometric functions and their reciprocals, logarithmic
functions and conversion functions with a technical significance.
In a functions the argument is placed in round brackets. The argument can also be a
mathematical expression comprising operations and further functions.
SIN(90)
COS(SQR(4*4))
calculates the product of 4*4, the square root of this and then the cosine.
The angle unit for trigonometric functions is always degrees. The appropriate functions are
available for the conversion from and to radians.
Name Function
ABS Absolute value.
ACS Arc cosine.
ASN Arc sine.
ATN Arc tangent.
CME Conversion of inches to cm.
COS Cosine.
DEC Conversion of sexagesimal division to decimal division.
The argument has the same format as the result of DMS.
DEG Conversion of radians to degrees.
DMS Conversion of decimal angle division to sexagesimal division.
The result has the following format: DD.MMSS
DD degrees
MM minutes
SS seconds
EXP Reciprocal function for natural logarithm.
FAC Faculty.
FMT Extended format: A value is only used if it is not "NL".
Example:
FMT("+07.30>")
+ with sign "+" ("-" is always output)
0 with leading zeroes
7 total integer places(incl. sign)
. separator integer.decimal (e.g. ",", "!")
3 total decimal places
0 with trailing zeroes
> output number right-justified (< left-justified)
FOR Format for representation of the result and conversion of numeric to string
variable.
Example:
FOR(10.4) sets the standard format of 10 places total length and 4 decimal
places. Specifying a negative format causes zeroes to be output.
The largest format that can be set is 20.9.
INC Conversion of cm to inches.
INT Integer component.
LEN Returns the length of a string.
LNA Natural logarithm with base e.
LOG Common logarithm with base 10.
MAC The content of the specified variables is used as a formula in the expression.
Conversion of string to numeric number: MAC("10") -> 10
RAD Conversion of degrees to radians.
SGN Sign. The result is -1, if the argument is less than 0 and 1, if the argument is
greater than 0. If the argument is equal to 0, the result is 0.
SIN Sine.
SQR Calculates the square root.
TAN Tangent.
TEN Reciprocal function for common logarithm.
TRU Removes all trailing blanks in the specified string.
2.2.6 Variables
Variables are used to store information in WOP. The variables are used by the basic
system, the macros, the screen forms and the machine file. Some information is also stored
in the form of variables in the geometry file. They form the interface between the screen
forms and macros.
Other variables serve as the interface between the basic system and the macros. One area
is also reserved for the user for his own configuration.
The variables are described in Section 7, "Interface description of the existing configuration".
Variables can be introduced anywhere where numbers are required.
A value is assigned to a variable by writing its name, an equal sign and an expression.
Example: V1=10+SIN(75)
The expression to the right of the equal sign is calculated and assigned to variable V1.
3*V1^2
V1=V1+2
VV1
means that first the value of variable 1 is derived and this is then used as the variable
number.
Example: V1=5:VV1=100
2.2.7 Priorities
Operators Priority
+,- Addition, subtraction Low priority
*,/ Multiplication, division ↑
^ Raising to power of
% Percentage increase/decrease ↓
( ), SIN, COS... Brackets and all functions High priority
If operations with the same priority appear in an expression, they are performed from left to
right. It is possible to influence the order in which operations are performed and therefore
the result by the use of brackets.
2+2*2
Solution: 6
(2+2)*2
Solution: 8
Several expressions can be calculated one after the other during one call if the expressions
are separated by colons. Only the final result, however, is displayed. This is especially
interesting with regard to variables because it is possible to assign values to variables and
then perform calculations with them.
Example:
V1=10:V2=2*PI:3*V1+SIN(DEG(V2))
The formula interpreter handles character string variables and character string constants.
Character string constants take the form of "text". The quotation marks must never be
omitted. Any character (except for quotation marks!) can appear within the quotation marks.
V51="text"
A so-called "zero string" can be assigned to a variable to delete the character string variable:
V52=""
When assigning a "zero string", never include a blank within the quotation marks!
V52=V51
"Test-"+V51
Outputs: "Test-Text"
V53="Test-"+V51
When assigning values to character string variables remember that the character string
variables must not be more than 40 characters long.
"2"+"2"
and
2+2
are very different! In the first expression, two character strings are concatenated. The result
is the character string "22". In the second expression, the numbers 2 and 2 are added. The
result of this expression is the number 4.
The first object (number, function or character string) determines the type of expression. If
the first object in an expression is a number (or a variable V1 to V50) or a function such as
SIN, the expression is numerical. This means that this expression must not contain any
character strings. An error will occur if a character string variable or character string
constant is included in the expression!
If the first object in an expression is a character string variable (V51 to V60) or a character
string constant, it is understood that only character strings are to be concatenated in this
V1=2.5 : "Result:"+V1
Sequence of operation:
Variable V1 is assigned the value 2.5. This expression is numerical.
In the second expression the first object is a character string constant. The second object is
a numerical memory. Its contents are converted to a character string. The result of the
second expression is the character string:
"Result: 2.5000"
"Result:2.5"
If a numerical variable no longer fits into this format, question marks appear. The "largest"
format is 20.9. Specifying "larger" formats restores the default format 10.4.
"Test"+2*V1
is not allowed because the operation "*" is incorrect in a concatenation of character strings.
In this case, the partial expression 2*V1 is not calculated!
"Test"+2+V1
is produced from the concatenation of the character string "Test" with the character string
resulting from the conversion of the number 2 and the character string that results from the
conversion of the contents of variable V1. This expression is allowed. But in this case, too,
the partial expression 2+V1 is not calculated but interpreted as a character string and
appended to "Test"!
FMT("+ 0 4 . 2 0 <")
Text variables V51 - V60 can be used for specifying the numerical format:
|V51 = "6.30":FMT(V51):"X"+V1|
V51="2*V1^2+4*V1"
Once this assignment has been made, this character string can be included in numerical
expressions as follows:
V1=8 : MAC(V51)+10
The brackets behind the MAC function can also contain a concatenation of character strings:
MAC(V51+V52+"*4")
The result of the expression in the brackets is then inserted in the text. The rules for
character string concatenation apply to expressions inside the brackets!
If an error exists in the text to be inserted this is shown in the input text.
The function MAC can be used several times in one expression. Please note that the
maximum input buffer length of 80 characters which includes substitutions must not be
exceeded!
LESS THAN
Symbol: <
If the value of the partial expression to the left of the operator is less than that of the partial
expression to the right of the operator, the result is 1. Otherwise, the result is zero.
Example:
GREATER THAN
Symbol: >
If the value of the partial expression to the left of the operator is greater than that of the
partial expression to the right of the operator, the result is 1. Otherwise it is 0.
Example:
The result is zero because V1 is not greater than the expression on the right.
If the value of the partial expression to the left of the operator is less than or equal to the
partial expression to the right of the operator, the result is 1, otherwise it is 0.
Example:
If the value of the partial expression to the left of the operator is greater than or equal to the
partial expression to the right of the operator, the result is 1, otherwise it is 0.
Example:
The expression on the right is greater than the one on the left, therefore the result is zero.
NOT EQUAL TO
Symbol: ≠ (ASCII: 216)
If the values of the two expressions to the right and the left of the operator are not equal the
result is 1. If the values are equal, the result is zero.
Example:
V1=4 : V2=4 : V1 ≠ V2
The result is zero because both variables have the same value.
EQUIVALENT TO
Symbol: ≡ (ASCII: 240)
If the values of the two partial expressions to the right and the left of the operator are equal
the result is 1. If the values are not equal the result is zero.
Example:
V1=4 : V2=4 : V1 ≡ V2
The result is 1.
OR
Symbol: !
If at least one of the values of the partial expressions to the left or right of the operator is not
equal to zero, the result is 1. If both values are equal to zero the result is also zero.
Example:
V1=9 : V2=0 : V1 ! V2
One of the two values is not equal to zero, the result is therefore 1.
AND
Symbol: &
If the values of both expressions to the right and the left of the operator are not equal to
zero the result is 1. If one of the two values is equal to zero the result is also zero.
Example:
Both values are not equal to zero, the result is therefore zero.
NOT
Symbol: NOT( )
If the argument of the function is equal to zero, the result of the function is 1. If the
argument is not equal to zero, the result is zero.
The result of the function is 1 because the argument has the value zero.
Notes on use:
The comparison operators have a higher priority than the arithmetic operators.
It is therefore nearly always necessary to place the partial expressions for comparison in
brackets.
Operators Priority
<,> Less than, greater than Low priority
≤,≥ Less than or equal to, greater than or equal to ↑
≡,≠ Equivalent to, not equal to
&,! And, or ↓
NOT Not functions High priority
String calculations can also be performed with the comparison operators. Where operator
sequences have the same priority they are performed from left to right. In the following
example, one of the effects of this is explained.
We are given the following expression:
The result of this expression is zero. First of all, V1 is compared with V2. As both variables
have the same value, the result of the partial expression is 1. This result is compared with
the contents of the variables V3 (3). The values are not equal, therefore the result is zero!
Always consider whether chain calculations using comparison operators are practical in the
problem at hand. The problem above in which three numbers are being tested for
equivalence has to be solved with AND operations:
V1=3 : V2=3 : V3=3 : (V1 ≡ V2) & (V1 ≡ V3) & (V2 ≡ V3)
In this expression V1 is first compared with V2. The result of the comparison is 1. Then V1 is
compared with V3. This result is also 1. ANDing with the first result produces 1. Then V2 is
compared with V3, here the result is also 1. Combining the result with 1 from the previous
result produces the final result 1. The comparison has been performed successfully.
In this expression the brackets are obligatory because "≡" has a lower priority than "&".
• The calculator contains the value "NL" = not assigned for resetting variables.
3. Screen Forms
Extensive text and numerical entries that might be needed, for example, for a certain
process, are managed in screen forms that are displayed by the system when the user
selects a function. The values entered, undergo a plausibility check before they are
transferred to the system, which then recognizes incorrect entries and indicates any
modifications that have to be made by a change in colour of the screen form field in
question.
These screen forms are pure ASCII files and can be edited. It is, for example, possible to
skip certain entries and instead always use permanent values in calculations.
All original screen forms (Siemens) that already exist in the system have the extension "009"
and are to be found in the path "/mmc.001/siem.069/wop.006/msks.007/deutsch.008"
(FlexOS) or
"\wop\t.006\msks.007\deutsch.008" (DOS).
The description in the sections below explains the basic structure of a screen form file.
- Instruction for the fields in the order of the screen form fields
- Screen form definition
- Repeat section
- End section
- End of screen form
- Text section
The individual screen form file elements are described in more detail below.
Example:
1 Field number
= Keyword
-3 Field type (-3 = decimal number)
=V2 Assignment of the field contents to variable V2
& Keyword
:V2 Output V2 when editing/printing
& Keyword
:1 Execute instruction 1 when field is exited
:$(0,0,12) Delete screen form on the screen when the field is exited
The serial number of the instruction sequences starts at 1 and is incremented. It refers to
the screen form fields in the order left to right and from top to bottom.
-11 to -16:
If V1249 is specified (value 2 => inch system) the internal value of the assigned variables is
converted to inches for output and the value entered is converted back to mm for internal
storage.
-11 .... Alphanumeric input field
-12 .... Integer -32736 to +32737
-13 .... Decimal number
-16 .... Integer * 4
Type 0 instructions are not assigned to any field but are called from other instructions.
?...? Call text from the text section or the text file
Syntax as bar selection menu:
?
Textnr1, Textnr2, Textnr3, .....
, Position when function is called
, Position when function is exited
, Line of the top left corner of the selection menu
, Column of the top left corner of the selection menu
?
In correct syntax a minimum of 5 items of information are always specified within the two
"?".
One screen form can have a maximum of 200 such items of information. A maximum of 40
fields can therefore be filled with text information (40 * 5 = 200).
The screen form exit instruction can only be in a line that contains an input field and is
executed when the return key is pressed (see Section 3.3 "Special variables").
Colour changes are introduced by the single character "^" in the screen form definition
followed by the colour number.
This switchover applies until it is expressly reset again.
(applies to VGA/EGA )
The number "0" and values greater than "30" are of special significance. ^0 means that the
field in question is reset to the standard colour on every field output.
^30 means that as from now no more colour changes are to be executed.
Example:
Screen form definition
# FIELD DESCRIPTION
1 = -1 &:1 &:35^6:1^30;
...
35 = 0 ^0:1:2:3:4:5:6:7:8^30;
...
When the first field has been exited, the colours of fields 1...8 are reset to the default values
(^0) (instruction 35), the first field is output in colour 6 according to the above list.
The colour conversion function is then deactivated again (^30).
Here, a description of what is to appear when the screen form is called is given. The
following symbols are used for defining the screen form (=keywords):
The screen form is surrounded by a frame. The following characters are required for setting
the frame.
= ASCII 179
= ASCII 196
= ASCII 191
= ASCII 192
= ASCII 217
= ASCII 218
= ASCII 195
= ASCII 180
Fields that are used for output only are described by ?__________,
fields for input and output are described by @__________.
The length of the field is defined by the number of "_" and the preceding character.
The total number of characters in the screen form part must not exceed 2560.
Illegal characters are ignored.
The text section is structured in the same way and has the same function as the general text
file. The general text file (/mmc.001/siem.069/wop.006/msks.007/deutsch.008/mars.009
(FlexOS) or \wop\t.006\msks.007\deutsch.008\mars.009 (DOS)) is made available to the
user and contains texts that can be addressed from any screen form.
When a text number is called a distinction is made regarding where the text is to be taken
from. If the text number is smaller or equal to the maximum text number in the text section
of the file, then this text is used. If the number is larger, the general text file is used.
The above text file is used for text calls and definitions.
7 = -1 =V51 &^3:7^30;
7 ... Sequence of instructions : 7
-1 ... Field number/type : Alphanumeric
=V51 ... The string entered in the entry field is assigned to variable V51.
&^3 ... Switch over the colour to number 3 (black/grey).
:7 ... Execute instruction 7.
^30 ... Deactivate colour switchover.
; ... End of instruction.
22 = ...
23 = ...
24 = 0 : >v48;
24 ... Sequence of instructions : 24
0 ... Field number/type : End of instructions
>v48 ... Jump to the line whose number is in variable 48.
; ... End of instruction.
A screen form is always exited using the ESCAPE key. This action sets variable V127 to
1BH (=ESC). This variable can then be evaluated in the program.
The name of the help screen form that can be called with F8 is specified in variable V1975.
The values of variables V747 and V748 control the exit behaviour of a screen form.
If a screen form is exited, a check is made for remaining instructions to be executed in the
screen form by evaluating the value of variable V749. If this value is not equal to 0 it is
interpreted as the line number of the instruction that still has to be executed.
This section shows the structure and elements of a screen form by way of a simple
example.
?_-Value @____.____
?_-Value @____.____
?_-Value @____.____
#repeat section
#end section
#end of screen form
#TEXT SECTION
1:!
2:!
3:V381!Z
4:V382!X
5:V383!Y
Explanation:
A comment can be written in the instruction line in front of the line number.
Line 1: Field type "-1"; "?" => Alphanumeric output field, length 2
?3? => Text from line 3 in text section = Contents of V381
Line 2: Field type "-3"; "@" => >Input field decimal number; 5 places before,
4 places after the decimal point
=V91 => output value = Contents of V91
Lines 3,5 same as line 1
Lines 4,6 same as line 2
Line 7 Line number = 0; always the last instruction!
Numbering the individual lines consecutively is not obligatory but improves clarity. Each line
number must only appear once.
The number of lines between "#..." and screen form corresponds to the position of the
screen form on the screen
@ = Input field, 5 places before, 4 places after the decimal point
? = Output field, length 2
#TEXT SECTION
The texts listed in the text section, here the contents of V381, V382, V383, can be
addressed from the screen form. They are assigned by specifying the line number )("?3?" in
line 1).
An exclamation mark must be placed at the end of each line; each subsequent text is
interpreted as a comment.
This section explains how following screen forms and selection screen forms are called by
way of an example.
In the screen form for contour milling "bahnbea.009" in the existing programming system
both types are used. In the example below, only the parts of the screen form that are
relevant to configuring the following screen form and selection screen form are listed and
explained.
...
# Field description
...
...
New 42=0|V981=V1100:V50=1:V161=1:V837=1:V1011=1:V3=V1115:V4=V1116|:|V25=1116+V4:V5=VV25:1/(V4ð4):
V5=V5+V1010|:64:44;
# Screen form
Contour milling
Approach/Retract strategy
To 1st starting point: @___
@_________________ ? axis: @____.____
?____________ @_______________________
?____________ @_______________________
...
015: "..\masken\schnittw.009"!
...
Initialization:
The first field is an output field and is relevant to the following screen forms in that it is from
here that the instructions for initializing the screen form are called. The variables that control
the exit behaviour are initialized from instruction 40, for example:
V747=1; V748=0 => Following screen form with PgUp, exit the screen form with RETURN.
V749=50 => Execute instruction 50 on exiting the screen form.
After these initializations a decision is made as to whether the screen form has been called
again, i.e. whether a new keyword is to be placed in the geometry or whether it is merely a
repeated call within a keyword that has already been placed.
For this, variable V161 is used: V161=0 => new keyword.
... |V25=42:1/V161:V25=43|:v25;
On division by 0 the pocket calculator is aborted. Depending on the value that V25 contains
after the pocket calculator call either instruction 42 (initialization for new call) or instruction
43 (initialization for editing) is called. The entire initialization is listed in small print so that it
can all be included but will not be explained in any more detail here.
Field 3 is defined an alphanumeric input field ("-1") in which text 1 of the text section is
output ("?1?").
001:"Cutting values"!
015: "..\screen_forms\cuttingv.009"!
If the same working variable is used in a following screen form for internal calculation as in
the screen form calling this screen form, the values of the calling screen form are
overwritten! The same of course applies to all other variables.
To ensure that no data are overwritten the following screen forms should contain
working variables different from those in the calling screen form.
Field 7 is also defined as an alphanumeric input field ("-1"). However, a text which is
determined by the value in V4 is output in this field.
If the cursor is now positioned in field 7 and the PageUp key is pressed, a selection screen
form whose top left corner lies in line 5, column 2. All 4 texts are listed one after the other in
this screen form. A text can be selected by selecting a field and V4 is placed on the position
of the text in the list.
Help:
If a small green "i" is displayed in the menu item bottom left this means that a help screen
form can be called up with function key shift F1.
The menu items of the horizontal softkey bar can be selected with function keys F3 to F9,
the menu items of the vertical softkey bar can be selected with SHIFT F3 to SHIFT F9
The action of the keys when they are operated from a screen form are explained below. The
key designations refer to the MF2 keyboard, a conversion table for the operator panel is
given in the Appendix.
Key Function
PageUp: If a following screen form exists for the current field, it is displayed.
↵: With RETURN the contents of the screen form are stored and the screen form
is exited.
ESC: The function is aborted with ESCAPE, the screen form is exited without saving
any values that have already been entered
END: Selects the previous input field. If the first field is selected the cursor jumps
back to the last field in the screen form.
PageDown: Selects the next input field. If the last field is selected the cursor jumps to the
first field in the screen form.
Õ/DEL: Within one input field: Delete character to the left of cursor/delete character on
cursor position.
The screen form files for the milling system that already exist are listed below:
bahnbea.009 Profiling
bahnstra.009 Strategy for path milling
beaman.009 Manual milling
bozyk.009 Drilling cycles
config.009 Select machine type, workpiece
eilo.009 Single-hole drilling (geometry)
ewm.009 Change plane
fase.009 Chamfer
fktpost.009 Functions after machining
fktpre.009 Functions before machining
flaebea.009 End milling parallel to contour
flaebeaa.009 End milling paraxial
fraes.009 Milling
434.009 Parting
435.009 Stock removal parameters felt-ring recess machining general
436.009 Stock removal parameters felt-ring recess machin. rough grooving
437.009 Stock removal parameters cut-off machining
438.009 Stock removal parameters groove machining general
439.009 Stock removal parameters groove machining rough grooving
440.009 Stock removal parameters thread undercutting general
441.009 Stock removal parameters thread undercutting rough grooving
445.009 Stock removal parameters finish countersinking
446.009 Stock removal parameters contour grooving longitudinal/face
447.009 Stock removal parameters contour grooving finish. longit./face
bahnbea.009 Profiling
bahnstra.009 Strategy for profiling
beaman.009 Manual milling
b_ausb1.009 Boring 1 L85 (call from drilling)
b_ausb2.009 Boring 2 L86 (call from drilling)
b_ausb3.009 Boring 3 L87 (call from drilling)
b_ausb4.009 Boring 4 L88 (call from drilling)
b_ausb5.009 Boring 5 L89 (call from drilling)
b_senk.009 Drilling/sinking L82
b_tap.009 Tapping L84
b_tbohr.009 Deep hole drilling L83
b_zent.009 Drilling/centering L81
cfrein.009 Blank from finished part
config.009 Select machine type, workpiece
Each screen form displays the menu (horizontal softkey bar) from which it is called.
The numbers in the file names indicate the softkeys in the basic menu that have to be
pressed to reach the stated menu.
Example:
h21.009 Pressing softkey 2 (geometry) and softkey 1 (Create new) takes you to menu:
Blank Contour Slot Holes Cycles
ref. pt.
h0.009
Tools Geometry Machining
material
h1.009
Master data Material
magazines data
h11.009
Load New Save Load Save Tool
magazine magazine magazine master dat. master dat.
h117.009
New Copy Modify Delete
tool tool tool tool
h14.009
Modify Save
workp. list workp. list
h2.009
Create Edit Delete Copy Part Curr. geo
new geometry ref. pt.
h21.009
Blank Contour Groove Holes Cycles
Ref pt.
h211.009
Rectangle Circle n-corner
h21111.009
Point Line Circle Row of Circle of Point Any point
points points box pattern
h211117.009
Edit New Delete
parameter element element
h2114.009
Const.geo Create Transition Modify Abort OK
elements cont. def. elements cont. def.
h21143.009
Chamfer Rounding Delete
transition
h212.009
Oriented Edit Form- Cylinder Abort OK
geometry elements elements
h2121.009
Line Line Line Line Line Arc Arc
right left up down any left ccw right cw
h2122.009
Modify Delete Select
element element variant
h213.009
Elong. hole Rectang. Annular n-corner Groove Radial slot C. groove
groove groove groove geo: Any
h214.009
Single Row of Circle of Hole Any
hole holes holes box pattern
h2145.009
Const. geo Define Edit Abort OK
elements pattern pattern
h215.009
Single Row of Circle of Point Any point
point points points box pattern
h24.009
Move Mirror Reverse Scale Parallel
Rotate mirror contour
h26.009
Store Load
part geo. part geo.
h4.009
Milling Drilling Machining Machine/ Insert Machining Create
cycles aux fct. block (DIN) Simulation NC prog.
h41.009
Tool Contour Solid Manual Surface
selection milling milling milling milling
h42.009
Centre Counter- Deep Thread Bore
Drill sink hole to DIN
h421.009
Tool Value
selection input
h422.009
Tool Value
selection input
h423.009
Tool Value
selection input
h424.009
Tool Value
selection input
h425.009
Bore 1 Bore 2 Bore 3 Bore 4 Bore 5
h4251.009
Tool Value
selection input
h4252.009
Tool Value
selection input
h4253.009
Tool Value
selection input
h4254.009
Tool Value
selection input
h4255.009
Tool Value
selection input
Many of the help screens have additional help screens that provide more detailed
information. These help screens are listed below together with the help screens from which
they can be called.
Each screen form displays the menu (horizontal softkey bar) from which it can be called.
The letters in the file name indicate the softkeys that have to be pressed in the basic menu
to call up that menu.
Example:
h21.009 Pressing softkey 2 (Geometry) and softkey 1 (Create new) takes you to menu:
Blank Finished
part
h0.009
Tools Geometry Machining
material
h1.009
Master data Material
magazines data
h11.009
Load New Save Load Save Tool Workholder
magazine magazine magazine master dat. master data.
h116.009
New Copy Modify Delete
tool tool tool tool
h117.009
Workholder Copy Modify. Delete
new workholder workholder workholder
h14.009
Modify Save
mat. list mat. list
h2.009
Create Edit Delete Copy Curr. geo
new contour ref. pt.
h21.009
Blank Finished
part
h211.009
Oriented Edit Form Cylinder Abort OK
geometry elements elements
h2111.009
Line Line Line Line Line Arc Arc
right left up down any left ccw right cw
h2112.009
Modify Delete Select
element element variant
h2113.009
Recess Undercut Thread Thread
undercut
h3.009
Clamping Turning Drill Fct. w/o Insert Machining Create
concentric ref. point block (DIN) simulation part prog.
h31.009
Chuck Move Deactivate
select.
h32.009
Roughing Finishing Thread Grooving
cutting
h321.009
Tool Longit. Face
selection roughing roughing
h322.009
Tool Longit. Face
selection fin. cut finishing
h323.009
Tool Longit. Facing Taper
selection thread thread thread
h324.009
Standard Thread Cut-
recess undercut off
h3241.009
Tool Rough Rough/fin. Finish
selection grooving grooving grooving
h3243.009
Tool Rough Rough/fin. Finish
selection grooving grooving grooving
h3244.009
Tool Value
selection input
h33.009
Centre Counter- Deep Thread Bore
sink hole to DIN
h335.009
Bore 1 Bore 2 Bore 3 Bore 4 Bore 5
Many of the help screens have additional help screens that provide more detailed
information. These help screens are listed below together with the help screens from which
they can be called.
hf2.009 h0.009
hf21.009 h2.009
hf211.009 h21.009
hf2111.009 h211.009
hf21118.009 h2111.009
hf2112.009 h211.009
hf2113.009 h211.009
hf3.009 h0.009
hf31.009 h3.009
hf311.009 h31.009
hf32.009 h3.009
hf321.009 h32.009
hf3212.009 h321.009
hf3213.009 h321.009
hf322.009 h32.009
hf3222.009 h322.009
hf3223.009 h322.009
hf323.009 h32.009
hf324.009 h32.009
hf3241.009 h324.009
hf32412.009 h3241.009
hf32413.009 h3241.009
hf32414.009 h3241.009
hf3242.009 h324.009
hf3243.009 h324.009
hf3244.009 h324.009
hf33.009 h3.009
hf331.009 h335.009, h33.009
hf335.009 h33.009
4. Macros
4.1 The task of macros
The user can modify macros defined by Siemens to suit his own requirements and generate
user-defined macros that perform is own functions.
Macros are triggered by two different program branches, Program creation/Graphics and NC
block generation. They therefore also have to fulfil different requirements: visualization on
the screen (graphics macros) and the generation of NC blocks (NC macros).
All macros of the same type are combined in one file. There is therefore one graphics file
(grafik.035 or oemgrafik.032) and one NC macro file (ncmac.032 or oemncmac.032).
Separate macro files exist for the milling and turning systems. The macro from the graphics
file is used for visualization on the screen and the macro of the same name in the NC file is
used for NC block generation.
For example, a tapping cycle can be called in the NC macro for a thread and the
corresponding graphics macro either generates a simple line or a "screw" with the correct
diameter and required depth.
The current data of the current travel movement are made available to the macros when
they are to be executed via variables by the basic system.
Screen forms can also be called up from the macros.
The macros (graphics macros and NC macros) are stored in ASCII files. These files can be
edited. The operating system editor "EDITOR" is described in Section 1.3.2.
Macro names:
Each macro is given a name by which it is identified. This name consists of three characters
plus one end character.
To avoid using the same name twice for macros, the end user should start every new macro
name for any expansions with X, Y or Z as these letters have not yet been used.
Selection requester:
A selection requester is a selection screen form that can be called in the program and which
lists the various macros (e.g. different drilling cycles).
Triple macro:
A triple macro consists of a starting macro, jump macro and end macro. A triple macro must
only be defined for machining operations. The starting macro is used to defined the
approach movement to the point where the machining operation is to be performed, the
jump macro bridges any gaps and the end macro defines the retraction movement.
018:Approach to contour
starting macro
018;Bridging of any discontinuities
jump macro
018;Retraction from contour
End macro
The system detects which part of the triple macro has to be called. The macros are
assigned values for the current approach, retraction and jump points by the basic system via
the system interface.
If the macros are defined in this way in the macro file only the starting macro is displayed in
the selection requester.
A macro can contain a calculation which is always located between 2 vertical lines. When the
calculation has been successfully completed the calculation is replaced by the result in the
text. The syntax for calculations is described in Section 2, "The Pocket Calculator".
If a ''!'' appears in a block this means that the block is ignored from this point.
Indented instructions
4.2.2 Jump/call
• Jump
Condition:
The jump goes to the macro named as the destination if the result of the arithmetic
expression is not equal to 0.
The condition like a calculation must be written between vertical lines.
Macro name:
The name of the macro that is the destination of the jump.
Example:
MA1:!FIRST MACRO
NC block 1
NC block 2
\ |V6>10| MA2
NC block 3
MA2:!SECOND MACRO
NC block 4
Explanation:
Variable V6 is scanned.
The two NC blocks (1 and 2) in MA1 are output.
Branching.
If the value of V6 is greater than 10 the jump goes to MA2 and the NC block in MA2 is
output. In this case, the last NC block in MA1 is not output! The NC program looks like
this:
NC block 1
NC block 2
NC block 4
If the value of V6 is less than or equal to 10 the last NC block of MA1 is generated. In
this case, macro MA2 is not used! The NC program looks like this:
NC block 1
NC block 2
NC block 3
• Call
In addition to the jumps there are the so-called calls. A call is written as follows:
Condition:
The jump goes to the macro named as the destination if the result of the arithmetic
expression is not equal to 0.
The condition like a calculation must be written between vertical lines.
Macro name:
The name of the macro that is the destination of the jump.
The difference between this and the jump is that when the called macro is completed
it returns to the calling macro.
"Return" means that execution is continued in the line following the call.
Example:
MA1:!FIRST MACRO
NC block 1
NC block 2
\\ |V6>10| MA2
NC block 3
MA2:!SECOND MACRO
NC block 4
NC block 1
NC block 2
NC block 3
NC block 1
NC block 2
NC block 4
NC block 3
If a jump is defined without a macro name as the destination of the jump the macro is
aborted.
Example:
MA3:NC block 1
NC block 2
\ |(V7+V1)>5|
NC block 3
NC block 4
If the condition in line 3 is true the macro is stopped. The last two NC blocks are not
generated!
Only the current macro is aborted. If the macro in question was called by another
macro (two "\") execution of the calling macro is continued.
• IF
A branch has the general form:
IF |condition| THEN
...
ENDIF
or
IF |condition| instruction
condition:
The condition is fulfilled if the arithmetic expression returns a result not equal to 0.
The condition must be placed between vertical lines.
THEN:
The expressions to be evaluated if the instructions are fulfilled are placed in the
following lines until the next ENDIF, ELSEIF or ELSE.
instruction:
The instruction in this line after the condition is evaluated if the condition is fulfilled.
This IF instruction is not followed by an ENDIF.
• ELSEIF
• ELSE
If none of the preceding IF or ELSIF conditions has been fulfilled, the instructions
between ELSE and ENDIF are executed.
If one of the preceding IF or ELSEIF conditions has been fulfilled, the ELSE block is
not executed.
Apart from a comment, no additional information must be placed in the ELSE.
• ENDIF
Example:
MA1:!FIRST MACRO
NC block 1
IF |V6<0| THEN
NC block 2
ELSEIF |V6>0| NC-BLOCK 3
ELSE
NC block 4
ENDIF
NC block 5
NC block 1
NC block 2
NC block 5
NC block 1
NC block 3
NC block 5
NC block 1
NC block 4
NC block 5
4.2.4 Loops
• FOR
beg_condition:
The arithmetic expression of the beginning condition is calculated.
The condition must be placed between vertical lines like a calculation.
The loop variable is placed in front of the beginning condition.
The value of the beginning condition is assigned to the loop variable.
end_condition:
The arithmetic expression of the end condition is calculated.
The condition must be placed between vertical lines like a calculation.
If the value of the loop variable is greater than the end condition, the loop is aborted.
STEP:
step_condition:
Specification of the loop increment is optional. If no STEP is specified, the loop
increment is set to 1.
The arithmetic expression of the step condition is calculated.
The condition must be placed between vertical lines like a calculation.
• END
End of the loop range. The loop variable is incremented by the loop increment. After
that, the FOR line is repositioned and the abort condition checked.
Example:
MA1:!FIRST MACRO
NC block 1
FOR V1=|1| TO |3|
NC block 2 (V1=|V1|)
FOR V2=|3| TO |5| STEP |2|
NC block 3 ( V2=|V2|)
END
END
NC block 4
NC block 1
NC block 2 (V1=1)
NC block 3 ( V2=3)
NC block 3 ( V2=5)
NC block 2 (V1=2)
NC block 3 ( V2=3)
NC block 3 ( V2=5)
NC block 2 (V1=3)
NC block 3 ( V2=3)
NC block 3 ( V2=5)
NC block 4
A screen form can be called from a macro while the macro is being executed. This is not a
good way of assigning values to the macro. It is better to user "\I".
The purpose of this feature is for debugging when testing macros.
Syntax:
\M |condition| name1 [name2]
condition:
The call can be prevent by suitable conditions but the condition can also be omitted. In this
case the screen form is always called.
name1:
Name of the screen form. Or name of the screen form file if name2 is also specified.
name2:
Name of the screen form in the screen form file called name1.
Syntax:
\I name1 [name2]
name1:
Name of screen form. Or name of the screen form file if name2 is also specified.
name2:
Name of the screen form in the screen form file called name1.
All graphics macros provided by Siemens are located in the macro file
/mmc.001/siem.069/wop.006/grafik.035 (FlexOS) or
\wop\t.006\grafik.035 (DOS).
Modifications or additional functions by the user are in the macro file
/mmc.001/user.005/wop.006/oemgrafik.035 (FlexOS) or
\wop\t.006\typ_a.006\oemgrafik.035 (DOS).
A simple "NC language" is used in the drawing macros. This is interpreted and displayed by
the NC system.
There are preparatory functions for straight lines and arcs that can be drawn only, drawn
and simulated or simulated only.
The following "G functions" are defined:
The following functions prevent conversion of the specified point onto the current plane. The
point is always output on the turning plane. This is necessary during approach of the plane
or tool changing point during active C-axis machining for example C axis machining.
A "-" in the centre column indicates that this motion is executed with rapid traverse (drawn
as a broken line).
A "-" in the second to last column indicates that this motion is drawn. A "-" in the last
column indicates that this motion is simulated.
These "G functions" must not be confused with identical machine words!
The addresses for the coordinates are X, Y, Z and the addresses for the circle parameters
are I, J. All addresses are absolute.
The addresses X, Y and Z are modal.
4.2.7 NC macros
Format of a macro:
MAC:NC block 1
NC block 2
Four columns are required for the macro name plus an end character. The fifth column
contains the first NC block.
For a blank line in the NC program, the line in the macro file must contain at least four
blanks.
In macros, words (but not complete blocks!) can be used from the machine file.
In a macro, the word call is specified by writing the name of the word between quotation
marks.
Example:
When the first NC block in this macro is generated, the string "N" (including quotation
marks) is replaced by the word specified by N.
Text not place between "|" (=pocket calculator call) or interpreted as a macro call in
accordance with the syntax, is also output into the NC code file. In this example, the text "(
block number )" is output.
If words from the machine file are used in macros, macros can be made a little less
machine-specific:
The more machine-specific data is contained in the machine file and the less machine-
specific data is written in the NC macros, the easier it is to generate programs for different
machines with the same macros by substituting the machine file.
Moreover it is easier and more flexible to specify formats and modalities for different values
in the machine file.
One example is the user of machine words for block numbering. If word is output with the
variable V181, it is automatically incremented by the system.
The program beginning macro from the graphics and the NC macro files of the programming
system for the SINUMERIK 840C control is listed below to demonstrate the basic difference
between graphics and NC macros.
Graphics macro:
1!XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXMakroXXXXXXXXXXXXXXXXX
2
3 101.!Program beginning
4 \I pa.009
5 G30 X|V864| Y|V865| Z|V866+V928|
6 !Plane
7 |V950=(V812-1)*4+900:V840=VV950:V950=V950+1:V841=VV950|
8 |V950=V950+1:V842=VV950:V950=V950+1:V843=VV950|
9 |V838=V840+4:V839=V841+4|
10 |V827=0|! Tool number
NC macro:
1 !XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXMakroXXXXXXXXXXXXXXXXX
2 !
3 ! Program beginning
4 101:
5 |V827=0:V1952="N":V1953=""|! Tool number skip block number.
6 |V1989="MPF"|
7 \ |V810≡1|PRT
8 |V1989="SPF"|
9 \ PRT
10 PRT;( |V1989||V1978| )
11 ( Drawing no.: |TRU(V1979):V1979| )
12 ( Date of creation: |TRU(V1980):V1980| )
13 ( Machine: |TRU(V1981):V1981| )
14 ( By: |TRU(V1982):V1982| )
15 ( |TRU(V1983):V1983| )
16 |V950=(V812-1)*4+900:V840=VV950:V950=V950+1:V841=VV950|
17 |V950=V950+1:V842=VV950:V950=V950+1:V843=VV950|
18 |V838=V840+4:V839=V841+4:V916=0:V917=1:V918=2:V919=3|
19 |V221=V926|! Activate G function from empirical data
20 \ |V846≡1|EB1
21 |V918=3:V919=2|
22 \ EB1
23
24 EB1;|V950=16|
25 \ |V812<4|EB2
26 |V51="":V52="":V53=""|! Plane G16
27 \\ |V924≡-1|EM1
28 \ |V923<1990|EAU
29 |V53=VV923|
30 \\ |V925≡-1|EM2
31 \ EAU
32
33 EM1;|V51="-"|! Minus for length offset
34
35 EM2;|V52="-"|! Minus for length offset
36
37 EAU;! Plane output
38 |V51=VV922+V51|
39 |V52=V53+V52|
40 "N"G|V950| |VV912| |VV913| |V51| |V52|
41 \ EA1
42
Brief explanation:
In the graphics macro, the reference point on the screen is approached (G30 ...). After this,
the variables are initialized with the axis names of the current plane.
Of course in the NC macro the "G function" for screen display is omitted. Output to the NC
file is specified here instead:
General information about the NC program is given in lines ten to fifteen as a comment. This
information can be specified in the program beginning screen form.
In planes G17 to G19, the plane selection and output of the zero offset in macro "EB3;" (line
56) are specified.
For plane G16 the plane selection is output in macro "EAU;", line 37, via variables previously
set in the empirical value file/program beginning screen form. The zero offset is output in
macro "EA2;", line 48.
The NC code of the program beginning macro generated then looks this, for example:
( MPF1 )
( Drawing no.: 1 )
( Date of creation: 20.11.93 )
( Machine: 840C )
( )
N10 G17 G54 G00 G90 G80
Words and blocks are defined in the machine file which generate the NC code when
activated. Words can be activated by NC macros and by the programming system, blocks
only by the programming system.
A program exists to create and modify the machine files that can be started from the FlexOS
system (see operating sequence in Section 1.4) or directly under MS-DOS.
Basis:
A word consists of an address letter and a sequence of figures with or without a sign.
A block consists of several words.
This is the proper basis of all NC languages ( see DIN 66025, part 1).
The machine file program is based on this lowest common denominator.
All interaction with the machine file program is performed via screen forms. The keys in a
screen form have the following meaning:
Ð: Jump to the field of the next line. If several fields exist in the lines, the same
column is selected in each line, if possible.
Toggle field: Display of selection screen form
Ï: Jump to the field of the previous line. If several fields exist in the lines, the
same column is selected in each line, if possible.
↵: In input fields
• a following screen form is displayed if there is one.
• if there is no following screen form, the cursor jumps to the next field.
In the cancel field, the screen form is exited without saving.
In the confirmation field, the screen form is exited and the changes stored.
Toggle field: Display of the selection screen form
It is only possible to exit a screen form with the cancel or confirmation field!
The main menu items can be activated with function keys F1 to F7, i.e. the corresponding
submenu is displayed. The required submenu item is selected using the cursor keys. With
RETURN, the associated screen form is displayed.
Files Read in
Display
Save
Initialize
System info
End
Word Create
Copy
Edit
Display
Delete
Standard formats
Block Create
Copy
Edit
Delete
Stand. blocks
Subroutines
Setup Read in
Colours
Letters
Filenames
Save
Read in:
The read-in function is used to read the specified machine file into the machine file program.
All parameters in the machine file program are than set as specified in the machine file.
The file is read in without message display.
Display:
This function lists all entries, both words and blocks, that have already been defined. The
letters in front of the entries displayed are intended to make it easier to assign identifiers to
the words or blocks.
The letters themselves can be set in Setup/Letters {F6}{F3}.
Save:
So that no data is lost if an unforeseen event occurs, this function can be used to buffer the
current state of the machine file.
It is not necessary to exit the running program.
Initialize:
System info:
When this function is selected, information about the current version of the machine file
program is output.
End:
5.1.3 Word
Create :
To define a new word, select "Word" from the main menu bar and "Create" from the pull-
down menu.
If a variable is entered, its value is output in the format of the word (integer/decimal places).
A standard format can be specified that is defined under menu item "Standard formats".
If zero is specified in the position for tabulated NC blocks, the words in the block are written
consecutively. Where values are not equal to zero, the first address letter of the word is
output at the appropriate position.
If a word is set modally, it is only output if its value has changed. The following trick (NC
macro) can be used to force output of the value:
E.g.: machine word = TST; assigned variable = V10=100; address letter = F :
TST Output in NC code F100
|V1=V10| Variable buffered
|V10=NL| Set variable to NL => no output
TST Value = NL =>no output in NC code
|V10=V1|
TST Output in NC code F100
Copy :
If you want to define a new word that is the same as an existing word except for a few
points, it is possible to copy the word and modify it (see Edit).
Edit :
During editing, the identifiers of the existing words are displayed first. The selected word is
then loaded into the same screen form as was used to define a word. You must click the
field to be changed and enter the new content.
With "Confirm" the new content of the field is accepted, and with "Cancel" a change to the
machine file is prevented.
Displays :
Delete :
If the deleted word has been used in a block, you must delete it their too because
otherwise the block is not stored.
Standard formats :
A table is displayed in which 10 different standard formats with 10 different integer and
decimal places each can be defined. Using the variable V1403 you can specify in the system
which index of a standard format is to be accessed.
5.1.4 Block
Create :
The components of a block can be: words, texts, other blocks or macros. The option of
specifying other blocks allows a number of simplifications. For example, the word for X, Y
and Z can be grouped together in one block and in every other block in which XYZ is
required, the block must be called.
During creation of a block component, a component entered is only a complete string when
it is assigned an identifier (word, text, block, etc.).
When editing blocks, you can select an element from the list using the cursor keys as
follows.
Now it is only possible to exit the list by pressing the END key (jump to the last field) leaving
a element that is not in the last position selected. In all other operations, the cursor and
therefore the selection is cancelled and assignment of an identifier is no longer possible.
If you press the END key, you can select the cancel field. Then you can move up again with
the cursor keys and select any function.
All standard blocks that the system accesses must be entered in the standard block table
using {F3}{F5}.
Copy:
When copying a block it is necessary to change the identifier of the new block,
otherwise the new block will not be saved.
Standard blocks :
All standard blocks that have been defined in the machine file must be entered here. The
unchangeable texts are read from the text file of the machine file program. Any name can be
selected for each block but it must correspond to the name defined when the block was
created.
The blocks entered here are assigned to the system via a further table in the system where
all blocks must be listed in the same sequence.
5.1.5 Machine
Under the heading machine, you will find items that are required to support NC control but
are not written in NC blocks.
General info 1
General settings and setting of the modes for each machining operation (e.g. for radius
correction, pocket milling, etc.).
General info 2
Paths NC3
If macros are used for NC block generation, the file name under which the macros are
stored must also be specified here.
An interpreter file is required for the NC block display. The name specified here is stored as
a standard in the NC system.
NC block number
In the screen form displayed here you can change the format specifications for outputting
the block number in NC code.
Layer horizontal
Layer vertical
Subroutines
5.1.6 Setup
Read in file:
Change colours:
13 violet black
14 violet black
15 white black
22 black violet
23 green violet
24 yellow red
25 green cyan
26 black green
27 cyan red
Change letters
File names
General Setup.
Save
If you want these settings to be available again later on, you can save them in a file.
If you want to use them every time the machine file program is used, you must store them in
the file MF3.SET.
There is one machine file each for the milling and turning systems in which existing data is
already defined. The user can make additions to the machine file.
The following machine words are already available in the machine file "Milling":
These machine words are used in the macros that already exist and are also available for
new NC macros.
The following additional words are used in the blocks defined in the machine file:
The following machine words are required for the miscellaneous functions for C axis
operation:
The following machine words are required for the miscellaneous functions for Y axis
operation:
The standard blocks for milling are defined in the following machine words:
In addition to the standard blocks additional blocks are defined for the programming system:
The following blocks are defined in the machine file for milling:
The following blocks are required for the miscellaneous functions for C axis operation:
Machine dependence is not established until the NC program has been generated.
The machine parameters required for this which range from the address letters and number
formats of the NC blocks to information about the cycles and subroutine options available in
the control (via macro calls in words) are taken from the machine file.
The machine file is generated with a program for this specific purpose (Section 5.1).
Before the NC blocks are generated, the machine file is read in so that the system knows
how the NC blocks must look for this specific machine.
The diagram below shows that mechanism by which the NC macro file is handled between
the NC programming system and the machine file program.
When a machine file is created the full name of the NC macro file is entered in this file.
Read in
Read in file
...
Confirmation Abort
NC paths
...
...
Confirmation Abort
The link between the machine file and the NC macro file is established by entering the macro
file name in the control description screen form.
The file names of the graphics macro file and of the machine file etc. are permanently
entered in the setup file. The machine file contains the definitions of the NC blocks and
machine words as well as the name of the NC macro file.
The circle is then complete and all the necessary conditions for using macros in NC block
generation have been fulfilled.
The NC blocks in the machine file are standard blocks which essentially cover the traversing
movements. All other NC blocks have to be generated by using the available macros when
programs are created.
It is also possible to insert NC code subsequently using the editor. However, this technique
should only be used in exceptional cases.
6. Configuring Example
The example below illustrates the interaction between the individual system components that
can be configured by the user. The screen forms and macros used are provided in a list. To
make changes in these screen forms or macros select and edit them as described in
Sections 1.3/1.4.
In the example, a decimal value and a string are to be output in NC code. The user must be
able to select both values by entries in screen forms.
First of all a graphics macro in graphics macro file "oemgrafik.035" is required which is
listed in the selection requester and can therefore by selected by the user via menu items
MACHINING - MACHINES AUX FCT.:
!XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXMakroXXXXXXXXXXXXXXXXX
X01:!auxiliary function
\I awm.009
As the macro name ends in ":" it appears together with the text after the name in the
selection requester and can be selected. Once it has been selected the screen form
specified in the macro is displayed.
This function appears as a separate program step in the work schedule and can be changed
again at a later stage via "Edit program steps".
! awm.msk 23.10.92
V1968:V1969:V966:V967:V968:V969:V970:V971:V972:V973:V974:V975
# Field description
1 = -3 =V1 &:14:22:V1 &:1:$(0,0,12);
2 = -3 =V2 &:V2 &:2:$(0,0,12);
3 = -3 =V3 &:V3 &:3:$(0,0,12);
4 = -3 =V4 &:V4 &:4:$(0,0,12);
5 = -3 =V5 &:V5 &:5:$(0,0,12);
6 = -3 =V6 &:V6 &:6:$(0,0,12);
7 = -3 =V7 &:V7 &:7:$(0,0,12);
8 = -3 =V8 &:V8 &:8:$(0,0,12);
9 = -3 =V9 &:V9 &:9:$(0,0,12);
10= -3 =V10 &:V10 &:10:$(0,0,12);
11= -1 =V51 &:V51 &:11:$(0,0,12);
12= -1 =V52 &:V52 &:12:$(0,0,12);
13= 0;
14= 0 :|V1=V966:V2=V967:V3=V968:V4=V969:V5=V970:V6=V971:V7=V972|:15;
15= 0 :|V8=V973:V9=V974:V10=V975:V51=V1968:V52=V1969|;
16= 0;
17= 0 :|V966=V1:V967=V2:V968=V3:V969=V4:V970=V5:V971=V6:V972=V7|:18;
18= 0 :|V973=V8:V974=V9:V975=V10:V1968=V51:V1969=V52|;
19= 0;
20= 0;
21= 0;
22= 0 :|V747=0:V748=0:V749=17|;
23= 0;
#repeat section
#end section
#end of screen form
#
01:!
For historical reasons, all screen forms specified in a screen form file must be given the
extension "msk". In the example, the screen form name "awm.msk" is in the first line of the
file.
All variables that are to be written into the geometry file by the system are specified in the
second line of the screen form.
Several values can be entered in the screen form but in the example only the variables V966
and V1968 have been assigned values:
When the screen form is displayed on the screen the cursor is positioned in the first field so
that the sequence of instructions for the first field is executed: The instructions after the first
"&", i.e. 14 and 22 are executed (":14:22" in the instruction line of field 1). Instruction 14
causes all current values of the user variables to be transferred to the working variables of
the screen form so that they are output in the screen form. Instruction 22 defines the exit
behaviour of the screen form: V747=0; V748=0 means that there is no following screen form
when PgUp is pressed and the screen form is exited with RETURN. Variable V749 is
assigned the value 20, i.e. instruction 20 is executed when the screen form is exited.
In addition, variable V1 is output in field 1 (":V1").
The value in field 1 is interpreted as a decimal value and is assigned to variable V1
("1=3=V1").
If 1000 is now entered in the first input field this value is stored in variable V1. If string "(
value H = 1000 )" is entered in the penultimate field it is stored in variable V51. Exiting the
screen form with RETURN (V748=0) calls instruction 17 (because V749=17) where all the
user variables are written back, i.e. V966=1000, V1968="( value H = 1000 )".
All the variables located at the beginning of the screen form (in this case in the second line)
are stored in the geometry file when the screen form is exited with RETURN. Here, they can
be accessed by the graphics macro for "Edit program steps" and by the NC macro for
"Generate part program".
If, as a next step menu item GENERATE NC PROGRAM is selected in the programming
system, the NC macro (must exist in the NC macro file oemncmac.032) is called:
!XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXMakroXXXXXXXXXXXXXXXXX
X01:!auxiliary function
( output by auxiliary function macro )
"N"H|INT(V966)|
"N"|TRU(V1968):V1968|
As a result of the second line of the NC macro only one line of text is output which is
interpreted as a comment by the NC code because of the brackets. A blank must be written
after the opening bracket and before the closing bracket! "N" is defined in the machine file,
the current block number is output.
The pocket calculator instructions are executed:
Output of the variable V966 via the function INT() will convert any real number that has been
entered (e.g. 1000.45, is possible according to the screen form definition) into a decimal
number. The value which is rounded up or down (in the example 1000) is then output in NC
code.
The function TRU() deletes all subsequent blanks in variable V1968 (because of
preassignment).
The entire system consists of a basic system which contains a limited range of functions and
an "application" that expands this range of functions.
The basic system uses a certain amount of the available variables (=system variables). The
application that already exists itself uses some of the remaining variables but can also
access the system variables simultaneously.
This means that only a few variables remain free for the user to use (for a description see
Section 7.2.3). However, he can fetch information from the variables assigned to the system
and the application. The variable assignment of the application is listed below (Section 7.2)
and an explanation of the required system variables (Section 7.3) is also given).
Some of the variables are preassigned in the empirical value file or the configuration file and
set during screen form execution.
The variables can contain different data types. There are variables for reals and integers and
strings. The data type is defined by the system and the user of the variables is bound by this
convention.
Integers / reals:
In the case of this data type the type definition in the screen form determines whether the
variable is to be interpreted as a real or integer value. Every variable is large enough to store
a real.
An integer is always a whole number. The value range is from -32768 to +32767.
A real variable contains a floating point and the number of places before and after the point
is user definable. For more detailed information refer to Section 2 "The Pocket Calculator".
String:
This data type contains a character string. I.e. a variable of data type "string" consists of one
or several characters that together form the character string.
The character string is always written in quotation marks in an assignment. Any characters
except for quotation marks can be placed between the quotation marks.
Example of an assignment:
V1981="SINUMERIK 840C"
System variables:
Only the variable numbers listed here have been assigned. It is not possible to access
numbers that are not named here.
Only the variables created for Siemens are described in this Section. System variables are
not mentioned. However, the system variables are used by WOP configuration where
necessary.
Variables within these ranges which are merely listed but not explained are reserved for
Siemens applications and must not be used by the end user. The end user should only use
variables which are explicitly defined as user variables.
V750
V762 Boring 2
Retraction path horizontal
V763 Boring 2
Retraction path perpendicular
V764
V765
V766
V767
V768
V769
V770 Deep hole drilling
Dwell time at starting point
V771
V772 All drilling operations:
Call as 1->G function
2->subprogram
V776
V777
V778 Drilling operations cycle numbers 81-89
evaluated in NC macro
V779 Approach strategy WOPM 1->1st movement plane/2nd movement infeed axis
2->1st movement infeed axis/2nd movement plane
3->3-axis movement
4->Movement in plane only
Measuring cycles:
The measuring cycles have not yet been implemented. However, the variable assignment
required for implementation is already defined and listed below:
Variable Explanation
V780 Extended T address
V781 T number
V782 Automatic tool offset
V783 Empirical value memory number
V784 Select reference hole
V785 Offset angle position for mono probe
V786 Infeed offset axis/drilling axis
V787 Centre point of abscissa
V788 Centre point of ordinate
V789 Sensor no./type number of measuring points
V824 Speed
set directly for functions before machining; insert blocks
from catalog for machining
set in macros from data in the geometry work file
evaluation in machine file
(WZW=Tool change)
V850 Sequence for approach WZW position axis 1 global
V851 Sequence for approach WZW position axis 2 global
V852 Sequence for approach WZW position axis 3 global
V853 Sequence for approach WZW position axis 4 global
V854 Sequence for approach reference point position axis 1 global
V855 Sequence for approach reference point position axis 2 global
V856 Sequence for approach reference point position axis 3 global
V857 Sequence for approach reference point position axis 4 global
Contour/surface machining:
Contour machining:
Solid machining:
Solid/surface machining:
V893
V894 intended for hole diameter
V895 intended for pos. hole axis 1
V896 intended for pos. hole axis 2
V897 intended for pos. hole axis 3
V898
V899 Save last feed setting
V922 Angle tool pointer to axis names for tool length comp. 1
preassignment in empirical value file (WOPM)
V923 Angle tool pointer to axis names for tool length comp. 2
preassignment in empirical value file (WOPM)
V928 Addition constant for graphics macro for reference and tool change point
(WOPM) not required for WOPT!
set in empirical value file
evaluation in graphics macro
V1011 Flag for "function output after machining" 1->no output macro
2->output
V1012 Offset in the infeed axis when machining holes
set in machining screen forms
evaluation in macros
V1163 Control of path compensation by the programming system for bottleneck problems
and decreasing radii.
1->yes
2->no
V1164 Machining side contour machining (in direction of travel)
1->centre
2->right
3->left
4->inside
5->outside
V1223
V1224 Approach strategy tool change point 1->X/Z
set by system 2->Z/X
evaluation in machining screen forms 3->XZ
4->X
5->Z
V1245 Macro-internal: flag for const. cutting speed <=> cutting speed switchover
necessary where several mach. operations performed with same tool; 1-> previous
Machining performed at constant cutting speed
V1263 Chamfers and fillets on the base are rough grooved in steps
0->no
1->yes
V1290 Finish turning: factor for radius calculation during approach via circle
circle radius = V1290 * RS (tool nose radius on tool)
if RS = 0.0 substitute value taken as RS (V1291)
V1296 Rough turning: angle for switchover from face feedrate to diameter feedrate
V1297 Length of end straight line between beginning and end point
on finished part contour and blank during generation of the stock removal segments
V1303-V1309: PARTING:
V1310 Thread cutting: degression calculation for const. stock removal volume by
0->Siemens formula
1->Böhringer formula
V1330
V1331 Length chuck body
V1332 Inside diameter chuck body
V1333 Outside diameter chuck body
V1334 Longit. dimension
V1335
V1336 Maximum speed
V1337
V1338
V1339
V1340
V1341 Control variable speed series, empirical value file:
1->no speed series
2->speed series, automatic
3->fixed speed series, M[V1351]
4->fixed speed series, M[V1352]
5->fixed speed series, M[V1353]
6->fixed speed series, M[V1354]
V1342 As for V1341, runtime
V1343 Speed series 1, minimum
V1344 Speed series 1, maximum
V1345 Speed series 2, minimum
V1346 Speed series 2, maximum
V1347 Speed series 3, minimum
V1348 Speed series 3, maximum
V1349 Speed series 4, minimum
V1350 Speed series 4, maximum
V1351 M function, speed series 1
V1352 M function, speed series 2
V1353 M function, speed series 3
V1354 M function, speed series 4
V1356
V1357
V1358
V1359
V1367 Display kinematics screen form during editing (empirical value file)
0->no
1->yes
V1390 Type of dwell time output during backing off (empirical value file):
0->in seconds
1->in revolutions
V1393 Infeed offset for face end (V185) and peripheral surface (V271), macro internal
V1407 Level form elements; sum of the place values (empirical value file)
V1419 - V1421:
Zero offset face end/peripheral surface for simulation
equivalent to V185-V187 during NC generation
V1443 Unassigned
V1446 Angle 2nd rotary axis (inclinable table) for output in machine file
V1452 Auxiliary factor for graphics macro for machining in front of the machining centre
1->behind the machining centre
2->in front of the machining centre
set in the program beginning macro (101)
evaluation on all outputs of the X axis
V1453 Automatic
0->no
1->step 1
V1461 ZO rotary table centre -> workpiece zero 1st axis (program beginning screen form)
V1462 ZO rotary table centre -> workpiece zero 2nd axis (program beginning screen form)
V1463 ZO rotary table centre -> workpiece zero 3rd axis (program beginning screen form)
V1464 ZO rotary table centre -> workpiece zero 1st axis (by the system for each plane)
V1465 ZO rotary table centre -> workpiece zero 2nd axis (by the system for each plane)
V1466 ZO rotary table centre -> workpiece zero 3rd axis (by the system for each plane)
V1486 Generate flag for part program indicating that no PA has been called.
evaluation in B01: only output if PA first
reset to 0 in PE
V1487 Set if B01 called before PA, i.e. in B01 no DIN code
output, output before PA.
reset to 0 in PE
V1490 Reserved
V1491 Reserved
V1527 G90/G91
V1952 Address for block number ":" or "N" or "/N", macro internal
V1978 - V1983:
Set in the program beginning screen form
evaluation in NC macro
V1990 - V1997:
Set in the configuration file
evaluation in machine file
V2000ff
SINUMERIK 840D
This section describes the system variables that are required for applications when
configuring screen forms and macros.
System variables that are only used in the geometry file or in other hidden parts of the
system are not listed here.
The following features are taken over by the basic system for path machining:
• Infeed depth
• Milling against contour direction
• Radius compensation
Infeed depth:
A depth must be specified for path machining ( = starting level minus end level ). So that this
depth can be reached it is necessary to specify an infeed ( = height that is removed in one
machining operation).
Machining of the contour is repeated with increasing Z level until the specified end level is
reached. There are two ways of reaching the Z level of the specified end level in the last
machining operation:
Maximum infeed:
If the value for the depth is not an integer multiple of the value for the infeed, another infeed
is used in the last machining operation.
This infeed is smaller than that specified with the parameter Z.
Constant infeed:
Starting from the specified infeed, a new infeed is calculated with which an integer number of
infeeds can reach the specified depth.
This infeed calculated by the system is always less than that specified by the user.
If the contour contains gaps, they are avoided with the use of macros.
In "reciprocating" mode, the tools is moved perpendicularly to the next infeed level at
feedrate at the end of a machining operation (in the simplest case). From there the
operation is performed backwards.
The radius compensation is reversed before this operation of course.
Radius compensation:
By specifying the position of the tool with respect to the machining operation (central, left,
right, inside, outside) it is possible to apply a radius compensation. The equidistant
calculated is shown on the screen.
2:
In the NC code, no standard blocks are output for the radius compensation. The variable
V191 is set to 1 or 2, in accordance with the tool position and the uncorrected path is output.
The NC system calculates the correct path using information about the position of the tool.
The correct value for the starting macro is already available in the variable V191.
After the last block has been output and before the end macro is called, variable V191 is set
to zero.
During reciprocation:
The radius compensation is reversed.
Bottleneck compensation:
If the bottleneck compensation is activated, an equidistant is calculated in the first step to
the contour to be machined with the specified values. The bottlenecks are compensated and
then these values are reversed and the equidistant calculated back. This contour is then
output into the NC program.
The calculation obviates cuts that could not be made with the current tool. Because the
equidistant might have to describe circles around acute corners, the final contour does not
have to match the original contour.
Combination of parameters:
The following system variables are available to the user for path machining:
The first to third columns of the table contains system internal data (e.g. required in the
geometry file) that is only listed here for the sake of completeness. The fourth column if the
number of the variable under which the parameter can be addressed in the input screen
form, the fifth column is the variable number for macros and NC blocks, the sixth column
briefly explains the parameters.
B: Letter of the parameter as it is entered in the standard text file at the position whose number is in the
next column.
TF: Number of the letter in the text file in lines 23 - 26. The number specifies the position in the total
number of letters.
Par: Internal parameter number. This column is uninteresting for the user.
Var: Variable number of the parameter for communication with screen forms.
MVar: Variable number of the parameter in the NC block or in macros.
Explanation: Brief explanation. More details in the text.
V303:
Tool radius. Required to calculate an equidistant path with respect to the specified contour.
The tool radius is ignored if a tool position is specified. If the radius in the input line is
missing, path machining accesses the variable V401. This variable is assigned to the tool
radius by the basic system.
V304:
Radius compensation mode. The value behind this parameter is equivalent to the position of
the switch for radius compensation in the machine file.
Is always on the previous value 2 in the system (see also Section Radius compensation).
V305:
Allowance. Included in the calculation of the equidistant path.
V306:
Path side. The parameter is required for radius compensation.
0: Central, i.e. no radius compensation.
1: Left.
2: Right.
3: Inside. Calculates whether to move left or right to the next discontinuity point using the
contour segment. This contour segment must be closed. If it is open or its direction of
rotation cannot be calculated (e.g. on overlaps or if the number of contour elements
until the next gap is more than 500), motion continues on the side of the path of the
last contour segment . If this occurs at the beginning of machining, motion is
performed in the centre. The side of the path output to the NC block is right or links
depending on the contour direction.
V307:
Offset in Z. This value is added to all outputs for path machining in Z. This parameter only
exists for reasons of compatibility. Its value is copied to these two parameters if depth and
infeed are not specified. The screen form does not request a value for this parameter.
V308:
Depth for the depth infeed. The value of this parameter is an absolute value. See Section
"Depth infeed" for more details.
V309:
This parameter specifies the direction in which the contour is machined:
0: The contour is machined in a defined contour direction. This is also the default
setting if the parameter is missing.
1: Machining is performed against the defined contour direction.
V311:
Infeed for the depth infeed. The value of this parameter is an absolute value. See Section
"Depth infeed" for more details.
V312:
Safety clearance for traverse motions.
V313:
This parameter is not normally specified. If it is specified with a value 1 after it, the path
machining manages residual contours.
V317:
Reference plane for traverse motions.
V318:
Quadrant for calculation of the equidistant path.
V320:
Segmentation of the infeed. The values after the parameter have the following meanings:
0: Maximum infeed.
1: Constant infeed.
V321:
Machining mode. Influences the type of infeed from one machining level to the next.
The following values can be placed after the parameter:
0 - 2: circulating
3 - 5: reciprocating
The macros perform all the necessary approach and retract motions in accordance with the
mode set.
Standard blocks:
Path machining requires the following standard blocks for NC block output:
The basic system provides the following features for solid machining:
• One to any number of closed contours are required. With open contours, problems can
occur in calculation because they are automatically closed by the system.
• Any sequence of these contours is possible, i.e. inside contours can be defined before
outside contours (or vice versa).
• Any definition direction is possible for the contours. It is reversed internally so that
machining is always performed in the same direction. The machining direction
(clockwise/counterclockwise) can be entered in a screen form.
• It is always assumed that the outside contour is always to be machined, i.e. this area is
a pocket in inside machining. Continuing from here, the next contours are islands,
contours in the islands are pockets again etc.
• All contours are considered finished contours, i.e. unfinished contours are not
considered at the moment.
• The initial contour is always at the height defined in the contour and is parallel with the
XZ plane.
• Consideration of differing beginnings for the contours can be controlled via screen form
input. Differing machining depths are not possible in calculation.
• Cutter with corner radius or ball radius (corner radius=cutter radius) are taken into
account.
The following system variables are available to the user in solid machining (solid milling, end
milling, manual milling):
B MVar Explanation
R V303 Tool radius
E V304 Corner radius
A V305 Allowance
U V306 Overlap
D V307 Direction of rotation
T V308 Depth
W V309 Angle (draught)
A V310 Number of paths
Z V311 Infeed pre cut
S V312 Safety clearance
I V313 Machining type
B V314 Drill radius
H V315 Z value workpiece surface
L V316 Length of the traverse motion at feedrate between contours
P V317 Retraction plane
Q V318 Quadrant
O V319 Consideration of existing Z coordinates
Z V320 Infeed constant/maximum
S V321 Direction (right/left)
B: Letter of the parameter as it is entered in the standard text file at the position whose number is in the
next column.
MVar: Variable number of the parameter in the NC block or in macros.
Explanation: Brief explanation. More details in the text.
Unlike in path machining, in point machining isolated points are machined, as the name
suggests.
User of macros:
Starting and end macros are supported in the usual way. They are specified before
machining in the geometry. Triple macros are supported.
Macro variables:
Variable Meaning
V202 X coordinate last point
V203 Y coordinate last point
V204 Z coordinate last point
V222 X coordinate current point
V223 Y coordinate current point
V224 Z coordinate current point
The first three variables are not assigned for the starting macro.
The last three variables are not assigned for the end macro.
The point coordinates are passed to the jump macro in variables.
Standard blocks:
7.3.4 Turning
Use of macros:
For turning only starting and end macros are supported in the usual way. They are specified
before machining in the geometry. Triple macros are supported.
The jump macro has no purpose, gaps are calculated directly by the system.
All machining operations are calculated by the system.
Features of the basic system are not used for approaching the machining operation, to
bridge gaps and to retract from the machining operation. Instead macros are used. The
following system variables are available to these macros:
Variable Meaning
V201 G function
V202 X coordinate beginning
V203 Y coordinate beginning
V204 Z coordinate beginning
V205 X coordinate end
V206 Y coordinate end
V207 Z coordinate end
V208 X coordinate arc centre
V209 Y coordinate arc centre
V210 Z coordinate arc centre
V211 Radius (arc angel > 180 degrees radius negative)
V212 Angle of X start, Y start; X end, Y end
V213 Length of X start, Y start to X end, Y end
V214 Starting angle circle arc
V215 End angle arc
V216 Arc angle of arc
Variable Meaning
V181 Block number as specified in the machine file
V191 Radius compensation, 0->none, 1->left, 2->right
V221 G function
V222 X coordinate beginning
V223 Y coordinate beginning
V224 Z coordinate beginning
V225 X coordinate end
V226 Y coordinate end
V227 Z coordinate end
V228 X coordinate arc centre
V229 Y coordinate arc centre
V230 Z coordinate arc centre
V231 Radius (arc angle > 180 degrees radius negative)
V232 Angle of X start, Y start; X end, Y end
V233 Length of X start, Y start to X end, Y end
V234 Starting angle circle arc
V235 End angle arc
V236 Arc angle of arc
Variable Meaning
V241 G function
V242 X coordinate beginning
V243 Y coordinate beginning
V244 Z coordinate beginning
V245 X coordinate end
V246 Y coordinate end
V247 Z coordinate end
V248 X coordinate arc centre
V249 Y coordinate arc centre
V250 Z coordinate arc centre
V251 Radius (arc angle > 180 degrees radius negative)
V252 Angle of X start, Y start; X end, Y end
V253 Length of X start, Y start to X end, Y end
V254 Starting angle circle arc
V255 End angle arc
V256 Arc angle of arc
Variable Meaning
V261 G function
V262 Starting coordinate 1st axis without rotation
V263 Starting coordinate 2nd axis without rotation
V264 Starting coordinate 3rd axis without rotation
V265 End coordinate 1st axis without rotation
V266 End coordinate 2nd axis without rotation
V267 End coordinate 3rd axis without rotation
V268 Coordinate 1st axis after rotation
V269 Angle of rotation
Variable Meaning
V261 G function
V262 Starting coordinate 1st axis
V263 Starting coordinate 2nd axis
V264 Starting coordinate 3rd axis
V265 End coordinate 1st axis
V266 End coordinate 2nd axis
V267 End coordinate 3rd axis
V268 End coordinate on 3rd axis including radius
V269 Length of the traverse motion
V270 Angle rotation
V271 Radius (arc angle > 180 degrees radius negative) of the peripheral surface
V272 Starting coordinate on 3rd axis including radius
V273 Path length of 3rd axis after rotation
V274 Previous angle or rotation
The geometric data of the first element of the first machining plane (V221ff for turning and
V261ff for machining on face end/peripheral surface) and of the last element of the last
machining plane (V241ff for all types of machining) are available to the starting macro.
The geometric data of the last element before the gap (V201ff) and the first element after
the gap (V221ff) are passed to the jump macro if required.
The geometric data of the last element of the machining operation (V201ff) are passed to
the end macro in variables. .
Variable Explanation
V331 Free
V332 Direction of rotation
V333 Feedrate depth Fz
V334 Feedrate plane Fxy
V335 Feedrate retraction Fab
V336 Feedrate F (free)
V337 Cutting speed (calculated from speed)
V338 Coolant
V339 Constant cutting speed
Variable Explanation
V71 Def. of the V no. input forms
V72 Tool description
V161 System state
0 -> fresh input of a keyword
1 -> fresh calculation without dialog
2 -> fresh "dialog run"
3 -> edit keyword
4 -> NC block output
The empirical value file is an ASCII file accessible to the user in which switch-on settings and
program rungs are stored in variables. The file is executed on system start-up so that all
variables entered are initialized. All changes that are made in the empirical value file
therefore only apply when the system is reinitialized.
The file contains both the assignment and a precise description of the data. It is located in
the data tree \mmc.001\user.005\wop.006\exam.033\erfahr.034 (FlexOS)
or\wop\t.006\exam.033\erfahr.034 (DOS).
Syntax:
Anything not placed between two vertical lines is interpreted as a comment and ignored
during execution. All instructions placed between "|"'s are executed and the variable contents
are available after system initialization.
The configuration file is an ASCII file accessible to the user in which all machine-specific data
are configured. The file is executed when the system is executed so that all variables are
initialized. All changes that are made in the configuration file therefore only apply after re-
initialization of the system.
The file contains not only the assignment but also a precise description of the data. It is
located in the data tree \mmc.001\user.005\wop.006\exam.033\projekt.034(FlexOS) or
\wop\t.006\exam.033\projekt.034 (DOS).
If the NC output is set to INCH, the number of decimal places must be set to
(V1403=2) to avoid imprecision.
If the C axis functionality is not enabled (V1376=2), the workpiece DEMO002 must be
deleted because it is not executable in this case.
Syntax:
Before the runtime during configuration of screen forms and macros there is no way of
performing a syntactic check of the data.
A debugger exists for screen forms (V1360=10 => activated) which stops after every
calculator call. This allows you to observe the instructions running. Every time execution
stops you can call the pocket calculator with CTRL N and view the content of the variables.
A debugger also exists for macros, which is controlled via the variables V1219 (on, off) and
V1955 (breakpoint):
It is possible to call a screen form from a macro while is being executed. A call of this type is
useful as a "debugger substitute" when testing macros.
condition: The call can be prevented by suitable conditions. The condition can also be
omitted. The screen form is then always called.
name1: Name of the screen form. Or name of the screen form file if name2 is also
specified.
name2: Name of the screen form in the screen form file called name1.
As soon as the macro interpreter reaches this line, it stops execution and outputs the
specified screen form. The screen form "vari.mask" provided by Siemens is useful for testing
because it can be used to view variables.
V.-Nr. ab:
To view variables enter the variable number of the first variable you want to view in the top
left-hand field of the screen form. After you have pressed the "Cursor down" key, the next
15 variable contents are displayed starting at the number entered. With the "Return" key it is
possible to view the next 15 variables one after the other. If you press the ESC key program
execution is resumed.
Via NC macro:
If you write any string in any line of the NC macro, this string is output as written in the NC
code when this line is run.
Here too, the rule is: Begin a line in the fifth column.
In this way, you can test whether certain positions in the NC macro are executed or not.
Text output can be made dependent on a suitable condition.
Examples:
Macro: NC code:
"N" M99 N100 M99
"N" "KÜHL" N100 M08
! Comment
( Comment ) ( Comment )
|V966=123.66|
"N" X|V966| N110 X123.66
It is also possible to have text output in the NC code via the machine file. In this case, output
is assigned to certain blocks.
Procedure:
• Call the program to generate the machine file
• Read in machine file via menu "Read in file"
• Select the required block via menu "Edit block"
• Insert text at any point in the list
A soon as this block is accessed via the machine file and it is output in NC code, the
specified text is also output at exactly the position at which it is located in the list.
Here it is not possible to prevent output by applying conditions and the text must be
removed in order to generate executable NC code.
A. Appendix
A.1 Conversion table MF2 keyboard <-> operator panel
The following table lists all keys that differ on the MF2 keyboard and the operator panel of
the control although they have the same function.
Õ Õ Backspace key
↵ ↵ Return key
Shift F1 F8
i Help screen