Forward and backward on path (C7)

1.1 Forward / Backward on pathPAGEREF _Toc307387999 \h5

1.2 NC-Program 6

1.3 PLC interface 8

1.4 Known restrictions 10

1.5 Parameters 11

1.5.1 Overview 11

1.5.2 Description 11

More:

button Forward / Backward on path

button NC-Program

button PLC interface

button Known restrictions

button Parameters


Forward / Backward on path

Modes

Interfaces

The possibility to move forward or backward on path is made available by saving the prepared commands (channel blocks) and just passing the channel blocks in the requested order to be executed by the interpolator.

Following modes are possible, which can be selected through the PLC-interface:

q Normal execution:
Moving forward with M-function synchronization

q Simulated Forward on path:
Simulated moving forward with possible suppression of M-function synchronization, if specified in channel parameter list.

q Backward on path:
Moving backward with possible suppression of M-function synchronization, if specified in channel parameter list.

Following interfaces are present:

q Configuration of storage size

q Configuration of M-function synchronization in forward/backward mode

q Additional NC-program command

q Control units for backward, simulated (forward) and storage of on HLI

Figure 1-1: Interfaces of forward/backward on path

Internal sequence

Subsequent picture illustrates the internal implementation of moving forward/backward on path. All decoded NC-blocks are saved in a buffer and passed to the interpolator. If moved backward the already prepared commands are inverted and executed in opposite order.

The NC-program itself is not decoded in reverse direction!

After decoding of program all branches, conditions and loops are broken down to an linear sequence.

Within the backwardstorage this linear program can be moved in forward or backward direction. Therefore any external influence during decoding, e.g. the actual value of an external variable for break of loop condition within the NC-program, is not taken into account a second time while moving backwards.

Real time influences like feedhold, override and single block operate as normal, because their effect is considered by the interpolator at each time.

Figure 1-2:Saving backward commands and passing to interpolator on demand

Backward storage size

Example

The size of the supplied backward storage can be given by P-STUP-00033 (fb_storage_size) in the startup parameter list [STUP]. The NC checks during startup if the minimum necessary size is given. If this is not the case, a warning is issued and the memory size is set to the required minimum value. If the size is set to 0, the forward/ backward functionality is totally turned off.

The maximum size is just limit by the resources of the automation device (e.g. IPC) itself.

For the configuration of the CNC the minimum size for the backward storage is about 210 KByte. Necessary setting of the storage size in the startup list:

fb_storage_size[0] 0x200000

For the backward moving a storage size > 1 MByte should be configurated. As a general rule calculate: 1 NC-block ≈ 1KByte

Synchronization of
M-functions

By default all M-functions are executed without synchronization in backward/ forward on path mode. If synchronization is wanted, during parametrization of the synchronization type of the M-function an additional bit can be set. If this bit is set, in backward direction M-function will be synchronized always by MVS_SVS [CHAN]. In forward direction their original synchronization mode like in normal execution will be kept.

Following synchronization types for the M-functions during forward/ backward on path are necessary.

BWD_SYNCH 0x400000
FWD_SYNCH 0x800000

They must be set in addition to the other available synchronization types for M-functions in the channel parameter list (P-CHAN-00041).

Example

M2, M101 and M102 are synchronized in backward direction:

m_synch[2] 0x00400002

m_synch[101] 0x00400002

m_synch[102] 0x00400004

M103 and M104 are synchronized in simulated forward direction:

m_synch[103] 0x00800002

m_synch[104] 0x00800004

M105 is synchronized in simulated forward and backward direction:

m_synch[105] 0x00C00002


NC-Program

#OPTIONAL EXECUTION ON / OFF

Within the NC-program by the command #OPTIONAL EXECUTION a sequence of NC-blocks can be marked as able to be skipped during forward/ backward on path. The marked part is just omitted on interpolator level if forward/ backward on path is active, no recalculation of any conditions is done when the commands are omitted. Therefore any interpolator state, especially the axis positions, has to be the same after skipping some NC-commands otherwise the path, speed, acceleration would not be continuously.

