Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-RS232 /LV2011 & NI-Serial 3.8.1

I have an application where I have been using LV8.6 & NI-Serial 3.6 along with either single USB-RS232 cables or USB-RS232/4 4 port systems at 115.2K baud fine for over a year and just recently upgrarded to LV2011 & NI-Serial 3.8.1. Since the upgrade I now periodically experience dropped data and yet get no error from my LabView app. I see this on multiple systems(XP & Vista) when using NI-USB hardware...when I remove the NI-USB hardware and use a native serial port on my XP machine the problem goes away(even with LV2011 & NI-serial 3.8.1). Other clue I have is that on VISTA machines I have that use internal PCI serial card (PCI-8430/8) I don't see the problem.

 

This is mysterious to me...scratching my head...any help would appreciated!

 

Jim

0 Kudos
Message 1 of 7
(2,071 Views)

Greetings, Jim;

 

When you went from LV 8.6 to LV 2011, was there anything that changed in the program with the upconvert? As in, it sounds like the upconverting might have changed the VI's in some way. With a LabVIEW example or some other code, are you able to obtain data from your devices without loss?

 

Also, what other hardware would you happen to be using? When you say NI USB Hardware, so you mean the USB - 232 or something else?

 

Finally, have you used the NI I/O Trace? It would allow you to see more information about the communication

http://digital.ni.com/public.nsf/allkb/282C5D41E2BA04F2862574BA007803B9

 

Cordially,

 

Simon Perez

Applications Engineer

National Instruments

National Instruments
Applications Engineer
0 Kudos
Message 2 of 7
(2,050 Views)

Simon:

 

Thanks for the feedback!

 

  • Nothing has changed in the upconvert process that I am aware of...and code natively developed in 2011 also displays the issue.
  • I am still having issues, which I have traced to serial buffer overflow issues.
  • Yes, the H/W with issues is USB-232 and USB-232/4.
  • I have used NI IO trace before, great suggestion, haven't tried it here yet, but I have now traced the issue to a buffer overflow.

It seems like something has changed in the way the buffer is handled in 2011, NI-serial, or Windows that has caused the issue to popup.

Once discovered I thought it would be a relatively simple fix to incerase the serial buffer size & flush the buffer but I have increased the buffer from the default 4K to 32K and still have problems...maybe IO trace will help me isolate the problem...I'm sure will end up being able to be solved in my code...but what is curious is why I am having to deal with it after update and not before.

 

Jim

 

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

Greetings;

 

Indeed, it is rather interesting that increasing the buffer size did not help and that the issue only appeared with 2011. Still, when you do take a look through IO trace, post what you learn such that we may isolate the error.

 

In addition, does this kinda problem pop up just with this piece of code or with any data acquisition with the same setup?

 


Simon Perez

 

National Instruments
Applications Engineer
0 Kudos
Message 4 of 7
(2,026 Views)

Simon:

Upon further digging into this it seems like it may be more complicated...I have a support ticket covering this at NI...

    • Didn't learn much from IO Trace...basically everything looked normal until the buffer overrun occurs.
    • Found that if I plug a interal card(PCI-8430/4) but don't use it in the same PC that has the USB-RS232 and now test the USB device with an incresed buffer size, the buffering behaves as expected...I can manually create a backlog situation and the buffer backlog smoothly increases to the value that I have set, and then as expected gives me a buffer overrun.
      • If I take the internal card out and repeat my test...I see erratic results with the buffer, and when set to 32,768 bytes, my program bombed with an overrun when the reported backlog was only 4,700 bytes. Pretty strange.
      • I am wondering if somehow when I upgraded to 2011 I did not get all the drivers etc. that I should have. It was my 1st attempt at generating a installation file from my VLM...it seemed to go well...but it was new. From Max 5.1 I show having LabView 2011 SP1 f2 & NI Serial v3.8.1 but I am wondering if there is a deeper driver verification I should be doing?

Jim

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

jimg,

 

Have you tried reinstalling the Serial drivers after your fresh install?  During the install of the drivers it will repopulate the drivers in 2011 and should work for you.

 

Regards,

 

J Newk
Systems Engineer
National Instruments
0 Kudos
Message 6 of 7
(2,009 Views)
  • Thanks for the feedback...I did try down reving to an earlier version on NI-Serial which did not work, then reinstalling back to the latest, which also did not work.
  • Based on another forum post that also seemed similar(http://forums.ni.com/t5/LabVIEW/Problems-With-USB-to-Serial-Adapter/td-p/1468626) I have tried a CommFront USB-232-1 and that immediately fixed the problem.
  • I have an open ticket with NI support on the issue and hopefully they can get to the bottom of it...looks to me like a low level driver issue of some sort since my test program which uses the latest NI-Serial & VISA works fine with the CommFront part...it never gives me a buffer overrun error unless I actually get to the end of the 32K buffer.

Jim

 

0 Kudos
Message 7 of 7
(1,978 Views)