From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

usb to serial communication

Hello everyone,

 

Im working on a project which has an device with rs232 port. I modified the basic Serial read-write VI. The program works fine with PC Serial port. But when I try to communicate with the same device through USB to serial converter (FTDI FT232RL FT232 USB TO TTL 5V 3.3V SERIAL ADAPTOR FOR ARDUINO BE0027) that's not happening and I get error message saying VISA read error. I searched forum for solution but still im at same problem.

 

pls help me out to solve with this problem.

 

Thanks.

0 Kudos
Message 1 of 13
(5,340 Views)

Hi reva866, 

 

Can you share a code or a snippet so that we can help you?

 

Emre

Actor Framework rocks!
Emre TUZUNER
0 Kudos
Message 2 of 13
(5,336 Views)

USB to RS232 Serial converters are getting better these days but you may still need to try a few different models if you're interfacing to older equipment.  What device are you attempting to talk to?

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 3 of 13
(5,295 Views)

RS-232 is a pretty loose and "sloppy" standard, so two devices which are both following the standard might very well not be able to communicate. I had a similar thing happen to me, where a JLink couldn't communicate with mu USB dongle, but worked with the motherboards serial port, but not on the next computers port ... So, try with a couple more. 😕

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 13
(5,281 Views)

Its the same vi from examples (Basic Serial Write & Read). The same program throughs "Framing Error during data transfer" error when I use USB to serial converter. What could be the reason for this. Pls help out.

 

Thanks

0 Kudos
Message 5 of 13
(5,255 Views)

I use FTDI- devices a lot and it's quite reliable. Look at my settings:

Device Manager.png

 

Properties 1.png

Driver Version 2.12 is quite new, but not essential

 

Properties 2.png

Klick this Button to configure the FTDI- Chip (the other settings are configured by your VIs settings)

 

Extended FTDI- Properties.png

These are my settings. No problems.

Are you using Handshake (XON-XOFF, DTR-DSR)?

 

Greets, Dave
0 Kudos
Message 6 of 13
(5,242 Views)

After doing these setting my error remains same (Framing Error). The baud rate, start bit and everything are set correctly. The problem Im mainly getting is that when I run it, sometimes it starts with a random symbol or character, and then it stops running and tells me I have a framing error. Sometimes as well, when I start it, nothing happens at all, and then after a little wait, it says I have a timeout error.

 

Pls help out

0 Kudos
Message 7 of 13
(5,213 Views)

Hi reva866, 

 

Can you send/read data using a software like Putty? Like others say, you may have a problem not caused by LabVIEW.

 

I suffered a lot in the past because of the converters too. then I started to use this converter and I never had a problem.

 

Emre 

Actor Framework rocks!
Emre TUZUNER
0 Kudos
Message 8 of 13
(5,210 Views)

The device has communication exe supplied by the manufacturer. with that also it is not communicating,

0 Kudos
Message 9 of 13
(5,206 Views)

There's a known bug with USB Serial convertors.

http://www.ni.com/product-documentation/52366/en/#182027_by_Date

 

It's supposedly fixed in VISA 15.0 but I haven't had a chance to test it. 

—Ben
Prevent your computer from sleeping programmatically!
Use Power Requests
Download from GitHub

0 Kudos
Message 10 of 13
(5,194 Views)