Mesa 7i92 pwm (hal startup) SOLVED

More
6 years 6 months ago #162724 by Dorro1971
Hi folks

I'm a bit of a noob with linuxcnc and it shows!

I'm running 2.8 with a mesa 7i92H

but I have my 2 axis lathe kind of operational everything now works exept pwm for the spindle speed.

I have flashed my 7i92 with 7i92_DMMBOB1x2D.bit which should allow 2 pwm channels....

I have added this to my hal code

setp hm2_7i92.0.pwmgen.pwm_frequency 400
setp hm2_7i92.0.pwmgen.00.scale 24000
setp hm2_7i92.0.pwmgen.00.out0.invert_output True
setp hm2_7i92.0.pwmgen.pdm_frequency 6000000
setp hm2_7i92.0.watchdog.timeout_ns 10000000
net spindle-speed-cmd spindle.0.speed-out => hm2_7i92.0.pwmgen.00.value
net spindle-on spindle.0.on => hm2_7i92.0.pwmgen.00.enable

At start up i get "signal spindle speed out is already connected"


Is there a simple way to set a static pwm value?..to test is functionality?..

And...can anyone spoon feed me a bit of code to connect the pwm to desired spindle speed..?

I have looked around, and found the above code....

Many thanks..I'm knda new somif there's anything else I need to do or incluse then please forgive me....

Dorro

Please Log in to join the conversation.

More
6 years 6 months ago #162732 by PCW
Replied by PCW on topic Mesa 7i92 pwm (hal startup)
What the error means is that you already have
hm2_7i92.0.pwmgen.00.value connected to another signal
(the signal is the first token after the net command)

Can you post your complete hal file here?

If hm2_7i92.0.pwmgen.00.value is connected to the actual spindle speed in hal
you can test by using MDI commands to set the spindle speed, say:

M3 S12000

if hm2_7i92.0.pwmgen.00.value is not connected to anything you can simply
setp hm2_7i92.0.pwmgen.00.value 12000

Please Log in to join the conversation.

More
6 years 6 months ago #162748 by Dorro1971
Hi PCW,

Many thanks for your reply

Here's my Hal file

Attachment not found



Here's the i/o from readhmid..(it's a long file)

Attachment not found



And here is the crash report..


Attachment not found



I really appreciate your help, it's the last part of this puzzle !...
Thanks.

Please Log in to join the conversation.

More
6 years 6 months ago #162750 by Clive S
Replied by Clive S on topic Mesa 7i92 pwm (hal startup)
This is the clue: That might help.
.
Debug file information:
Note: Using POSIX realtime
./my_LinuxCNC_machine.hal:179: Pin 'spindle.0.speed-out' was already linked to signal 'spindle-speed-cmd'
2509

Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
.
This is pointing to line 179 in the hal file

.

net spindle-speed-cmd spindle.0.speed-out => hm2_7i92.0.pwmgen.00.value
net spindle-on spindle.0.on => hm2_7i92.0.pwmgen.00.enable

# ---setup spindle control signals---

net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs

Please Log in to join the conversation.

More
6 years 6 months ago #162753 by Dorro1971
Oh I think I get it..it's refernced a bit further down in hal........ I stole this bit of code from another thread..the OP said it was working for him...but Now you have translated the error code I can see.......(feel a bit silly now)..but it was late last night after a day of installing and debugging with the mesa stuff...so if I comment that line out i will at least get rid of the error....

I'm just not familiar with the commands and/or the syntax of HAL...

and of course I want results NOW..lol

Thank you for that snippet

think i need glasses!

Please Log in to join the conversation.

More
6 years 6 months ago #162754 by Clive S
Replied by Clive S on topic Mesa 7i92 pwm (hal startup)
Glad it helped. I am still fumbling around as well

Please Log in to join the conversation.

More
6 years 6 months ago #162756 by Dorro1971
Hi Clive..

it's quite a steep curve isn't it?..lol

WINNER! there was another conflict woth thespindle on command..but now i understand the error code and what lne it's at i can deal with it,

All working now..very happy!...Thank you..i owe you a beer!

Please Log in to join the conversation.

More
6 years 6 months ago #162757 by Dorro1971
Any ideas how to ad [solved] to the title to save other people's time and effort?..

Please Log in to join the conversation.

More
6 years 6 months ago #162806 by tommylight
Edit the original post and add solved to the subject, above the message.
BTW, to all, do not use square brackets, they are used for reporting spam and stuff, so it causes a bit of confusion for us admins and moderators, use normal brackets, or no brackets just caps lock, like SOLVED.
Thank you.

Please Log in to join the conversation.

More
6 years 5 months ago #166451 by Dorro1971
Thank you....

Please Log in to join the conversation.

Time to create page: 0.236 seconds
Powered by Kunena Forum