Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: jwlrymkr on July 01, 2009, 06:11:20 PM

Title: Second probe?
Post by: jwlrymkr on July 01, 2009, 06:11:20 PM
Can I add a second probe using a secondary parallel port?
The problem I am having is that one probe has to be active high (NC) and the other is active low (NO).
I also have no clue how to add this to the ports and pins; as there is only one selectable probe.??? Can I assign something else as a probe?
Thanks,
Ken
Title: Re: Second probe?
Post by: Cruiser on July 02, 2009, 12:10:30 PM
I am curious about this as well, I have both a tool probe and a part probe and would like to leave the tool probe dedicated and also have the part probe ready to go on a whim without having to change things all the time in settings. I have them both wired in to my second port, no problem. Mach has the Digitize setting, but wouldn't it be best to have some appropriate name for the tool probing to eliminate any problems with mach's innards.
Title: Re: Second probe?
Post by: vmax549 on July 02, 2009, 08:24:33 PM
IF both probes use the same format NC or NO then you can run as many as you like. THe NC would run in series and the NO would run parallel. But as a mixed batch  NO. Mach only has one probe input that I am aware of.

You could always use a relay to convert one of your probes formats.

Just a thought, (;-) TP
Title: Re: Second probe?
Post by: Cruiser on July 02, 2009, 11:11:57 PM
Parallel ! I didn't think of that ! So just run both on same pin and since they won't be used at same time ! OK ! Right now I have them on seperate pins and just use the tool probe manual, don't have a tool touch macro yet, still looking and learning on that one. In fact I'd really appreciate an easy start on that one. The threads I've seen on that so far were works in progress and sounded scary ! besides I don't understand what they are doing yet or why.
Title: Re: Second probe?
Post by: jwlrymkr on July 03, 2009, 07:57:37 AM
Thanks for the reply TP.
I was afraid of that :'( I have another NC probe on the way from Arnie now.
Title: Re: Second probe?
Post by: vmax549 on July 03, 2009, 12:25:33 PM
HIYA DON, THere are many ways it has been done. Pick your poison(method) and we can help you get it up and running.

Or at least describe how you want it to work (;-)

(;-) TP
Title: Re: Second probe?
Post by: Cruiser on July 03, 2009, 05:21:54 PM
Thanks TP
I've been giving it some thought, and started making a study of another probe cycle. What I see is that the machine it is used for has Z zero set at home switch. Mine is set with zero at spindle face kissing table top. I intend to have a pinned position for the tool probe at somewhere in the X+ extent and centered on a rib on Y. The position is not set yet. I change tools by hand and have the tormac tool system, plus I use some other R-8 tools. I have and can use a G28 position for tool chng. What I have been thinking is for a general first pass probe cycle using tool's height, and follow up with a second and real probe at reduced feed to set new height. First probe is thought to find any mistakes in tool initial setting then correct etc. I have considered making some kind of swing-out tool probe, but so far don't think I'd be able to trust it fully. My thoughts are to start somewhere and learn as I go. As mentioned, The routines so far are all set WRONG side of Zed ! As I said too, lots too learn about how VB is put together and what is what pertaining to Mach. I'm starting to make some sense the code and will start simple and grow with it !
Well, this is the plan and Yes I would really appreciate any and all help in getting me started, If I had a better code to start with I'd erase the one I'm looking at now and not miss it for sure.
Thanks

PS. I changed wires for my two probes this morning to parrallel, not tried yet, but I know it be OK !  So simple that I couldn't see it !
Title: Re: Second probe?
Post by: vmax549 on July 03, 2009, 05:35:15 PM
Probably best in your case to start from scratch.

Take a blank sheet of paper and write down IN ORDER how you think you want it to work. ONE line at a time each move or process being a new line.

NORMALLY once you have it worked out on paper HOW you  want it to work it is a simple process to code it. Then test it, debug it, tune it and you are done.(;-)

