Moving forward in G-code & starting from a selected block

Moderators: TomKerekes, dynomotion

Post Reply
smartmc
Posts: 7
Joined: Sat Jan 16, 2021 12:59 am

Moving forward in G-code & starting from a selected block

Post by smartmc » Wed Mar 01, 2023 11:08 pm

Hello,

Is it possible to move forward in the G-code program so as to start from a selected block.
It would be necessary that the control executes all the blocks calculation internally (without moving the axes) so as to approach the point at the end of block preceding the chosen block.
For example if work stops during thread cutting it would be possible to continue from where last machining ended.
Any input on implementation of this function is welcome.

Thanks.

User avatar
TomKerekes
Posts: 2546
Joined: Mon Dec 04, 2017 1:49 am

Re: Moving forward in G-code & starting from a selected block

Post by TomKerekes » Wed Mar 01, 2023 11:36 pm

Hi,
Is it possible to move forward in the G-code program so as to start from a selected block.
It would be necessary that the control executes all the blocks calculation internally (without moving the axes) so as to approach the point at the end of block preceding the chosen block.
Its not clear how that would work if the move to the previous block is not executed.
For example if work stops during thread cutting it would be possible to continue from where last machining ended.
Its not clear what you mean by this.

However KMotionCNC does have a Set Next Statement option by right clicking on the GCode line where you would like to start. KMotionCNC then scans backwards from that line to attempt to determine the previous position, feedrate, spindle speed, units, etc

When setting the Next Statement you may receive messages such as:

BackwardsScan.png
BackwardsScan.png (5.7 KiB) Viewed 961 times
And then when Cycle Starting you may receive a resume message with certain options as shown below:

Resume.png

Set Next Statement doesn't work with subroutines, or if a different Tool, or GCode Offset, or Plane is required to resume.
Regards,

Tom Kerekes
Dynomotion, Inc.

smartmc
Posts: 7
Joined: Sat Jan 16, 2021 12:59 am

Re: Moving forward in G-code & starting from a selected block

Post by smartmc » Fri Mar 03, 2023 3:00 am

Hi,
TomKerekes wrote:
Wed Mar 01, 2023 11:36 pm
Its not clear how that would work if the move to the previous block is not executed.
The calculations of the upstream G-code is done internally without moving the axes, then only the move of the block immediately preceding the requested start block.
smartmc wrote:
Wed Mar 01, 2023 11:08 pm
For example if work stops during thread cutting it would be possible to continue from where last machining ended.
I mean if, say thread cutting is interrupted due to power off, operator can continue starting from a selected block.

Note that I'm referring to a function in SIEMENS control called "Block Search" which I quote few lines of it's description

Block search
Function
Block search offers the possibility of starting part program execution from almost any part
program block.
This involves the NC rapidly performing an internal run through the part program (without
traversing motions) to the selected target block during block search. Here, every effort is
made to achieve to the exact same control status as would result at the target block during
normal part program execution (e.g. with respect to axis positions, spindle speeds, loaded
tools, NC/PLC interface signals, variable values) in order to be able to resume automatic part
program execution from the target block with minimum manual intervention.

Block search types
● Type 1: Block search without calculation
Block search without calculation is used to find a part program block in the quickest
possible way. No calculation of any type is performed. The control status at the target
block remains unchanged compared to the status before the start of the block search.
● Type 2: Block search with calculation at contour
Block search with calculation at contour is used to enable the programmed contour to be
approached in any situation. On NC Start, the start position of the target block or the end
position of the block before the target block is approached. This is traversed up to the end
position. Processing is true to contour.
....

User avatar
TomKerekes
Posts: 2546
Joined: Mon Dec 04, 2017 1:49 am

Re: Moving forward in G-code & starting from a selected block

Post by TomKerekes » Fri Mar 03, 2023 5:49 pm

We only have what I described.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply