Machsupport Forum

Mach Discussion => Mach SDK plugin questions and answers. => Topic started by: Cad cam man on January 15, 2020, 09:12:34 AM

Title: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 15, 2020, 09:12:34 AM
Hello guys,
I recently purchased a mpg pendant from ebay it is the typical 4 axis jog pendant wired it does not have an enable button or a e stop all it has is the axis selector and x,y,z,a selector and the dial encoder. I have tried using every plugin , brain that I could find and nothing works . I have a hp a1140n desktop running windows xp pro with the 3.066 version of mach3 . I added a 2nd printer port and a c22 board . The problem is when mapped the keys/functions mach3 acts like it does not see the change so am I missing something or doing something wrong . Like I said I have tried every thing I can think of I have even went back and had all my wiring checked by someone else for a fresh set of eyes and it all looks right . Does anyone have any ideas on what I can do to gain control of my axis selection and my resolution selection
Title: Re: Plugin that works for Chinese mpg pendant
Post by: TPS on January 15, 2020, 09:19:45 AM
if it is hardwired to lpt2 you will not Need any plugin at all.

here:
http://www.markusmechatronics.com/Handrad_HowTo.html

is an example for a hardwired pedant.
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 16, 2020, 10:39:38 AM
if it is hardwired to lpt2 you will not Need any plugin at all.

here:
http://www.markusmechatronics.com/Handrad_HowTo.html

is an example for a hardwired pedant.

The pendent I am using is a little different than the one in this setup
1) I dont have a enable button on the side of my pendent.
2) The pendent I am using does not have an e-stop  button on it

I dont know if these differences will matter i have a c22 board but i can also plug the pendent directly into the pc as well
Title: Re: Plugin that works for Chinese mpg pendant
Post by: TPS on January 16, 2020, 12:11:42 PM
The pendent I am using is a little different than the one in this setup
1) I dont have a enable button on the side of my pendent.
2) The pendent I am using does not have an e-stop  button on it

does not matter just skip them, the pricipal is the same.
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 16, 2020, 05:46:17 PM
Pics
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 16, 2020, 05:46:58 PM
Pics
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 16, 2020, 05:47:35 PM
Pic
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 16, 2020, 05:48:17 PM
Dial
Title: Re: Plugin that works for Chinese mpg pendant
Post by: TPS on January 17, 2020, 10:25:46 AM
is there no documentation about the used wire color's?
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 17, 2020, 12:58:19 PM
Yes there is Chinenglish but the colors were all I needed and all the wires r all wires correctly I will post a pic of the instructions when I get off work I get off at 4 central time usa
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 17, 2020, 06:37:30 PM
Here is what came with the mpg pendant
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Tweakie.CNC on January 18, 2020, 02:41:33 AM
Hi Cad cam man,

It would be helpful for easy viewing if you would resize your pictures to 800 x 600 before posting. This thread refers; https://www.machsupport.com/forum/index.php?topic=24585.0

Many thanks,

Tweakie.
Title: Re: Plugin that works for Chinese mpg pendant
Post by: TPS on January 18, 2020, 03:04:25 AM
according to the example from my link wiring would be:

yellow -> Pin 3
yellow/black -> Pin 4
Brown -> Pin 5
Brown/black -> Pin 6

gray -> Pin 7
gray/black -> Pin 8
orange -> Pin 9

orange/black -> Pin 25

green -> Pin 13
White -> Pin 15
red -> Pin 10
black - Pin 24

the you can use all Settings from example

Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 18, 2020, 10:38:09 AM
@tweakie sorry I didnt know there was a preference of size picture to post .. I will be sure to resize them in the future...

@ tps.. so are you saying I should rewire my whole pendant to match the example you posted ?? The wire color does not matter as long as I know what colors go where and they all match up according to the example in reply #10
Title: Re: Plugin that works for Chinese mpg pendant
Post by: TPS on January 18, 2020, 01:07:14 PM
@ tps.. so are you saying I should rewire my whole pendant to match the example you posted ?? The wire color does not matter as long as I know what colors go where and they all match up according to the example in reply #10
for the Moment i am not able to follow you, how the pedant is wired on the PP port side??!
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 18, 2020, 03:52:31 PM
Sorry for the confusion I have the pendant wired just like the instructions that came with it as.
Red - +5v( outside source )
Black - gnd ( outside source)

