Program linuxcnc?

More
7 years 1 month ago #146348 by MaHa
Replied by MaHa on topic Program linuxcnc?
Another option, just change the hm2 part according your config.

Use M64 P00 to turn on, to turn off M65 P00
net laser1 <= motion.digtal-out-00 => hm2_7i76e.0.7i76.0.0.output-07

Use M64 P01 to turn on, to turn off M65 P01
net laser2 <= motion.digtal-out-01 => hm2_7i76e.0.7i76.0.0.output-08

Use M64 P02 to turn on, to turn off M65 P02
net hotwire <= motion.digtal-out-02 => hm2_7i76e.0.7i76.0.0.output-09


In the .ini file,
[HALUI]
MDI_COMMAND = M64 P00 ;command 0
MDI_COMMAND = M65 P00 ;command 1
.....
How to assign a keyboard key to this commands, please ask someone else, as i dont know.

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

More
7 years 1 month ago #146350 by tjd
Replied by tjd on topic Program linuxcnc?
Ok, thanks for the info.

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

More
7 years 1 month ago #146410 by tjd
Replied by tjd on topic Program linuxcnc?
Having just read this

am I right in thinking I can have the controls for said lasers and Hot Wire Cutter on a virtual control panel, assuming I can't as yet work out how to do it from the keyboard??

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

More
7 years 1 month ago #146420 by JohnnyCNC
Replied by JohnnyCNC on topic Program linuxcnc?
Yes, I added buttons on the screen to control my coolant (Air blast) and a button to cause the machine move all axis to what I consider the "parked" position before I shut it down.

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

More
7 years 1 month ago - 7 years 1 month ago #146464 by MaHa
Replied by MaHa on topic Program linuxcnc?
Just found a easy way to do your keyboard stuff. It worked on my sim, debian stretch testing.
On the desktop goto properties, keyboard. There i was able to enter commands, with keyboard shortcuts.
After starting Axis, this were executed by shortcut. Have a look in axis, help, keyboard, because there are so many keyboard shortcuts already, avoid a colision. So just enter the mdi command call ,example in screenshot. 1 at the end sets true, if 0 is there, nothing happen.
All you need to do, are the .ini file entrys in Halui section, as shown in previous post (M64,M65) and connect your relay to the switched pins.
And also edit the .hal file, net motion.digital-out as example.
enjoy
Last edit: 7 years 1 month ago by MaHa. Reason: incomplete
The following user(s) said Thank You: Soccer Kid

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

More
7 years 1 month ago #146775 by MaHa
Replied by MaHa on topic Program linuxcnc?
Even it seems the interrest in this problem is fading, i could not leave a half finished solution behind, which confuses more than help.
Ok, here is the final, pretty easy to do. I choose User defined M funktion to simulate momentary switch. So with the before shown way, assigning keyboard keys to M function, halcmd or whatever Laser1 Laser2 and Hotwire can be turned on off by the same Key combination, because toogle used. Even it's a bit ugly, the same M function can be used from MDI or Gcode.
The M function must be made executable. And .txt must be removed.
The toggle part is in custom.hal, you need to do the entry in .ini, as

[HAL]
HALFILE = custom.hal

In the your-machine.hal file toogle needs 3 entrys. In my case i had count=2, so changed to count=5. And each needs addf.
And in custom.hal the hm2 part enter your output to switch. If your relay has more than 60ma, maybe a flyback diode required.

loadrt toggle count=5
addf toggle.0 servo-thread
addf toggle.1 servo-thread
addf toggle.2 servo-thread
addf toggle.3 servo-thread
addf toggle.4 servo-thread
The following user(s) said Thank You: tommylight

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

Time to create page: 0.153 seconds
Powered by Kunena Forum