System hangs repeatedly with certain combinations of operations
- Jonathan_H
- Away
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 1
16 Aug 2025 23:52 #333529
by Jonathan_H
Replied by Jonathan_H on topic System hangs repeatedly with certain combinations of operations
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
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 or Create an account to join the conversation.
- Jonathan_H
- Away
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 1
17 Aug 2025 19:07 #333564
by Jonathan_H
Replied by Jonathan_H on topic System hangs repeatedly with certain combinations of operations
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 or Create an account to join the conversation.
- Jonathan_H
- Away
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 1
18 Aug 2025 00:07 #333592
by Jonathan_H
Replied by Jonathan_H on topic System hangs repeatedly with certain combinations of operations
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?
# --- 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 or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11383
- Thank you received: 3820
18 Aug 2025 07:12 #333610
by rodw
Replied by rodw on topic System hangs repeatedly with certain combinations of operations
Sometimes people use the near component so you can set a speed range that satisfies spindle.0.on
Please Log in or Create an account to join the conversation.
- Jonathan_H
- Away
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 1
18 Aug 2025 10:47 #333619
by Jonathan_H
Replied by Jonathan_H on topic System hangs repeatedly with certain combinations of operations
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.
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 or Create an account to join the conversation.
- Jonathan_H
- Away
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 1
18 Aug 2025 11:41 #333623
by Jonathan_H
Replied by Jonathan_H on topic System hangs repeatedly with certain combinations of operations
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?
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 or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 19071
- Thank you received: 5261
18 Aug 2025 14:01 - 18 Aug 2025 14:05 #333625
by PCW
Replied by PCW on topic System hangs repeatedly with certain combinations of operations
Did you "addf" the lut5 function to the servo thread?
addf lut5.0 servo-thread
addf lut5.0 servo-thread
Last edit: 18 Aug 2025 14:05 by PCW.
Please Log in or Create an account to join the conversation.
- Jonathan_H
- Away
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 1
24 Aug 2025 11:29 #333844
by Jonathan_H
Replied by Jonathan_H on topic System hangs repeatedly with certain combinations of operations
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.
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 or Create an account to join the conversation.
Time to create page: 0.064 seconds