How to go about pulsing an output in hal.
- M4MazakUser
- Offline
- Elite Member
Less
More
- Posts: 173
- Thank you received: 5
11 Jan 2023 10:36 #261550
by M4MazakUser
How to go about pulsing an output in hal. was created by M4MazakUser
I'm finally hooking up hydraulics. I have 6 solenoids
.1 to open chuck. (Theres a reversing lever for internal chucking)
2 to disable chuck opening while the spindle is on.
3 to set tailstock to forward. (Momentary coil)
4 to set tailstock to reverse (momentary coil)
. The 2 above lock the quill from going the opposite direction.
5 forward quill travel
6 reverse quill travel
Any ideas how to do the quill movement in hal, or should I just use classicladder.
- 2 is easy, I just connected it to a spindle enable relay.
- 1 is easiest, it just goes to an output.
3&4 would be easy in ladder combined with 5&6.
But I'd prefer a hal solution.
.1 to open chuck. (Theres a reversing lever for internal chucking)
2 to disable chuck opening while the spindle is on.
3 to set tailstock to forward. (Momentary coil)
4 to set tailstock to reverse (momentary coil)
. The 2 above lock the quill from going the opposite direction.
5 forward quill travel
6 reverse quill travel
Any ideas how to do the quill movement in hal, or should I just use classicladder.
- 2 is easy, I just connected it to a spindle enable relay.
- 1 is easiest, it just goes to an output.
3&4 would be easy in ladder combined with 5&6.
But I'd prefer a hal solution.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19464
- Thank you received: 6529
11 Jan 2023 14:27 #261571
by tommylight
Replied by tommylight on topic How to go about pulsing an output in hal.
Add the entries in hal, something like:
net quil-up hm2-eth.7i76.0.0.output-01
net quil-down hm2-eth.7i76.0.0.output-02
Start LinuxCNC
Open "show hal configuration" or similar from machine menu
On the left find those pins
On the right click on watch tab
On the left click on those two pins so you can see when they are active
At the bottom write
setp quil-up true
Press enter
setp quil-up false
Press enter.
Be aware that all pins/naming is from memory so replace by your actual pins.
Also, LinuxCNC 2.9 and up have set and reset on the right side of pins on the watch tab of show hal configuration so no need to write anuthing, just click on set or reset.
net quil-up hm2-eth.7i76.0.0.output-01
net quil-down hm2-eth.7i76.0.0.output-02
Start LinuxCNC
Open "show hal configuration" or similar from machine menu
On the left find those pins
On the right click on watch tab
On the left click on those two pins so you can see when they are active
At the bottom write
setp quil-up true
Press enter
setp quil-up false
Press enter.
Be aware that all pins/naming is from memory so replace by your actual pins.
Also, LinuxCNC 2.9 and up have set and reset on the right side of pins on the watch tab of show hal configuration so no need to write anuthing, just click on set or reset.
Please Log in or Create an account to join the conversation.
- M4MazakUser
- Offline
- Elite Member
Less
More
- Posts: 173
- Thank you received: 5
11 Jan 2023 17:12 #261593
by M4MazakUser
Replied by M4MazakUser on topic How to go about pulsing an output in hal.
Ok, so i geuss itd be pretty easy to write an m100+ program to do this
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19464
- Thank you received: 6529
11 Jan 2023 17:18 #261595
by tommylight
Replied by tommylight on topic How to go about pulsing an output in hal.
The above was for testing only.
You can do that in gcode using Mcodes
linuxcnc.org/docs/html/gcode/m-code.html#mcode:m62-m65
You can do that in gcode using Mcodes
linuxcnc.org/docs/html/gcode/m-code.html#mcode:m62-m65
Please Log in or Create an account to join the conversation.
Time to create page: 0.105 seconds