Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: BR549 on August 12, 2013, 11:49:21 PM

Title: PoppaBear Question SCott??
Post by: BR549 on August 12, 2013, 11:49:21 PM
HIYA Scott do you know of ANY indicator in the plugin side that tells you IF a G31 is running ??

Or do you know of any indicator in CB or the LEDS that does the same??

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 14, 2013, 01:45:07 AM
Terry,

see "Beta" G31 Detect plugin I just posted under finished plugins......... 
http://www.machsupport.com/forum/index.php/topic,25264.new.html#new

IT IS BETA, so let me know if it works for you, and I will declare it release.....

scott
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 14, 2013, 11:20:50 AM
HIYA SCott, It does not work here. I installed the plugin and then reloaded mach3 then set the userLED.

When I invoke a G31 it does NOT lite up the led. I tested the Userled with CB code and it works fine I can turn it on and off.

Sense you are doing the Plugin, the Function I was after was IF the Probed trips AND a G31 was NOT called then it issues a FULL STOP to mach3. It is called "protected mode" . It is to protect the probe when you are moving around getting into a position to probe. It does need to be able to be turned on and off when needed. It could be done via macro M*********x.

Thanks (;-) TP
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 14, 2013, 10:09:16 PM
Here is the condition that I am testing it:

Under config, ports/pin, the PROBE input is enabled.

The plugin is looking at the "Probing" Boolean variable in the axis structures. When you issue a G31 z-1 command via, MDI.
the Boolean DOES become true, and when true, it sets the USER LED to true, if a G31 is NOT in effect it turns off the ULED.

While it is actively probing, (the G31 is currently active), it was MY understanding that if the "Probe" input signal goes high (the probe hit something), then that ends the G31 probing cycle.........

if the above understanding is what your doing, and getting NO results....... well then, it appears that I have NO clue what variable in mach3 land is the one to show that probing is currently active.

VB Macros......  If you can do it in a macro, then why do you need a plugin?

Scott
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 15, 2013, 11:37:36 AM
One could do the turning on and OFF with a " macro". I have found NO CB indicator that tells IF mach3 is in G31 mode.

Maybe someone else could test it as well. COuld be a Vista problem here.

Thanks For the effort,

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 15, 2013, 09:22:43 PM
Scott does this work with your machine ?

(;-)TP
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 15, 2013, 09:38:39 PM
have no clue, dont have a probe, and my shoptask is down for a reconfig.
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 19, 2013, 07:07:41 PM
HIYA SCOTT,  The plugin DOES work as I found out BUT it is locked to LED2000 , No matter what you choose in the config.

I found it by creating a report that showed all the active LEDS up to 3000. Then comparing to reports WITH and WITHOUT the G31 running

If you get time to look at it could you change the function to IF the probe is tripped AND NOT in G31  to issue "STOP" to mach3.

Also we need to be able to turn it ON and OFF via a Macro perhaps monitor another LED to turn it on and off ?

Thanks for the time, (;-) TP
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 20, 2013, 11:01:13 PM
I do have a working PROTECTED MOVE mode now. IF you are not in G31 mode(probing) and the probe tip HITs an object Mach3 will STOP to protect the probe tip from damage.

This works with jogging as well.

Thanks TO Scott, (;-) TP
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 21, 2013, 07:03:59 AM
Hey Terry,

  Opps................  duh............  I forgot to tie the ULED selection to
The var for what ULED............  I will probably try and get it fixed,
Later tonight or this week.

BTW:  I will put in the functionality you requested in the message above as well.

Scott
Title:
Post by: Analias on August 21, 2013, 09:17:20 AM
Where do I get the most recent version of this script? I'm tired of bending probe tips. It's an expensive way to encourage me to be alert.

Sent from my Samsung Galaxy S4 running CyanogenMod 10.1
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 21, 2013, 02:47:24 PM
We are working on it, (;-)

(;-) TP
Title: Re: Re: PoppaBear Question SCott??
Post by: Analias on August 21, 2013, 03:08:18 PM
We are working on it, (;-)

(;-) TP

If you want another code monkey to look at it, I humbly offer another set of eyes.


Sent from my Xoom using Tapatalk 4
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 21, 2013, 03:20:33 PM
Terry, (and OTHER brave souls......)

Here is the Updated and Revised, "Probing Protection" plugin: (my last post in that plugin thread).

http://www.machsupport.com/forum/index.php/topic,25264.new.html#new

Let me know what you think,
BTW: Just a fair use caviot, if your going to use this thing when it is all debugged for money, then send me a few bucks.....
a few bucks goes along way for continued encouragement....... :)

