Hello Guest it is October 06, 2024, 09:26:57 PM

Author Topic: Read out G-Code list in the top right corner of mach3  (Read 6924 times)

0 Members and 1 Guest are viewing this topic.

Read out G-Code list in the top right corner of mach3
« on: January 07, 2011, 02:58:30 AM »
Hello,

for a script i should exactly know, if g31 is active (not if the probe led is on).

I thought it could be easy to read out the active g-code list on the top right corner of mach3 where all active g codes are listet (G54 G90 G00 ......)

It seems to be a label called mode.

Do any of you have an idea how to read out the codes?

Thank you

Joachim

Offline BR549

*
  •  6,965 6,965
Re: Read out G-Code list in the top right corner of mach3
« Reply #1 on: January 07, 2011, 12:08:00 PM »
That display is an internal display of the MODAL gcodes. I don't think it will display all gcodes.

I don't think you can READ that list from VB.

Perhaps if you explain why you need to know if mach is running a G31 we can come up with something to help out.

Just a thought,(;-) TP
Re: Read out G-Code list in the top right corner of mach3
« Reply #2 on: January 08, 2011, 03:52:25 AM »
Hi TP,

i wrote a macro which is running with the macropump to protect a touchprobe against collision.

It controls permanently if the probe LED is on and if so the macro controls if the probe drives more than 0.5mm in any axis.

If the probe drives more then 0.5mm while the tip has touched the macro stops all motion with reset.

When i do g31 with g0 i sometimes have a bigger overrun than 0.5mm and the macro stops the machine what is not wanted in that case.

I only could do slower g31 probes or i tell the macro while g31 is active to do nothing...

Joachim

Offline BR549

*
  •  6,965 6,965
Re: Read out G-Code list in the top right corner of mach3
« Reply #3 on: January 08, 2011, 12:35:10 PM »
Perhaps you could use the ISMoving() to tell IF the axis is still moving after the probe trip?

Compare the state of the probe trip (led) and the trip position. Then IF the next compare to the axis position exceeds the .2mm from the trip position AND the axis ISMOVING() then Estop

I don't know of any way to KNOW if the G31 goes active(;-).

Just a thought, (;-) TP

PS:  You may want to consider doing the safety check from the BRAINS. They are more dependable and faster and take up less CPU time.

HUM NOPE that stil does not help as you still need to know IF the g31 is active.

I'll do some digging.

« Last Edit: January 08, 2011, 12:42:22 PM by BR549 »

Offline BR549

*
  •  6,965 6,965
Re: Read out G-Code list in the top right corner of mach3
« Reply #4 on: January 08, 2011, 04:20:58 PM »
I have looked and look and thunk and thunk but don't see a way to do what you want as there eis now way I see to KNOW if the G31 is running.

One thing I do see is to moniter the ProbeLed and IF it goes active AND wait a few MSec and IF the axis Ismoving () then Estop.

But looking back through a few years of notes on probing. The problem was NOT when the probed actually tripped the input and it turned on the led. IT was when the probe tripped but MACH did not see the trip because it was busy with VB stuff and then the axis drove the probe into the part thinking it had NOT tripped. (IMO)

I can say that the G31 when used in the Gcode programs is stone cold dependable. I have routines that probe for 998000 trips and it never misses a point.

BUT when you use it INSIDE the VB enviroment it requires you to constantly guard it with wait states to insure it does and sees what it is suppose to without crashing the probe.This usually makes it a very clunky stop/go process that is FAR from a smooth operation.

IF we had an indicator like you need MAYBE it could be made more fail safe.

Again (IMO), (;-)

Re: Read out G-Code list in the top right corner of mach3
« Reply #5 on: January 09, 2011, 04:00:04 AM »
Many thanks to all of you !

I am going to install a user led which is set to on if g31 is running (controled by my probing code).

So i have an indicator if g31 is running.

Thank you

Joachim