%t_storag.nc

X10 Y0

N10 G91 G00 X10 F1000

N11 #OPTIONAL EXECUTION ON

N12 Z123

N13 S1000 M3

N14 Z-123

N15 M101

N16 #OPTIONAL EXECUTION OFF

N20 G90 G01 X0

N30 G02 I10

N40 G03 J10

M30

The continuous path of axis with or without omitting of blocks is checked and detected by the CNC. Any further conditions must be ensured by the user itself and are not checked by the CNC.

Nesting of multiple commands optional execution on/off is not considered.

If simulation is turned on while execution is within OPTIONAL EXECUTION ON/OFF-sequence, the omitting is automatically delayed till execution has reached OPTIONAL EXECUTION OFF. This is necessary, because the marked sequence is just allowed to omit at all or not.

Following example is not allowed, because the calculated velocity and acceleration differs at the block limits (N11 and N15) where optional execution is turned on/off, even the axis positions are continuously.

%t_storag.nc

X00 Y0

N10 G90 G01 X10 F1000

N11 #OPTIONAL EXECUTION ON (X-axis moving in)
(position direction)

N12 X20

N13 S1000 M3

N14 X10

N15 #OPTIONAL EXECUTION OFF (X-axis moving in)
(negative direction)

N20 X0

N30 G02 I10

N40 G03 J10

M30

#BACKWARD STORAGE CLEAR

By the NC-command #BACKWARD STORAGE CLEAR the actual available backward storage can be cleared explicitly. Thereby it is ensured that afterwards it can not be moved further back than up to the clearing position in the program.

%backward-storage

N000 G01 X0 F10000

N010 X100 Y123

N020 X100

N030 X200 Y10

N040 X300 Y20

N050 #BACKWARD STORAGE CLEAR

N051 #BACKWARD STORAGE CLEAR (test multiple clearing

N052 #BACKWARD STORAGE CLEAR (test multiple clearing

N060 X400 Y-20

N070 X500 Y-3

N060 #BACKWARD STORAGE CLEAR

N080 X444 Y10

N090 X333 Y3

N100 X222 Y10

N110 X111 Y3

N120 X000 Y10

N130 X-111 Y3

N140 #BACKWARD STORAGE CLEAR

N1000 M30


PLC interface

Control units

The PLC can command options of forward/backward on path via three BOOLEAN control units:

Rückwärts
Description | Command to move backwards on path.
Datatype | MC_CONTROL_BOOL_UNIT, see description Control Unit
Characteristics |
Access | PLC reads request_r + state_r ahnd writes command_w + enable_w
ST-Path | gpCh[channel_idx]^.bahn_mc_control.backward_motion pMC[channel_idx]^.addr^.MCControlBahn_Data.MCControlBoolUnit_BackwardMotion
Commanded, requested and return value
ST-Element | .command_w .request_r .state_r
Datatype | BOOL
Value range | [TRUE, FALSE]
Redirection
ST-Element | .enable_w

Simuliertes Vorwärtsfahren
Description | Command to move forwards in simulation. E.g. in this mode M-function synchronization are handled different.
Datatype | MC_CONTROL_BOOL_UNIT, see description Control Unit
Characteristics |
Access | PLC reads request_r + state_r and writes command_w + enable_w
ST-Path | gpCh[channel_idx]^.bahn_mc_control.simulate_motion pMC[channel_idx]^.addr^.MCControlBahn_Data.MCControlBoolUnit_SimulateMotion
Commanded, requested and return value
ST-Element | .command_w .request_r .state_r
Datatype | BOOL
Value range | [TRUE, FALSE]
Redirection
ST-Element | .enable_w

