LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Integrate LIFA with GRBL or vice versa

Hi all,

I am currently building a CNC machine/laser cutter/3D printer/whatever. The software I am using a open source software written for the arduino called "GRBL" which is actually written in optimized C and flashed to the arduino. This allows me to stream Gcode to the arduino via serial and a processing sketch called "gctrl". This has a very basic text based gui and limited commands. I want to use LIFA and GRBL together somehow. With my labview vi I can only move the steppers individually and can't process gcode and send it to them. I was going to inport the GRBL code into LIFA and make a seperate function to parse Gcode to it and control my spindle and all that jazz but GRBL is written in C. I think  the reason they did this is to minimize the space used on a regualr Arduino Uno. I was going to usea Mega so that both codes could be integrated and loaded. So now I am not sure if this can even be done without just rewritting one of the programs all together. What would be the easiest route here. Make a gcode parser in labview similar to freddy pingpongs etch-a-sketch vi, have two arduinos one with LIFA and one with GRBL and hook them both to my driver boards and just disable one when the other one is running and vice versa (not the cleanest but probably the simplest codewise). Or can LIFA be converted to C and be flashed to the arduino with GRBL?

Gctrl (Processing Sketch.pde) GRBL GUI : https://github.com/damellis/gctrl

GRBL (Optimized C) Gcode interpreter : https://github.com/grbl/grbl

LIFA: I'm sure everyone is familar with this.

Thanks a lot in advance for your input.

0 Kudos
Message 1 of 11
(8,070 Views)

You have two choices.  Modify the LIFA code that runs on an Arduino or develop a Labview graphics Serial interface to your GRBL code.  I don't know which is easier.  But if you wanted to try to developing a Labview graphics serial interface to GRBL I suggest you look at the Labview serial interface to Mbed.  Mbed is a programming environment for a LPC1768 microntroller. See

<http://mbed.org/cookbook/Interfacing-with-LabVIEW>

Skip over the first part of the page.where they discuss RPC.  This part is similar to LIFA . Futher dfown the page there is the heading "Serial Communication". This is the part I suggest you look at to get ideas for developing your own graphics serial interface to GRBL.    

Howard

0 Kudos
Message 2 of 11
(4,896 Views)

Thank you hrh1818, that was a great suggestion. I am trying to make it work but I am having problems writing to the serial port. I can use termite serial terminal software and Send commands easily to the arduino. But when using VISA I cen't get the same results. When I establish  connection with the board it responds which I can read with my labview code. But I can't send it any commands. In termite they do a append LF which I do as well in my VISA configure all the same things with the stop bit parity bit, baud rate, etc... What is wrong is there something very fundamental that I am missing? I have also used premade labview termial programs (Serial port test 1.2 and Hyper Termianl) and I am getting the same results. They can establish a connection but can't write data to it. Please some help would be awesome. I have added my vi to the discussion.

0 Kudos
Message 3 of 11
(4,897 Views)

Okay I figured it out it needed a carriage return constant. not a \n.

0 Kudos
Message 4 of 11
(4,897 Views)

I am having a new issue where I want to have two arduinos running at the same time. One is running GRBL and I am communicating using visa and serial commands and the other is running LIFA. It seems like they are on the same com port when both are plugged in. when I use visa for my serial communication with GRBL I select com3 and it works but when I plug in LIFA it goes to ASRL3::INSTR which appears to be the same thing as com3 in max. How do I make them use different com ports? I have 3 usb ports on my laptop and in max it shows I have a com1, com3 and lpt1. I've tried all the usb ports but always comes up as com3.

0 Kudos
Message 5 of 11
(4,897 Views)

So far I can't provide any help in getting 2 Arduinos to run at the same time.  I tried to run two Arduinos at the same time.  Both were using LIFA.  I set the COMM port for one to COMM 9.  The other to COMM 12.  When I went back to check the COMM port setting for the first one Labview changed it to COMM 12.  For some unknown reason when using two Arduinos Labview automatically sets the COMM ports to he same value.

Have you tried plugging in the Arduino using LIFA first and then plugging in the Arduino running GRBL?.

Howard

0 Kudos
Message 6 of 11
(4,897 Views)

hey Rymanvw, how are you?
Could you make GRBL communicate with LabView?
I'm doing a similar project and, maybe, you can help me with it. I just need to know what I should do to send g-codes through LabView to Arduino.
Thanks

0 Kudos
Message 7 of 11
(4,897 Views)

Hi dbarbosa,

Yes I was able to get labview to communicate with GRBL. Here is a project I created a while ago, I don't really remember how well it worked but feel free to try it out.

http://www.filedropper.com/grblgui

0 Kudos
Message 8 of 11
(4,897 Views)

Hi, Ryman...
Thanks very much for answering my question. It's gonna help me a lot.
Take care, buddy!

0 Kudos
Message 9 of 11
(4,897 Views)

Hi Ryman, Hi dbarbosa could you help me .I'm doing a similar project. I want to send g-codes through LabView to Arduino.

0 Kudos
Message 10 of 11
(4,897 Views)