LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"getting data and memory arrays.vi" is very slow getting data from instrument

I successfully managed to simply control the "Impedance Analyzer 4294A " from the pc, thanks to the downloaded driver NI 488.2.
I am using Labview 8 and a GPIB connection.
However I have a little issue: when the sweep is completed, the data transfer to Labview is very slow (about 20 seconds).
This isn't a big problem but prevent me to make subsequent sweeps in a little time.
I think the problem is related with the "Getting data and memory arrays.vi", but I don't know how to solve the problem.
Besides the macro of Excel which has the same purpose is much faster (2-3 seconds), so I think it is a Labview issue.
I hope you can give me some cues. Thank you very much!
 
 
 
 
0 Kudos
Message 1 of 14
(3,672 Views)
What differences do you see when you look at the code in the macro and the code in the VI? They both have to be calling similar instrument commands so you should be able to determine what the macro is doing differently. You didn't post the macro for anyone else to look at. Where did you get this macro?
0 Kudos
Message 2 of 14
(3,670 Views)
Sorry, I wrongly logged in with my teacher`s account, but it's always me.
Unluckily the Excel macro is protected by a password and I can't enter it.
My teachers told me that the Excel macro was included in the instrument package when the Impedance Analyzer was bought.
Instead the "get data and memory arrays.vi" simply writes the command "OUTPDTRC" on the VISA, then receives an array of unknown length and stores it.


0 Kudos
Message 3 of 14
(3,658 Views)
You can turn on NI-Spy in MAX and capture the commands from the macro. You can also post the NI-Spy file here for someone to look at.
0 Kudos
Message 4 of 14
(3,653 Views)
Thank you very much, I'll try your suggestion and I'll post the GPIB activity as soon as possible (that is when my associates stop using the instrument). 
0 Kudos
Message 5 of 14
(3,643 Views)
Here it is attached the GPIB activity for both Excel Macro and Labview software.
In the Labview activity I've noticed some time out errors: what are they due to?
Moreover I've found an unknown command  "READ?" used by the Excel macro. In the Programming Manual there isn't any reference.
I can guess what is related to, but I 'd like to know the difference between this one and the "Read data and memory arrays.vi".
Lastly, is there a way to reproduce in Labview the Excel Macro seen in NIspy?
Download All
0 Kudos
Message 6 of 14
(3,610 Views)

Hi Luca

Any more usefull information can help us in finding a solution to your problem. Is the "Getting data and memory arrays.vi" a LV function? If YES could you tell me the path to find it in the FunctionsPalette? If NO I suggest you to track the function's behaviour by using the highlight execution or, best, verify the fuctions/VI that compose the "Getting data and memory arrays.vi" or post it in this forum.

Waiting on your newws - Hope this helps.

.Hudson NIIT

 

0 Kudos
Message 7 of 14
(3,609 Views)
Hi Hudson,
thanks for your help!
My name is Alessandro, Luca is my teacher and I wrongly used his account to log in the first time!...
Answering your question, "Getting data and memory arrays.vi" is a LabView function, but it isn't in the Functions Palette, or better not by defeault.
I find this vi in the driver for my instrument driver Agilent 4294A. 
However I already tracked the function's behaviour, both highlighting the esecution and studying the subVi: it just asks the instrument for data and then store them in an array of unknown (depending on the number of data) length.
The problem is that I can't compare it with the corresponding block of the Excel Macro, beacuse this one is protected by a password.
Now I'm watching with NI-Spy the commands which run on the GPIB when I use Excel.
There is one command: "READ?", that reminds me the Labview Vi quoted before.
However I can't still understand why this "READ?" command is much faster than the Labview Vi.
 
 
 
 
0 Kudos
Message 8 of 14
(3,597 Views)
All of the commands that the macro is using are shown in the NI-Spy file. It looks like with the SAVDAT ON and STOD MEMO commands, the internal data array is saved to a built in RAM disk. The READ? command then gets this data. All of these commands are doumented in the programming manual but the section in the manual about reading from the instrument does not explain this technique. The manual explains the technique that is in the LabVIEW driver. You can take the commands that you see in the macro generated NI-Spy file and make your own data transfer VI.
0 Kudos
Message 9 of 14
(3,581 Views)
I'll soon begin to implement the commands seen in the Excel Macro.
Your explenation has been very useful.
Thanks a lot for your help!
 
 
 
0 Kudos
Message 10 of 14
(3,578 Views)