- Posts: 10
- Thank you received: 0
Spindle soft start delay
I've tried putting the example in the docs ( linuxcnc.org/docs/html/examples/spindle....#_spindle_soft_start ) into my custom.hal but I get the following error:
Please Log in to join the conversation.
In line 14 of your custom.hal file change the signal name to be the already-defined "spindle-cmd-rpm" and that will already have the value of "motion.spindle-speed-out" in it.
Please Log in to join the conversation.
The signal is definitely declared in the main HAL file:
Please Log in to join the conversation.
Please Log in to join the conversation.
linuxcnc.org/docs/html/examples/spindle...._0_10v_spindle_speed
Please Log in to join the conversation.
I had read through that area, but assumed that part was already handled by stepconf so skipped it. I'm getting a pwmgen.ko file exists error when I add that, so I'm guessing I need to manually do the spindle part instead of stepconf. I'll give it a try later tonight when I get another chance! Thanks
Please Log in to join the conversation.
It might help to not think of HAL as a programming language. Or, if you must, then it is most like LabView or Simulink. You are defining data paths.justinj wrote: Unfortunately not that simple. I had tried changing that already (I have a programming background in other languages so I tried to use that to debug)
but then I get an error
Code:./custom.hal:14: Pin 'spindle-cmd-rpm' does not exist
The format of a "net" command is "net signal pin [pin ....]"
The first string after the "net" is the signal name. You appear to have put the "spindle-cmd-rpm" signal in a pin "slot"
You can't allocate a signal to a different name, you can't even copy the value of one signal to another (well, not without using a unit-gain scale or similar).
Please Log in to join the conversation.
andypugh wrote:
andypugh wrote:
It might help to not think of HAL as a programming language. Or, if you must, then it is most like LabView or Simulink. You are defining data paths by defining a net-list.justinj wrote: Unfortunately not that simple. I had tried changing that already (I have a programming background in other languages so I tried to use that to debug)
but then I get an error
Code:./custom.hal:14: Pin 'spindle-cmd-rpm' does not exist
The format of a "net" command is "net signal pin [pin ....]"
The first string after the "net" is the signal name. You appear to have put the "spindle-cmd-rpm" signal in a pin "slot"
You can't allocate a signal to a different name, you can't even copy the value of one signal to another (well, not without using a unit-gain scale or similar).
That makes a bit more sense, but I still have no idea how the ramping etc. is working when there are no variables (That I can see)
I've tried all sorts of combinations with the part I missed and am still getting errors. Can anyone have a quick look and see what I'm missing? paste.ubuntu.com/25376124 & paste.ubuntu.com/25376128
Please Log in to join the conversation.
But I don't see anything connected to the out. (though that would be normal if it was to be connected to a GUI element, as the GUI isn't loaded when the normal HAL files are parsed. The GUIs themselves load a POSTGUI_HALFILE typically)
More importantly I don't see the scale function being loaded or added to a thread.
loadrt scale count=1
addf scale.0 servo-thread
Please Log in to join the conversation.
