Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Loosing data using ibrda() GPIB asyncronous read

Hi experts,

my problems are:       (fast quad core CPU, WinXP, C++ using NI488.2  v2.4 functions  )

The instrument I use send the data whenever it calculates a new value (2bytes). For that the instr. is Talker and the PCI-GPIB card ist Listener. The PCI-GPIB card transfer during the measurement the control to the instrument (CIC). 

smallest datarate: 0 (if instrument got no external trigger),   fastest data rate: each 2ms a value.

My application starts in a loop a ibrda() for 2bytes and waits by ibwait() for CMPL or TIMO. Immediately the next ibrda() is called not to miss any data. The data is written into a circular buffer. This runs i a own worker thread.

 

As I have up to 4 instruments and 4 PCI-GPIB cards there are 4 worker threads acquiring the data. 

Tests results shows that one or 2 from 4 threads have ~1% loss from results.

 

Maybe  there is a bottle neck accessing 4 PCI-GPIB cards thru the drivers?

Any idea how to avoid data loss?

 

br

0 Kudos
Message 1 of 5
(3,685 Views)

A important additional thing!

I tried the latest NI488.2  v2.5 and the data loss increases to 2%

I just test NI488.2 v1.6 and it seems the loss is 0.  All the 4 threads have identical data counters...

 

 

0 Kudos
Message 2 of 5
(3,682 Views)

Hi br,

 

you mentioned that you have data loss when using version 2.4 and 2.5 of NI488.2, how do you detect the data loss?

Is there any change when you use less instruments or a smaller data rate?

 

Regards,
Bernd

0 Kudos
Message 3 of 5
(3,645 Views)

Hi Mr. Fasching,

all the 4 instruments (R&S ESVB test receiver) are triggered simultaneously at my tests by a pulse generator counting the pulses.

On the PC side each thread (managing one instrument -> PCI-GPIB ) counts the incoming bytes by Threadibcntl()

so what I expected is that generator pulses == result counter of all 4 instruments

what I got: after some seconds one or 2 result counter counts less results. I put a dump to a file measuring the data rate of each thread and what I see is that in this thread the rate is floating between 294/s and 300/s while the good ones are at  nearly 300/s (pulse generator sends with 300Hz)

The loss is about 0.5% ... 1% with the v2.4 and even more worse  1.0% ... 2% with the v2.5.

 

Using NI v1.6 the loss is 0, means generator pulses == result counter of all 4 instruments. All 4 threads show identical counter which == generator pulses even if I accelerate to 500Hz.

 

Of course if I have smaller loss if I reduce the generator pulses/s.  A test at small data rate 10Hz with NI v2.5 shows no loss.

Using only 2 instruments  with NI v2.5 there is no loss (says customer, haven't verified that)

 

best regards

 

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

Hi OutOfRosenheim,

 

according to our developers the 488.2 has been extensively tested to insure no data loss. So we would need some more information like e.g. a spy capture.
Dou you see any possibility to reproduce the behaviour without having the actual hardware?

 

Kind Regards,

0 Kudos
Message 5 of 5
(3,603 Views)