Hello Guest it is April 24, 2024, 12:32:37 PM

Author Topic: Telling if the G-Code window has loaded code  (Read 1716 times)

0 Members and 1 Guest are viewing this topic.

Telling if the G-Code window has loaded code
« on: December 03, 2019, 10:10:35 PM »
So on the older machines when you loaded a g-code program into the controller the green cycle start light would actually start blinking at you to say you had code in the controller. Is there a handle to check my G-Code window to see if it is not null. Or a way to navigate to it and check it. Its location is three layers deep of tab controls|tlpGraphicMain|mbpMainTab|nob_Program_Panel|nbp_G_Code_Tab_0|. Then I could blink my button box's green button. Below is the attached layout to help with navigation.

I just stumbled upon the timer script panel and how to use it that sure made blinking my cycle start button when the feed hold button is pressed rather easy to figure out. I am using regular non-toggleable buttons and changing their images out on the timer interval as well as setting the output state for my LEDs on my button box.
Re: Telling if the G-Code window has loaded code
« Reply #1 on: December 04, 2019, 12:34:49 AM »
Hi,
this board concerns Mach3 screens rather more than Mach4....I think you'd get more views on the Mach4 General Discussion
board.

You can interogate Mach to determine the number of lines of Gcode are loaded:

Code: [Select]
LUA Syntax:
count, rc = mc.mcCntlGetGcodeLineCount(
number mInst)

If you used that in the PLC script, if count>=1 then Gcode is loaded and therefore set an LED to blink or whatever.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'