(;-) TP
Title: Re: Second probe?
Post by: Cruiser on July 03, 2009, 09:08:06 PM
I thought I'd better clear up something here, I tried the parallel with the probe but didn't think about if it was NO or NC ! parallel don't work with the Minear probe. So, It is going to be either series or separate pins and find a way around the fact of only one input for digitizing. I would imagine that there must be a way of assigning another unused input as the tool's probe and leave the digitzing input for the rest of probing or digitizing. I read somewhere that it can't be done, but I just don't buy that. It would also make sense to me that the tool's probe would be the logical choice to reassign if one were to be.
Title: Re: Second probe?
Post by: jwlrymkr on July 03, 2009, 09:22:34 PM
Don, I am also using a dedicated tool setter probe that I don't want to move, but I also want to have another spindle probe to do center/ and or edge finding. I see no reason these both cant be used on the same port since they wont be active at the same time. My problem was that I was trying to use one normally open and one normally closed probe, but if they are both the same, I don't see a problem. Someone please correct me if I am wrong.
Ken
Title: Re: Second probe?
Post by: vmax549 on July 03, 2009, 09:40:30 PM
Ken you are correct (;-)  If they are the same switch format you could have a 100 of them and they would all work but only one at a time.

DON it is NOT about having more pins for the port BUT MACH only recognises ONE input as a probe devise.

I'll see if I can find some info on the minear probe. HOw many wires does the probe have??

(;-) TP
Title: Re: Second probe?
Post by: HimyKabibble on July 04, 2009, 07:40:22 AM
Don, I am also using a dedicated tool setter probe that I don't want to move, but I also want to have another spindle probe to do center/ and or edge finding. I see no reason these both cant be used on the same port since they wont be active at the same time. My problem was that I was trying to use one normally open and one normally closed probe, but if they are both the same, I don't see a problem. Someone please correct me if I am wrong.
Ken

All you need to do is add an inverter to one of them so they'll both be the same polarity....  A single transistor would do it.

Regards,
Ray L.
Title: Re: Second probe?
Post by: Cruiser on July 04, 2009, 11:26:55 AM
Its Just that I haven't tryied it yet and am a bit concerned about the total resistance of both of these in series. I will try it tho, just takes a bit of wiring change at the port.
Title: Re: Second probe?
Post by: ticoe on July 04, 2009, 03:18:27 PM
HI there I cant get my Mach3 to to work with the arrow keys  to move the X and Y and Z.  I just installed SS board?
Title: Re: Second probe?
Post by: Cruiser on July 05, 2009, 12:17:22 AM
I tried the series connection today and it seems to work fine ! But every time I sit down to study the code for the probing routine my mind goes some where else and doesn't want to help me ! Maybe If I bribe it ?
Title: Re: Second probe?
Post by: vmax549 on July 05, 2009, 01:15:12 AM
Start with a blank piece of paper and write down what you want it to do IN the order you think it needs to be.     JUST as if you were telling it to me.

Then we work from there, (;-) TP
Title: Re: Second probe?
Post by: jwlrymkr on July 08, 2009, 02:22:23 PM
OK, got my second probe hooked up to the same pin as the first probe but...
Probe 1 wont work unless probe 2 is open at the same time and probe 2 wont work unless probe 1 is open etc..These are both NC probes.
Is there some sort of relay or something I can hook up to these to make them play nice together? :o

Ken
Title: Re: Second probe?
Post by: Cruiser on July 08, 2009, 03:14:08 PM
sounds like you got them hooked up parallel "Both to same pin" It may be you need series hookup <or> leave one to pin and other to ground then connect remaining power & ground together for a series circuit so power has to go through both units for one complete circuit.
Title: Re: Second probe?
Post by: jwlrymkr on July 08, 2009, 03:35:23 PM
Yes, had them in parallel...will try series.
I wish I knew more about electronics.
Thanks Don!
Title: Re: Second probe?
Post by: zarzul on July 10, 2009, 01:03:20 PM
Ken,

That is correct, wire them in series, that should work for you. 
If either probe opens (contact) it will be seen at the port.

Arnie 
Title: Re: Second probe?
Post by: jwlrymkr on July 10, 2009, 03:37:47 PM
Thanks guys. I have both probes working now.
Arnie, thanks for the great quality products! I received the probe camera today as well  ;D
Title: Re: Second probe?
Post by: Cruiser on July 17, 2009, 11:56:58 AM
Dag nab it, been looking for this thread for days ! finally got here !
I found a copy of another macro for tool probing and did the mod's for my machine and for the most part it works great ! with the exception of the G10 L2 P line