Green- 2 pin ( mpg A+)
White- 3 pin ( mpg B+ )
Green&black- 1 pin ( jog on led +5v )
White&black- gnd ( jog on led gnd)
Yellow- 4 pin ( select x axis )
Yellow&black- 5 pin ( select y axis )
Brown- 6 pin ( select z axis )
Brown&black- 7pin ( select a axis )
Gray- 8pin ( x1 )
Gray&black- 9pin ( x10 )
Orange- 10pin ( x100 )
Orange&black- +5v ( com for selector )

All the other color and number not listed above are not being used and have nothing connected to them
I hope this clears it up for you
Title: Re: Plugin that works for Chinese mpg pendant
Post by: ZASto on January 18, 2020, 04:16:18 PM
GND from outside source and GND of your Parallel port should be connected or your encoder outputs will be referenced to what?
Title: Re: Plugin that works for Chinese mpg pendant
Post by: TPS on January 19, 2020, 03:57:31 AM
Green- 2 pin ( mpg A+)
White- 3 pin ( mpg B+ )
 Config -> Ports&Pins -> Encoder/MPS -> MPG1 Enabled | A-Port = 2 | A-Pin = 2 | B-Port = 2 | B-Pin = 3

Green&black- 1 pin ( jog on led +5v )
White&black- gnd ( jog on led gnd)

 this is only the led, we will take care later


Yellow- 4 pin ( select x axis )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 4
System Hotkeys -> Trigger#1 OEM Code = 259

Yellow&black- 5 pin ( select y axis )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#2 Enabled | Port = 2 | Pin = 5
System Hotkeys -> Trigger#1 OEM Code = 260

Brown- 6 pin ( select z axis )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 6
System Hotkeys -> Trigger#1 OEM Code = 261

Brown&black- 7pin ( select a axis )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 7
System Hotkeys -> Trigger#1 OEM Code = 262


Gray- 8pin ( x1 )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 8
System Hotkeys -> Trigger#1 OEM Code = 265

Gray&black- 9pin ( x10 )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 9
System Hotkeys -> Trigger#1 OEM Code = 266

Orange- 10pin ( x100 )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 10
System Hotkeys -> Trigger#1 OEM Code = 267

Orange&black- +5v ( com for selector )
 this is wrong, Needs to be connected to GND

Title: Re: Plugin that works for Chinese mpg pendant
Post by: TPS on January 19, 2020, 04:19:32 AM
and as ZASTo sayed

GND from outside source and GND of your Parallel port should be connected pin 18-25
Title: Re: Plugin that works for Chinese mpg pendant
Post by: ZASto on January 19, 2020, 05:08:33 AM
TPS, you "messed up" a bit :)

        Personal Message (Offline)

Re: Plugin that works for Chinese mpg pendant
« Reply #17 on: 19-01-2020, 10:57:31 »


Quote
Green- 2 pin ( mpg A+)
White- 3 pin ( mpg B+ )
Config -> Ports&Pins -> Encoder/MPS -> MPG1 Enabled | A-Port = 2 | A-Pin = 2 | B-Port = 2 | B-Pin = 3

Green&black- 1 pin ( jog on led +5v )
White&black- gnd ( jog on led gnd)

this is only the led, we will take care later


Yellow- 4 pin ( select x axis )
Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 4
System Hotkeys -> Trigger#1 OEM Code = 259

Yellow&black- 5 pin ( select y axis )
Config -> Ports&Pins -> Input Signal -> OEMTrigger#2 Enabled | Port = 2 | Pin = 5
System Hotkeys -> Trigger#1 OEM Code = 260

Brown- 6 pin ( select z axis )
Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 6
System Hotkeys -> Trigger#1 OEM Code = 261

Brown&black- 7pin ( select a axis )
Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 7
System Hotkeys -> Trigger#1 OEM Code = 262


