Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB communication time

Solved!
Go to solution

Hi, 

I want to confirm the overhead ni gpib communications time.

Once Host PC with NI GPIB participate with Tester & handler communication, the test time increase almost 190 milliseconds.

Consider NI GPIB took overhead 190 milliseconds more.

 

Anyway to reduce this time ?

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

Depends.  190ms isn't a long time.  What are you doing?  Let's see some code and perhaps we can show you more effecient ways to do things.

 

You should initialize communications, trigger the measurement, buffer the data on the instrument, then read the data back once the measurement is complete.  If you want to run really fast measurements, avoid reading data to PC while measuring.  Generally instruments are very fast at gathering data, but transferring the data to the PC takes time (maybe 10-20ms/data point depending on the instrument).  So you should buffer all the data on teh instrument (to instrument internal memory) then read that data once at the end.  The read can take many seconds but you avoid delays in the measurement.

 

Craig 

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

Hi,

 

Thanks for your reply.

 

Instrument A and Instrument B communicating through Gpib.

Another computer (C) connected with NI gpib to read message for some reports.

our program connect and use ibrd function  on C and read continuously char by char.

once C connected instrument time increase by 190 ms.

 

Now we notice that we use NI GPIB USB HS . is it possible to decrease this overhead time if we use PCI card ?

 

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

Latency and overhead for PCI is about the same as USB.  Why read char by char?  It seems like your instruments are really slow, and all the communication is slowing you down.  But without knowing details - instrument models and code, there's not much more to suggest.

0 Kudos
Message 4 of 7
(2,428 Views)
Solution
Accepted by topic author GovinR

Hi,

 

Latency and overhead for PCI is about the same as USB  = Not true

 

we just tested and found the cause.

USB HS  : overhead time 190 MS
PCI : overhead time 35 MS almost 6 times lesser.
 
Thanks for your advice.

 

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

@GovinR wrote:
USB HS  : overhead time 190 MS
PCI : overhead time 35 MS almost 6 times lesser.

Wow, you spent over 7 years to do this one test!  That seems excessive when you could have just used this: Instrument Bus Performance.

 

You just hit a pet peeve of mine:  Capitalization matters.  You wrote 190 MegaSeconds, which comes out to be over 6 years.  Many would actually interpret your statement as MegaSamples, which really makes no sense in respect to time.  You really meant to write 190ms (190 milliseconds) and 35ms.


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
(2,389 Views)

Hmm.  Is that a significant amount of time?  Not usually, but I can't tell what you tested.    Also lot of that time difference is probably going to depend on your PC motherboard and how it supports PCI vs USB. You should structure your code so that minuscule difference does not cause any issues down the road in case you upgrade other things.

 

To assist people in the future who searc the forums, you could give details of how you tested each setup, any code used in the testing, and your PC/OS setup.  Those details may be a lot more relevant in the future than the times posted and might be of use to someone who was in your situation.

 

Craig

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