Tool = GetSelectedTool         'current tool
REM Context 10001
If IsSuchSignal (22) Then
code"G0g90Z" & 16.0
code"G0g90X" & 24.02 & "Y" & 1.985      'moves to above switch
code "g31 z0 f30"
While IsMoving()
Wend
code "g1g91z.1f30"
While IsMoving()
Wend
code "g31g90z0f5"
While IsMoving()
Wend
MachineZ = GetVar(2002)         'switch contact point
MachineZ = MachineZ - 2.0288      'calculates tool length offset
code "G10 L2 P" & Tool &"Z"&MachineZ   'inserts tool table
code "G43H"&Tool         'turns offset to on
code "g0g90z16.0"
end if

I get an error and I don't recall exactly but it refers to the P of the G10 L2 being out of range or something to that effect. I suspect that there is some issue with how it is implemented or worded. I read somewhere that spaces are troublesome in macro's and would also like to know if there is a rule on this and what it might be ? I have ran this and it does exactly what I want to do except it does not post the offset to the tool list and it faults out as mentioned. Any help here would be greatly appreciated.
Title: Re: Second probe?
Post by: vmax549 on July 17, 2009, 05:38:23 PM
Change the L2 to a L1

(;-) TP
Title: Re: Second probe?
Post by: Cruiser on July 17, 2009, 06:15:12 PM
Could it really be that simple ? I sure hope it is and THANK YOU VERY MUCH !
Title: Re: Second probe?
Post by: Cruiser on July 17, 2009, 06:53:21 PM
VMAX,
 I tried the change and still got an error "P value out of range with g10L1"
code "G10L1P" &Tool &"Z" &MachineZ   'inserts tool table
What I question now is the part of the line >&Tool &"Z" &MachineZ< and if it is appropriate or not, I don't know a lot about this, but I get the impression that there is too much there which throws the computation out of range. Or, shouldn't there be some definition of "P" ?
Could you define this for me to some extent ?
Thanks again !
Modify ! L1 above should read L2 ! I just went out and double checked it all ! button macro reads L1 and yet error reads L2 now I know I'm lost ! I need to learn more about these changes and how to properly find and implement them this is getting a bit out of my league (like lots & lots)
Title: Re: Second probe?
Post by: vmax549 on July 17, 2009, 07:21:46 PM
Ok take out this:


MachineZ = GetVar(2002)         'switch contact point
MachineZ = MachineZ - 2.0288      'calculates tool length offset
code "G10 L2 P" & Tool &"Z"&MachineZ   'inserts tool table


AND ADD this:

MachineZ = (GetVar(2002) - 2.0288)      
code "G10 L1 P" & Tool &"Z"&MachineZ

That part works here

Now as for the P # ofut of range that is saying that what ever you are calling for TOOL the number is greater than 255 (;-)

Change

 Tool = GetSelectedTool         'current tool

to

TOOL= GetSelectedTool()

 (;-) TP
Title: Re: Second probe?
Post by: vmax549 on July 17, 2009, 07:55:41 PM
OK lets cover another base. I don't know the full scope of your approach but here is something to think about.

You are using Getselectedtool() to get your tool #. This MAY NOT be what you think it is(;-) When you call the tools in say T6 mach loads that number into the que waiting to use it. It is not active UNTIL the M6 runs. In the Fanuc way of thinking working with tool changers the T6 can be called way ahead of time so the tool changer can get it ready to load. THen right after the M6 call that loads the tool a new number is called so it can get that tool ready.

T6   ' calls the tool to the que
code
code
code
M6  ' acutually loads the tool # in the system
T7  ' calls the next tool to the que

IF you are wanting the tool# that is currently SHOWING in the dro on the front page then you need to use

GetCurrentTool()

THat is the tool# that the M6 has called to run.


