04-02-2016 06:15 AM
Hi, i have a doubt of interfacing micrcontrollers with labview. I need to know can we interface any microcontroller with labview and please specify a very basic requirements that is needed to interface microcontroller with labview?
Thanks in advance!
04-02-2016 06:42 AM
What kind of microcontroller?
04-02-2016 09:06 AM
How much data do you need to send back and forth? At what rate you need to transmit data?
The most common way I have seen to have a microcontroller and PC communicate (regardless of the language being used) is with a serial port. Many microcontrollers have UARTs built in. So that would be the simplest.
04-03-2016 10:33 PM
Hi, thanks for your reply. So, can i take these points as basic requirements to connect microcontroller with LabVIEW?
04-04-2016
01:05 AM
- last edited on
04-08-2025
04:17 PM
by
Content Cleaner
@dhans wrote:
Hi, thanks for your reply. So, can i take these points as basic requirements to connect microcontroller with LabVIEW?
You can communicate with LabVIEW and Micro-controller using Serial Port.
Use Micro-controller UART with Level Converter IC such as RS232 or USB to UART bridge to receice and send data from LabVIEW.
There are lots of example on Serial Communication.
[link removed]
See this video, which gets ultrasonic data from arduino to LabVIEW using Serial Port. (USB CDC)
http://www.youtube.com/watch?v=MK8r8ZnTvR0
04-04-2016 10:46 PM
Hi, If i can connect micrcontroller with Labview via serial port, then what is thr role of the firmware here?
04-05-2016 03:36 AM
@dhans wrote:Hi, If i can connect micrcontroller with Labview via serial port, then what is thr role of the firmware here?
Do you mean the firmware on the microcontroller? To communicate with a microcontroller you need to have 2 pieces of software:
1) Software running on the microcontroller which performs the 'functions' you require from the microcontroller and also has code for doing serial communications (receiving commands / outputting data) - the serial protocol you will likely need to define yourself (e.g. ASCII, binary) or take something like the LINX toolkit as an example (which works for Arduino)
2) Your LabVIEW code which sends the commands to the microcontroller / receives the data.
04-05-2016 05:00 AM
@dhans wrote:Hi, If i can connect micrcontroller with Labview via serial port, then what is thr role of the firmware here?
You have to write the microcontroller's firmware and have it do communications over its UART so that your LabVIEW program on Windows can send/recieve data. Communications are typically a 2 way street.
04-05-2016
09:30 AM
- last edited on
04-08-2025
04:18 PM
by
Content Cleaner
@dhans wrote:
Hi, If i can connect micrcontroller with Labview via serial port, then what is thr role of the firmware here?
This question makes me think you aren't aware that LabVIEW code cannot be compiled for an arbitrary platform. You cannot take a VI and turn it into code that runs on a microcontroller. The Arduino toolkits for LabVIEW are what others have been describing. The microcontroller has some set firmware on it written in C++, and LabVIEW just talks to it over serial. You cannot take a VI and put it on a microcontroller.
Now there are a few exceptions to that statment like the Arduino toolkit that really does try to take a VI and put on on there, and there is one for the Raspberry Pi that is in beta, and there is a way to turn an industrial PC into a real time controller. But other than a few exceptions, all embedded hardware that LabVIEW code can run on, is NI hardware, meaning a myRIO, cRIO, sbRIO, NI FPGAs, RT PXIs, etc.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-28-2017 09:12 PM
Is there any other way to communicate between LabVIEW and microcontroller other than serial comminication.?
I face communication loss between the hardware and the LabVIEW a number of times in between the program run. Does the problem happen because of the performance of the CPU of the computer or the LabVIEW program?
Note: The serial port 2.0 and the cable is good.