Mesa 7i92 pwm (hal startup) SOLVED

More
6 years 6 months ago - 6 years 5 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
Last edit: 6 years 5 months ago by Dorro1971.

Please Log in or Create an account 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 or Create an account to join the conversation.

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

Many thanks for your reply

Here's my Hal file

File Attachment:

File Name: my_LinuxCN...hine.hal
File Size:8.2 KB


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

File Attachment:

File Name: readhmid.txt
File Size:2.36 KB


And here is the crash report..


File Attachment:

File Name: linuxcnccrash.txt
File Size:7.41 KB


I really appreciate your help, it's the last part of this puzzle !...
Thanks.
Last edit: 6 years 6 months ago by Dorro1971.

Please Log in or Create an account 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 or Create an account to join the conversation.

More
6 years 6 months ago - 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!
Last edit: 6 years 6 months ago by Dorro1971.

Please Log in or Create an account 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 or Create an account to join the conversation.

Time to create page: 0.188 seconds
Powered by Kunena Forum