Scott
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 21, 2013, 04:03:29 PM
HIYA SCott, the plugin does not work. It also messes with the MDI causing it NOT to be useable.

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 21, 2013, 04:25:25 PM
Scott IF you want to test the functions THERE you can emulate the Probe signal. You just have to have the LPT driver loaded for it to work.

You do not need a probe or even a machine running.

Just a thought, (;-) Tp
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 21, 2013, 09:24:15 PM
unfortunatly, that is not true for me:

1). Probing is the one signal, that cannot be emulated.
2). I am running Vista 64 bit, so, the engine ParaPort no worky eigther.

Please try the plug in a different comp........
if it still gives those same issues, I will dig.

scott
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 21, 2013, 11:00:29 PM
The probe CAN be emulated but not in 64 bit mode the lpt driver has to be running.

I'll do some more research on the problem.

Reloaded the old plugin and it works fine when I use a macro pump to drive the function.

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 22, 2013, 05:42:34 PM
ok, Terry (and others),

I got it working....... found a stupid err...........
fixed it,

here is the link: http://www.machsupport.com/forum/index.php/topic,25264.msg178763.html#msg178763

let me know what you think!

Scott
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 22, 2013, 07:02:00 PM
HIYA Scott So far testing shows it is PERFECTO. I hereby nominate you to the Mach3 plugin Hall of Fame. Which in turn awards you the title of Grand Wizard.

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 22, 2013, 07:17:39 PM
"Which in turn awards you the title of Grand Wizard. " 

*** no members of the KKK where hurt in the making of this movie"

Thanks Terry!!
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 22, 2013, 07:25:26 PM
For those that chose to USE the plugin to save a few tips  and broken probes please consider sending Scott a FIVE dollar bill as appreciation for all his hard work on this Plugin it was a bit tricky to pull off.

Especially if you are using it in a commercial application and are making money off the use.

Scott is BACK AT SCHOOL so his FREE time is very limited and he does a lot of this from the goodness of his heart.

So please consider a donation to the cause, Cause he is probably broke going back to college at HIS age (;-)


To use the plugin you need of course the PLUGIN and you need to create 2 Mcodes (macros)  1 to turn ON a UserLED() and 1 to turn it OFF. You do not have to put the Uled on screen but it makes it NICE to be able to see IF it is ON or OFF. BUT it is not really neccessary as IF in dought turn it on or off again.

I use M20 to turn it on and M21 to turn it off.

'M20 ,Macro for Protected Move ON
SetUserLed(2001,1)
End

'M21 ,Macro for Protected Move OFF
SetUserLed(2001,0)
End

Now you can use it from Gcode or from the MDI.

You can also create On Screen  Buttons to do the functions

How the Function works is When you turn on the Function the plugin is monitoring MACH3 for several things. It looks to see IF  a G31 is active. IF it is everything is normal. IF it is NOT active and then the probe is tripped MACH3 will issue a STOP command to halt motion on all axis , this will help save the Tip/Probe from damage.
It also works IF you are jogging.



(;-) TP


(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: ger21 on August 22, 2013, 07:39:20 PM
Scott, do you have a PayPal link?
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 22, 2013, 07:43:06 PM
Scott I guess I should have said  "Grand PooBa"  (circa: Fred Flintstone).

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 23, 2013, 07:30:51 AM
hehehe sure, my paypal is my email addy:  replace the "at" with "@"

poppabear"at"hughes.net

and THANKS!!
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 23, 2013, 07:31:54 AM
Speaking of the Flintstones.........   Fred called me and said, "Hey I want my Head Back"........  :)
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 23, 2013, 08:08:49 AM
Terry, (and others)....

Here is the link for the "release version" 4.0 
http://www.machsupport.com/forum/index.php/topic,25264.msg178466.html#msg178466

There has been NO change in the code from the last one, OTHER than, I changed the DLL name to: "ProbingProtection.dll".  (instead of the G31_Dectect.dll).

Also on the Config Dialog, the header was changed as above, and the version number was added.  The XML data and all other references to the above name change is also been done.

So, I you want to use the "Official" release, then disable you current G31_detect, close mach3, delete that plugin from the plugin directory. Then double click the "ProbingProtection.m3p" and it will install as usual. Then you will need to re-enable the plugin and redo your ULED choices if they are NOT the defaults.

Scott
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 23, 2013, 11:31:13 AM
The actual name in the real world would is "Protected Move Mode"

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: poppabear on August 25, 2013, 07:20:22 PM
Terry,

Here is the the RE-Release of the Probe Protected Mode plugin v. 4.1

http://www.machsupport.com/forum/index.php/topic,25264.msg178466.html#msg178466 (http://www.machsupport.com/forum/index.php/topic,25264.msg178466.html#msg178466)

