Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

UART Communication via LabView

I am trying to determine the best way to interface a PIC microcontroller with LabView via UART.  I need some sort of digital I/O hardware that can meet the following constraints:

 

-The PIC board has pinouts for USART TX and RX.

-Ultimately, the computer/Labview module will be responsible for communicating with up to 24 microcontrollers at once; this is 48 digital I/O at a bare minimum.  Ideally, only a single hardware module would be used to connect to these devices (or a few daisy-chained together).

-This hardware module would ideally communicate with the PC via USB, although a serial connection would work as well.  It needs to play nice with LabView, of course.

-Baud rates should be as fast as possible.

 

Does NI make any hardware that can accomplish this?

 

Thanks,
Ben

0 Kudos
Message 1 of 8
(13,415 Views)

Hi Ben,

 

If you want to address so many devices I would use a RS-485 interface a use (or make it yourself) a protocol like ModBus so you can address devices.

On the software side it will take more time but on the hardware side you just need RS-485 transceivers and a simple 2-wire cable from device to device.

0 Kudos
Message 2 of 8
(13,394 Views)

hello...i have this attached vi which randomly generate the data and plot it on the graph..as i stop the vi it will save the data in text file with time stamp..now here the need is that i have UART programming by which i have to plot the data coming through UART in this vi..plz help me by editing this vi for UART programming..

thank you..

Download All
0 Kudos
Message 3 of 8
(12,560 Views)

Hello uv_0209,

 

Here are some useful resources that may be able to help you accomplish what you are trying to do.

 

https://decibel.ni.com/content/docs/DOC-17963

 

http://forums.ni.com/t5/LabVIEW-Embedded/How-to-send-recive-this-package-in-UART/m-p/984683

 

 

Ryan
Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(12,530 Views)

thank u sir..

here i have attached edited vi for plotting the data coming through UART..plz give me correction if there is any problem in it..plz reply as soon as possible..i need it urgently.

0 Kudos
Message 5 of 8
(12,520 Views)

 Hello uv_0209,

 

I do not see anything odd. You should test it and let us know if the behavior is the expected or not.

 

Regards

0 Kudos
Message 6 of 8
(12,501 Views)

i tested the vi..i connect the adc program code generating ascii data..but on front panel i have gotcha data as 0 only..

0 Kudos
Message 7 of 8
(12,488 Views)

Hello, Did you program is now working. Have you solved the problem why you are getting zero's?

0 Kudos
Message 8 of 8
(7,073 Views)