Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Davek0974 on February 14, 2014, 08:22:42 AM

Title: Modbus / MPG help...
Post by: Davek0974 on February 14, 2014, 08:22:42 AM
As a bit of entertainment I ordered a super cheap handwheel pendant off ebay to connect up to my plasma table (which is still being assembled  ;)), surprisingly it arrived today after only two weeks.

Anyway, got it set up and seems to work apart from one bit which makes no sense and i'm not sure if it's the super cheap pendant or a setting I need to tweak.

When I jog the head to where i want to start, I presumed I press the button marked "Origin" also labelled as "Start Point" in the chinglish manual and then press "Start"????

But when I press "Origin" it presses the Mach3 "To Go" button on screen and does not set start coordinates so when i press "Start" it starts at machine zero.

Is this fixable or should i stop messing about and return it for refund?
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 15, 2014, 03:27:18 AM
No ideas?
Title: Re: Modbus / MPG help...
Post by: geh7552 on February 15, 2014, 01:50:41 PM
Rule #1... Anything bought off the internet from China there is a 50/50 chance it won't work right or will work for very long.
Rule #2... Don't expect instructions that make sense or customer technical assistance.
Rule #3... Good luck getting a refund. Most of the Chinese sellers make claims to warrantee products but trying to collect on that is almost impossible.   
Rule #4... Yes, it's cheap but you get what you pay for.

Most MPG have the ability to program the function buttons and usually come with software for that purpose. Unless you have the software or instructions that make sense, you are probably out of luck.

Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 15, 2014, 02:55:39 PM
No worries, I got it off eBay so a refund is guaranteed.

I was hoping an easy fix was possible but never mind, i was doubtful it would even arrive in the first place :)

I'll try asking the supplier, should be fun :)
Title: Re: Modbus / MPG help...
Post by: mc on February 15, 2014, 03:05:00 PM
It will most likely just be a configuration issue, with the button mapped to wrong Mach function.

How is the pendant connected, and do you know how it's communicating with Mach (i.e. is it emulating a keyboard, or does it have it's own plugin, or someway else?)
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 15, 2014, 05:15:48 PM
Hi
It uses the serial port plus a USB port, I think the USB is used for power.

It uses the macro pump feature in mach for the jog wheel afik.

There is no driver and no software, couldn't even get the manual to download :) but there were so many identical clones on the net I just copied the simple setup procedure.
Title: Re: Modbus / MPG help...
Post by: mc on February 15, 2014, 05:21:25 PM
I'd guess it's using the serial modbus.

Got a link to one?
Title: Re: Modbus / MPG help...
Post by: Hood on February 15, 2014, 07:57:17 PM
Attach the macropump.
Hood
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 16, 2014, 03:33:23 AM
I'd guess it's using the serial modbus.

Got a link to one?

It's eBay item. 231030701972

Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 16, 2014, 03:34:10 AM
Attach the macropump.
Hood

It's at work, I'll do it Monday, thanks.
http://www.cnczone.com/forums/attachments/mach_mill/191332d1373222349-chinese_electronic_handwheel_mach3-macropump.m1s.txt (http://www.cnczone.com/forums/attachments/mach_mill/191332d1373222349-chinese_electronic_handwheel_mach3-macropump.m1s.txt)
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 16, 2014, 03:53:26 AM
I seem to have lost the modify post button, anyway the file in the link above is the macropump.m1s file I used.

It's here...
http://www.cnczone.com/forums/attachments/mach_mill/191332d1373222349-chinese_electronic_handwheel_mach3-macropump.m1s.txt (http://www.cnczone.com/forums/attachments/mach_mill/191332d1373222349-chinese_electronic_handwheel_mach3-macropump.m1s.txt)

I presumed they were all the same, but looking inside it maybe it can be fixed if you know what it all means :)
Title: Re: Modbus / MPG help...
Post by: Hood on February 16, 2014, 05:34:15 AM
Neither of these seem  have a ToGo button press so maybe you have a different macropump?
Hood
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 16, 2014, 06:36:44 AM
This was the exact file I used, the device came with nothing so I did a google, came up with that link and downloaded it.

Dave
Title: Re: Modbus / MPG help...
Post by: Hood on February 16, 2014, 06:54:08 AM
There is nothing in the macropump, that I can see anyway, that is calling the ToGo button (OEM 333), you sure its the ToGo button that is invoked by the Origin button? Dont even see mention of origin in the macropump either, so dont really know which button it is.


Hood
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 16, 2014, 08:45:30 AM
Yes, pressing origin just operates the to-go button in mach.

I have emailed the guy but will likely end up returning it through lack of support.
Title: Re: Modbus / MPG help...
Post by: stirling on February 16, 2014, 09:39:51 AM
I agree with Hood - there is nothing in that macropump that operates the togo button. In fact all that macropump does is set the jog modes and axis selection. Forgetting buttons for a moment - if your machine jogs when you turn the handwheel it has nothing to do with that macropump so either it's not the one that is actually running or you MUST have either a Brain or a Plugin running.

Why not post a link to what you downlaoded.
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 16, 2014, 09:55:36 AM
That WAS the file I downloaded.

