Program linuxcnc?

More
26 Sep 2019 05:10 #146217 by tjd
Program linuxcnc? was created by tjd
Hi all,
I have a couple of lasers I’m using for part alignment. They’re simply running off a power supply at the moment but I’d like to be able to toggle them on and off via my keyboard. Is this possible? Are there any tutorials for this sort of thing?
I’m also using the CNC as a hot wire foam cutter. Again the hot wire attachment is currently running off a separate power supply and I’d like to be able to turn it off and on from the keyboard. All help gratefully received, many thanks in advance.

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

More
26 Sep 2019 06:55 #146218 by pl7i92
Replied by pl7i92 on topic Program linuxcnc?
hi welcome
YES it is possible and Working behaviour to control the TOOL as almost every CNC-Control does

what is the laser Part Positioner of its a Galvo system i guess
so it has Blending internal
so just hook up a Switch within between as most positioners do
foam cutter control is also in System With a real good corner behavior available and XYUV cuts
Attachments:

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

More
26 Sep 2019 08:35 #146234 by tommylight
Replied by tommylight on topic Program linuxcnc?
Give us more info about the system, please.
It is possible to do all that, you just need some free outputs and some hal editing.

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

More
26 Sep 2019 09:53 #146241 by tjd
Replied by tjd on topic Program linuxcnc?
Hi, thanks all for assistance.
Running LinuxCNC 2.7.14 with Mesa cards: 5i25 & 7i77. - and a shed load of free ports.
Operating a HURCO KM3 3 axis milling machine (1989).
Laser Alignment is no more complicated than a couple of 12v lasers mounted 90 degrees opposed to give a cross-hair at the tool point. The power for the lasers is coming from a power supply within the CNC mill - NOT connected to Mesa boards at all.
Hot wire foam cutter is simply a hot wire suspended from a bracket and attached to its own separate power supply, again NOT connected to Mesa boards.
Have had a look at HAL in LinuxCNC documentation but struggled to know where to start. Again, all help gratefully received.

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

More
26 Sep 2019 10:13 #146243 by tommylight
Replied by tommylight on topic Program linuxcnc?
You have to start with wiring and adding relays to switch the power On/Off to the laser/wire cutter.
One output from the Mesa 7i77 has to go to one side of the relay coil and the other side of the relay coil goes to ground or negative of the power supply that powers the Mesa board.
The switching pins of the relay have to be connected to one of the wires of the laser/wire cutter, by cutting one of the wires and attaching them to the NO ( normally opened ) contacts of the relay.
Then edit the hal file and make the connection of however you want to control that output (M3 spindle on, probe, separate button etc ) to that output on the 7i77.

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

More
26 Sep 2019 10:30 #146244 by tjd
Replied by tjd on topic Program linuxcnc?
Brilliant!
Ok, I was with you right up to the point where you started talking about the HAL file! From what I've tried to understand about HAL, I need to assign pins and so on but couldn't really work out how that was done from the tutorial.

I'd like to control each laser independently and toggle the Hot wire cutter off and on so am I right in thinking I need 3 ports?

Assuming I have all the wiring and relays you mentioned connected up and wired into the 7i77, what do I do next?

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

More
26 Sep 2019 10:47 #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
26 Sep 2019 11:34 #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
26 Sep 2019 14:19 #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
26 Sep 2019 14:38 #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.

Time to create page: 0.095 seconds
Powered by Kunena Forum