[SOLVED] MPG help

More
16 Jul 2010 18:43 - 21 Jul 2010 21:53 #3367 by Pentax
[SOLVED] MPG help was created by Pentax
so I have an mpg setup up, wired, and ready to go. however, my hal file causes an error.....

the error and hal file are attatched. (had to make the hal file a .txt, just open with open office, or browser, to view...)


please help?

File Attachment:

File Name: hm2_servo.txt
File Size:10 KB
Attachments:
Last edit: 21 Jul 2010 21:53 by Pentax.

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

More
16 Jul 2010 19:47 #3368 by BigJohnT
Replied by BigJohnT on topic Re:MPG help
You have not created a thread called "base-thread" so use the servo-thread instead it will be plenty fast for a MPG.

John

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

More
16 Jul 2010 19:49 #3369 by cmorley
Replied by cmorley on topic Re:MPG help
well the error says that base-thread is not found. hm2_servo does not use a base thread it uses a servo-thread.
you are trying to read the mpg with a software encoder counter. Why not use the mesa board to read the mpg?
adding a base thread to a hostmot2 config can have some problems and changing the encoder counter to
servo thread will probably not be fast enough. (go a head and try it I would speed up the servo thread too)

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

More
16 Jul 2010 19:54 #3370 by cmorley
Replied by cmorley on topic Re:MPG help
By the way pncconf is an experimental mesa config builder that can help to add a mpg.
you could use it as is or use its files as an example of how to add a mpg to your files.
open a terminal and type 'pncconf' and press enter.
this only works in EMC 2.4 and up .

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

More
16 Jul 2010 20:26 - 21 Jul 2010 21:55 #3371 by Pentax
Replied by Pentax on topic Re:MPG help
thanks for the advice. this machine is running dapper drake, so I don't think i can run 2.4.

the mpg does nothing, but at least now EMC starts.

i don't think i understand the syntax in the mpg section. I am feeding the mpg +5 volts, and its brand new from cnc4pc, so it should function. I have it wired as single ended output ( I didn't test it on the scope, assuming it will work because its new).

With this hooked up, should the rotary switches make the axis jog selection on the GUI change? nothing happens with any of the rotary switches.

My first thought was to use the mesa board, but I wanted to see if the computer could do it.

REVISION (inserted july 21 2010) : Problem is solved and i now use the mesa board to support the mpg encoder.

thanks again for helping, more advice is appreciated.

File Attachment:

File Name: hm2_servo-...d853.txt
File Size:10 KB
Attachments:
Last edit: 21 Jul 2010 21:55 by Pentax.

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

More
16 Jul 2010 20:42 #3372 by cmorley
Replied by cmorley on topic Re:MPG help
use HAL meter to see if the jog-axis is actually set true.
and see if the encoder signals are getting to the encoder counter.
and if the jog-scale actually gets set to useable number.

I can't see anything obvious yet...

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

More
16 Jul 2010 21:33 - 16 Jul 2010 21:50 #3373 by Pentax
Replied by Pentax on topic Re:MPG help
allright, so halmeter is a great tool

i discovered that "axis.0.jog-enable" was FALSE on the button, so i switched the HAL value to ....."in_not" and now it is TRUE when the switch is at the appropriate mark....yay.

halmeter also said TRUE to mpg-A and B values. however, i couldn't get it to give me an actual count. I check the Vcc to the mpg, and it fluxuates from 4.5 to 5.1, but that should be enough to run this.....
Last edit: 16 Jul 2010 21:50 by Pentax.

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

More
16 Jul 2010 21:57 #3374 by BigJohnT
Replied by BigJohnT on topic Re:MPG help
If you can't see any counts then you need to look at the electrical part I would say unless you have the encoder component set to the wrong type...

Have you read the MPG example in the manual?

www.linuxcnc.org/docview/html//examples_mpg.html

John

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

More
16 Jul 2010 22:15 - 16 Jul 2010 22:48 #3375 by Pentax
Replied by Pentax on topic Re:MPG help
yes, i believe that is where i need to look, at the encoder. I have gained TRUE and FALSE functionality from both my axis and .1,.01,.001,.0001 rotary switch.

The option encoder.0.counter-mode is a question mark for me....should that be in my hal file? I based my file off of the example there.

ok, so i tried the different options of encoder.0.counter and nothing changes. i found a useful tool in halmeter axis.0.jog-counts that remains zero, no matter how much i turn the wheel.

I will take the wheel out on Tuesday and throw it on the scope and see if it even produces square waves. i hope its some coding error by me and not the wheel.....
Attachments:
Last edit: 16 Jul 2010 22:48 by Pentax.

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

More
16 Jul 2010 22:51 - 16 Jul 2010 22:53 #3376 by Pentax
Replied by Pentax on topic Re:MPG help
this is the final hal file in case anyone has any mods....or suggestions.

thanks a lot, your help is really appreciated.

A.

File Attachment:

File Name: hm2_servo-...3afd.txt
File Size:10 KB
Attachments:
Last edit: 16 Jul 2010 22:53 by Pentax.

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

Time to create page: 0.096 seconds
Powered by Kunena Forum