Arduino I/O with Linuxcnc

More
31 Oct 2012 21:49 #26130 by Miselph
Replied by Miselph on topic Re:Arduino I/O with Linuxcnc
I am using a MESA 5i25 - 7i76 combo, so I do in fact have enough inputs to wire the pendent directly into the 7i76, I even have an encoder input available.
However I wouldn't be able to display the machine position on the pendant that way.

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

More
31 Oct 2012 21:56 #26132 by andypugh
Replied by andypugh on topic Re:Arduino I/O with Linuxcnc

I am using a MESA 5i25 - 7i76 combo, so I do in fact have enough inputs to wire the pendent directly into the 7i76, I even have an encoder input available.
However I wouldn't be able to display the machine position on the pendant that way.


The 7i73 (plugs into the RS422 port on the 7i76) might be a simpler solution. We even have an LCD HAL component now:


Attachments:

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

More
31 Oct 2012 22:09 #26135 by ArcEye
Replied by ArcEye on topic Re:Arduino I/O with Linuxcnc
Andy Pugh wrote:

... We even have an LCD HAL component now:

I wondered if you had finished that.

If you have a mesa board, you have all the I/O you need, and it wouldn't make sense to try to pass a MPG output through the Arduino via a serial link, they work very well natively just connected directly.

Now that Andy has made the Mesa LCD display easier to use, that seems an obvious way to go.

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

More
31 Oct 2012 22:12 #26136 by Miselph
Replied by Miselph on topic Re:Arduino I/O with Linuxcnc
oooooo That's a bit good.
How simple is it to integrate into Linuxcnc? I understand that pcnconf has the details for it but I don't want to re-run pncconf as I have a gantry machine and pncconf will overwrite my nice ini and hal file and break everything :(

It is definitely something to think about. One of the main draws to the arduino / usb method tho is that I was planning on using a Bluetooth wireless link as the operator can walk right round the machine and I don't want cables getting tangled up.

Ideas / opinions?

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

More
31 Oct 2012 22:27 #26138 by andypugh
Replied by andypugh on topic Re:Arduino I/O with Linuxcnc

How simple is it to integrate into Linuxcnc?

Pretty easy, you plug it in with a CAT5 cable and all the pins appear in HAL. (Lots of IO, 4 encoder counters, some analogue inputs)
You can link them all up as you feel fit in a custom.hal file.
7i73 Manual:
www.mesanet.com/pdf/parallel/7i73man.pdf
LCD HAL module docs:
www.linuxcnc.org/docs/html/man/man9/lcd.9.html

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

More
31 Oct 2012 22:34 - 31 Oct 2012 22:34 #26140 by andypugh
Replied by andypugh on topic Re:Arduino I/O with Linuxcnc

LCD HAL module docs:
www.linuxcnc.org/docs/html/man/man9/lcd.9.html

And what a lot of formatting errors there are in that document. I will try to fix it tonight.
Last edit: 31 Oct 2012 22:34 by andypugh.

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

More
31 Oct 2012 23:08 #26146 by Miselph
Replied by Miselph on topic Re:Arduino I/O with Linuxcnc
Well it looks like the very best option is the 7i73.
However, I am going to continue experimenting with the arduino pendent for the time being as I have all the bits bar the enclosure knocking about and I enjoy tinkering.
Worth noting that with regards to the jogging of the machine I am thinking of using a thumb-stick joystick (like you get on a playstation joypad) as I am not looking for precision with the jogging, at the moment at least. The jogging is just used to roughly locate the cutting head prior to probing and to move the head out of the way and such like. No cutting is done in jog mode.

The advantage of the thumbstick is that you can move multiple axis simultaneously and it only requires the arduino to send a value representing stick displacement from centre. I can see that trying to transmit pulses from an MPG using the arduino and serial wouldn't really be practical.

In the long run I will look to build a 'proper' pendant using the 7i73 in the long run tho.

Thank you very much for all your help and advice.

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

More
31 Oct 2012 23:37 #26150 by andypugh
Replied by andypugh on topic Re:Arduino I/O with Linuxcnc

Worth noting that with regards to the jogging of the machine I am thinking of using a thumb-stick joystick (like you get on a playstation joypad).

I use an actual Playstation joypad on my machine, and I am entirely happy with it. (Techncally a cheap USB copy of the actual Playstation controller).
wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant
The wireless ones work fine too, by all accounts.

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

  • r00t4rd3d
  • r00t4rd3d's Avatar
  • Visitor
  • Visitor
01 Nov 2012 10:19 - 01 Nov 2012 10:20 #26170 by r00t4rd3d
Replied by r00t4rd3d on topic Re:Arduino I/O with Linuxcnc

I use an actual Playstation joypad on my machine


I use a USB Nintendo controller and the Linux app QJoyPad, it converts the joystick inputs into keystrokes. Easier for people who dont mess with hal.

qjoypad.sourceforge.net/
Last edit: 01 Nov 2012 10:20 by r00t4rd3d.

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

More
01 Nov 2012 22:36 #26186 by VNR
Replied by VNR on topic Re:Arduino I/O with Linuxcnc

Hi

Would it be possible to add analogue data as well as just bits?

Yes of course, but how you go about it probably depends upon the value ranges you will be dealing with.
There are 4 hal_type_t data types, bit, signed long int (s32), unsigned long int (u32) and float, and pins can be any of these types.
Bits are just used a lot because they easily represent switches etc.
They also can be very tightly packed in data packets of just a few bytes as per the example on page 1.
If you give me an idea of what you are trying to do, the data size etc I will have a think on it
regards


Just to mention, i am currently testing an integration of HAL and Arduino Mega using Modbus protocol over USB. All data types are posible to trasmit and receive. Results and more news in the next week.
VNR

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

Time to create page: 0.107 seconds
Powered by Kunena Forum