Machsupport Forum

Third party software and hardware support forums. => Galil => Topic started by: AMorris on January 17, 2013, 11:11:33 AM

Title: Remote jog pendant again
Post by: AMorris on January 17, 2013, 11:11:33 AM
I know I have posted this topic before but I'd like to see if anyone has come up with anything new lately. Has anyone come up with a remote jog pendant for MACH with a Galil controller? I see that you cannot use the second parallel port with the Galil plugin. I can do the programming for the Galil to use the inputs for jogging but have no idea how to update the position info back to MACH or even if that can be done. Perhaps someone has discovered a way to do this. I thought it was worth asking again. It sure would be handy instead of reaching for the keyboard all the time.   Thanks, Allen
Title: Re: Remote jog pendant again
Post by: smurph on January 20, 2013, 05:49:02 PM
Allen,

If you just do a JG based on an input going high and a ST when it goes low, then you are halfway there.  An axis selector switch would be required too.  You can use 2 inputs for a 4 position switch.  0 inputs high == X, 1st input high == Y, second input high == Z. and both inputs high == A.  So, two inputs for direction and two inputs for axis selection.  The rest is Galil programming.  You could burn your controller with a #AUTO to launch the code in it's own thread.  The tricky thing would be to honor the Mach jog enable.  You don't want to jog while the machine is running g code, etc...  Basically, I think you could check to see if the desired axis is moving or in a coordinated move before jogging it.

The EASY part is Mach will get updated with the position automatically from the data record.  :)

The other thing you can do is similar to what I do.  Use the inputs to drive a brain that presses mach buttons.  I use Modbus for this, but you could do it with Galil inputs as well.

I have a panel mount axis selector, two jog direction buttons, and a jog feed rate analog pot that I simply could NOT live without.

Steve
Title: Re: Remote jog pendant again
Post by: AMorris on January 21, 2013, 08:27:54 AM
smurph,
Thanks for the info. The Galil programming is the easy part for me.
So is Mach constantly talking to Galil or do you have to run a loop to tell Mach to access the data record?

Could I see the brain you are using? I have never tried to write one and have no experience with brains(barely use my own)

Thanks,
Allen
Title: Re: Remote jog pendant again
Post by: smurph on January 21, 2013, 10:15:59 PM
Well... Mach is constantly talking to the Galil plugin which is constantly talking to the Galil.  The Galil plugin gets the data record from the Galil every 100ms.  And then it forwards all of that information to Mach.  Updating position, velocity, inputs, and outputs, etc...  So that is all automatic.  For instance, for a jog from the keyboard or the Mach screen, we just issue a Galil JG command.  And when you let off the button, we just issue a ST command.  We don't query the Galil for any information in the interim between the button press and when you release it because that is all happening behind the scene.  So the same thing will happen if your Galil code issues the JG command.

I'll post up my jog brains when I get downstairs to turn on the machine to get them.  They are based on user LEDs.  I have modbus driving the LEDs from the modbus device (Pokeys 56E) inputs and the jog brains just look at the LEDs to do the button presses, etc...  So you could use Galil inputs (regular or extended) to drive some LEDs and use the brain files pretty much unmolested.  LOL 

Steve
Title: Re: Remote jog pendant again
Post by: Keisler on January 22, 2013, 06:52:15 PM
Hi,

