HAL -> Arduino Breakout

More
03 Mar 2013 02:44 - 03 Mar 2013 02:46 #30777 by dewy721
Replied by dewy721 on topic HAL -> Arduino Breakout
Your right on the money. As you can easily build the interface your talking about with an Arduino powered LCD touch screens, LEDs, graphical indicators, buttons, analog gauges, and all.

You'll just need to know how to hack at C#/C++ code to make the interface the way you want using the Arduino platform to control it, then use HAL2Arduino to expose the HAL pins to that Arduino. Even multiple Arduino units can be ganged together to handle multiple tasks.

Right at the moment I'm getting close to releasing version 0.4 with some example plugins to easily allow toy CNC builds.

It should be ready for the public in a day or two. (Ironing out a few last minute details, between errands.)

When its ready for download I'll announce it with a post here. But before then, I could use a few good feature requests for add-on mods.
Meanwhile it the new version already supports:
  • USB access to HAL interface.
  • Independent Stepper control w/acceleration.
  • Basic DRO (as a coding example.)
  • Physical and Virtual limit switches.
  • Message passing, for multi-Arduino applications.
  • Drag and drop add-ons, easily add/remove features.
Last edit: 03 Mar 2013 02:46 by dewy721. Reason: typos

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

More
03 Mar 2013 03:14 #30778 by emcPT
Replied by emcPT on topic HAL -> Arduino Breakout
Well in that case, it is what I need.
I think I can manage the c++ stuff, but simple examples are always welcome.
I am in a long way to reach that part of my retrofit as I am currently dealing with the spindle, but as I wanted physically buttons in my machine it seams that your work can be the base for it.
Once again thank you.

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

More
03 Mar 2013 21:43 #30800 by dewy721
Replied by dewy721 on topic HAL -> Arduino Breakout
Ok, as promised. HAL2Arduino 0.4 (pre-release) has been posted.

Excerpt: (From my blog )

For those of you that have been waiting ever so patiently for the next generation of EMC2Arduino, here is the first version of HAL2Arduino that is actually useful to the average end-user.

This version has a couple of bug fixes:
  • Bi-directional communications fix. (Coding typo)
  • Init spam bug fixed.
Added features:
  • Support for plugin based mod files, for drag-n-drop/compile add on features.
  • Pre-compiler optimized code (modFiles too!) to keep the memory footprint lower, saving more room for your code. Unused code won’t be added to your final build.
  • Added “Green Light” signal so Arduino clients can synchronize with each other.
Added modFiles:
  • modAccelStepper: 0~9 axises of speed sensing motion control, default config is for 3-axis machine suitable for routers, plasma tables, basic mills, etc.
  • modLimSwitch: support for min/max/home switches, both physical and/or virtual (based on stepper positions).
  • modLcd: Updated to run on HAL2Arduino-0.4 (Still just a basic example of a DRO.)
In the pipeline:
  • modButtons: A control panel collection for the basics like E-Stop, start, stop, pause, step, etc.
  • Config LinuxCNC from Arduino. ie: Edit/upload HAL2Arduino to your arduino, run the host side python script and the custom.hal files get generated for you, based on the configuration of the arduino(s).
If you like, you may grab an early copy of it here .
The following user(s) said Thank You: emcPT

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

More
03 Mar 2013 23:01 #30802 by emcPT
Replied by emcPT on topic HAL -> Arduino Breakout
Thanks

I read your blog and it seams correctly structured.
I do not know arduino and therefor I have a long way to walk. Maybe many users here are in a similar position as I am.

One of the things that get people going forward is a simple example, video or pictures, like a "hello world". Pushing for my side, I would be quite happy to see a button working (linuxcnc <- arduino) or a led commanded (linuxcnc->arduino).
As an example, I was looking for arduino hardware and I got more confused as there are several options/versions. With a real example at least I would know what hardware to buy.

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

More
03 Mar 2013 23:28 - 03 Mar 2013 23:30 #30804 by dewy721
Replied by dewy721 on topic HAL -> Arduino Breakout
Well, your in for an enlightening experience then. :)

