Академический Документы
Профессиональный Документы
Культура Документы
1 Introduction 2
5 Parameters 19
5.1 Overview ...........................................................................................................19
5.2 Description .......................................................................................................19
1 Introduction
Motivation, function After an NC program is started, the individual NC blocks are read in con-
tinuously by an interpreter module, are converted to an internal representa-
tion and are output to the NC channel for further processing. In the NC
channel, the data is then read in by further modules (tool radius compensa-
tion, contour preparation, etc.), edited and passed through up to the inter-
polator.
The current editing of the commands in the interpolator corresponds to the
actual status of the machine, whereas the decoded commands corre-
spond to its future status.
During program decoding, parameters (e.g. external variables) are read
and, depending on them, different program sequences are possibly run
through.
Decoder block ahead is currently not limited. Thus, the time between pro-
gram influencing during decoding and program execution can be very long.
That is to say that a parameter change that has an influence on program
decoding is only noticeable to a user in execution after a considerable de-
lay.
To keep this program influencing as close as possible in time to program
execution, the decoder block ahead must be kept as short as possible, i.e.
influences on the program are relatively directly noticeable to the user.
%Main
N10 X.. Y.. Z.. G01 F2000
N20 X.. Y..
N30 $IF V.E.Param1 Time
N40 Z..
N... sequence
N200 $IF V.E.Ext_influence
N210 X..
N220 $ENDIF
N1000 M30
NC channel
DECODER
%Main
N10 X.. Y.. Z.. G01 F2000
N20 X.. Y..
N30 $IF V.E.Param1
N40 Z..
Decoding at N200 N...
N200 $IF V.E.Ext_influence
N210 X..
N220 $ENDIF
N1000 M30
N190..
%Main
N10 X.. Y.. Z.. G01 F2000
N20 X.. Y..
TOOL RADIUS COMPENSATION N30 $IF V.E.Param1
N40 Z..
Internal N...
dynamic buffer N200 $IF V.E.Ext_influence
N210 X..
N220 $ENDIF
N1000 M30 Decoder
N130..
block
ahead
%Main
N10 X.. Y.. Z.. G01 F2000
PATH PREPARATION N20 X.. Y..
N30 $IF V.E.Param1
Internal N40 Z..
dynamic buffer N...
N200 $IF V.E.Ext_influence
N210 X..
N220 $ENDIF
N30.. N1000 M30
N20..
INTERPOLATION
Internal
dynamic buffer
Interpolation %Main
N10 X.. Y.. Z.. G01 F2000
N10 X.. Y.. Z.. at N10 N20 X.. Y..
N30 $IF V.E.Param1
N40 Z..
N...
N200 $IF V.E.Ext_influence
N210 X..
N220 $ENDIF
N1000 M30
In the case of certain program runs, the user would like to specify, for ex-
ample, how far ahead of the interpolator level the decoding may be as
maximum.
Status display If decoding has reached the block ahead limit, the decoder's waiting state
is indicated by the following status bit. The status bit is cancelled when
decoding is continued.
0x00100000 BLOCK_AHEAD_LOCK_ACTIVE
The display date can be shown, for example, in the diagnostics data or via
the test user interface (ahmi.exe).
Internal sequence For every NC block output, the decoder stores the associated line number
(block count) and an associated output counter in an internal table.
During the program run, the decoder then determines the corresponding
delta of the output counters (block ahead) in the table with the (interpolator)
line number and the line number of the NC block that it is currently pro-
cessing itself.
If this delta is then greater than the defined permissible limit, the decoder
interrupts its execution and waits with continued decoding until the interpo-
lator again falls below the defined limit, i.e. has practically "caught up"
again.
NC channel
DECODER Decoding at NC program
block count = 26
001 %Main
002 V.G.MAX_NC_BLOCKS_AHEAD = 25
003 N10 X.. Y.. Z.. G01 F2000
Yes, 004 N20 X.. Y..
Ahead wait 005 N30 X.. Y..
006 N40 Z..
limiting 007 N50 Y..
delta > 25 ... Nxx..
reached? 026 N200 X.. Y..
027 N210 X..
No,
continue
N190..
N130..
PATH PREPARATION
N120.. - N40..
N30..
N20..
INTERPOLATION
Interpolation at aktive interpolated
block count = 3 N10 X.. Y.. Z..
NC block
2.1 Application
Selecting block ahead Block ahead limiting can be defined in the channel parameter list or directly
limiting in the NC program.
Activating via Global variables are available for defining and selecting limiting of decoder
NC command block ahead in the NC program.
Two (exclusive) block number limiting options are possible:
With
V.G.MAX_NC_BLOCKS_AHEAD = <value>
you define the maximum number of channel-related NC blocks (lines) by
which the decoder may be ahead of the interpolator. Channel-related NC
blocks are program lines that lead to further actions in the next NC chan-
nel, e.g. movement blocks, technological functions or switching commands.
Pure parameter calculations, blank lines and comment lines without block
number are processed at interpolator level only and are ignored on defini-
tion of the block ahead value.
With
V.G.MAX_MOTION_BLOCKS_AHEAD = <value>
you define the maximum number of pure NC motion blocks (G00, G01,
G02/03) by which the decoder may be ahead in relation to the interpolator.
All other NC program lines are ignored during definition of the block ahead
value.
As from the point where it is set, the block ahead limit is then active up to
the end of the main program M30.
Only ever one block ahead limit option may be active. The error message
P-ERR-21575 is issued if more than one option is used.
Deactivating via If the value of these V.G. variables is set to 0, limiting is deactivated again.
NC command
Programming example
%MAIN
With
max_motion_blocks_ahead <value> ( P-CHAN-00246)
you define the maximum number of NC motion blocks (G00, G01, G02/03)
by which the decoder may be ahead of the interpolator.
After the program is started, the block ahead limit is immediately active and
remains selected up to the main program end M30.
After the program is started, the block ahead limit can be modified at any
time in the NC program or can be deactivated by writing the corresponding
variable
V.G.MAX_NC_BLOCKS_AHEAD
or
V.G.MAX_MOTION_BLOCKS_AHEAD.
The value set in the channel parameter list then applies again the next time
the program is started.
Only ever one block ahead limit may be activated via the configuration. The
error message P-ERR-21575 is issued if more than one option is used.
Deactivating via No limit is active after starting of the program if these parameters are set
channel parameters equal to 0 or if they are not specified in the list.
dec_max_ahead_protected ACTIVE
Definition of In the case of time-limited block ahead limiting, the maximum permissible
limiting decoding lead is defined by specifying a time in seconds, i.e. by how many
seconds decoding may be ahead of program execution (interpolation).
In this case, only the travel time of motion blocks such as G00, G01, G02,
G03 is considered as well as the dwell time (G04,#TIME). Other time-
consuming NC functions such as M functions, etc. are not considered. In
particular no real-time influences such as override, feedhold, etc. are eval-
uated.
The travel time calculated here is based on the programmed contouring
motion. However, this can only be a rough estimate because contour and
dynamics-influencing functions such as tool radius compensation, polyno-
mial contouring, spline interpolation, override, feedhold etc. cannot be con-
sidered in the decoder. That is to say, the real contouring speed can devi-
ate considerably from the programmed contouring speed.
Restrictions:
Independent axis motions (INDP_SYN. INDP_ASYN) and the "Z"
amount of helical motions are not considered.
No consideration of override, M functions, etc.
Status display If decoding has reached the block ahead limit, the decoder's waiting state
is indicated by the following status bit. The status bit is cancelled when
decoding is continued.
0x00200000 TIME_AHEAD_LOCK_ACTIVE
The display date can be shown, for example, in the diagnostics data or via
the test user interface (ahmi.exe).
Internal sequence Calculation of the relevant travel times takes place completely in the de-
coder.
To this end, the decoder estimates a minimum execution time = path
length/speed for each (travel) block.
The decoder keeps the block count and the time required in a table for
each output travel block. With the block count indicated by the interpolator,
the time lead with respect to the travel block processed last is then deter-
mined via the table. If this delta is then greater than the defined permissible
limit, the decoder interrupts its execution and waits with continued decod-
ing until the interpolator again falls below the defined limit, i.e. has practi-
cally "caught up" again.
Block ahead limiting is active only if the interpolator's block supply (moni-
Effectiveness tored operating mode, Section 4) is ensured.
Programming example
%MAIN
% Quadrat.nc
#SLOPE [TYPE=HSC]
G133 100
V.G.MAX_TIME_AHEAD = 2 ;Seconds
G00 G90 X0 Y0
P40 = 5000
P30=100.0 (* Side length of square *)
P20 = 100 (* Number of block segments of a side length*)
P10 = P30/P20
$FOR P1=1,P20, 1
N[P1]G01 G91 XP10 FP40
$ENDFOR
G90
$FOR P1=1,P20, 1
N[P1+1000]G01 G91 YP10
$ENDFOR
G90
$FOR P1=1,P20, 1
N[P1+2000]G01 G91 X-P10
$ENDFOR
G90
$FOR P1=1,P20, 1
N[P1+3000]G01 G91 Y-P10
$ENDFOR
G90
V.G.MAX_TIME_AHEAD = 0 ;Seconds
M30
6
x 10
0.8
Sollwert 2
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1
6
Sollwert 1 x 10
Test contour
4
x 10
5
Bahngeschw.
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4
3
Takte x 10
4
x 10
5
Bahngeschw.
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4
3
Takte x 10
4
x 10
5
Bahngeschw.
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4
3
Takte x 10
Time ahead: 0.225 seconds, block supply starts pulsating, path velocity varies
4
x 10
5
Bahngeschw.
0
0 0.2 0.4 0.6 0.8 1 1.2
3
Takte x 10
Time ahead: 0.2 seconds, block supply pulsation increases, path velocity varies
4
x 10
5
Bahngeschw.
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4
3
Takte x 10
Time ahead: 0.1 seconds, block supply pulsation is very strong, path velocity varies
4
x 10
5
Bahngeschw.
0
0 0.5 1 1.5 2
3
Takte x 10
Effectiveness of block As far as possible, use of block ahead limiting must not influence the
ahead limiting programmed contouring motion in its course and its dynamics.
Priority 1: Maintaining the interpolator's block supply has top priority because this is
block supply the basic prerequisite for a stable sequence of the contouring motion.
Priority 2: Maintaining the programmed contouring speed or keeping to the path's
contouring dynamics dynamics is a further criterion. As a result of block ahead limiting, this
should not deviate too considerably from the optimum feed rate value
that is possible within the scope of the path's dynamics.
Priority 3:
Block ahead limiting attempts to keep to the programmed feed rate value
block ahead limiting
only when these two criteria are met.
Monitored
To ensure this staggered consideration, block ahead operation can take
block ahead operation
place in a monitored mode.
If the interpolator discovers that the block supply no longer suffices due
to an active block ahead limit and a stop of motion is impending, or the
programmed contouring speed can no longer be kept to within the scope
of the dynamic limits, it indicates this to the decoder in addition to the
current block count.
Then, the decoder immediately cancels any active block ahead limit to be
able to supply the channel with blocks again, even if the block ahead limit
is still exceeded.
Thus, the block ahead limit is considered or kept to only if the interpola-
tor's block supply is sufficient and the programmed path dynamics can be
kept to.
Thanks to these priorities, the supply of blocks can never be interrupted
and, consequently, the NC channel's contouring motion can never be
stopped.
Mode selection This mode is always active by default in the case of the time-related
block ahead limit.
In the case of the block-related block ahead limit, to ensure downward
compatibility the monitoring mode can be additionally activated by the
channel parameter P-CHAN-00270:
dec_max_ahead_protected NONE | ACTIVE
Limits of Although this mode ensures stable execution, user should nevertheless
monitoring make sure they do not set the block ahead limit values too low.
It values are too low, there is otherwise a risk that the block supply by the
decoder is interrupted too often and is thus requested again by the inter-
polator. Due to the buffering effect of the NC channel, this can lead to
"pulsing" of the block supply and to a highly fluctuating contouring speed
(see program example in Section 3.1).
5 Parameters
5.1 Overview
Constant Description
0x00100000 BLOCK_AHEAD_LOCK_ACTIVE status display:
Decoding in block ahead limiting. Waiting for interpolator.
ID Parameters Description
P-CHAN-00216 max_nc_blocks_ahead Block ahead limit via (relevant) number of blocks
P-CHAN-00246 max_motion_blocks_ahead Block ahead limit via number of motion blocks
P-CHAN-00269 max_time_ahead Ahead limiting via motion time
P-CHAN-00270 dec_max_ahead_protected Ahead limiting in "protected mode"
5.2 Description