I am also looking for this solution for my Mach3 + Galil 1842 combo running on a TREE CNC Knee mill.   This link for a $115 PENDANT intrigues me as it states it is for MACH3. Has anyone tried it?


 (http://www.ebay.com/itm/CNC-USB-Manual-Pulse-Generator-remote-pendant-for-MACH-3-engraving-Router-/281033722182?pt=LH_DefaultDomain_0&hash=item416eea4946/url)
Title: Re: Remote jog pendant again
Post by: smurph on January 22, 2013, 07:20:22 PM
That looks to be a MPG.  I think AMorris was looking for just a jog pendant.  However, I don't believe that you will get that one working with the Gall or any other external motion controller.  The problem comes from how Mach communicates to the external controller.  It is a timed loop.  So that loop time will introduce latency for every move you make on the hand wheel.  That is why we put MPG support in the Galil plugin.  The MPGs that normally plug into a parallel port can normally be wired into Galil inputs and AUX encoders to run the MPG directly on the Galil.  No latency what so ever and it has very smooth and precise MPG movements.

I have one similar to this:  http://www.cnc4pc.com/Store/osc/product_info.php?cPath=40&products_id=162 (http://www.cnc4pc.com/Store/osc/product_info.php?cPath=40&products_id=162)  I don't remember where I got it.  But it looks the same.

It works really well.  What I did was buy a DB25 breakout board to wire it directly to the Galil.  It did use up quite a few of my inputs.  But inputs are cheap these days with Pokeys so if you run out, you can get more rather easily.  You ALWAYS wire the encoder wires to an AUX encoder (or spare axis main encoder) input on your Galil though.  Then you make up some brain files that turn on MPG jog mode, select the increment, and select the the axis to be moved via the inputs.

While that is not as simple as plugging a MPG into a USB port or a parallel port, it is really not that bad of a job.  And you will get the best MPG movement you can possibly have.

Steve
Title: Re: Remote jog pendant again
Post by: AMorris on January 23, 2013, 07:35:52 AM
Steve,
Let me make sure I understand. By going thru the Galil inputs and the brains, Mach will update the DRO's when the Galil is jogged?

Allen
Title: Re: Remote jog pendant again
Post by: Keisler on January 23, 2013, 08:24:13 AM
I would like to add a few follow on questions to Allen's:

1. The MPG MUST be connected to the Galil interconnect board, right?
2. If above is yes, then MACH3 will monitor this encoder input as part of the plugin?
3. When the TAB key is hit for the JOG pendant on screen, you will need to select the axis and resolution/speed?
4. Say you select Y axis, then when you turn the physical MPG from 1. Above it will move the axis?

How can one use one of the off the shelf usb pendants to get all of those features to work plug and play, except for the MPG which has to be wired in direct.  I like the DRO on the pendant, and would like to be able to zero the machine using the pendant.

If it is better to split my questions out to a new thread that is OK. Thank you,

Shafi
Title: Re: Remote jog pendant again
Post by: smurph on January 23, 2013, 12:53:56 PM
AMorris:

The Galil inputs and Mach brains only have an indirect relationship with the position displayed by the Mach DROs.  The Galil inputs and the brains are the mechanism by which you will drive the axes.  The position information is a function of the Galil moving the axes and updating Mach with the new locations.

If you jogged an axis though the Galil terminal while Mach was up and idling (I can do that with my Ethernet controllers but I have not tried it with a bus controller), Mach's DROs would update.  The Galil plugin always updates Mach with the position information.  The Mach DROs display actual Galil positions, not Mach calculated positions.  It is not at all like a parallel port stepper system where Mach has to keep up with the position information.  

You basically have two ways of accomplishing what you want to do:
1.  Use Galil inputs to drive Galil code to jog your axes.
2.  Use any input device to drive brains that push virtual Mach buttons and let Mach drive the axes just like if you were pressing the jog buttons on the tab screen.

Option 1 is probably more complex as you will have to figure a way to honor Mach's jog rules.  And using Galil code will require using Galil inputs.
Option 2 works like a charm and you don't have to use Galil inputs if you don't want to.  

Either way, the position info will be updated automatically.

KeislerL

1. Yes, the MPG encoder wires must be hooked to the Galil.  
2. Mach 3 doesn't monitor the encoder input with the Galil plugin.  The Galil plugin gears (slaves) the desired axis to the MPG encoder.  There is nothing Mach has to do other than sit back and enjoy the ride.
3. If you wire the axis selection and increment switch outputs of the MPG to inputs on the Galil (or some other input device), then you can make a brain file to select the axis, jog mode, and increment without having to use the tab screen.

The end goal is to be able to select the Y axis on the pendant axis selection switch, select the increment on the pendant increment switch, hold the button down to select MPG jog mode, and move the Y axis with the hand wheel.  

Mach supports 3 MPGs.  I have one on my panel (MPG1) and a remote pendant (MPG2).  I can move X with the panel encoder and Y with the pendant encoder if I so chose.  Or any other combination.  But it is important to note that the actual MPG encoder movement is not processes by Mach.  The Galil does it all.  However, Mach is used for the setup information such counts per unit of the MPG, getting the selected axis and increment, etc... That is why a brain is needed.  And the Galil plugin code honors Mach's jog rules (can't move an axis with the MPG when Mach is moving that axis).

