04-05-2018 07:56 AM
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?
04-05-2018 09:20 AM
I Made a better "scan" vi for the 3497x (0 or 2) , give it a try
04-05-2018 09:27 AM - edited 04-05-2018 09:28 AM
BTW: I put Configure scan and configure can list way back in the initialization state...
04-05-2018 09:34 AM - edited 04-05-2018 09:40 AM
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.
04-06-2018 12:59 PM
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:
In your case, the problem can be handled according to the following scheme:
You can find more information about this pattern here:
http://www.ni.com/white-paper/3023/en/
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
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