Mesa 7i92 pwm (hal startup) SOLVED
04 Apr 2020 23:57 - 02 May 2020 23:37 #162724
by Dorro1971
Mesa 7i92 pwm (hal startup) SOLVED was created 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
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: 02 May 2020 23:37 by Dorro1971.
Please Log in or Create an account to join the conversation.
05 Apr 2020 00:46 #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
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.
05 Apr 2020 08:45 - 05 Apr 2020 08:48 #162748
by Dorro1971
Replied by Dorro1971 on topic Mesa 7i92 pwm (hal startup)
Hi PCW,
Many thanks for your reply
Here's my Hal file
Here's the i/o from readhmid..(it's a long file)
And here is the crash report..
I really appreciate your help, it's the last part of this puzzle !...
Thanks.
Many thanks for your reply
Here's my Hal file
Here's the i/o from readhmid..(it's a long file)
And here is the crash report..
I really appreciate your help, it's the last part of this puzzle !...
Thanks.
Attachments:
Last edit: 05 Apr 2020 08:48 by Dorro1971.
Please Log in or Create an account to join the conversation.
05 Apr 2020 09:35 #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
.
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.
05 Apr 2020 10:22 - 05 Apr 2020 10:27 #162753
by Dorro1971
Replied by Dorro1971 on topic Mesa 7i92 pwm (hal startup)
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!
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: 05 Apr 2020 10:27 by Dorro1971.
Please Log in or Create an account to join the conversation.
05 Apr 2020 10:25 #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.
05 Apr 2020 10:34 - 05 Apr 2020 10:34 #162756
by Dorro1971
Replied by Dorro1971 on topic Mesa 7i92 pwm (hal startup)
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!
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!
Last edit: 05 Apr 2020 10:34 by Dorro1971.
Please Log in or Create an account to join the conversation.
05 Apr 2020 10:41 #162757
by Dorro1971
Replied by Dorro1971 on topic Mesa 7i92 pwm (hal startup)
Any ideas how to ad [solved] to the title to save other people's time and effort?..
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19209
- Thank you received: 6438
05 Apr 2020 22:18 - 05 Apr 2020 22:20 #162806
by tommylight
Replied by tommylight on topic Mesa 7i92 pwm (hal startup)
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.
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.
Last edit: 05 Apr 2020 22:20 by tommylight. Reason: more info
The following user(s) said Thank You: HueyHQ
Please Log in or Create an account to join the conversation.
02 May 2020 23:37 #166451
by Dorro1971
Replied by Dorro1971 on topic Mesa 7i92 pwm (hal startup)
Thank you....
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.094 seconds