LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing Arduino file using labview

Solved!
Go to solution

Hi, I am using ATmega2560 Arduino board and I want to flash a arduino (.ino) file using VISA from labview. but the program returns VISA write timeout (1073807339) error. Is it possible to flash arduino file from labview?. If it is how to flash the arduino file?

0 Kudos
Message 1 of 26
(4,608 Views)

What should the Arduino do with a .ino file ? 

An Arduino is a embedded chip that need a compiled code to run. You need to compile your .ino file and then transfer the compiled code to the Arduino. 

You might be able to do that with a external exe file, that  comes with the Arduino compiler. 

0 Kudos
Message 2 of 26
(4,579 Views)

Hello,

Arduino compiler in lab view is available refer below link.

http://sine.ni.com/nips/cds/view/p/lang/en/nid/213121

 

better to use the arduino IDE available in arduino website.

Expand.Evolve.Influence
0 Kudos
Message 3 of 26
(4,575 Views)

Hi,

Actually I want to set some digital pins with different delays. For that I used Arduino interface for LabVIEW and it is working. But I need very small delay between two digital pins( in the order of ms). The minimum delay I am achieving is 20ms (Digital Write VI itself taking 20ms to set the pin as 1 or 0). So I tried with Arduino file(.ino file) which will run in the Arduino board continuously. I am able to flash the Arduino file with the Arduino compiler. But I want to do this from LabVIEW. I had flashed binary files (.bin files) using LabVIEW VISA succesfully and it is working well. Similarly I want to do the same thing for Arduino(.ino) files. Is it possible to flash .ino file using VISA or is there any other options to control and automate the Arduino compiler to flash the file into the board?

0 Kudos
Message 4 of 26
(4,574 Views)

You still need to compile your ino files, you can't do anything with a bare ino file on a Arduino. 

Then, if you really want to use VISA for transfer, you need to learn the bootloader protocol of the Arduino to be able to get it into bootloader mode, and then you can transfer your compiled code. 

 

I would try to Google how you compile an arduino file from an external program, and use the programs that comes with the Arduino IDE to compile and transfer the code to your Arduino board. 

Message 5 of 26
(4,566 Views)

Thank you very much.. I will also search for that..

Arduiuno compatible compiler for labVIEW - how will this work? and do I need to install this?

0 Kudos
Message 6 of 26
(4,566 Views)

If you expand the lower window in the Arduino IDE while you are programming you will see that the Arduino IDE calls another program (AVRdude) and AVRdude actually programs the Arduino.

 

So why not just call AVRDude with the LabVIEW systemexec.vi?

 

========================
=== Engineer Ambiguously ===
========================
Message 7 of 26
(4,561 Views)

Or just use the Arduino Programmer IDE with commandline: 

https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc

Message 8 of 26
(4,555 Views)

Can you please explain some more detail regarding this? How could I call AVRdude?

0 Kudos
Message 9 of 26
(4,548 Views)
Solution
Accepted by topic author Prakashsp

Well you would have to read the Avrdude documentation for all the command line parameters...

 

But dkfire has a better idea really as all you need to do is call the Arduino IDE with the Systemexec.vi using a command line 

 

arduino [--verify|--upload] [--board package:arch:board[:parameters]] [--port portname] [--pref name=value] [-v|--verbose] [--preserve-temp-files] [FILE.ino]

 

BTW: This is the Systemexec vi SVICapture.PNG

You will find it under Connectivity----->Libraries & Executables in the pallet. 

========================
=== Engineer Ambiguously ===
========================
Message 10 of 26
(4,544 Views)