Gray- 8pin ( x1 )
Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 8
System Hotkeys -> Trigger#1 OEM Code = 265

Gray&black- 9pin ( x10 )
Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 9
System Hotkeys -> Trigger#1 OEM Code = 266

Orange- 10pin ( x100 )
Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 10
System Hotkeys -> Trigger#1 OEM Code = 267

Orange&black- +5v ( com for selector )
this is wrong, Needs to be connected to GND

Same OEMTrigger on different pins :D
I know, it is a Copy/Paste common error :D :D :D
Title: Re: Plugin that works for Chinese mpg pendant
Post by: TPS on January 19, 2020, 07:50:05 AM
ok corrected Version

Green- 2 pin ( mpg A+)
White- 3 pin ( mpg B+ )
 Config -> Ports&Pins -> Encoder/MPS -> MPG1 Enabled | A-Port = 2 | A-Pin = 2 | B-Port = 2 | B-Pin = 3

Green&black- 1 pin ( jog on led +5v )
White&black- gnd ( jog on led gnd)

 this is only the led, we will take care later


Yellow- 4 pin ( select x axis )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#1 Enabled | Port = 2 | Pin = 4
System Hotkeys -> Trigger#1 OEM Code = 259

Yellow&black- 5 pin ( select y axis )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#2 Enabled | Port = 2 | Pin = 5
System Hotkeys -> Trigger#2 OEM Code = 260

Brown- 6 pin ( select z axis )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#3 Enabled | Port = 2 | Pin = 6
System Hotkeys -> Trigger#3 OEM Code = 261

Brown&black- 7pin ( select a axis )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#4 Enabled | Port = 2 | Pin = 7
System Hotkeys -> Trigger#4 OEM Code = 262


Gray- 8pin ( x1 )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#5 Enabled | Port = 2 | Pin = 8
System Hotkeys -> Trigger#5 OEM Code = 265

Gray&black- 9pin ( x10 )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#6 Enabled | Port = 2 | Pin = 9
System Hotkeys -> Trigger#6 OEM Code = 266

Orange- 10pin ( x100 )
 Config -> Ports&Pins -> Input Signal -> OEMTrigger#7 Enabled | Port = 2 | Pin = 10
System Hotkeys -> Trigger#7 OEM Code = 267

Orange&black- +5v ( com for selector )
 this is wrong, Needs to be connected to GND
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 19, 2020, 10:18:18 AM
So how do I check to see if the orange black should be gnd???
Title: Re: Plugin that works for Chinese mpg pendant
Post by: TPS on January 19, 2020, 11:26:05 AM
orange/black is the com of all Switches, and for switching Inputs at a parallel port they Need to be taken to gnd.
Title: Re: Plugin that works for Chinese mpg pendant
Post by: ZASto on January 19, 2020, 02:24:16 PM
In the attached archive is settings with brains that work on my computer.
Due to the parts that I had "on hand" OemTrigger#7 is actually a switch on low cost encoder that is used to switch Jogging On/Off.
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 19, 2020, 03:36:05 PM
Cool thanks Zasto so all I enable all brn. Files and it should work??do u agree with the orange and black ( com  wire ) should be ground?
Title: Re: Plugin that works for Chinese mpg pendant
Post by: ZASto on January 19, 2020, 03:48:58 PM
Those 2 .brn files you can copy to Autoload folder and they will be by default enabled.
ALL wires that are referenced as 0V/COM should be connected to GND pin of parallel port (pins 18..25)
L+ to pin1 of parallel port, L- to GND
LED will be lit when LED on screen whch indicates Jog ON is lit.

So:
Yellow to pin4
Yellow/Black to pin5
Brown to pin6
Gray to pin8
Gray/Black to pin9
Orange to pin10
L+ to pin1
Orange/Black + L- to pin25

