LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB to RS232

i need USB to RS232 communication LabView VI USB to RS232 communication please Help me for this in my board have one USB HUB this hub had upstreem and 4 downstrem in 2 downstreem converted to RS232( FT232R) I need vi like i should send the data from usb host(upstreem) and am reciving data from one usb and 2 usb to RS232 Converted data i need vi like this please help me for this 

0 Kudos
Message 1 of 6
(816 Views)

You need a RS-232 USB converter, once you plug it on USB, the computer will see that as a COM Port. You use that to send/receive commands. With NI-Visa Interactive control you should be able to setup Serial settings and send/receive commands to verify the operation. On labview you will use Visa functions for that. 

0 Kudos
Message 2 of 6
(771 Views)

You just need the proper driver for the USB-RS232 adapter and it will show up as a COM port in Windows.  From there, just use VISA to write and read.  From there, it really just depends on the message protocol of whatever you are trying to talk to.


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 6
(762 Views)

A USB to RS232 adaptor that is Windows compatible should either install a virtual Com port for each device as it is detected by Windows or come with its own virtual Com port drivers.

 

Once the Virtual Com port is installed using a USB to RS232 adaptor with VISA is no different than using an on-board Com port. 

 

No special USB knowledge or raw USB programming considerations are necessary.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 6
(744 Views)

but this need vi right because i need write data from USB and i need recive data from com 

0 Kudos
Message 5 of 6
(682 Views)

You’re misunderstanding completely what has been told to you. When you connect an FTDI USB to RS-232 adapter to your USB port Windows will automatically install a Virtual COM port driver that makes the serial port on the other end of the FTDI chip look like a serial port in Windows. You simply use serial COMM functions (Windows API) or NI-VISA (in LabVIEW) to communicate with that port as if it was a built in RS-232 ort in your computer. There is no USB programming involved or needed from your side.

 

You really do not want to communicate directly on USB level if at all possible. That is tedious, painful and advanced programming.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(665 Views)