OLD Lathe conversion to a CNC
- besriworld
- Offline
- Elite Member
Less
More
- Posts: 250
- Thank you received: 70
26 May 2024 15:30 #301486
by besriworld
Replied by besriworld on topic OLD Lathe conversion to a CNC
Attachments:
Please Log in or Create an account to join the conversation.
- besriworld
- Offline
- Elite Member
Less
More
- Posts: 250
- Thank you received: 70
01 Jul 2024 05:23 - 01 Jul 2024 06:19 #304124
by besriworld
Replied by besriworld on topic OLD Lathe conversion to a CNC
Attachments:
Last edit: 01 Jul 2024 06:19 by besriworld.
Please Log in or Create an account to join the conversation.
- besriworld
- Offline
- Elite Member
Less
More
- Posts: 250
- Thank you received: 70
03 Jul 2024 05:27 - 03 Jul 2024 05:31 #304297
by besriworld
Replied by besriworld on topic OLD Lathe conversion to a CNC
Hello, I have a question. I want to emphasize that I am new to LinuxCNC! The spindle has separate oil lubrication. I want the pump to not run all the time. Only when the spindle is rotating. A pressure sensor is installed.
I want to do before the spindle turns to turn on the lubrication pump and wait for the enabling signal from the pressure sensor. When true to rotate the spindle. If during rotation the signal from the sensor changes its state, it is not true to trigger an alarm. What is the right way? Is there an example? I'm sorry, but I couldn't find a similar topic.
I want to do before the spindle turns to turn on the lubrication pump and wait for the enabling signal from the pressure sensor. When true to rotate the spindle. If during rotation the signal from the sensor changes its state, it is not true to trigger an alarm. What is the right way? Is there an example? I'm sorry, but I couldn't find a similar topic.
Last edit: 03 Jul 2024 05:31 by besriworld.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19188
- Thank you received: 6430
03 Jul 2024 08:50 - 03 Jul 2024 08:50 #304312
by tommylight
Replied by tommylight on topic OLD Lathe conversion to a CNC
Probably by remaping M3 would be the best way, but no idea if M3 can be remaped.
I am sure it can be done in hal but that is quite a journey.
Using M6 or M7 is much easier, see mist/coolant use, requires adding an output for it in wizard, be it StepConf or PncConf.
I am sure it can be done in hal but that is quite a journey.
Using M6 or M7 is much easier, see mist/coolant use, requires adding an output for it in wizard, be it StepConf or PncConf.
Last edit: 03 Jul 2024 08:50 by tommylight.
The following user(s) said Thank You: besriworld
Please Log in or Create an account to join the conversation.
03 Jul 2024 13:19 #304325
by andypugh
Replied by andypugh on topic OLD Lathe conversion to a CNC
I don't think it would be that hard in HAL.
This will also stop the spindle if the pressure falls, which probably isn't desirable, so you could add a latch:
linuxcnc.org/docs/stable/html/man/man9/flipflop.9.html
in addition to (most of) the above
This will turn the spindle motor on when there is pressure and the spindle is on, but will only turn the motor off when the spindle-off (inverted spindle on) goes true and resets the latch.
If you want an alarm too, then that would be based on the latched output being on, and the pressure being low.
Add another not, used to create an output that is high when the pressure is low, and another and2
linuxcnc.org/docs/stable/html/man/man9/message.9.html
net spindle-on spindle.0.on <lube pump on> and2.0.in0
net lube-pressure <lube swith output> and2.0.in1
net spindle-enable and2.0.out <spindle motor on>
This will also stop the spindle if the pressure falls, which probably isn't desirable, so you could add a latch:
linuxcnc.org/docs/stable/html/man/man9/flipflop.9.html
in addition to (most of) the above
loadrt flipflop
loadrt not
addf flipflop.0 servo-thread
addf not.0 servo-thread
net spindle-on not.0.in
net spindle-off not.0.out
setp flipflop.0.data 1
net spindle-enable flipflop.0.clk
net spindle-off flipflop.0.reset
net spindle-latched flipflop.0.out <spindle motor on>
This will turn the spindle motor on when there is pressure and the spindle is on, but will only turn the motor off when the spindle-off (inverted spindle on) goes true and resets the latch.
If you want an alarm too, then that would be based on the latched output being on, and the pressure being low.
Add another not, used to create an output that is high when the pressure is low, and another and2
linuxcnc.org/docs/stable/html/man/man9/message.9.html
loadrt message messages="Low lube pressure!"
net lube-pressure not.1.in
net lube-pressure-not and2.1.in0
net spindle-latched and2.1.in1
net alarum and2.1.out message.0.trigger
Please Log in or Create an account to join the conversation.
- besriworld
- Offline
- Elite Member
Less
More
- Posts: 250
- Thank you received: 70
03 Jul 2024 14:00 #304328
by besriworld
Replied by besriworld on topic OLD Lathe conversion to a CNC
Many thanks for the quick and detailed reply. I will try soon.
Please Log in or Create an account to join the conversation.
- besriworld
- Offline
- Elite Member
Less
More
- Posts: 250
- Thank you received: 70
09 Jul 2024 10:10 - 09 Jul 2024 10:12 #304739
by besriworld
Replied by besriworld on topic OLD Lathe conversion to a CNC
What's missing from my HAL file. I cannot do protection if the requested RPM of the spindle do not follow the current RPM from the encoder.
The problem is that the machine should automatically stop if the pump is not working. The spindle is large and if left without lubrication the bearings will break.
The problem is that the machine should automatically stop if the pump is not working. The spindle is large and if left without lubrication the bearings will break.
Attachments:
Last edit: 09 Jul 2024 10:12 by besriworld.
Please Log in or Create an account to join the conversation.
- besriworld
- Offline
- Elite Member
Less
More
- Posts: 250
- Thank you received: 70
11 Jul 2024 19:33 #304941
by besriworld
Replied by besriworld on topic OLD Lathe conversion to a CNC
Can anyone help. I can't find where the error is..
I am attaching the new files!
I start the spindle with Gmoccapy gui
I am attaching the new files!
I start the spindle with Gmoccapy gui
Attachments:
Please Log in or Create an account to join the conversation.
12 Jul 2024 03:06 #304957
by PCW
Replied by PCW on topic OLD Lathe conversion to a CNC
What is the actual issue with the current hal/ini file set?
Please Log in or Create an account to join the conversation.
- besriworld
- Offline
- Elite Member
Less
More
- Posts: 250
- Thank you received: 70
12 Jul 2024 04:20 - 12 Jul 2024 04:21 #304962
by besriworld
Replied by besriworld on topic OLD Lathe conversion to a CNC
Hello, when I start the spindle with S1000 m3. The spindle rotates without the set acceleration and if I simulate a deceleration or stop of the spindle there is no following error. The machine/spindle works without errors!
Last edit: 12 Jul 2024 04:21 by besriworld.
Please Log in or Create an account to join the conversation.
Moderators: piasdom
Time to create page: 0.260 seconds