LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Microcontroller interfacing with labview

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!Smiley Happy

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 1 of 13
(11,329 Views)

What kind of microcontroller?

0 Kudos
Message 2 of 13
(11,304 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 13
(11,284 Views)

Hi, thanks for your reply. So, can i take these points as basic requirements to connect microcontroller with LabVIEW?

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 4 of 13
(11,232 Views)
@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
0 Kudos
Message 5 of 13
(11,210 Views)

Hi, If i can connect micrcontroller with Labview via serial port, then what is thr role of the firmware here?

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 6 of 13
(11,161 Views)

@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.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 7 of 13
(11,138 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 13
(11,127 Views)

@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.

Message 9 of 13
(11,101 Views)

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.

 

0 Kudos
Message 10 of 13
(9,871 Views)