Terry, also, thank you for finding that bug, it is fixed, sorry for the inconvenience it may have caused.

Please download and test this to be sure, it is working here ok.

Scott
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 25, 2013, 09:03:11 PM
HIYA Scott it seems to work ok now BUT it does not give you a status message when it trips as to it activated and stopped MACH.

Something such as "Protected Move Mode Activated, Mach3 STOPPED" Hard figure out what happen if there is no status message(;-)

Thanks Scott, (;-) TP

Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 26, 2013, 01:31:56 PM
Guys Please do not use this version it has a bug. We are trying to work it out.

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: BR549 on August 27, 2013, 10:04:21 PM
DO to another mach3 QUIRK this function cannot be made 100% dependable in all conditions .

Please do not USE.

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: rcaffin on October 04, 2013, 06:43:48 AM
> DO to another mach3 QUIRK this function cannot be made 100% dependable in all conditions .
Should that read
Due to another mach3 QUIRK Mach3 cannot be made 100% dependable in all conditions ?
:-)

Cheers
Title: Re: PoppaBear Question SCott??
Post by: BR549 on October 04, 2013, 10:24:43 AM
YES please don't do it in that instance either. (;-)

BUT actually we have it running just fine now, it took a while to work around the quirks.

NOW IF we could get the "Write to file" corrected so it did NOT write IF the G31 did not trip by the end of motion(endpoint).

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: ger21 on October 04, 2013, 02:40:00 PM
So this now works?
Title: Re: PoppaBear Question SCott??
Post by: rcaffin on October 04, 2013, 04:46:08 PM
Quote
NOW IF we could get the "Write to file" corrected so it did NOT write IF the G31 did not trip by the end of motion(endpoint).
Um ... not sure about that one. I can think of situations where having the end-of-motion data could be useful as a warning flag. I am sure that won't apply in every case though. Perhaps it needs to be an option?

Cheers
Roger
Title: Re: PoppaBear Question SCott??
Post by: BR549 on October 04, 2013, 07:33:57 PM
HIYA Roger. The problem with the "write to file" is that mach3 does NOT issue error codes when that occurs. So to the program that processes the points file it cannot tell the difference between an actual trip or an end of motion value. That leaves the points file corrupted. NO point is much better than a corrupt value as far as the point cloud is concerned.

Yes IF you are doing the write to file VIA CB you can do a compare BUT that really SLOWS the process down. and really all you would do is NOT write the value if it is the same as teh end of motion value.

Hiya GER. I will have to check with Scott to see IF he has redone the Plugin to the FIXED version. Here I use the older Plugin and a macro pump to make it all work. Scott was going to include the macro code into the plugin so it would work with all current version of MACh3.

So far I have NOT been able to fool it and I have really tried(;-).

(;-) TP

Title: Re: PoppaBear Question SCott??
Post by: rcaffin on October 04, 2013, 09:42:44 PM
Quote
The problem with the "write to file" is that mach3 does NOT issue error codes when that occurs. So to the program that processes the points file it cannot tell the difference between an actual trip or an end of motion value. That leaves the points file corrupted. NO point is much better than a corrupt value as far as the point cloud is concerned.
Could be complex, or even 'not possible'.
The ESS (for instance) logs the XYZ values within nanoseconds of the touchprobe signal (which completely ignores the delay introduced by any filter on the line!) and passes the data back to Mach. But I question whether Mach can distinguish between genuine touch-probe data and the end-of-motion values. Yes, to be sure, a design problem. But since V.043.022 manages to get confused between the touch-probe data and the START-probe values, it would seem that the code there may have some very fundamental design faults. Yes. that version of mach can write either value to the data file - and does on my machine.

I find it useful to have the data written to the file whether or not the touch-probe actually touched. I can filter out the end-of-motion data later, and that tells me when I have a problem with the scan path. If you have a multi-megabyte file of points that could be painful, but I don't probe for point clouds at present.

Quote
IF you are doing the write to file VIA CB you can do a compare BUT that really SLOWS the process down.
Yes, I am using CB for the file writing, but I hadn't noticed any speed penalty myself. I do probe slowly.

Cheers
Roger
Title: Re: PoppaBear Question SCott??
Post by: BR549 on October 05, 2013, 08:39:53 PM
HIYA Roger, With probing routines running close to 1 million hits the CB write adds HOURS to the routine by the time I am done. EVEN with my newest creepy crawler routine it does slow the process down compared to useing the Direct file write of the M40/41. BUT be cause Mach3 does not error it currupts the actual data with end of motion writes. So for now the creepy crawler is limited to the speed of the CB write. The actual probing motion CAN be very fast IF you are brave(;-). The probing actualy runs in straight Gcode (not a macro call) and so far is stone cold dependable. ONLY the file Write is done in CB.

