Documentation: Reis GMBH & Co Maschinenfabrik Obernburg
Documentation: Reis GMBH & Co Maschinenfabrik Obernburg
04
DOCUMENTATION
General
Author: ESS
Date: January 21, 2008
Control version: RSV-PCX
Software revision: 21.0
Documentation for level: 3
Project-ID: ES_D061904
Date: 22.02.2008
Original: C:\TRABAJO\REIS\ROBOTS\PROGRAMACION
ROBOT\CNC\CNC_Programmierung_2100_gb.doc
RSV-IPC GENERAL
Document revisions
TABLE OF CONTENTS
1 General description_________________________4
2 Target group_______________________________4
3 Safety instructions_________________________4
4 Requirements: Hardware and Software_________4
5 Installation/Configuration____________________4
6 Operation_________________________________4
6.1 Preliminary remark_______________________________4
6.2 File format______________________________________5
6.3 Program import__________________________________6
6.4 Position settings in a CNC program_________________6
6.5 Command sequence______________________________7
6.6 Interpreter operating modes_______________________7
6.7 Behavior with START/STOP________________________7
7 Programming______________________________8
7.1 The system command CNC________________________8
7.2 Description of commands_________________________8
7.2.1 G0: PTP interpolation___________________________8
7.2.2 G1: Linear interpolation_________________________9
7.2.3 G2: Circular interpolation in clockwise direction_______9
7.2.4 Circular interpolation in counter-clockwise direction___10
7.2.5 G17________________________________________10
7.2.6 G18________________________________________10
7.2.7 G19________________________________________10
7.2.8 G53: Switching off the zero point shifting___________10
7.2.9 G54...G58: Zero point shifting____________________10
7.2.10 Mxxx: Additional functions_____________________10
7.2.11 F: advance_________________________________12
7.2.12 S Spindle speed_____________________________12
7.2.13 Ln=xxxx: Additional axis value__________________12
CNC_Programmierung_2100 03/08 gb 2
RSV-IPC GENERAL
CNC_Programmierung_2100 03/08 gb 3
RSV-IPC GENERAL
1 General description
CAM systems generate CNC programs (programs in G-code) which usually are
transferred to a CNC control to run there.
For reasons of costs, robots shall be used instead of CNC machine. Due to the minor
precision of a robot compared to a CNC machine the use of CNC-programs of course
remains limited to typical robot applications such as e.g.: Laser cutting, milling etc.
Following DIN 66025, a part of the CNC commands was integrated in the RobotStar V
control (abbr. RSV). Their function and use will be explained in the following.
Note:
Development of the CNC functions is subject to permanent improvements and further
developments. Therefore it is possible that some of the functions described here will be
completed, omitted or otherwise realized in the future. As far as modifications can be
foreseen today already, reference is made at the corresponding positions in the document
concerning a further development or incompatibility.
2 Target group
Programmers
3 Safety instructions
5 Installation/Configuration
not applicable
6 Operation
For CNC programming it is usual to summarize several commands to one step (into one
program line). The individual commands are designated with “word“ and a complete
command line with “step“. CNC words are e.g.: G0, G53, M3, X100 and one step is e.g.:
N20 G1 T2 G54 F2000 S5000 X20 Y20.
CNC_Programmierung_2100 03/08 gb 4
RSV-IPC GENERAL
These designations are also adopted for the following specification and the term “RSV
command“ has been added for the command word necessary in the Reis robot language
(in this case “CNC“). Alternatively, instead of the designation “word“ the term “CNC
command“ is also used.
Step (CNC-step or program line):
CNC N20 G1 T2 G54 F2000 S5000 X20 Y20
RSV-command word:
CNC
Word (CNC-command):
G0 ,M3, S9000, T2 etc.
The CNC programs generated by a CAM system are ASCII files that cannot directly be
transferred to the RSV user program memory (AWP) in this way. On the one hand, the
RSV expects a command word in each program line (in this case "CNC"), on the other
hand, the CNC program must be put in brackets by a program start and a program end
step.
The external post-processor therefore has to deliver the CNC program in an RSV
compatible SRC-format. Then the SRC file only still contains the program code in RSV
syntax.
Example:
CNC program generated by a standard post-processor:
;Example
N10 G0 T1 G54
N20 X0 Y0 Z100
N30 G1 X120 Z52.5 F200 S9000
...
...
...
Expected CNC program:
SPR „<Name>“
CNC ;Example
CNC N10 G0 T1 G54
CNC N20 X0 Y0 Z100
CNC N30 G1 X120 Z52.5 F200 S9000
CNC...
CNC...
CNC...
END
"SPR" is the program type, in this case a subprogram, and <name> is a program name
like e. g. CNC_PROCESSING. Also "MPR" (main program) is possible as program type.
CNC_Programmierung_2100 03/08 gb 5
RSV-IPC GENERAL
The usual RSV syntax rules apply for the program name: Only alphanumerical characters
and the characters '$' and '_' are allowed. The maximum name length is 25 characters.
It is possible to generate and to modify CNC programs also at the portable teach pendant
of the control. The RSV command "CNC" required for this purpose can be found in the
seventh submenu under the PHG key "SPEC".
When generating a CNC program it has to be observed that the distance between points
will not be selected too small and that there won’t be caused any major changes in
orientation. Too small point distances may lead to output of the message:
<S967>
path control:
Preparation not yet finished.
Reduce speed or
increase advance (_IPOSANDVANCE).
Too large modifications in orientation or a too large advance may cause the message:
<S646>
Servo message: ...
Required axis speed is too high (stop-1).
The minimum distance between points can be calculated from the maximum possible
number of positions per second and the selected advance. The robot control e.g. with the
standard-IPO-cycle = 10.88 ms can process max. 45 positions per second (2 IPO-cycles
per path).
Attention:
The value of 45 positions per second is the theoretical maximum value. Depending on the
CPU load and program structure, this value has to be corrected downward.
At the runtime the value in the system variable _IPOSADVANCE should be set to 30:
Insert command COPY 30,_IPOSADVANCE in the sequence program.
CNC_Programmierung_2100 03/08 gb 6
RSV-IPC GENERAL
1. All control commands, and that in the order as they are in the CNC step; the
commands M6 and T are an exception.
2. M6 if existing
3. T if existing
4. L, I, J, K, A, B, C, X, Y and Z
Approach of a position therefore is always executed last. The words M2 and M30 must not
be in one line together with other words.
Besides the step sequential mode the CNC programs can also be processed in single step
mode. The single step mode refers to the CNC-steps and not to the CNC-commands
included in. A CNC step is completely processed when operating the START key, even if
this contains several CNC commands.
If the various restrictions regarding processing of commands in the operating modes
TEST1 to TEST4 are disturbing, the configurable test user mode has to be applied
alternatively.
Backward movement (TEST1 minus mode) is completely blocked for CNC-programs.
A STOP aborts processing of the current word right in the middle of the CNC-step. The
step pointer stops at the currently processed step.
Necessary actions such as “Spindle off“, “Laser off“, “Coolant pump off“ etc. are
depending on the application and either have to be processed by the PLC or via Event-
Controller. Same applies for re-start after operation of the <START> key.
After a START, processing will be continued from the point of interruption on i.e., the
current CNC-step will not be processed again from the beginning.
CNC_Programmierung_2100 03/08 gb 7
RSV-IPC GENERAL
7 Programming
A CNC program that shall be processed by the RSV must only contain program lines
complying with the Reis syntax regulation. In general, each program line must always
contain one RSV command word and, depending on the command, still one or several
parameters. Transferred to CNC programs this means that each program line containing
G-Code instructions must begin with the command word "CNC". The instructions
themselves are added to the system command "CNC" as text parameters.
The following structure results from this for CNC program lines:
CNC <G-Code instructions>
Example:
The program line N1234 G1 G54 X22.5 Y30.0 Z100.0 F3000 in total contains six individual
instructions as mentioned below: the type of interpolation, one zero point shifting, three
destination point coordinates and the feed.
In the RSV syntax same looks as follows:
CNC N1234 G1 G54 X22.5 Y30.0 Z100.0 F3000
Random use of CNC commands and standard robot commands in a program is possible.
The combination of these two command types results in the highest possible flexibility.
The following commands are integrated in the RSV. All the other commands not
mentioned here will cause an error message and the abortion of interpretation.
The machine will approach the following coordinates in the PTP control mode. The
movement parameters speed, acceleration and approximation explicitly must be set (e.g.
in a subprogram or directly via RSV system command).
Examples:
CNC QPTP_PARAMETER ;given via CNC subprogram
CNC G0 .....
or
PTP_VELOC 100% ;default of the PTP velocity
PTP_ACCEL 100% ;default of the PTP acceleration
FLYBY #ON ;switch on approximation
CNC G0 ......
CNC_Programmierung_2100 03/08 gb 8
RSV-IPC GENERAL
The machine approaches the following coordinates in the control mode LINEAR with the
currently adjusted advance F. The RSV gives an error message if no advance had been
defined. The movement parameters speed, acceleration and approximation explicitly must
be set (e.g. in a subprogram or directly via system command).
Examples:
CNC QPTP_PARAMETER ;given via CNC subprogram
CNC G1 .....
or
PATH_VELOC 100% ;default of the CP velocity
PATH_ACCEL 100% ;default of the CP acceleration
FLYBY #ON ;switch on approximation
CNC G1 ......
The machine approaches the following coordinates in the control mode CIRC with the
currently adjusted advance F. The RSV gives an error message if no advance had been
defined. The movement parameters acceleration, approximation etc. explicitly must be set
(e.g. in a subprogram or directly via system command, see G1).
Complete description of a circular path includes interpolation parameter I, J and K defining
the circle center relative to the start point of the circle movement.
IPO Significance
parameters
I Distance of the center point parallel to the X-axis,
referring to the circle start point.
J Distance of the center point parallel to the Y-axis,
referring to the circle start point.
K Distance of the center point parallel to the Z-axis,
referring to the circle start point.
If a G2 step does not contain an destination point coordinates, a full circle is described
(destination point = start point). Since the circular plane is undefined with two positions
being given, circle interpolation will take place in the operation plane defined by G17, G18
or G19.
Example:
CNC G0 X100 Y50 Z20
CNC G2 J30 F2000 ;full circle with radius = 30 mm.
CNC_Programmierung_2100 03/08 gb 9
RSV-IPC GENERAL
see G2
7.2.5 G17
Definition of the X/Y-plane as operation plane for the circular interpolation, see G2/G3.
7.2.6 G18
Definition of the Z/X-plane as operation plane for the circular interpolation, see G2/G3.
7.2.7 G19
Definition of the Y/Z-plane as operation plane for the circular interpolation, see G2/G3.
Change from the currently adjusted frame into the frame $BASE with G53. All following
positions are also approached in the Base frame.
A user frame is activated with one of these G54…G58 commands in the RSV. The
corresponding frame will be defined or calibrated as usual for the RSV. Allocation between
G5x and the corresponding frame is defined as follows:
G54 Frame 1
G55 Frame 2
G56 Frame 3
G57 Frame 4
G58 Frame 5
One G53...G58-command must precede the first G0/G1/G2/G3-command in the program.
The RSV releases an error message if this condition is not fulfilled.
Additional functions will be realized in the RSV by means of macros. The macro name
results from the letter M and the following digits, without leading zeros. The CNC
commands M7, M07 and M007 for example always call the macro “M7“.
CNC_Programmierung_2100 03/08 gb 10
RSV-IPC GENERAL
Beyond the syntax M<number> defined in the DIN 66025 the RSV also allows the use of
macro names, so that the following syntax is allowed:
M 07 or M07
the macro “M7“ will be called
Attention: leading zeros will automatically be suppressed!
Since additional functions are common RSV-macros, parameters may also be transferred
to those. A special identification of the parameter list is not required, the single parameters
are simply separated by blank(s) or tab(s). Therefore, no further CNC commands must be
added to the end of the parameter list.
Example:
CNC M55 25 #ON 6.87 ;25, #ON, 6.87 are call parameters for the macro "M55"
M6 is an absolutely defined additional function a real tool change will be performed with
(deposit current tool in the magazine, taking new tool). Thus, M6 is a macro with positions,
branchings and I/O-control.
The CNC command M6 only works in conjunction with a T-command indicating which tool
is to be taken from the magazine. Therefore, the tool name "T..." from the T-command is
transferred to the macro as parameter.
M6 Tn (n = tool number) or
M6 TDrill (Tdrill is the name of the tool)
CNC_Programmierung_2100 03/08 gb 11
RSV-IPC GENERAL
7.2.11 F: advance
F - followed by a number- defines the advance (path speed). The unit is adjusted via
default to mm/min and cannot be changed (only metric indication of lengths in the RSV).
There is no default value for the advance. Therefore an advance must have been set
before/with the first G1 (linear movement) or G2/G3 (circular movement), otherwise the
RSV will give an error message.
S – followed by a number – defines the spindle speed in the unit 1/min. Normally, the
control must convert the spindle speed into an analog voltage. Since this calculation is
depending on the application, it has to be made on the user level. This is the reason why
(same as for an M-command) a macro will be called with the fixed name “S“ and the
speed will be transferred as parameter to this macro.
This CNC command defines additional axes’ values for linear axes in mm or for rotation
axes in degrees, the unit results from the axis definition in the machine data. The number
between the letter L and the allocation indicates the additional axis number (L1 to L18 for
additional axis 1 to 18) and the number after the allocation indicates the destination
position (axis nominal value). With L1=90 e.g. the first additional axis will either be moved
to 90° (for a rotation axis) or 90mm (for a linear axis).
Q – followed by alphanumeric digits – calls the same subprogram. The character string
between the CNC command ’Q’ and one of the parameter separators blank, or tabulator or
the line end will be interpreted as program name. The letter Q has to be considered as
instruction (Q must not be the first character of the program name) because no path
indications will be possible in this case.
No parameters can be transferred to RSV subprograms. The only possibility for transfer is
the use of global variables and/or constants.
CNC_Programmierung_2100 03/08 gb 12
RSV-IPC GENERAL
T – followed by a number – activates preset tool data; corresponds to the tool change that
is performed with the RSV system command TOOL. Since the RSV tool variables begin
with the letter ’T’, direct addressing of the corresponding variable is possible with the
CNC-command T… . The CNC command T6 e.g. performs the same as the RSV-
command “TOOL T6“.
Beyond the syntax T<number> defined in the DIN 66025 the RSV also allows the use of
tool names, so that the following syntax is allowed:
T 07 or T07
the tool variable “T7“ is activated
Attention: leading zeros will automatically be suppressed!
The absolute coordinates in mm referring to the current frame are given with X..., Y... and
Z.… .
Examples:
CNC G0 X100 Y 200 Z-50
CNC G1 X70.5 Y130.7
CNC G1 Z120
CNC X150 Y250
CNC Z300
Note:
The first position in a CNC-program has to be completely inscribed.
Reason: Missing coordinates will be replaced in the RSV by the current actual values of
the robot during the program runtime; this may cause transformation errors if the current
actual values cannot be transformed, e.g. axis 5 = 0 for robots with complete hand axis
kinematics (singularity).
An incomplete position indication may also cause different paths/movements, depending
on the current actual value of the missing coordinate at the time of program start.
A complete position e.g. for a 5-axis RL kinematics will be given as follows:
CNC G0 X…. Y…. Z…. B…. C….
CNC_Programmierung_2100 03/08 gb 13
RSV-IPC GENERAL
Note:
No axes’ configurations can be given via CNC command. In mode 1 (A, B, and C are
orientation angles), the first CNC position thus cannot be described completely. The robot
approaches a position with the configuration used at last which may cause twisting of the
head axes and swiveling overhead.
7.2.18.1 Description of the orientation by the so-called Roll, Pitch and Yaw –
angles.
The method "Roll-, Pitch-, Yaw" has been selected from the most different possibilities for
description of the orientation. With this method, transfer of the reference coordinate
system into the tool coordinate system takes place as follows:
Rotation with the angle A around the z-axis of the reference coordinate
Roll
system
Pitch Rotation with the angle B around the new y-axis (after rotation A)
Rotation with the angle C around the new x-axis (after rotation A and
Yaw
B)
CNC_Programmierung_2100 03/08 gb 14
RSV-IPC GENERAL
RPY(A,B,C) = Rot(z,A)Rot(y,B)Rot(x,C) =
cos A cos B cos A sin B sin C − sin A cos C cos A sin B cos C + sin A sin C 0
sin A cos B sin A sin B sin C + cos A cos C sin A sin B cos C − cos A sin C 0
− sin B cos B sin C cos B cos C 0
0 0 0 1
Examples:
CNC G1 X100 Y120 ;This is a comment
CNC G1 X100 (X-coordinate) Y120
CNC ; This is a comment as own CNC step
(This is also a comment as own CNC-step)
A step suppression is marked with the backslash „/“ and is valid during the total runtime of
the program. The step suppression can be compared with “invalid steps“ in RSV
programs, beginning with a „\“).
Examples:
CNC /G1 X100 Y120
\CNC G1 X110 Y120
Execution of the command will be suppressed in both cases.
Comman Description
d
Axxx Cartesian orientation angle A or absolute angle of axis 6.
xxx indicates the angle in the unit degree.
CNC_Programmierung_2100 03/08 gb 15
RSV-IPC GENERAL
CNC_Programmierung_2100 03/08 gb 16
RSV-IPC GENERAL
From RSV-version 21.0 on the above described CNC-commands can be defined anew
(exchanged) on the operating panel by means of the system variable _SCNC_ALIAS(1)
[26].
The system variable _SCNC_ALIAS is an array with 26 elements the array index
corresponding to the ordinal number of the command letter used in the program. The
contents of the selected array element is the command letter used in the RSV.
The example given below demonstrates how to replace the command for the subprogram
call, i.e.,the letter Q will be replaced by the letter L.
CNC_Programmierung_2100 03/08 gb 17
RSV-IPC GENERAL
In case only array element no. 12 is modified, as shown in the example, the two
commands Q<Name> and L<Name> have the same effect. In both cases the subprogram
<Name> is called. In case this should not be requested, the contents of
_SCNC_ALIAS[17] also has to be changed (e.g. invalidate with a blank).
During the run-up phase of index 1 to 26 the system variable array is initialized with the
letters "A" to "Z", i.e. Alias = RSV-internal command. Redefinition may be done e.g. in the
macro AUTOEXEC or with AUTO-Start in the start program.
8 Application Software
MAC "M6"
I T S_TOOL
I ENDDEF
C
LOK_VAR Name:S_TOOL(40)
LOK_VAR Name:S_tmp(40)
LOK_VAR Name:IRes
C
C
PTP_VELOC [%]:100
PTP_ACCEL [%]:100
PATH_VELOC [mm/s]:200.0000
PATH_ACCEL [%]:100
C
CNC_Programmierung_2100 03/08 gb 18
RSV-IPC GENERAL
CNC_Programmierung_2100 03/08 gb 19
RSV-IPC GENERAL
MAC "S"
I T R_Speed -200000.0 200000.0
I ENDDEF
C
LOC_VAR Name:R_Speed
F _RANA_OUT[1] = 10.0 / 20000.0 * R_Speed
END
9.1 Introduction
CNC_Programmierung_2100 03/08 gb 20
RSV-IPC ALLGEMEIN
CNC_Programmierung_2100 03/08 gb 21
RSV-IPC ALLGEMEIN
CNC_Programmierung_2100 03/08 gb 22
RSV-IPC GENERAL
10 Appendix
not applicable
CNC_Programmierung_2100 0308 gb 23