- Posts: 8
- Thank you received: 0
Silly Questions - HAL, Arduino
I'm getting back into my mill conversion after a busy few months came up.
I like the idea of having a control panel as well, so I thought I could go about making a basic one using Arduino like many before.
Want to achieve: Feed/spindle speed control. X,Y,Z axis control, coolant, rapid override, so nothing too complex.
In simple terms how does LinuxCNC talk to the Arduino (and vise versa).
Questions:
Does the .hal file just load the input (from the USB Arduino)?
Does the postgui contain the 'mapping' from the inputs to the control?
I know Java and basic C++, so can I use the Java library to Ardunio and still get normal control?
How do I map the input pins from Arduino and make them do something on my machine (and vise versa - such as lights when running)?
Just looking for basic terms to get me started researching as I got a bit overwhelmed with the amount of custom controls I've been reading about.
Thanks all,
~ Jay.
Please Log in to join the conversation.
- kornphlake79
- Offline
- Senior Member
-
- Posts: 51
- Thank you received: 0
Edit: an Arduino will run GRBL and whatever other forks might be out there, so an Arduino is capable of controlling a CNC machine, just not through linuxCNC.
Please Log in to join the conversation.
forum.linuxcnc.org/forum/18-computer/231...no-i-o-with-linuxcnc
and
forum.linuxcnc.org/forum/18-computer/225...or-linuxcnc?start=20
Rick G
Please Log in to join the conversation.
So those videos of axis jogging weren't through LinuxCNC itself (even with the machine powered by them) - or is it a case of being able to use LinuxCNC inputs to jog the axis?kornphlake79 wrote: I haven't done exhaustive research on mating an Arduino to linuxCNC, but from what I understand it probably won't accomplish what you think it can. The Arduino won't operate realtime, so you can't use it for motion control, pulse generation, etc. You might be able to use it for some peripheral items like a signal beacon, or chip conveyor, but I don't think it's going to do what you want it to do. If you're just looking for additional IO a PCI parallel card should give you enough to do the things you listed, for about the same price as an Arduino, and there are dozens of people are familiar with this approach and can help you if you run into problems.
Edit: an Arduino will run GRBL and whatever other forks might be out there, so an Arduino is capable of controlling a CNC machine, just not through linuxCNC.
I have yes, just need a concept in my head of how everything works together so the method of control makes more sense.Rick G wrote: A bit old but have you seen this?
forum.linuxcnc.org/forum/18-computer/231...no-i-o-with-linuxcnc
and
forum.linuxcnc.org/forum/18-computer/225...or-linuxcnc?start=20
Rick G
Please Log in to join the conversation.
But you can certainly jog and control many features with usb, just not real time.
A great example of jogging and how to set it up on a usb pendant is here...
wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant
Adding more features...
wiki.linuxcnc.org/cgi-bin/wiki.pl?Adding...imple_Remote_Pendant
Rick G
Please Log in to join the conversation.
Please Log in to join the conversation.
- kornphlake79
- Offline
- Senior Member
-
- Posts: 51
- Thank you received: 0
As long as you aren't trying to connect your stepper or servo drives to the arduino you should be okay for general IO, but I have to wonder what advantage you see in using an arduino over a parallel port.
Please Log in to join the conversation.
kornphlake79 wrote: Realtime is required for (software) step generation, encoder feedback, or other high speed communication. My understanding is that realtime halts any other process and dedicates all system resources to the realtime process until it completes, it isn't just about speed but about safety as well, you wouldn't want an incoming email to cause a servo to run away.
As long as you aren't trying to connect your stepper or servo drives to the arduino you should be okay for general IO, but I have to wonder what advantage you see in using an arduino over a parallel port.
That makes sense now.
In that case I would have to think about how I'll connect as I want the ability to jog axis. USB doesn't seem like the best option.
Please Log in to join the conversation.
Rick G
Please Log in to join the conversation.
Personally, since i realised this, I prefer to do all machine-movement interaction through realtime-interface IO.
If you want to make an Arduino-empowered HMI, then look here: emergent.unpythonic.net/01198594294
There is a realtime-interfaced device for much the same money, but it is only usable if you have Mesa hardware.
Please Log in to join the conversation.