All I did was turn macropump on in config, turn on modbus support, put the file in the plasma macro directory and it started working, but not quite right.
Title: Re: Modbus / MPG help...
Post by: Hood on February 16, 2014, 11:36:44 AM
Can you attach your xml please.
Hood
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 16, 2014, 04:23:42 PM
Will do so in the morning, thanks for helping.
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 17, 2014, 02:36:16 AM
Plasma.xml file attached...
Title: Re: Modbus / MPG help...
Post by: Hood on February 17, 2014, 02:55:46 AM
Ok I think I can see how they are doing it, can you load the screenset attached and see if it does as you want.
Hood
Title: Re: Modbus / MPG help...
Post by: Hood on February 17, 2014, 03:45:56 AM
Ok try this one instead, last one didnt seem to work as I expected, hopefully this one will.
Hood
Title: Re: Modbus / MPG help...
Post by: Hood on February 17, 2014, 03:50:26 AM
BTW the origin button on the pendant is actually meant to be GoToZero rather than set origin but I think you want it to be the latter. If that is the case then that is the way it should work in the above screenset, if not let me know and I can easily change it.
Hood
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 17, 2014, 04:03:50 AM
Brilliant, that zero's just how i expected it to.

However, between that update and the previous one, something has altered the jog wheel, it now whizzes the axes up and down at super-rapid speed???


Dave
Title: Re: Modbus / MPG help...
Post by: Hood on February 17, 2014, 04:17:15 AM
Ok I probably changed some of the jog settings by the tab screen, either press the buttons on the Pendant to change to the settings you want or take off of Cont Jog mode by using the Tab screen,
Hood
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 17, 2014, 04:19:02 AM
Ignore that last post, the jog speed on the screen pullout had jumped from 10 to 100, stuck it back down and we're all good to go.


Many thanks for the fix, I am most impressed with the support.

BTW what was the change ?

Dave
Title: Re: Modbus / MPG help...
Post by: Hood on February 17, 2014, 04:51:18 AM
The pendant uses a keyboard emulator so its sending keystrokes to Mach. Some of the buttons in Mach have default HotKeys set and Go To Zero is one and that is what the Origin button is actually meant to do on your Pendant. It is meant to send the Axes to work offset Zero position. That is not what you were wanting however so I modified the HotKeys for the GoToZ button and added an Origin button and assigned the HotKey to it.

The Plasma screenset however has a mix up in the HotKey assignment and instead of the GoToZ button only having the hotkey  Ctrl + O assigned the ToGo also had the same Hotkey assigned.
that is one of the reasons i personally detest hotkey setups as it is hard to work out where problems lie and can lead to all sorts of unexpected things, others however love them and once upon a time it was really the only way to get extra I/O into Mach for button presses.
Hood
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 17, 2014, 05:35:57 AM
Brilliant, thanks again
Title: Re: Modbus / MPG help...
Post by: stirling on February 17, 2014, 06:33:36 AM
Nice one Hood - how did you ascertain it uses a keyboard emulator? I assume it's using the USB for that i.e. it's emulating a USB keyboard - yes? So why's it using the macropump and modbus for a select few keys at all? i.e. why not handle them all via keyboard emulation? and what's handling the handwheel i.e. the MPG clicks?

Ian
Title: Re: Modbus / MPG help...
Post by: Hood on February 17, 2014, 07:03:16 AM
Ian, it was the only other option it could be. I looked at the xml and it was not using a Brain or a Plugin so had to be doing it some way.
I knew it wasnt the analogue inputs so only thing left I could think of was HotKeys with a keyboard emulator. and that will be why the USB is needed.

The MPG itself  is using the ModIO internal settings originally implemented for the ModIO board from  Peter Homann.
Hood
Title: Re: Modbus / MPG help...
Post by: stirling on February 17, 2014, 07:18:18 AM
Makes me wonder if the macropump is actually not being used at all. If it IS then it seems whacky to use keyboard emulation for some keys and the macropump for others - doesn't make sense.

Ian
Title: Re: Modbus / MPG help...
Post by: Hood on February 17, 2014, 08:08:01 AM
I think the ModIO is being used for the MPG so it makes sense to also use the analogue Ins for the axis select. Peter used a rotary switch with resistors soldered  between positions and that allowed him to read multiple positions on one analogue input. Mach was short of I/O back in the old days as you know and it was a way that worked well.
HotKeys I have never liked, I have used them when it was the only option but I had a real disdain for them and was glad when I could move on to real inputs.
 I think why they are using a mix is the ModIO just doesnt have enough inputs for all that is done on that pendant, could be wrong though as it has been a long long time since I looked at ModIO.

Hood

Edit
 Oh and yes the MacroPump will be needed, the ModIO interface only gets the analogue ins to Mach but something has to tell Mach what they are for, could be the macropump or a Brain but Macropump works well for things like that.
Title: Re: Modbus / MPG help...
Post by: stirling on February 17, 2014, 08:46:53 AM
OK - cheers - still seems like a dog's breakfast to me  ;D

Ian
Title: Re: Modbus / MPG help...
Post by: Davek0974 on February 17, 2014, 12:56:46 PM
I think it outlines how flexible mach is under the hood, this is a dirt-cheap pendant clone and with a minor tweak it's now working well.

Clever stuff, thanks for the assistance.
Title: Re: Modbus / MPG help...
Post by: Hood on February 17, 2014, 01:56:26 PM
Ian, I agree, it is a mixed up method but the limit of inputs via the ModIO interface likely makes them have to do it that way for the Hotkey part of things, still much preferable in my opinion than having all the buttons via Hotkeys and also no way to do MPG via HotKeys.
It would be much better if it was similar to a PoKeys with real I/O but I suppose the Chinese havent worked out how to rip off the PoKeys plugin yet ;D

Hood