List of HAL variables for spindle PID

More
05 May 2020 18:14 #166785 by paulctan
Can someone here point me to where I can find a list of the HAL variables? Specifically, where I can find spindle PID related HAL variables such as spindle-fb-rpm, spindle-vel-fb-rps, spindle-vel-cmd-rps, and any spindle PID related variables. I'm trying to troubleshoot a PID setting on a spindle, and I just need to know what to look for in halshow.

Thanks.

Paul Tan.

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

More
05 May 2020 18:39 #166787 by PCW
There is no such general list since signal names are arbitrary.

The pins that connect to signals have defined names which is why
you need to examine the hal file to determine the function of
(and proper connections) of signals

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

More
05 May 2020 18:57 #166788 by paulctan
I guess what I'm looking for then is some documentation on the code that PNCconf generate. Does something like that exist?

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

More
05 May 2020 19:17 #166790 by PCW
I don't think there is any such documentation other than the created hal file itself

For example, this is the section that scales the encoder derived
feedback speed in RPS to RPM (notice the scale factor of 60)

This says that spindle-fb-rpm is simply spindle-vel-fb-rps * 60
so if you read values that don't show this ratio, it suggests
that there is perhaps a noise or oscillation issue and those values
represent samples taken a slightly different times

# Use ACTUAL spindle velocity from spindle encoder
# spindle-velocity bounces around so we filter it with lowpass
# spindle-velocity is signed so we use absolute component to remove sign
# ACTUAL velocity is in RPS not RPM so we scale it.

setp scale.spindle.gain 60
setp lowpass.spindle.gain 1.000000
net spindle-vel-fb-rps => scale.spindle.in
net spindle-fb-rpm scale.spindle.out => abs.spindle.in
net spindle-fb-rpm-abs abs.spindle.out => lowpass.spindle.in
net spindle-fb-rpm-abs-filtered lowpass.spindle.out
The following user(s) said Thank You: tommylight

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

More
05 May 2020 22:57 #166815 by paulctan
Ok, maybe some help in understanding this part would help me:

Can someone just confirm that this part of the code in the .hal file just creates an alias variable spindle.0, where

spindle-vel-cmd-rps is linked to spindle.0.speed-out-rps
spindle-vel-cmd-rps-abs is linked to spindle.0.speed-out-rps-abs
spindle-vel-cmd-rpm is linked to spindle.0.speed-out
...
and so on.
# ---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
net spindle-enable             <=  spindle.0.on
net spindle-cw                 <=  spindle.0.forward
net spindle-ccw                <=  spindle.0.reverse
net spindle-brake              <=  spindle.0.brake
net spindle-revs               =>  spindle.0.revs
net spindle-at-speed           =>  spindle.0.at-speed
net spindle-vel-fb-rps         =>  spindle.0.speed-in
net spindle-index-enable      <=>  spindle.0.index-enable

Just needed to verify that it's actually defining the variables spindle.0.speed-out-rps, etc.

Thanks.

Paul Tan.

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

More
05 May 2020 23:41 #166820 by PCW
No, those are not variables, the spindle.0.xxxx tokens are pins
exported by motion. To get a list of motions pins take a look at
the manual page for motion:

man motion

The signals (like spindle-revs) are created (if they do no exist) by
the net commands. The signal names are arbitrary

Signals are the token that follows the net command:

net blue_wire pin_x pin_y

blue_wire is the signal, it connects the pins pin_x and pin_y
pin-x and pin_y must exist, that is they must have been exported
by a LinuxCNC component
The following user(s) said Thank You: paulctan

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

Time to create page: 0.150 seconds
Powered by Kunena Forum