Just a thought, (;-) TP
Title: Re: Second probe?
Post by: Cruiser on July 17, 2009, 09:35:00 PM
Gee thanks VMAX,  I've very carefully edited my txt file and will take it out this evening and incorporate all of it and see what happens. I think I understand what you say about >get current tool< v/s >get selected tool< Altho I think that in the way I'm using it it may work both ways, I like what you say better and will use your sugestion !
Again Thanks very much Your knowlege and experience is greatly appreciated, I'm on new territory here but trying to learn.
Title: Re: Second probe?
Post by: Cruiser on July 17, 2009, 11:53:09 PM
Well, I'm at a total loss ! as I see it there must be some other file location that I don't know about that is now getting in the way. I made the changes as you described and I check'd dbl check'd triple check'd till I was bloody eyed and then I went over it again to make sure that everything was in order. Meaning, I used button editer, and modified the hiddenscript file that comes up just exactly as I'd done before, and it still comes back with error p value out of g12L2p range ! Why it comes up with L2 is beyond me because as I see it there is NO L2 only L1 !  It must be just messin with me and it is succeeding quite well ! I even tried to run it single step in the editer and it ran fine but still popped up that damned pesky error message again. I don't get it !
Title: Re: Second probe?
Post by: vmax549 on July 18, 2009, 01:21:59 AM
WHen you bring up the button editor and mod the code do not use the FILE SAVE just exit out and say yes to save the hiddenfile to the screenset. If you FILEsave it saves it to a file and not the screen code.

It sounds like that is what is happening, that explains why it still give the same error, it is still seeing the same code(;-)

PS: repost your code and extra set of eyes may help.

I'll do some more testing for you, (;-) TP
Title: Re: Second probe?
Post by: Cruiser on July 18, 2009, 01:52:47 AM
Thanks Vmax, I think ya hit it on the knogin there, it is exactly what I'm doing I'll just exit and yes it but what about the other file ? will it get updated too ? or matter ?
TOOL=GetCurrentTool()      'current tool
REM Context 10001
If IsSuchSignal (22) Then
code"G0G90Z" &16      'safe height
code"G0G90X" &24.02 &"Y" &1.985
code"G31G90Z0F60      'first probing
While IsMoving()
Wend
code "G1G91Z.1F60"   'clear probe
code "G31G90Z0F5"      'fine probe
While IsMoving()
Wend
MachineZ=(GetVar(2002)-2.0104)   'calc
code"G10L1P"&TOOL&"Z"&MachineZ   'post
code "G4P.1"            'dwell
code "G43H" &Tool         'offset to on
code "G0G90Z16"
code "G0G90X13Y10"
end if                 
This is my master copy I use from my flash drive so I can go from shop to house, pretty sure it is as is in machine !
Title: Re: Second probe?
Post by: vmax549 on July 18, 2009, 01:56:17 AM
What it does is saves the file to the Macro directory instead of the screenset file(;-)

I tested your basic code here and it works fine, updates the tool data(;-)

