Silly Questions - HAL, Arduino

More
11 Sep 2016 01:04 #80319 by ImJay
Ello.
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 or Create an account to join the conversation.

More
11 Sep 2016 01:39 - 11 Sep 2016 01:42 #80320 by kornphlake79
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.
Last edit: 11 Sep 2016 01:42 by kornphlake79.

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

More
11 Sep 2016 06:54 - 11 Sep 2016 07:09 #80325 by Rick G
Last edit: 11 Sep 2016 07:09 by Rick G.

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

More
11 Sep 2016 07:28 #80326 by ImJay

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.

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?

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

I have yes, just need a concept in my head of how everything works together so the method of control makes more sense.

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

More
11 Sep 2016 07:49 #80327 by Rick G
I have not tried using Arduino with linuxcnc yet.
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
The following user(s) said Thank You: ImJay

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

More
11 Sep 2016 07:52 #80328 by ImJay
Just to clarify, "real time" with LinuxCNC is based in ms, where as the jogging control takes a bit longer to update on both ends making it less "fast", in a sense?

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

More
12 Sep 2016 15:43 #80366 by kornphlake79
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.
The following user(s) said Thank You: ImJay

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

More
13 Sep 2016 04:51 #80378 by ImJay

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 or Create an account to join the conversation.

More
13 Sep 2016 08:01 #80381 by Rick G
You can certainly use usb for jogging.

Rick G

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

More
13 Sep 2016 10:12 #80384 by andypugh
Using an Arduino for the HMI interface is certainly no worse than using a keyboard and mouse, and is probably much better than clicking GUI buttons. Clicking a GUI button with a USB mouse puts two non-realtime stages in the loop.

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.
The following user(s) said Thank You: ImJay

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

Time to create page: 0.086 seconds
Powered by Kunena Forum