Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-232 slow under Windows 10

I have a Labwindows/CVI 2016 application that communicates with a bunch of Eurotherm temperature controllers via RS-232 using a NI USB-232. I have been running it for several months under Windows 7 and it goes through and queries all the Eurotherms in 1.6 seconds, consistently. When I switch over to a Windows 10 computer this query time is very erratic, sometimes it might take 1.6 sec. but most times is in the 4 to 5 second range. I have the same version of the drivers on both computers (NI-Serial 15.0) and I'm using the native calls: OpenComConfig, ComRd, etc.

0 Kudos
Message 1 of 5
(4,750 Views)

Hi PSevilla,

 

What differences besides operating system are you aware of between the computers? I'm interested in hardware specifications (number of CPU cores, etc.) All the operating systems, development environments and drivers are compatible, so there shouldn't be too much of a difference in performance. Is the 1.6 second timing a result of explicit timing in the code or is that just as fast as it will run? If you're not explicitly timing the code, it sounds like the difference could be due to jitter. If anything else is running on the Windows 10 machine, extra processes could be contributing to the extra delay. Windows 10 is a non-deterministic operating system so there's not much you could do to eliminate jitter besides stopping as many background processes as you can. 

 

You may also find some useful information by running I/O trace during the process when it's running on Windows 7 and on Windows 10, to make sure the DLL calls are the same.You can run an IO trace by following the instructions on the linked document:

 

Performing a Good NI I/O Trace Capture for Debugging/Troubleshooting

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

Austin
Staff Software Engineer
NI
0 Kudos
Message 2 of 5
(4,691 Views)

The ironic thing is that the Windows 7 computer is 6 years old and the two Windows 10 computers that I have tried are both brand new, but I still get the same erratic behavior. I have done all testing with no other applications running. I have a separate thread whose only job is to sample the Eurotherms as fast as it can, and I call the Timer() function at the beginning and end of the loop to measure the execution time.

 

At this point I may try to set up a more controlled test where I don't use the Eurotherms and instead I do some sort of loopback test or maybe send data from one computer to another. I also have some cheap USB-to-RS232 adapters (FTDI driver) that I might try, although I went with NI because the cheap ones tend to lock up when I close the serial port.

 

I'll also try the I/O trace you mentioned when I get a chance. Currently we are running a multi-day test with the Windows 7 computer so I wouldn't be able to switch to the Windows 10 computers until we are done.

0 Kudos
Message 3 of 5
(4,678 Views)

Hi,

 

Can you post some of your code?

 

Curt

0 Kudos
Message 4 of 5
(4,644 Views)

A loopback test is a good idea, I look forward to the results.

Austin
Staff Software Engineer
NI
0 Kudos
Message 5 of 5
(4,637 Views)