(;-0 TP
Title: Re: Second probe?
Post by: Cruiser on July 18, 2009, 02:49:36 AM
That explains a lot then as I had been trying to save it to three places so it would be safe and I didn't know where it belongs so etc ! In the morning I will simply open file and veryfy its still intact and do a close then click yes when it asks and all should be good. Right ? Geez there is a lot of stuff to learn and proceedure to get exact. It is tough to do when the information is either difficult to find or even identify if it is the right info or it comes from who knows where. I am certainly Glad you are available and willing to help !  Again Thanks for the help and I will post in A.M. if no, when ! it all works like it should !
Title: Re: Second probe?
Post by: Cruiser on July 18, 2009, 10:51:38 AM
It didn't work ! But the error message changed to reflect the acceptance of the new code edits. "Pvalue out of range with G10L1" At least I can feel a bit joyous this time that I am seeing changes in my favor and learning more needed information. After I've increased my caffeine saturation levels to a sufficient level I will go out and See if I missed something.
Title: Re: Second probe?
Post by: vmax549 on July 18, 2009, 11:06:00 AM
OK lets looks at this. What have you got loaded as far as tool#?  It may error on a tool #0 as well(;-) Tool#s  range from 1-255

Here I loaded t22 with a M6 T22 call at the MDI. "THen" I ran the macro code.

 THis gives the macro something to work with other than 0

You may want to consider apiece of code for error checking the T# values to make sure the value = >0 and <256 if it is in error then send a message to the screen and then end. Then you can correct the problem and rerun the macro.

Don't give up, (;-) TP
Title: Re: Second probe?
Post by: Cruiser on July 18, 2009, 01:06:09 PM
Good point ! I think !  I used a tool #25 which is just a solid probe quicky. It was active but I didn't MDI a m6 call. could that be the issue ? The tool shows up in all the screens as active tho, I thought that this should sufice.
adding the error checking might be a good issue to take into veriable within operation for sure. I have been pondering also adding something to insure a G53 or G54 which I deliberately always leave zero'd and rarely ever use it except for machine postition needs. And also a tool offset cancel might be appropriate too.
I'll try the m6t# in mdi and test it again, but feel it redundant if tool shows as active.
If I made a copy with another name for an M call like 666 or something and tried running it in mdi ? How can I insure not using a conflicting name ?
How about some testing angles I can try to prove what is or isn't happening ? I am out of my league and open for sugestions.
Title: Re: Second probe?
Post by: Cruiser on July 18, 2009, 03:29:20 PM
I checked macro this morning, edited my notes, saved per above, ran, saw error per "L2", check'd macro again, it says L1, ran again, L2 error, rebooted several times in between just in case and checked smore ! I am missing something important here ! Can G vs g or L vs l make a differance ? also, can I use G53 in moves with the G90 or will G53 supercede or cancel a G91 ? thought is in case of another offset messing with cycle later on down the road.
Thanks again and still hoping to solve this mystery (;>}=
Title: Re: Second probe?
Post by: vmax549 on July 18, 2009, 08:43:55 PM
I did some more testing for you today. The DRO on the screens will display the current tool# BUT they will not update the currentTool#. THe only way it happens is through the M6 t# call.

So if you want to use the value in those dros you will have to call the value from the dro instead of the parameter.

Or just use what you have. I real life you only sett the tool length AFTER you call and load the tool with the M6T# call.

I think the error of the L2 instead of L1 is a snaffoo in the error mesage used.

(;-) TP

(;-) TP
Title: Re: Second probe?
Post by: Cruiser on July 18, 2009, 11:09:19 PM
Your right on ! The errror is gone ! It works and updates ! I just have to remember to make the call in mdi before running it, Now I am happier and ready to move on to another project.
Thanks VMAX
Title: Re: Second probe?
Post by: vmax549 on July 18, 2009, 11:14:43 PM
You may be able to include the M6T# call in your code. You can also use a Question box to ASK for the tool # (;-)

I KNOW one step at a time,  Glad you got it working GOOD JOB, (;-) TP
Title: Re: Second probe?
Post by: Cruiser on July 19, 2009, 02:47:36 AM
To add a call within the code could be very advantageous in dead and I will gladly try it. Of course you know already that I don't have a clue how to implement such within the code. The code I started with was from someone else and modified for my needs, and as I told Gene of IH yesterday it will be made available for all the IH users and anything to make it more universal or user friendly I'm sure will be greatly appreciated. I would be more than happy to hear any and all idea's that will make this an indispensable tool for all with a similar setup. This is the start of my learning curve!
Again I say THANK YOU VMAX
Title: Re: Second probe?
Post by: vmax549 on July 19, 2009, 12:57:46 PM
NO Problem, I have a box full of handy macros and tools and we create more very day as ideas come in. Maybe one day when Brian gets time he can incorporate them into Mach directly as new Gcodes or Mcodes.

Let me know IF you need any help to add the tool# Question to your macro it is easy(;-)

Now when you get it working as you like (;-) We do have a place to post it . It is called the MACH TOOL BOX over in the download section. Just type in a brief description of how it works and attach the macro.  IF you look at some of the examples there you will see how it works.

GOOD JOB(;-)

(;-) TP
Title: Re: Second probe?
Post by: Cruiser on July 19, 2009, 01:13:10 PM
I'll check it out for sure. Also, If you have something I can look at and study/mimic I'd be grateful, I don't know enough to make the original invention, but I can usually adapt from another example. I prepared a rough first rendition or compilation Zip file and posted on the IH thread. I am now quite happy with how this works and at how repeatable it seems to be with my Minear probe. It seems to repeat in the .0003" range as far as I can tell, maybe closer, hard to tell yet!
Thanks again for your help and I am giving you credit for making this possible, your willing experience is greatly appreciated for sure here!