NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET dll attached to process TestStand is faster than not attached

Hi,

 

I have a function in a C# dll that sends packet to a device (around 90) on serial port.

It sends a packet, wait for respons, analyze it and repeat until a whole file is transfered.

 

I notice that the transfer (by checking the LEDs on serial hub) is faster when the DLL is attached to the TestStand process (with no breakpoints). If I don't attach Visual Studio to the TestStand process, the same dll (compiled in release also) is way slower. It sometimes go fast, but then stop and send a couple packets with 1sec interval, then start again sending 6-7 packets very fast (0.3s).

 

I'm not sure what could cause that. Is it possible because I attached the process to the TestStand editor that it preloads a lot more stuff and dll is faster?

 

The transfer take around 2 minutes. If I attached the dll, it takes like a minute...!

 

Not sure what could cause that behavior.

 

Thanks in advance for your help.

0 Kudos
Message 1 of 2
(2,951 Views)

... just a dumb thought.

Does the priority of the VS process when attached matter over the pure TestStand priority?

 

I belieave your calls to the serial port are marshalled by the OS. Perhaps when you're running you lib as an attached VS process the priority is higher? 

But I'm just giving you a random thoughts...  I'm not sure if VS would have a hiher prio than TestStand anyway. 😉

 

Maciej


0 Kudos
Message 2 of 2
(2,910 Views)