As attractive as that USB pendant seems, I would be very wary of using it.  There is no telling if the MPG could be hacked to wire directly to the Galil encoder inputs.  But...  If you could do that, then you basically would not have to use a brain at all.  The USB connection would drive the axis selection, increment, and jog mode.  And the encoder would drive the axis.  And you would gain the rest of the functionality that the pendant offers.

The other unknown is what kind of information does the pendant stream through the USB connection?  If the encoder was disconnected from it and wired straight to the Galil, then is the pendant going to provide Mach with bogus information?  I'm not sure if it would even matter.  But that is the problem.  We just don't know.  Or will the pendant simply fault out and just refuse to work if the encoder is not wired to it?  Lots of questions here...

I guess it all depends on if you are willing to take the gamble.  If it works, it will rock.  If not, you have a paper weight.

Steve
Title: Re: Remote jog pendant again
Post by: smurph on January 23, 2013, 02:27:10 PM
Ok Allen, I finally got off my ass and fired up the machine.  :)  Here is the brain info:

In the screen shot of the brain (my X axis jog brain), you will see the OEM LEDs in the left hand column.  1125 is the positive jog direction switch and 1126 is the negative jog direction switch.  LED 1122 is lit when the axis selector switch is selecting axis X.

I used a modbus device to update the status of those LEDs.  Basically, there is another brain I used to do that.  But you could use the Galil inputs just as easily.  You would map the Galil inputs to some spare OEMTRIGGERs in ports and pins and use those instead of LEDs.  Or, if you have extended IO on your controller, you could map those inputs to LEDs.  What ever you choose will be in the left column as the brain lobe inputs. 

So to go over the logic a bit...  if the axis selector switch is in the X position, my LED 1122 is set to ON.  If I then press the jog + button on my panel, then LED 1125 is also set to on.  I then take the logical and of these two brain inputs to drive a pulse timer that "pushes" the Mach JogX-Right button.  So IF 1125 is on AND 1122 is on, push jog right.

Same thing for the left or negative jog.  Just a different LED that gets lit up when the jog - button is pressed on the panel.

The last action the brain does is test see if the direction buttons have been let off.  And it presses the Jog off X button if so.

It is important to note that to jog an axis in Mach with the brains, you have to provide the button down event to start the jog and then provide the button up event to stop the jog.  If the third action were not there, the axis would start jogging when you pressed a direction button and it would continue to jog until it hit a limit or the end of the table travel!

Also, the brains only perform an action once per state change.  So when you let off a direction button, it only runs the third action one time.  You can see this in action if you "view" the brain file in the brain control dialog.  (Operator->Brain Control).

I have three brain files.  One for each axis.  They are different only by which LEDs are processed and by which mach "buttons" are pressed.  X for X actions, Y for Y actions, etc...  The separate brain files are purely a matter of being able to see what you are doing in the brain editor.  A large brain file gets hard to read.  The brain editor leaves a lot to be desired, unfortunately.  But it does work.

I also have a brain that reads my analog Jog Feed Rate pot on the panel.  So I can adjust the jog rate without having to use the tab screen.  (See the attached pic of my panel.)

It was all a bit of a pain to setup and get working.  But...  it was well worth it.  I don't have to use the keyboard for any jog ops.  I have a button on the screen that selects the jog mode (cont, incr, or MPG) and a button that toggles the jog increment.  If I had more real estate on my panel, I could have put buttons on it for those as well.  But my screen is a touch screen, so it is almost like having a button anyway.  It is a large panel, but I put a large monitor in it.  Which is nice because I can't see the way I used to!  :)  But it did make the area for "real" buttons a bit tight.  All of the buttons got recycled from the original Yasnac controller.  I quite like the feel of the jog buttons and I wanted to keep them.  The Cycle Start and Feed Hold buttons were retained, as well as the analog spindle RPM and load gauges.  And I love having the original tool changer controls on the panel as well.  I think it turned out to be a nice combination of the "new" and the "old". 

Steve
Title: Re: Remote jog pendant again
Post by: Keisler on January 23, 2013, 03:53:00 PM
Steve,

Thanks for answering our questions, and the extra information of your integration which is really nice!

In your reply to Allen, you mention option 2 below:
"You basically have two ways of accomplishing what you want to do:
1.  Use Galil inputs to drive Galil code to jog your axes.
2.  Use any input device to drive brains that push virtual Mach buttons and let Mach drive the axes just like if you were pressing the jog buttons on the tab screen.