You could also reconfigure ESTOP to be on LPT2 then:
Blue to ESTOP pin
Blue/Black to pin25
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 20, 2020, 10:02:44 AM
I had the orange and black wire that was labeled ( com ) going to +5v and was getting some results but the axis selector and the resolution switches were not selecting the right function. I changed the com wire to gnd like you said in the post above and got nothing ...no results at all ...so I went back to com to +5v and now the switches work but I can not get them to work right ...meaning when I select the x axis it will select it or when I select the x100 it will select it . Right now when i try to select an axis or a resolution the lights change on the diagnostic page but the jog flyout does not change
Title: Re: Plugin that works for Chinese mpg pendant
Post by: ZASto on January 20, 2020, 10:48:39 AM
Well, you will force me to make a video :(
Common wire for selector switches should be connected to LPT GND.
OEMTriggers should be LOW Active as LPT port is providing current for sensing which pin is grounded
Title: Re: Plugin that works for Chinese mpg pendant
Post by: TPS on January 20, 2020, 11:43:58 AM
small question, witch light Change on diagnostic Screen?

you are using ZASto's Brains now, all Trigger' oemcodes set to -1 in Config System hotkeys?

all plugin's  related to any mpg deleted from plugin Folder?

pls post your Profile XML.
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 22, 2020, 01:51:28 PM
update on mpg: Ok after alot of chasing the wires and matching them with the pins they go with I finally got it to work, Thanks to the one and only ZASto!!!!!! All the help from tps and Zasto I was able to finally get the mpg to finally work well done guys I thank the both of you for all the help now I can finally get the project I was working on before I got side tracked by this mpg deal any way the problem was the wires I was using and the pin numbers were not the same for some reason in windows the pin number and the wire were not synced . I was able to use the c22 bob to check what pin was active then changing it in Mach3 to make them both the same I think this is a Windows Xp issue when dealing with the pci card addon lpt2 port and the version of xp I have so any way that was what it was and Im up and running
Title: Re: Plugin that works for Chinese mpg pendant
Post by: ZASto on January 22, 2020, 02:17:46 PM
I, personally don't use mpg. Keyboard with camera and touch plate are quite enough :)
You can buy cheap USB "endoscope" camera on AliExpress. I have one permanently installed on machine and it works with Karl's camera plugin.
Edited some buttons and added some DRO's on BigTex screenset.
Defined parking position, measured offsets between camera and spindle centre, ...

When i drill my prototype PCB's, they are NEVER aligned with X or Y axis, added some buttons with appropriate VB scripts (thanks Tweakie) to calculate the system rotation, .....
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 22, 2020, 02:24:45 PM
So u use the camera to set your offsets??
Title: Re: Plugin that works for Chinese mpg pendant
Post by: ZASto on January 22, 2020, 03:44:31 PM
Yes.
I mainly work with wood and sometimes with aluminum.
All my drawings have origin at SE corner of the stock material (ie. bottom left) and Z=0 at top of the stock.
Title: Re: Plugin that works for Chinese mpg pendant
Post by: ZASto on January 22, 2020, 03:48:57 PM
Camera like this one https://www.aliexpress.com/item/32722569743.html?spm=a2g0o.productlist.0.0.24f81244W3VdXk&algo_pvid=c492cac3-ca17-435f-890e-0f8fd4b63431&algo_expid=c492cac3-ca17-435f-890e-0f8fd4b63431-3&btsid=e5e7f15d-de80-49c2-b8b2-b1927a3be991&ws_ab_test=searchweb0_0,searchweb201602_2,searchweb201603_53
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Cad cam man on January 22, 2020, 03:54:55 PM
I see ...what do your PCB's do
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Tweakie.CNC on January 23, 2020, 01:49:22 AM
It was some 8 years ago now but if anyone is interested in circuit board positioning and local system rotate the thread is here;
       https://www.machsupport.com/forum/index.php?topic=22932.msg160769#msg160769

Tweakie.
Title: Re: Plugin that works for Chinese mpg pendant
Post by: ZASto on January 23, 2020, 03:29:51 AM
Hi Tweakie,
what do you think where the math came from :)

Buttons A, B and C :D
Title: Re: Plugin that works for Chinese mpg pendant
Post by: Tweakie.CNC on January 23, 2020, 04:12:07 AM
 ;D ;D ;D

Tweakie.