LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Taking measuments with Agilent 34972A without the trigger

Hello,

 

I need to use the Agilent 34972A to take measurements of voltage and temperature in a fixed timed scan after a waiting time using LabVIEW. 

 

For this, I used as my VI base the "Agilent 34970 Advanced Scan.vi", an example provided by the manufacturer. However, this VI scans the measurements using an internal trigger, and because of the delay intrinsic on the trigger's switching, my code it isn't respecting so well the interval scan. In PNG attached I printed the example used as a base; looking the help of the diagram block that scan the channels with the trigger, if I select "False" in the "Wait for Trigger?" option, the instrument didn't scan (null in all of the measurements). 

 

Another thing of this situation it's the sound of the trigger's switching, and my client refuse the work requested with this noise.

 

Looking the driver pallete, I didn't find an similar diagram block that scans multiple parameters (voltage, temperature, current, frequency, etc.) without the trigger. But I know that this DAQ can do this easily (like using the DAQ with 'Agilent BenchLink Data Logger 3' software).

 

Can someone help me to make this important detail in my VI? 

0 Kudos
Message 1 of 5
(711 Views)

I Made a better "scan" vi for the 3497x (0 or 2) , give it a try

 

Agilent34970.png

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 2 of 5
(694 Views)

BTW: I put Configure scan and configure can list way back in the initialization state...

 

wwCapture.PNG

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 3 of 5
(690 Views)

Also I noticed you are not setting the advanced option on your voltage channels.

 

What is your integration time set to? 

 

Integration time, bandwidth, accuracy, channel delay all affect the speed you can take measurements

 

If you look at my initialization I set by DCV measurement (Vbatt) to 1 PLC integration (One Power Line Cycle) and my DCV (W/m^2 pyrometer) to 10 PLC integration. That means one measurement takes .016 seconds and the other takes .16 seconds. 

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 4 of 5
(687 Views)

Hello Thiago!

 

I have two solutions to the problem of delays in your code:
    1.  By analyzing your code, we notice many events happening inside the same 'while loop'. Scanning arrays and writing data, for example, requires much more time than data acquisition, and this can be one of the sources of delays between measurement times. Since multiple readings of the same parameter are performed, the hardware configuration can also be made outside the 'while loop', rather than being executed whenever a measurement occurs.
The first solution is to construct your code in a producer/consumer design pattern. This structure allows you to handle multiple processes at the same time, treating each one individually and in different rates. For example, data acquisition and data writing can occur simultaneously, at different speeds, without the writing time delays the acquisition time.
This basic structure consists of two while loops, called producer and consumer, that communicate using data queues. Look at this basic model of the producer/consumer process structure:

 

Producer_Consumer.pngProducer/Consumer Patter Process

In your case, the problem can be handled according to the following scheme:

prod-cons2.PNG

You can find more information about this pattern here:

http://www.ni.com/white-paper/3023/en/

https://forums.ni.com/t5/Community-Example-Submissions/Using-Producer-Consumer-Architecture-for-DAQm...

An example of how hardware configurations can be done outside of the 'while loop' can be found in Help section on LabVIEW:

LabVIEW: Help > Find Examples... > Hardware Input and Output > DAQmx > Analog Input > Voltage - Continuos Input.vi

 

 

  1. A second solution to the problem is presented in an old forum, where the trigger source configuration is changed from 'Immediate' to 'Timer', and changing the settings as desired. This forum is available at:

 https://forums.ni.com/t5/LabVIEW/Agilent-34970A-continuous-scanning/td-p/727230

 

Still, the first solution must be definitive and more efficient than the second, for the delay problem in the desired time.

 

Thank you for the attention!

 

Isabelle Orlandi

Isabelle Orlandi
Engenharia de Aplicações
National Instruments Brasil
0 Kudos
Message 5 of 5
(654 Views)