Option 1 is probably more complex as you will have to figure a way to honor Mach's jog rules.  And using Galil code will require using Galil inputs.
Option 2 works like a charm and you don't have to use Galil inputs if you don't want to." <end of quote>

OPTION 2 is EXACTLY what I would like to do with the $115 pendant on ebay.  The seller says he has the plug-in for MACH3 on a CD included with the purchase, so perhaps no brain file is needed.  Like you said, when you hit the TAB KEY, MACH3 is telling GALIL what to do in as much as axis selection, increment, etc.  I want to just duplicate this functionality to the pendant.

If the seller's supplied PLUGIN is no good, can I write a brain file to utilize the serial data sent? 

Thanks!

Shafi
Title: Re: Remote jog pendant again
Post by: smurph on January 23, 2013, 05:25:31 PM
Well...  Allen is only looking for jog control.  Not MPG control.  So his case is a little different.  For MPG, you about HAVE to wire it directly in to the Galil or the MPG movements will be so jerky that you will not even use it.  

But there is the possibility that you can get half way there with the USB pendant.  (as described previously)

Unless you talk to the seller of the pendant and get his protocol, you will not be able to do much with that data.  You would most likely have to write your own plugin even if you had the protocol information.  You are talking months of work to use a ~$115.00 pendant.  Or you could possibly work with the seller and see if he is willing to help out.  Any way you slice it though, you are not going to dump that pendant data directly into a brain and get anything useful.  The brains are limited by what inputs can drive it.  You will need some other layer to parse the data into a form (LEDs, DROs, etc..) that the brains can use.

Steve
Title: Re: Remote jog pendant again
Post by: Keisler on January 23, 2013, 08:58:34 PM
Steve,

I am confused.  All I want to do is jog the axes.  One at a time is fine.  So I must be misunderstanding the MPG versus JOG control.  For JOG control, will the pendant work, or am I still looking at months of programming work for a plugin?  I just want to have the basic function of what the TAB key gives you but in a pendant or operator panel. 

Please tell me what I should be looking at.  Thank you,

Shafi
Title: Re: Remote jog pendant again
Post by: smurph on January 24, 2013, 12:25:06 AM
I think that pendant only provides MPG control.  MPG is Manual Pulse Generator.  The hand wheel is just a 100 detent encoder.  Each detent is usually one pulse (or 4 in quadrature).  In combination with the increment selection, you can move the axis one detent on the hand wheel encoder to get a ratio of movement on the axis.  For example, setting your increment to .001" would mean that your axis would move .001" for every detent.  One full rotation (100 detents) would yield .100"  Setting the jog increment to .010" would move the axis .010" for every detent on the hand wheel encoder.  Or a full 1.000" per full revolution of the hand wheel.  It needs to be tightly coupled with the motion controller otherwise you will get erratic axis movement.  MPG is very different that what is provided on the tab screen.  The tab screen functionality is really just button jogging.

I took a look at the page again and I didn't see jog buttons.  It has a toggle for the jog mode (Right arrow) and a toggle for the jog increment (Left arrow).  But MPGs use those as well so it is not unusual for them to be there.  But I don't see jog buttons proper.  Maybe I'm misunderstanding the broken English on the page (which is an alarm bell for me).  But I really think that is just a fancy MPG.

Here is a video of the wireless version of that pendant: http://www.youtube.com/watch?v=hRd1zSRFp50 (http://www.youtube.com/watch?v=hRd1zSRFp50)  I saw no push button jogging.  The whole pendant seems to use the hand wheel.  Even for feed rate and spindle speed.  A neat little device!  However, it is not really going to be friendly with an external motion controller such as the Galil.  :(

http://www.ebay.com/itm/CNC-Mach3-USB-JOG-Pendant-Controller-/180687929148 (http://www.ebay.com/itm/CNC-Mach3-USB-JOG-Pendant-Controller-/180687929148)

Now that looks like a jog pendant to me.  No hand wheel.  Sans the coordinate display though.  But that one looks like it would be plug and play.  Press a button and jog away.  If you didn't want to go to the trouble of wiring up an MPG, then that is what I would suggest using.  But do your research.  Look around and find something you will be happy with.  There are lots to choose from.  Google "Mach 3 Jog Pendant"