Just a thought, (;-) TP
Title: Re: PoppaBear Question SCott??
Post by: rcaffin on October 05, 2013, 09:53:40 PM
Hi Terry

Quote
With probing routines running close to 1 million hits the CB write adds HOURS to the routine by the time I am done.
Ah - yeah, different application for sure! I use the probing to check the alignment of things on the mill table. Only a dozen or two actual probe movements. Very different.

I did manage to check the alignment of the mill table too. With a couple of layers of aluminium cooking foil inserted in the right place the surface is now square to the Z axis to within about 8 microns across the full width and front-to-back. Jig alignment stops are also square to within 10 microns, possibly less.

It may well be that a later version of Mach will handle probe data writes properly, but I am trying to hold out for Mach4 instead.

Quote
The actual probing motion CAN be very fast IF you are brave(;-).
Errr ... welll... not today.
If I bust one of my probes I just have to make another one, but I can imagine someone with a Renishaw might be a bit hesitant!

Cheers
Roger


Title: Re: PoppaBear Question SCott??
Post by: poppabear on October 06, 2013, 07:02:43 PM
Hey Terry,

Sorry, I have been buried under a bunch of Do-key.
RE-send the macro (with documentation of what it is doing in that macro, and I will integrate it with the OLD G31 detect plugin). Also remind me again, of what we where hoping to accomplish here, since I have been doing a lot of other things, and frankly don't remember what we where doing or why.....

Scott
Title: Re: PoppaBear Question SCott??
Post by: BR549 on October 06, 2013, 07:41:59 PM
I could tell you the story about the renishaw and the dent in the table and the smashed probe and the $1800 repair bill but then I would start crying again so I won't bring it up again.

Been there, have the broken parts. 

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: BR549 on October 14, 2013, 12:34:00 AM
Well just an update on the protected mode we cannot get it to work correctly via a plugin SO we have placed it in the Close but no cigar bin right over there next to file 13.

There are some funny timing issue in the plugin side that I am not familar with compared to the CB side.

It still works with a combo of plugin and macropump but it would be hard for the average OP to master I am afraid. AND i am not sure how it would work with a large macropump running

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: poppabear on October 14, 2013, 10:09:25 AM
Yeap, my suspicion is, that the macro pump runs as compiled code, and it runs in it's own thread, and probably has mutexs' or other synchronizing code to keep it in synch with M3. The plugin when running Terry's code, has no way to tie it into the Macro-pump synchronization object, so, the timing just doesn't work out correctly. At any rate, I have asked Terry to make a "How To" document to get his hybred solution of my G31 probe plugin, and his MP code, to get it to work.

Scott
Title: Re: PoppaBear Question SCott??
Post by: stirling on October 14, 2013, 11:41:22 AM
kinda missed what you guys were up to... whack this in your macropump

If Not isProbing() And isActive(DIGITIZE) then
  doOEMButton(1021) 'hit the panic tit
End If

Cheers

Ian
Title: Re: PoppaBear Question SCott??
Post by: BR549 on October 14, 2013, 05:46:00 PM
 I don't think you will be able to back off of a trip with that senario without the panic button going off it is a catch 22.

Where did you find IsProbing() ????

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: BR549 on October 14, 2013, 06:40:55 PM
I tried the IsProbing () in my macropump but it triggers ANOTHER mach3 BUG that when you call a G1 move from the MDI it tries to feedhold and you get the message "Nothing to feed hold" AND locks up the MDI. You then have to hit STOP and then you can resume.

(;-) TP
Title: IsProbing ...
Post by: rcaffin on October 14, 2013, 07:03:08 PM
The best use for Isprobing is to see when Mach4 will be released.  ;D

I suggest Mach3 is terminal, at least as far as such complex things are concerned.

Cheers
Roger
Title: Re: PoppaBear Question SCott??
Post by: BR549 on October 14, 2013, 10:34:50 PM
HIYA Roger I believe you are correcto mondo.

BUT I wonder how much base code of mach3 is in Mach4 (;-)

I do know there is NO CB, maybe

(;-) TP
Title: Re: PoppaBear Question SCott??
Post by: rcaffin on October 14, 2013, 10:54:41 PM
Quote
BUT I wonder how much base code of mach3 is in Mach4 (;-)
I do remember being told that Mach4 was a complete rewrite from scratch, using LUA rather than CB.

It was realised that the foundations of Mach3 had too many fundamental DESIGN faults which would prevent it from ever being stable under the increasingly sophisticated uses people are making of it. They even hired (I think) at least one experienced programmer for the job.

Cheers
Roger