[SOLVED] MPG help

More
17 Jul 2010 15:39 #3393 by BigJohnT
Replied by BigJohnT on topic Re:MPG help
Looks fine to me... I think once you have some encoder counts coming in you will get it working in a hurry.

I'll wander out to the shop to see how I have my encoder hooked up on my Hardinge...

John

Please Log in or Create an account to join the conversation.

More
17 Jul 2010 15:54 #3394 by BigJohnT
Replied by BigJohnT on topic Re:MPG help
If you have a 7i33 Quad Servo Card I would connect the MPG to that. On my Hardinge I have the following connections on my 7i33 for the MPG
+5V        = 5 VOLT BUSS
ENCB3  = MPG B
GND      = 0 VOLT BUSS
ENCA3 = MPG A

Here is my Hardinge hal file.

John

File Attachment:

File Name: hardinge.txt
File Size:15 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
18 Jul 2010 05:53 - 22 Jul 2010 16:11 #3401 by Pentax
Replied by Pentax on topic Re:MPG help
thanks a lot John, I'll give it another shot when i get back on Tuesday.
Last edit: 22 Jul 2010 16:11 by Pentax.

Please Log in or Create an account to join the conversation.

More
21 Jul 2010 21:37 - 21 Jul 2010 21:52 #3448 by Pentax
Replied by Pentax on topic Re:MPG help
Success!

The thing works great. Thanks for all your help guys.

Here is a picture of the setup.

I'm still confused on the mux 4 business, and I can't get my .1, .01, .001, .0001 to do what i want... it also doesn't seem to jog with the wheel in those increments. but at least its a start.

Thanks,
A
Attachments:
Last edit: 21 Jul 2010 21:52 by Pentax.

Please Log in or Create an account to join the conversation.

More
22 Jul 2010 00:23 - 22 Jul 2010 00:27 #3449 by cmorley
Replied by cmorley on topic Re:MPG help
post your last HAL file.and we'll check out mux4.
How is your selector switch wired?

Chris M
Last edit: 22 Jul 2010 00:27 by cmorley.

Please Log in or Create an account to join the conversation.

More
22 Jul 2010 13:15 #3453 by BigJohnT
Replied by BigJohnT on topic Re:MPG help
mux4 is a two input 4 output selector switch. Depending on what inputs are "on" defines which output is "on". The outputs are configured by setting the pin value for each output. In your hal file setp is what sets a pin value.

www.linuxcnc.org/docview/html//man/man9/mux4.9.html

Kind of a computer geek description but it is all we have atm.

John

Please Log in or Create an account to join the conversation.

More
22 Jul 2010 15:58 - 22 Jul 2010 16:00 #3459 by Pentax
Replied by Pentax on topic Re:MPG help
Ok, here is the latest hal (it could use a little cleaning, sorry).

There were a couple of tricks to getting the encoder to function. I had it leaching legacy power for a universal power supply inside the box that i use for relays and general power, it fluxuated from 4.5-5.2 VDC. I switched it to the mesa power supply which puts out a reliable 4.78 VDC. I don't know if the encoder circuit on the MPG is sensitive to fluctuating power, it shouldn't be, but i did that anyway.

I changed the .ini to have four encoders instead of three, which appeared to be key. I was using the 3 axis servo example provided with the emc build on dapper drake.

And lastly, I stared at the hal file until it worked.

The mux4 is the only thing that is misbehaving. I have two switches on the unit, one three way, and a four way. The three way is fully functional and has X, Y, and off. (there is no z on this machine). The other switch is .1, .01, .001, .0001. This switch behaves oddly. I have a ground going to the pole, and four GPIO pins going to the .1, .01, .001, and .0001. Mux4 seems to accept only two pins? you can see in my hal that i attempted to have it use all four, but it failed.

Thanks again for the help guys,
A

File Attachment:

File Name: hm2_servo-...1cad.txt
File Size:11 KB
Attachments:
Last edit: 22 Jul 2010 16:00 by Pentax.

Please Log in or Create an account to join the conversation.

More
22 Jul 2010 23:22 - 22 Jul 2010 23:24 #3463 by BigJohnT
Replied by BigJohnT on topic Re:MPG help
mux4 only has two inputs and four outputs.
in0     in1     output 
off      off           0
on      off           1
off      on           2
on      on           3

so you have to wire your selector switch to produce the above inputs for the mux4 to work properly. So in position 1 you have no lines on... in position 2 you have one line one etc.

If you look again at my config you will see that I named my mux4 mpg-scale. So looking at my MPG section you can see where I set the desired values for the in's and where I connected inputs to my mux4 (named mpg-scale)

John
Last edit: 22 Jul 2010 23:24 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
22 Jul 2010 23:43 #3466 by cmorley
Replied by cmorley on topic Re:MPG help
To use your selector switch with a mux 4 you must multiplex the switch connections
Probably pretty easy using some diodes....or
If you use mux8 you could get three jog speeds with out multiplexing the switch connection.
I was gonna say mux16 (for four speeds) but that is only in the developer version yet....

Please Log in or Create an account to join the conversation.

More
03 Aug 2010 18:29 - 03 Aug 2010 18:32 #3566 by Pentax
Replied by Pentax on topic Re:MPG help
Ok, its all good. Fully functional. i have .1, .01, .001, and .0001 . Here is a copy of my final and cleaned hal file. I ended up using a 3 pole 4 position switch to get what mux4 wanted (off-off, off-on, on-off, and on-on), which is probably overkill, but it was quick and cheap to setup.

yay.

Thanks for the help.

File Attachment:

File Name: hm2_servo-...97da.txt
File Size:10 KB
Attachments:
Last edit: 03 Aug 2010 18:32 by Pentax.

Please Log in or Create an account to join the conversation.

Time to create page: 0.189 seconds
Powered by Kunena Forum