Steve
Title: Re: Remote jog pendant again
Post by: AMorris on January 24, 2013, 08:58:26 AM
Found this today. Steve, do you think it has a chance of working in Mach and my Galil?

http://www.ebay.com/itm/CNC-4-Axis-USB-Pendant-Manual-remote-Control-JOG-encoder-for-Mach3-ONLY-/281027208825?pt=LH_DefaultDomain_0&hash=item416e86e679

Title: Re: Remote jog pendant again
Post by: smurph on January 24, 2013, 03:18:20 PM
I think it will work.  After all, it is just going to duplicate what you can do on the tab screen.  I had no idea these type of pendants existed before this thread.  Some are quite cool!  I would wonder how durable these things are.  But at that price, you can have 3 in stock! 
Title: Re: Remote jog pendant again
Post by: Keisler on January 24, 2013, 03:19:08 PM
OK, now I am understanding.  IF the product in question has a MPG wheel, then it needs to go to the GALIL INPUT board directly.  Otherwise, the non-MPG wheel product can plug right to the PC, and MACH3 and GALIL will work together.

From this seller, here is his reply to me last night:
"Hi,
i understand your worrys.
we sold hundreds of the above item.
all are working well with Mach3.
it was made by China Manuafacturer.

mach3 MPG pendant datasheet download link:
https://skydrive.live.com/redir?resid=CB363E5D4717263F!130&authkey=!ANB54coqLU3RLeg

Mach3 software download link:
https://skydrive.live.com/redir?resid=CB363E5D4717263F!131&authkey=!AE0gPlrBxJrtR2g

thanks

kevin- onlyforever702"

Perhaps we can find something that works soon.
Title: Re: Remote jog pendant again
Post by: AMorris on January 25, 2013, 07:31:05 AM
I bought one of the pendants from my link below. I guess we will see how it works.
You're right Steve, ifin it breaks they are cheap enough to have a spare or two on hand.

I'll let you know how it works.

Thanks for the help
Allen
Title: Re: Remote jog pendant again
Post by: TOTALLYRC on January 25, 2013, 06:02:52 PM
If you want a jog pendant I use a game pad from logitec and map the buttong using Keygrabber. Works like a charm. The hardest part is finding out the keyboard shorcuts. The easiest way I found was to open the standard screen set in Machscreen and look at what Mah3 is using to make things happen.

It is similar to this one

http://www.logitech.com/en-us/product/gamepad-f310?crid=713 (http://www.logitech.com/en-us/product/gamepad-f310?crid=713)

It has 16 buttons and you can have up to 4 pages of buttons via keygrabber.

Mike
Title: Re: Remote jog pendant again
Post by: AMorris on February 04, 2013, 07:33:31 AM
Well I got the pendant from China and it works great. I did not have to do anything to set it up. Plugged it in and it works. Sure makes it handy to jog the table. Jog speed adjustment works great too. Well worth the $25. I think I will make an aluminum back cover just for protection.

I also figured out how to sharpen my end mills over the weekend. I created a VB front end and a Galil program to sync the table travel and rotation of the end mill. Works great. I may start sharpening some for other people in the near future.

Allen
Title: Re: Remote jog pendant again
Post by: Keisler on February 04, 2013, 07:39:02 AM
Allen,

Thanks for posting. I was waiting to see how this purchase went for you.  I will get one of that seller's pendants also.
Please post a video of your end mill regrinding in action. I have lots of cutters needing resharpening.
Title: Re: Remote jog pendant again
Post by: smurph on February 04, 2013, 02:21:39 PM
Nice!  That sharpening proggy will be sweeeeeeeeet!
Title: Re: Remote jog pendant again
Post by: AMorris on February 05, 2013, 09:00:33 AM
Not sure if I will have time to get a vid posted as we leave Friday for a Caribbean cruise.

Played with the pendant more last night and I have to say it's perfect so far. The mouse still works at the same time.


Allen
Title: Re: Remote jog pendant again
Post by: AMorris on March 08, 2013, 08:06:24 AM
The pendant is still working fine. No problems at all except that I am going to use a better quality and heavier cable as the one with it will probably not last long. I have even done a drop test and all is well. So with that, I was wondering if anyone else bought one and how is was going for them?
Thanks,
Allen