Reset backward storage
Description | Turns the backward storage off. No further block is saved in the backward storage.
Datatype | MC_CONTROL_BOOL_UNIT, see description Control Unit
Characteristics |
Access | PLC reads request_r + state_r and writes command_w + enable_w
ST-Path | gpCh[channel_idx]^.bahn_mc_control.backward_storage_off pMC[channel_idx]^.addr^.MCControlBahn_Data.MCControlBoolUnit_ResetBackwardStorage
Commanded, requested and return value
ST-Element | .command_w .request_r .state_r
Datatyp | BOOL
Value range | [TRUE, FALSE]
Redirection
ST-Element | .enable_w

M-Functions while
Forward/ backward on path

Use of backward storage

NC-Reset

By default the synchronization of the M-functions in mode backward on path and forward on path are suppressed. If necessary, the synchronization can be enabled by specific bits.

Using these bits, in backward direction all synchronized M-functions are handled as MVS_SVS (commanded before block and synchronized before block), in forward direction the synchronization is the original mode as given in channel parameter list.

To turn the saving of function blocks in the backward storage on or off is just allowed if no program is in execution and not backward motion is active. When turning the storage off and on again after program end, the storage is cleared. By this it is ensured, that any following backward movement can not move further back than to this point.

Additionally the backward storage is cleared in each NC-reset.


Known restrictions

q A motion with external measurement signal (G100) is just performed the first time. Any following backward/forward motion does not consider the external measurement signal again.

q It is not possible to move backwards over a homing command. Because this movement has external influence on axes movements (cam signal), which could not be reversed in backward direction. Even digital drives could manage the homing motion without CNC for themself. Therefore G74 is disabled to move backwards. Any saved previous commands are rejected.

q Manual mode without parallel interpolation (G200) and manual mode with superimposed interpolation (G201) is not treated in backward/forward mode.

q Also the motion in manual mode because of key presses and handwheel increments is not saved or reversed in backward/forward mode.

q Spindle specific commands (velocity/position) are not inverted.

q Explicit synchronization command for independent axis can not be inverted in backward direction.

q Block search at the moment is not considered.


Parameters

More:

button Overview

button Description


Overview

Constant | Description
M_FKT_ANZ | Maximum number of M functions [SYSP - Chapter 8.1]
KANAL_ANZ_RND | Maximum number of independent channels [SYSP - Chapter 2.4]

ID | Parameter | Significance
P-CHAN-00041 | m_synch[i] | Synchronisation types for M-functions
P-STUP-00033 | fb_storage_size[i] | Storage size for backward moving on path


Description

P-CHAN-00041

Synchronisation methods for M functions

Parameter

m_synch[i]

Description

The synchronisation method of the corresponding M function is defined in the array "m_synch[i]". The field index "i" defines the number of the M function. The maximum number of M functions is limited by the constant M_FKT_ANZ.

The value of P-CHAN-00041 specifies which synchronisation method the M function possesses, i.e. when a check is run for the presence of the PLC acknowledgement. A motion is not executed, or is stopped at the latest towards the end of the block, if no acknowledgement has arrived from the PLC.

Data type

UNS16

Data range

NO_SYNCH, MOS, MVS_SVS, MVS_SNS, MNS_SNS, MNE_SNS, MVS_SLM, MVS_SLP, MEP_SVS, MET_SVS

Dimension

Translatory: -

Rotatory: -

Default

NO_SYNCH

Remarks

-

P-STUP-00033

Storage size for backward on path

Parameter

fb_storage_size[i]

Description

For moving backwards on path this parameter defines the storage size in byte. The array index "i" defines the NC-channel number. The maximum number of channels is limited by the constant KANAL_ANZ_RND. The first channel is defined by index "0".

The NC checks during startup if the minimum necessary size is given. If this is not the case, a warning is issued and the memory size is set to the required minimum value. If the size is set to 0, the forward/ backward functionality is totally turned off.

The maximum size is just limited by the resources of the PC itself.

Data type

UNS32

Data range

0 ≤ P-STUP-00033 ≤ MAX(UNS32)

Dimension

Translatory: -

Rotatory: -

Default

-

Remarks

-