Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Recording and watching data while Agilent 34970A is running

Solved!
Go to solution

Hi everyone,

I am using Agilent "34970A" for measuring voltage. I would like to make a code and a dashboard with the following requirement :

- Recording data for several days.

- Be able to start and interrupt the recording process at any time.

- Watching data on a table while the Agilent is recording data.

- Being able to gathering data while the laptop is asleep.

I made a code with the Agilent VI box inspired by the "instrument driver examples in Labview"
I use a "conf trigger" to set the "Chanel delay" and the "trigger" and after block "read VI' (see picture attached) but the problem with that code is that I cannot interrupt and watch the data while the Agilent is running. I need to wait until the block "read VI" is finished and then I can see the data on the table. 

I also tried to use a loop with a bloc read, so to interrupt to code I just need to interrupt  my loop but my code doesn't work when my laptop is asleep and I think there must be an easier way to do it.

 

Could you advice me ? Any better idea ?

Thanks in advance for you comment

 

Oliver HUBERT

 

 

0 Kudos
Message 1 of 15
(4,523 Views)

I am using Agilent "34970A" for measuring voltage. I would like to make a code and a dashboard with the following requirement :

- Recording data for several days.

Save data to a text file (CSV)

- Be able to start and interrupt the recording process at any time.

Either end the program and restart, or bypass the Trigger.  Now the 34970A will NOT acquire any new data to read essentially pausing the system.

- Watching data on a table while the Agilent is recording data.

Once the data is read into LabVIEW from the 34970A, it is up to you how you would want to view it.

- Being able to gathering data while the laptop is asleep.

NOT ADVISED, change the laptop power settings.  While this Data Acquisition Switch is capable of holding 50,000 samples in memory, that would change your entire LabVIEW updating and viewing scheme. 

I made a code with the Agilent VI box inspired by the "instrument driver examples in Labview"
I use a "conf trigger" to set the "Chanel delay" and the "trigger" and after block "read VI' (see picture attached) but the problem with that code is that I cannot interrupt and watch the data while the Agilent is running. I need to wait until the block "read VI" is finished and then I can see the data on the table. 

I also tried to use a loop with a bloc read, so to interrupt to code I just need to interrupt  my loop but my code doesn't work when my laptop is asleep and I think there must be an easier way to do it.

 

Oliver HUBERT

 


 

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 2 of 15
(4,502 Views)

Hi thanks for your help !

 

OK, So my laptop should be awake during the entire duration of the test ?

How can you display the data value while the Agilent is running ? I tried with different bloc like "read Vi", "Read totalizer" But every time I need to wait until the Scan is over, and then when it is over all the values appear all at once on the screen.

When you say bypass the trigger, you mean like for button"wait for the trigger"  for the bloc "config trigger" entry (see picture attached) ? I've already tried this button and it is not working, I don't know how to interrupt my program.

 

0 Kudos
Message 3 of 15
(4,491 Views)

Another idea: Did you check if  Keysights Benchlink datalogger software can do the job for you ?  

0 Kudos
Message 4 of 15
(4,475 Views)

@oli.HUB wrote:

Hi thanks for your help !

 

OK, So my laptop should be awake during the entire duration of the test ?

How can you display the data value while the Agilent is running ? I tried with different bloc like "read Vi", "Read totalizer" But every time I need to wait until the Scan is over, and then when it is over all the values appear all at once on the screen.

 


The data that arrives after the Scan is dependent on how the scan is setup.  If you have 40 measurements in the scan, then data will be available after those 40 measurements are taken and not before.  I have always been one for programming in SCPI to direct an instrument in the exact state that I need it.  It takes some more insight into how an instrument operates rather than using the pre-canned utilities.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 5 of 15
(4,464 Views)

This is related to what I am working on now.  I am writing LabVIEW code to access the computer running Benchlink via TCP/IP.  Benchlink adds to its data file each time it records new data, generally every 10 seconds in my test setups.  I want to poll the Benchlink computer every minute or so, open the Benchlink data file, copy any new data, then close the data file.  However, I don't want to have the data file open by my LabVIEW program when Benchlink tries to save new data, because I think we could lose data if that happened.  Is there anything I can do to synchronize my LabVIEW polling and my Benchlink data writing times to avoid collisions?

 

Thanks.

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 6 of 15
(4,382 Views)

To my knowledge no, you would have to have one or the other poll at one time or the other would miss. 

Chase
NI Technical Support Engineer
Message 7 of 15
(4,348 Views)

Rather than opening the file (which you probably can't anyway because Benchlink will have it locked) just make a copy to the local machine and then play with it there.  Maybe check file size and only retrieve when its grown significantly?

Message 8 of 15
(4,328 Views)
Solution
Accepted by topic author oli.HUB

Hi Everyone,

 

Thanks for your advises.

I figure out how to respect most of my requirements, thanks again.

Here is the code for those who might be interested.

 

Best regards

 

0 Kudos
Message 9 of 15
(4,146 Views)

Hi

Can you also post the missing Subvi.vi?
2018-03-23 22_08_36-Agilent_34970A_dashboard.vi Block Diagram _.png

I usually write drivers a bit different, and I'm trying to understand what you do and maybe will ask why you do it that way.

greetings from the Netherlands
0 Kudos
Message 10 of 15
(4,132 Views)