The Arduino platform is opensource, just like LinuxCNC.
There is TONS of get your feet wet stuff on the web, just google or youtube search for Arduino+your interest. Chances are you'll find something.
One such example on youtube show a project just like you described:
. Its just a video of a red/green LED back-lit button to toggle LinuCNC's "Machine Power" button within the Axis GUI. In fact, this was one of the videos that got me started making HAL2Arduino, once I saw it was possible.
Last edit: 03 Mar 2013 23:30 by dewy721.

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

More
03 Mar 2013 23:44 #30805 by emcPT
Replied by emcPT on topic HAL -> Arduino Breakout
That is it!

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

More
04 Mar 2013 13:43 #30820 by dewy721
Replied by dewy721 on topic HAL -> Arduino Breakout
Although HAL2Arduino provides access to all the HAL pins listed in section "6.1.2 Pins" of the linuxcnc.org/docs/EMC2_Integrator_Manual.pdf file, it can also accept plug-in modFiles to enhance its "out of the box" useability.

For those of you that are a little light in coding experience, I could put together a modFile of an 'ideal' CNC control panel template for average users. I just need to know what options are generally considered 'ideal' to have available for most of you out there.

If someone/people would be so kind as to list the buttons they would like access to, then I could put together a modFile to facilitate easy access to any/all of those features.
That way you only need to handle the physical construction of the box and the parts it holds.

In other words, what features make a great control panel?

So far I got:
  • E-Stop
  • Machine power
  • Program start
  • Program pause
  • Program step
  • Program stop
  • Feed rate override
  • Coolant mist on/off
  • Coolant flood on/off
  • Spindle controls
Are there any other control panel assets that you guys would like easy access to??? Let me know.

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

More
04 Mar 2013 16:02 #30821 by emcPT
Replied by emcPT on topic HAL -> Arduino Breakout
Hello.
For me (lathe user) I would have (and since they are so many that is why I was looking for a solution)

1) Directly as possible to linuxcnc (vital buttons):

Emergency stop (in my case directly to mesa card)
PWR ON
PWR OFF

2) Arduino/or other that allow to have a larger range of solutions

Cycle/program start (with back led)
Cycle/program stop (with back led)
Jog X+
Jog X-
Jog Z+
Jog Z-
Fast jog (if you press this simultaneous with any of the jogs it will go at a higher speed)
Feedrate speed (that also controls the jog speed) in increments of 10, from 0% to 150%. This is normally a dial indicator with fixed positions. Only for this I suppose it is needed 4 inputs (2^4 = 16)
Coolant on (with back led)
One or two extra for engaging special auxiliary functions

Now the keyboard, that would be similar to the picture in attachment. Maybe it would be more simple.
I do not know if it is possible to use your HAL2Arduino to simulate keystrokes, like 'A' 'a' 'B' and so on. If it is then for me it would be perfect.
Attachments:

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

More
04 Mar 2013 17:07 - 04 Mar 2013 17:14 #30823 by dewy721
Replied by dewy721 on topic HAL -> Arduino Breakout
Everything but actual typing out a letter keystrokes it can do, directly.

If your referring to A,B as in selecting stored programs, canned cycles, mode changes. Sure it can do that, either by recording to an SDcard (future modFile).
With some more work on my end, it could even be called from the PC's hard drive directly.

If what you intend is actual machine-side typing as in loading up someFilename.ngc into the Axis GUI then you could do it with a separate arduino that has just been flashed to act a a usb keyboard.
Somebody has figured that out already.

After that, the hardest part would be physically making the control box.
Last edit: 04 Mar 2013 17:14 by dewy721. Reason: typos

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

More
04 Mar 2013 22:03 - 04 Mar 2013 22:28 #30838 by andypugh
Replied by andypugh on topic HAL -> Arduino Breakout

Emergency stop (in my case directly to mesa card)


Relying on an Arduino and USB connection for E-stop strikes me as a very bad idea.
E-stop should be hard-wired.

I would also suggest that if you already have Mesa cards then the 7i73 may be a better interface for a control panel than the Arduino is. (It is only slightly more expensive and offers a lot more pins, LCD driver, matrix keyboard support, encoder-counters...)
Last edit: 04 Mar 2013 22:28 by andypugh.

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

Time to create page: 0.078 seconds
Powered by Kunena Forum