Hello Guest it is April 25, 2024, 01:31:51 AM

Author Topic: Mach4 PMC Cycle Start problem  (Read 732 times)

0 Members and 1 Guest are viewing this topic.

Mach4 PMC Cycle Start problem
« on: April 21, 2022, 11:03:55 AM »
Hello
I used an external button via the PMC for the Cycle Start command.
The button works perfectly for the cycle start of a program but does absolutely nothing for MDI.
Do you have any idea why MDI differs from the window where the program is loaded (Gcode)?

Offline jbuehn

*
  •  101 101
    • View Profile
Re: Mach4 PMC Cycle Start problem
« Reply #1 on: April 21, 2022, 12:08:19 PM »
You could look at the code behind the Cycle Start button on the screen, but it's basically calling a different API based on whether the GCode tab is active, or the MDI tab is active.

If the GCode tab is active it calls the Cycle Start API. If the MDI tab is active it calls a different API (can't remember which one off the top of my head) to run your MDI command.
Re: Mach4 PMC Cycle Start problem
« Reply #2 on: April 22, 2022, 04:35:31 AM »
Thanks for the reply.
So theoretically it would be more functional to make a script to link the external button directly to the Cycle Start button on the screen !?
However, it is strange to build a Cycle Start in PMC that does only half of what it should!

Offline jbuehn

*
  •  101 101
    • View Profile
Re: Mach4 PMC Cycle Start problem
« Reply #3 on: April 22, 2022, 01:41:57 PM »
I haven't used the PMC much so there may be a way to do it in there?

Otherwise you could use the signal library in the screen load script. When your button input goes high, call the same same CycleStart() function the screen's Cycle Start button calls...plus any other logic you may have in the PMC script.

If you're unfamiliar with the signal library stuff, there's some good info on this forum. Craig has some nice intro stuff here:
https://www.machsupport.com/forum/index.php?topic=40051.msg267764#msg267764
Re: Mach4 PMC Cycle Start problem
« Reply #4 on: April 22, 2022, 02:21:16 PM »
Hi JBUEHN
I made a script for cycle start and now it is functional for MDI as well.
It's a pity that the PMC doesn't work properly, I had another problem with it, after doing enough program lines I couldn't open it except with the new version 2.0.4612, in the old version 2.0.4300 it can't be open anymore, and honestly the new version doesn't really appeal to me, it has a lot of moodiness.
Thanks!