Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

lost data between oscilloscope and computer

I am trying to determine the source of a bottle neck in data transfer/retention. Data is being transferred from an oscilloscope to a computer via gpib at irregular intervals, but no greater than ten times per second. There is no interruption in data transfer of any kind when I am not trying to log the data. However, when I am logging data there seems to be a gradual slowing of the transfer until i observe several oscilloscope triggering events occur between transferred waveforms to my labview program. The labview program does little manipulation to the data. It adds each XY pair to an array that grows over the course of collection (typical ending size is ~3500KB). It also calculates a running average of the waveforms. Initially this had been done by summing over the entire storage array and dividing by the number of files. Thinking that this might be computationally taxing to the computer, I tried to perform a weighted average of incoming waveform and a stored average. But, this hasn't seemed to address the problem.
 
So, I'd welcome any and all advice about how to diagnose this problem. The computer is relatively old (1GHz processor, 256MB memory, 30 GB hard drive), and I am thinking of upgrading it but have been told that this should not be the source of my problem. I'm using a PCI GPIB card.
 
Thanks in advance for your help!
 
-Eli
0 Kudos
Message 1 of 14
(4,768 Views)
The problem lies in the gradually building the array. The memory allocation takes a long time and the bigger your array grows the longer it takes.
Allocating memory in bigger chunks is speeding up a lot.

If you publish the program I can try to change it.

greetings from the Netherlands
0 Kudos
Message 2 of 14
(4,763 Views)
Albert, that is enormously kind of you. This program is a bit of a bear. I inherited it from someone who did not believe in an object oriented approach so that it is rather cluttered. I will completely understand if you don't have the patience to deal with it.
 
I imagine that memory allocation would be faster on a faster computer with more memory?
0 Kudos
Message 3 of 14
(4,757 Views)
Eli:

I am going to take a deeper look at your vi and post a suggestion soon.
Thanks.

Rudi N.
0 Kudos
Message 4 of 14
(4,719 Views)

Thanks, Rudi! I really appreciate your help.

-Eli

0 Kudos
Message 5 of 14
(4,715 Views)
Hello Eli

finally found the time to really try to look into your problem
Indeed I would have written something like this in LV3 but not now anymore

In fact a lot of subvi's are still missing look in vi hierarchy and you find all of them.
The best you can do is zip them


greetings from the Netherlands
0 Kudos
Message 6 of 14
(4,706 Views)
Apologies for not including all of the sub-VIs. I wasn't sure whether to just include the VIs where I thought the problem was located or the whole thing. Here is a zip file containing all of the sub VIs and the main VI entitled "Mass Spec (final) -eli no misses".
 
Thanks again to the LabView community for taking this on.
 
-Eli
0 Kudos
Message 7 of 14
(4,698 Views)
It is almost complete Eli

still missing:
     Integrate.vi
     GPIB Query.vi        (I guess I can fill this one in from Agilent)
greetings from the Netherlands
0 Kudos
Message 8 of 14
(4,671 Views)
How embarrassing. I apologize for the inconvenience. Here is an updated zip file. I have tested it out to make sure that, once unzipped, the Mass Spec (final) . . .  vi opens successfully and can be run.
 
Thanks for your patience. 
0 Kudos
Message 9 of 14
(4,666 Views)
Great, All VI's are available now.
I tried first in version 6.1 but now I looked at it in 7.1 (autogrow on structures is great for this style of program.
Don't worry I'll recompile to 6.1 again (and maybe to 6.0 also)

Eli , one question , where do you activate logging, I found one big knob on the frontpanel just below Collect Spectra. Is that the one?

greetings from the Netherlands
0 Kudos
Message 10 of 14
(4,661 Views)