Program linuxcnc?

More
7 years 1 month ago #146245 by bevins
Replied by bevins on topic Program linuxcnc?
hal_input will give you access to keys on keyboard in HAL, then you can fire an output with it.
I have never used it but this should work.

hal_input

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #146246 by tjd
Replied by tjd on topic Program linuxcnc?
Ok, that sounds cool.
Unfortunately I still don't know enough about HAL programming to even start that. Is there some example code anywhere I could try to follow?

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #146266 by pl7i92
Replied by pl7i92 on topic Program linuxcnc?
just open the HAL file and look for Spindle-on
or Spindle-cw
thats all
then put your pinname behind it

net spindle-enable <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #146271 by tjd
Replied by tjd on topic Program linuxcnc?
Sorry, I don't follow that at all.
As said, I don't understand enough about HAL to know the syntax of what you've written there.
For example - at the risk of sounding like an idiot... If I'm looking to control a hot wire and or lasers from a key on the keyboard - how does that relate to the spindle?
In the code you've written, what is the pinname?
Is there a list of pinnames I can/can't use?
Does a pinname relate to a specific pin/port on the 7i77 mesa board?

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #146294 by MaHa
Replied by MaHa on topic Program linuxcnc?
The question is, are you using the mill and foamcutter? If just the foamcutter is used, it would be easy, as the gcode
for control is there already.
M3/M5 could be used for the hotwire on/off even with timedelay for warmup
M7/M8 turn on Laser, M9 turn off both
I think in terminal halcmd show pin > pinlist.txt give a list of available pins. Just find the ones needed
and copy paste to avoid typos.
In this case would be spindle as mentioned before, and coolant, example:

net coolant-mist <= iocontrol.0.coolant-mist => hm2_7i76e.0.7i76.0.0.output-15
net coolant-flood <= iocontrol.0.coolant-flood => hm2_7i76e.0.7i76.0.0.output-07

about the relay, from a certain dimension a freewhelin diode is needed. 1n4xxx

Actually reading your post again, about the requirement. If you want to control that with keyboard key,
shure pl7i92 has the answer how to map keys and do halui call.

Eventually have 3 switches installed near your keyboard, then you can turn on off anytime as desired. From
keyboard it might be locked while active running file.

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #146298 by tjd
Replied by tjd on topic Program linuxcnc?
I'm intending to have foam cutter and mill spindle running independently so using spindle pin for control is not really an option. Will take a look at available pins as suggested.

At the moment, from 'Axis' i can press F9 and turn on/off the spindle and press F7 to start/stop mist coolant. I'm ideally looking for similar control over lasers and foam cutter. For example, press 'x' for one laser, 'y' for the other and possibly 'f' for the foam cutter.
These controls potentially being locked out while running a program is not an issue.

With regard to having 3 buttons next to the keyboard, that's kinda what I've already got, as mentioned previously they are powered separately from the milling machine so am looking to move control directly to the keyboard itself.

Many thanks for all the help thus far...
The following user(s) said Thank You: MaHa

Please Log in or Create an account to join the conversation.

Time to create page: 0.349 seconds
Powered by Kunena Forum