LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple serial ports streaming - BSOD/freezes - Hardware or Software problem?

Hello all,

 

I just joined the forums as I'm in dire need of some help with LV. I'm trying to hook up three lasers for an experiment. These are connected to my laptop via seperate RS232 cables with an adapter each to a COM port. I found an LV example that reads in one laser from the manufacturers site (something with .dll files and a C++ library). I'm a beginner with LV and I can't really say I have experience, especially not with custom libraries, so I just tried to make it work somehow. So what I did was basically copy it three times and reconnected some wires and changed the output format. I've added my program to this post; warning, you might get slightly sick by looking at it.

 

Anyway, my main problem is; it works, but only for a limited time. After some time the VI will crash or my laptop will BSOD. Now, since my VI isn't very professional and probably has a very bad structure I'm not sure whether this is a problem with the VI or with the RS232 adapters/USB hub. I read some things on faulty RS232 adapters that conflict, but I can also imagine my VI can't deal with three data streams correctly, so I'm not sure where this is coming from.

 

I was hoping that if any of you would take a glance at my VI, you could tell me whether it's my VI or not. I'd rather confirm this before I buy three new RS232 adapters.

 

P.S. I'm running this on LV 2011 and LV 8.2.1 (my laptop with 2011 only recognises 2 COM ports simultaenously and my other laptop with 8.2.1 all three, but my laptop with 2011 can handle the crashes better)

 

Thanks!

Download All
0 Kudos
Message 1 of 7
(2,844 Views)

I have had lots of issues using USB to Serial adaptors in general they are all crap but I have found that adaptors that use the FTDI chipset seem slightly better than the ones that use the Prolific chipset.

 

We have trashed all USB to Serial adaptors and only use all desktop computers with PCIe serial ports cards now.

 

Yes that means your laptop may be usless for testing purposes as all of ours have become but it's the price we pay for reliability.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 7
(2,833 Views)

Currently we have three different adapters (not sure what chipset each has).

 

Do you think using three confirmed identical FTDI chipset based USB adapters might solve this?

0 Kudos
Message 3 of 7
(2,785 Views)

@kerboiu wrote:

Currently we have three different adapters (not sure what chipset each has).

 

Do you think using three confirmed identical FTDI chipset based USB adapters might solve this?


It might...

 

You know I do not know what has changed in Windows the past few years but they certainly have made USB to Serial adaptors unrealable. It's not just a "LabVew thing" either. I have software that comes with instruments exibiting the same issues using USB to Serial adaptors.

 

Back in Windows XP days thest things were rock solid. I had a test system running 24/7 for several years using six of the Prolific devices on one USB hub.

 

Now with windows 7 I am lucky to get any program using a single USB to Serial device connected to an instrument to run 24 hours without just going off into lala land. No "crash", no error message, nothing, the program just hangs. The only way to end the program is to use the task manager to kill it. Then the serial port is not accessable by VISA, or any other program, you have to reboot to regain access to the serial port.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 7
(2,772 Views)

Yea, I noticed. I tried opening three instances of the sensor software, each assigning a different COM port. it worked longer than with LabView but eventually it froze as well. I'm gonna try three identical FTDI adapters, hopefully that will fix it, or at least make the whole thing stable for longer.

 

I have the same problem on XP as on W7 though, so I'm not sure where the problems lies. Problem with XP is that Task Manager can't kill it. (sigh)

0 Kudos
Message 5 of 7
(2,744 Views)

As an off the wall suggestion, check the usb "power save settings" under "control Panel:Power Options:Edit Plan Settings:Advanced Settings:USB settings" You want the USB selective suspend setting to be Disabled. Another possible idagnostic tool might be to do  a    Power Efficiency Diagnostics Report  which we have found has occasionally pointed us to usb hanging issues. 

 

Using the same type usb-serial adapters doesn't guarantee anything, but I have run into issues where a vendor's driver was implemented incorrectly. It ended up being a wrapper around the FTDI driver, and the wrapper dll wasn't correctly made multi-threaded safe. I browbeat the vendor (I was working at a LARGE corporation, with a prospective LARGE purchase of the devices) into telling me what calls their wrapper made. I then used the FTDI dll directly, not using the "simplified interface" of the vendor's dll. FTDI's dll was thread safe, no more random lockups/BSOD.

 

Good Luck, these are incredibly painful!

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 6 of 7
(2,729 Views)

Well it seems using three identical FTDI chipset RS232/USB adapters did the trick, I can now read all three sensors for longer times without crashing. They are from no prestigeous supplier, but it works.

 

The only thing that occured to me, is that the third sensor really slows down the overall VI. I've ran three instances of the software that came with the sensor (works for only 1 sensor) simultaneously and it doesn't go much slower, so I guess I got a problem here with my VI. However that's probably due to my amaturish VI. I read some things about parallel loops and queueing so I'll have a look at that.

0 Kudos
Message 7 of 7
(2,635 Views)