- Posts: 721
- Thank you received: 0
SpindleHub hal component to manage spindle enable near speed etc
- smc.collins
- Topic Author
- Offline
- Platinum Member
-
Less
More
3 years 9 months ago #262902
by smc.collins
I needed this as some of my custom hal components need spindle enable and disable and sharing the iocontrol pins isn't always a option. You can pipe your iocontrol for spindle here and hub it out to upto 5 hal components. Also has Estop feature to shut the spindle down. it handles spindle enable, spindle brake, estop, spindle at speed "with a tolerance input" etc. hope it helps somebody. Code is given as is, no warranty yada yada yada, may kill you might not etc. updated 1 -28-2023, changed the tolerance scheme from absolute value to percentage of spindle commanded versus actual for spindle at speed calculation. Oversight on my part not thinking about super low spindle speeds and a large error tolerance.FYI I am using this component in my main hal file to reduce and uncomplicate the hal file pin naming. ymmv. in fact I have been moving most of my hal components into my main hal file.updated and removed previous comp file.
Please Log in to join the conversation.
3 years 9 months ago #263098
by andypugh
Replied by andypugh on topic SpindleHub hal component to manage spindle enable near speed etc
You can share a single HAL output pin with as many input pins as needed. There is no need for any extra handling.
etc.
Each signal can only have one output pin, but can have as many inputs as needed.
Code:
net some_signal output_1
net some_signal input_1 input_2 input_3
net some_signal input_4
net some_signal input_5
Each signal can only have one output pin, but can have as many inputs as needed.
Please Log in to join the conversation.
- smc.collins
- Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 721
- Thank you received: 0
3 years 8 months ago #263561
by smc.collins
Replied by smc.collins on topic SpindleHub hal component to manage spindle enable near speed etc
added fabs to arguments and math.h to handle inverse numbers for spindle speed, oversight on my part found some wierd math issues with CCW operation of the spindle. updated 2-1-2023
Please Log in to join the conversation.
- smc.collins
- Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 721
- Thank you received: 0
3 years 6 months ago #268828
by smc.collins
Replied by smc.collins on topic SpindleHub hal component to manage spindle enable near speed etc
I'm adding C axis pass through / management to this hal component, I'm going to start testing soon, anyone interested in testing ???
Please Log in to join the conversation.
Time to create page: 0.081 seconds
