Controlling Arduino through Labview

i wanted to know if there is a way to control an arduino board through labview instead of its software that just uses code

What do you mean by control? Do you mean program or do you mean communicate with? Communication should mean just opening a serial port and writing to it. Programming could be a little more difficult because you have to compile the c++ code and then transfer it to the microprocessor. If you can give me a little more of an idea what you are trying to do I might be able to help a little more.

i mean programming and communication. i want to build a small robot and i’m not too good in programming but i have expirence in labview from frc this year

Have you tried the arduino programing environment? I have found it to be incredibly simple yet powerful. Plus, it will be a LOT easier to do than to write the Labview code you would more than likely need to even communicate with the processor (Disclaimer: I haven’t tried it I could be wrong). There are also a ton of resources on the arduino site.

Now, if you wanted to actually program the arduino in Labview code and then hit compile and then download that to the arduino you are looking at a LOT of work. You would need to write some way of translating the LV code into instructions the microprocessor could understand. Then transfer that to the arduino somehow.

<theory>If Labview can generate c++ code you should be able to generate it and then just copy paste it into the arduino environment and compile and upload that way. That or you could compile your file and upload it by hand but that is something I have never tried doing</theory>

The normal LV environment doesn’t translate to C code. There is an add-on module that does this, and it allows you to target the large number of embedded devices that are out there. You will find that the development, especially the debugging is a bit more tedious that using RT, though.

Greg McKaskle

With a small effort, it is possible to learn how to program an Arduino in its native language/environment. Either use the tutorials they offer, or buy a book. In a week of study you will know how to program something, and in 2 months (just when school is starting up again!) you will be very good at it, able to make that Arduino jump up and sing if you want it to…

Try it, you might surprise yourself.

Of course, we are all here to help if you have any questions. So, no fear.::safety::

The programming language for an Arduino is basically C, with just one function that you need to put code in. Have a look at some of the examples on the Arduino site and you’ll see how easy it is.

Yes, after looking at the complicated compiler used for FRC, I decided not to try too hard to learn C, especially because we were using LabVIEW, which I like.

But after looking at the Arduino programming environment, I was really surprised and delighted. It is very simple and easy.

Here are a couple great resources for programming Arduinos and Arduino in general:

Arduino 101 videos at Maker Shed (Check out the rest of the page too.)
Ladyada.net learning electronics with Arduino Some programming in there.
Arduino Programming Manual Great manual about the environment, how to program, and all the functions.

Greg, are you implying that this LabVIEW add-on module allows you to target the Arduino? What is this module called?

http://www.ni.com/labview/microprocessor_sdk.htm

That page contains the more general tool that I was thinking about, and on the left are links to more specific ones too. The Arduino isn’t viewed as an important instrumentation target, so these tools won’t directly reference it.

But generally, this is the tool that was developed to go from LV to C/C++ code in order to target specialized processors such as DSPs and micros. Similarly, the FPGA module goes from LV to VHDL to target even more specific silicon.

Back to micros
http://www.thaieasyelec.net/index.php/arm/labview-arm-lpc2378-touch-screen-i/o-board/p_64.html

This is an example of it in use.

http://timothytwillman.com/itp_blog/?p=82

And this is someone using one tool to program the Arduino, but using LV to integrate it with their computer

Greg McKaskle

Here is another write-up on how to interface LabVIEW and an Arduino:

http://web.me.com/iklln6/automation/LabVIEW.html