System hangs repeatedly with certain combinations of operations

More
1 year 2 months ago #333529 by Jonathan_H
Thanks,
I've been looking at the hal file to remind myself what the setup is, so now I know what values to use. Given a little time I would have worked it out before leaving, but I had a bus to catch

Please Log in to join the conversation.

More
1 year 2 months ago #333564 by Jonathan_H
using spindle-enable the output of lut5.0 seemds to remain resolutely False, despite the values of the input signals being correct

Please Log in to join the conversation.

More
1 year 2 months ago #333592 by Jonathan_H
The code in my hal file is now
# --- SPINDLE-AT-SPEED ---
net ext_spindle-at-speed <= hm2_7i76e.0.7i76.0.0.input-12
setp lut5.0.function 0x0d
net spindle-enable lut5.0.in-0
net ext_spindle-at-speed lut5.0.in-1
net spindle-at-speed lut5.0.out

if I use hal meter to view the pins on lut5.0 the inputs have the expected values depending on whether the spindle is on or off and whether it is up to speed or not, but the output is always false.

What am I missing?

Please Log in to join the conversation.

More
1 year 2 months ago #333610 by rodw
Sometimes people use the near component so you can set a speed range that satisfies spindle.0.on

Please Log in to join the conversation.

More
1 year 2 months ago #333619 by Jonathan_H
Do you mean they use the near component with the actual spindle speed?

I don't have a value for that, the VFD just gives a true/false output when it is enabled and its frequency matches the requested value.

Please Log in to join the conversation.

More
1 year 2 months ago #333623 by Jonathan_H
Looking at the code of lut5 there really isn't much to it to go wrong.

So, given that probing the input pins shows the correct values, and probing the output pin shows an unchanging false output, I have to wonder if the function is just not being called for some reason.

What actually triggers the lut5 function to execute and generate a new output? Is it simply a change on the inputs, or is it perhaps thread related?

Please Log in to join the conversation.

More
1 year 2 months ago #333625 by PCW
Did you "addf" the lut5 function to the servo thread?

addf lut5.0 servo-thread

Please Log in to join the conversation.

More
1 year 2 months ago #333844 by Jonathan_H
That was it, thought I must have missed something.
Thanks
Creating the spindle-at-speed for a stopped spindle seems to have fixed the issue I was having. I added a delay because I prefer to have the spindle actually stopped (or close to) before the movement happens.
I don't see a way to make the delay time proportional to the starting speed of the spindle, so for now I've set it to five seconds.

Please Log in to join the conversation.

More
1 year 2 months ago #333866 by Jonathan_H
The VFD does have a 0-5V frequency signal output. Wondering if there's a way I could use that for the spindle-at-speed after a spindle stop. Perhaps by simply comparing it with a threshold

Please Log in to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum