Hello Guest it is May 01, 2025, 06:46:17 AM

Author Topic: Counters increase during gcode path generation  (Read 2772 times)

0 Members and 1 Guest are viewing this topic.

Counters increase during gcode path generation
« on: January 15, 2025, 09:49:20 AM »
I create a macro for running the program needed and its work fine.
Now i'm turning it more difficult and insert some counters to run subprograms in a certain time.
The problem i'm facing is this:

- When I Post G-code (macro button) and the Mach3 start generating the Code, those counters starts. And i just need them to count while programs are running.

Can you please give me tips for this?

Thanks
Re: Counters increase during gcode path generation
« Reply #1 on: January 15, 2025, 12:02:17 PM »
Ok I found (using a StartCycle Led) that when Post GCode is generated the Start Button is On that's why the counters start counting.

Now i used a Flood (fake) Led to distinguished when GCode is generated from Cycle is running and the counts works fine. But i'm using the Flood(fake) Button for that...if i forget to turn on this button, the program run and doesnt count besides that if i want to real use Flood i have the button already in use for condition.

Is possible to create more Buttons like OEMButton with the Led for check?

Offline TPS

*
  •  2,574 2,574
Re: Counters increase during gcode path generation
« Reply #2 on: January 16, 2025, 07:55:53 AM »
check Mach3_V3.x_Macro_Prog_Ref.pdf for:

IsLoading()
IsMoving()
IsStopped()

those functions should "help" to get your counters working correctly.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.