Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

UART communication between Labview and external devices

I have not been able to get much help from NI Tech support for a proposed set-up using Labview as basis. I don't have an active license for labview or any NI hardware. However I need help to verify that a proposed system will work before I go ahead and make the company I work for make the investment and purchase License and hardware. I need to use Labview to control an audio measurement system through USB preferably and also use labview to communicate with a device under test ( DUT) through UART. After several attempts NI referred me to Newark their local sales representative for the region I am located in. Sales engineer was not much help.  Stated that NI does not sell any hardware that has UART communication. After my own research I found 

that the following NI devices do have UART

NI myRIO

NI ELVIS RIO

NI roboRIO

I called Newark back and the same sales rep told me oh yes NI makes these hardware but from their experience only sell these to academic institutions. My questions are

1) Is this the case can these devices above be used only for Academic purposes and not be sold for commercial/ industrial applications?

2) Can anyone confirm that these are the only three Hardware devices made by NI that support UART communications ?

3) Looking at my block diagram is what I am proposing a viable solution or do I need to look else where?

 

Thank you

0 Kudos
Message 1 of 10
(1,627 Views)

The myRIO and ELVIS were developed for academic situations.  That does not mean you could not use them in commercial settings though.

 

However, only based on your description, you just need a decent PC with an RS-232 card.  I don't know what your audio measurement system is though.  Or is that what you are trying to develop?


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 2 of 10
(1,588 Views)

UART could be a lot ..  most common is RS232 ,  or  low level to a µController, or ...

Say your system running the LabVIEW program has a USB port, you usually get adapters for your UART to USB that show up as a serial COM port in the system and can be adressed by LabVIEW (VISA driver)

 

Depending on the needed performance of the UART (or maybe more of them in one system) one can use dedicated hardware for high speed serial communication

https://www.ni.com/de-de/shop/hardware/products/serial-interface-device.html

 

sorry german page

 

So, if you provide more information about the UART, we can help better.

 

And yes it's a shame <censored >  NI customer support ....     did I now support that by answering?  😞

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 3 of 10
(1,576 Views)

Hi crossrulz, Thanks for the reply. I am unable to use RS-232 communications in this case because the DUT uses an  SiP that we can only communicate with using UART. The audio measurement system is what we are trying to develop . The DUT has a MEMS microphone on it that records sounds . We need to be able to test it during manufacturing when it is completely assembled to make sure it works. Currently the SiP talks to the MEMS microphone through I2S , records the sounds and stores it to flash memory. We need LabView to switch on Audio Analyzer which will generate a frequency sweep signal through the speaker. LabView will then through the USB/UART interface communicate with SiP to turn on microphone and record the sounds.  Recorded sounds will then be sent to Audio Analyzer for analysis and then result will be passed back to LabView GUI to display test result.

 

 I am currently looking at Audio Precision for the Audio analysis or even possibly NI. I know that have an audio and vibration suite

I hope my explanation is clear

0 Kudos
Message 4 of 10
(1,548 Views)

Probably you can get a FTDI USB-UART cable, but to use the driver APIs, there is learning curve.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 5 of 10
(1,545 Views)

Hi Henrik Danke Shoen. Unfortunately I am unable to use RS232 or most of the other Serial communications protocols RS485 PCI etc. The SiP on the Device under test communicates with a MEMS microphone on the device using dedicated I2S . The SiP has GPIOs which we are able to configure for UART communications but not RS232.

Yes I was thinking of using a USB-> UART converter .  If it may help I have attached a snap shot from the page that explains the UART/ GPIO use for the chip set family  which is from Nordic that I am using on my device.

And yes you have provided the support by answering 

 

Regards 

0 Kudos
Message 6 of 10
(1,543 Views)

looks for me like an ordinary serial port , the hardware in your picture can be ordered  just hook them to the RXD, TXD and GND and your done.  as i said a USB to UART adapter .  some pittfalls with the driver (wether FTDI or profilic or what the chinese will buildin 😉 )

 

it will show up as a COM port in the OS and LabVIEW can acess it via the VISA driver.

 

why the hell the board designer of that SIP didn't include that conversion chip on the PCB??

 

Have nice weekend

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 7 of 10
(1,536 Views)

Sounds like your device simply has a 5V or 3.3V TTL UART interface. Nothing that would be any problem as you can get USB-FTDI cables that are either proper RS-232 or also simply 5V/3.3V TTL compatible. They usually do not have a real connector but are so called pig tails with loose wires or single 2.54mm female connectors.

 

https://nl.farnell.com/ftdi/c232hm-ddhsl-0/cable-usb-mpsse-0-25a-3-3v-o-p/dp/2352015?st=ft232h

https://nl.farnell.com/ftdi/c232hm-edhsl-0/cable-usb-mpsse-0-45a-5v-o-p-50cm/dp/2352016?st=ft232h

 

These are an example of an universal cable for either 3.3V or 5V. They can be used either with the FTDI MPSSEE interface driver to implement all kinds of synchronous or asychronous interfaces such as SPI, I2C and bit bang or they can be used with the FTDI VCP driver to act as a simple serial port in your computer. There are cheaper variants that only have an RxD, TxD and GND wire, which for a lot of microcontroller communication is all that is required.

 

FTDI MPSSE mode requires you to interface to the according FTDI DLL and has a learning curve for sure, but with the FTDI VCP driver you can simply access the interface with NI VISA from within LabVIEW. If your UART interface only uses RxD and TxD and maybe one or two handshake lines, the VCP driver should surely work for you.

Rolf Kalbermatter
My Blog
Message 8 of 10
(1,523 Views)

Hi Rolf,

Thanks for the response and your time. Unfortunately the links you supplied in the message probably need registration on Farnell's website to be able to view. They gave me access denied on server messages when I tried to view.  I will search to see if I can find them. 

Yes the SiP is compatible with only  3.3V TTL . For our communication purposes with the SiP we only need RX, TX, and GND so the FTDI VCP will probably be the best route to go. Right now I have not purchased any hardware or software. I just wanted to be sure that in Theory I could set up the system before getting the company to invest time/ money purchasing hardware and software for the application.  

0 Kudos
Message 9 of 10
(1,516 Views)

Yes I was automatically logged into my account it seems.

 

Without being logged in I found also this one which would probably work fine for you:

 

https://nl.farnell.com/ftdi/ttl-232r-3v3-we/cable-usb-ttl-3-3v-wire-end/dp/1740365

 

The other two would be:

 

https://nl.farnell.com/ftdi/c232hm-edhsl-0/cable-usb-mpsse-0-45a-5v-o-p-50cm/dp/2352016

https://nl.farnell.com/ftdi/c232hm-ddhsl-0/cable-usb-mpsse-0-25a-3-3v-o-p/dp/2352015

 

If you go to your local Farnell site you should be able to enter the last number in the URL which is the Farnell order code.

 

 

 

 

Rolf Kalbermatter
My Blog
Message 10 of 10
(1,510 Views)