Showing results for 
Search instead for 
Did you mean: 

Can we run a LabVIEW VI and the uploaded Arduino code at the same time on the Arduino board?

Go to solution

If we use LabVIEW to write Serial data to an Arduino, can we upload code to the Arduino before running the VI so that the Arduino has something to do with the signals it receives from LabVIEW? Specifically, we want to use the Digital I/O pins to read in a signal on the Arduino (supplied serially by LabVIEW) and to do something with the signals like turn on an LED. Is this what most people do?


Our project involves a parking meter, and we want to use the Arduino by itself, but we want to first simulate the code using some signals that we want to pass in via LabVIEW. Basically, the parking meter has to tell the Arduino if it is paid and if there is five minutes or less remaining on the time. Based on this information and data from a PING sensor, we will determine what output to put out (flashing an LED at different frequencies to denote two different messages).


Sorry if my question isn't clear or if it's trivial; my partners and I are very new to both LabVIEW and the Arduino, and we're trying to get this to work soon.

0 Kudos
Message 1 of 5
Accepted by topic author ruthnan

The LabView Arduino library VI's are designed to run the Arduino as a USB DAQ/DIO.


That is not really what you are after...


I am not really sure how LabView would even be useful in this project.



Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 2 of 5

Hi ruthnan,


Based on the description of your set-up and what you want to achieve, I believe the best route for you to take is simply use some basic VISA serial read/write commands to send serial data to the Arduino. Your Arduino program would need to be configured to be ready to receive the serial data and then perform operations based on the recieved signals. If you are using a USB connection to the Arduino board this should be feasible as there are other customers that seem to have gotten some basic examples of this to work. You can refer to this forum post for an example of another customer who programmed a similar application:


There are many examples for serial communication using NI-VISA in the Example Finder. Another valuable source of information on this topic would be the discussion forums on the Arduino website. This is a link to another example of a user implementing basic serial communication to the Arduino:


Another route you may want to look into is the LabVIEW interface with Arduino (LIFA). This interface, however, is more catered to acquiring data from the Arduino and processing it in LabVIEW with the benefits of the Graphical Programming Environment. There is a Developer Zone page that gives plenty of information on LIFA and provides examples. The link is here: 


I hope this information helps! If you have any further questions on this topic feel free to reply to this thread.




James D.
Applications Engineer
National Instruments
Message 3 of 5

in some projects is important to perform simulation before implementation and you can do this with Arduino and LabVIEW, for example can use the Proteus simulation program to the microcontroller, attached some links you will find yourself this information may luck

0 Kudos
Message 4 of 5

Actually i have same question from you. Is it possible.


Because i m confuse.


I have an arduino code i want to implement that code in my labview. For example to get simple pulses with some specific delay.  I need a switch to reset my arduino so i can run my that program. But that switch i want to make at Labview. ?




0 Kudos
Message 5 of 5