Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow data transfer between Agilent N3300A and PC

Solved!
Go to solution

Hello,

 

I am using an Agilent N3300A connected via Serial -> USB to a PC running LabVIEW 2012.

 

During my tests, I found that the time required to retrieve the data from is very long. With the example below, provided with the drivers, I measured that each of the 3 subVIs that read the instantaneous measures takes about 11.7 s to complete.

 

Snippet.png

 

As a consequence, this example VI does not work out of the box, I need to increase the Maximum Time constant and to wire it also to the two following subVIs. Otherwise, a timeout happen, the device become unresponsive and needs a restart to be controlable again by the PC (haven't found another, more elegant way to get control).

 

Is it possible to speed up the process of retreiving the data? And as a bonus question, how to remotely control again the instrument after a timeout occures?

 

Thank you for your time

LabVIEW 2013 SP1
Windows 7 64bit
Windows Server 2012 64 bit
Windows 8.1 32 bit
0 Kudos
Message 1 of 7
(4,117 Views)

How much data are you getting with each read?  What is the baud rate?  It is very likely it is purely due to the fact that serial ports are pretty darn slow.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(4,112 Views)

Instead of blindly connecting subVIs together, perhaps you should understand actually what you are asking the instrument to do.

Instantaneous measurements and yet 1000 measurement points?

0 Kudos
Message 3 of 7
(4,109 Views)
There are 1000 points to read (default value). Baud rate is 9600 (also default). It indeed occured to me that the limitation comes from serial connection. But it doesn't look like so much data to transfer. Would GPIB be faster?
LabVIEW 2013 SP1
Windows 7 64bit
Windows Server 2012 64 bit
Windows 8.1 32 bit
0 Kudos
Message 4 of 7
(4,108 Views)
Hi nyc, I am not "blindly" connecting subVIs together, and I am trying to understand what's under the hood. I already made a VI that works well apart the fact that data transfert is super slow. I just wanted to make a test with an example created by somebody else, that is supposed to work well. (again: I didn't make the VI showed above, it was included with the drivers). If I understand well, this VI, with the default values, makes 1000 instantaneous measurements every 10 µs and returns them in arrays. I don't see the problem you're pointing at.
LabVIEW 2013 SP1
Windows 7 64bit
Windows Server 2012 64 bit
Windows 8.1 32 bit
0 Kudos
Message 5 of 7
(4,105 Views)
Solution
Accepted by topic author Baobob

What is the data format?  Instruments can usually transfer using ASCII or binary.  Binary would be more efficient.

 

GPIB would perform a lot faster (can approach 1MB/s).  At 9600 baud, you are running at 1200B/s, not including the start and stop bits.

 

Assuming binary format at 4bytes/data point, your serial communications should be taking around 3.3 seconds.  Assuming ASCII with 12 bytes/data point (pure guessing here), that's 10 seconds.  So 11 seconds for a transfer is not out of the question.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 7
(4,101 Views)
Data format is ASCII unfortunately (User Manual says: "All data programmed to or returned from the electronic load is ASCII."). Well, thank you for your explanation, helps a lot! I guess I'll have to turn to GPIB then.
LabVIEW 2013 SP1
Windows 7 64bit
Windows Server 2012 64 bit
Windows 8.1 32 bit
0 Kudos
Message 7 of 7
(4,098 Views)