Hello Guest it is March 28, 2024, 08:12:01 AM

Author Topic: Simulating around subroutines  (Read 4028 times)

0 Members and 1 Guest are viewing this topic.

Offline Sage

*
  •  365 365
    • View Profile
Simulating around subroutines
« on: July 28, 2008, 01:01:32 PM »
hanksĀ  to Graham I now have a Gcode program to cut my Z-axis mounting plate. I've learned a lot modifying it. Ive been using MACH to simulate the program . I want to go past a large section of the code and start looking at the action further on. My problem is when I use the"Run From Here" function it always seems to zip through to analyze the program as normal but then stops at the beginning of the first subroutine as if that was the place I had indicated instead of actually down the program where I indicated to start.
 Is there a way to work around this.
 If it really needs to start at the beginning of the first subroutine in order to stay in sync, then it would be nice to have a fast foward function and a "STOP HERE" button to indicate a line where you want to stop and continue at normal speed.
 Maybe what I'm doing is better accomplished by a dedicated G-code simulator. If someone can suggest a free one it would be appreciated.

Sage
« Last Edit: July 28, 2008, 01:03:05 PM by Sage »

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Simulating around subroutines
« Reply #1 on: July 28, 2008, 01:14:28 PM »
What might be a logical place to you to start the program, is not necessarily a logical place for the computer to start the program.

It is all to do with whether or not the computer can properly work out the precise position (in machine co-ordinates) in the line.
It may be that using a subroutine necessarily denies it that function, unless it goes through the sub-routine to work out the final position.

In such circumstances I have often included a "positioning" line which doesn't mean much, because the computer is probably already there (and so ignores it), but when doing a run from here it is a place where the computer can get a finite position.

This is fairly important when you are using longs lines of GCode which only have one reference position, or have no command code (because it is global) and the computer has to back track to find the finite place it can tell what it was it was supposed to be doing.
Not me driving the engine - I'm better looking.