Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Continuous Measurement Program - Basics

Solved!
Go to solution
Highlighted

Hello all,

 

I have a vague understanding of the DAQ interface and VISA API. I have some standard HP34401s and other instruments connected through GPIB (but using VISA). Without having to buy a new piece of hardware for data logging, I'd like to achieve the following in real time:

 

  • Output data from all DMMs to a table or array nicely, with a time index (relative seconds; absolute time and date is overkill)
  • Plot real-time data from all sources separately (scaled appropriately with math modules and automatically re-scaling plot size)
  • Be able to output data from the plots into neatly formatted CSV files at the user's command, at the end of the session
  • Display the screen of an infrared camera software on the same LabVIEW front panel as the plots (IMAQ driver?)

Details: 

 

Based on user input on experiment duration, gather data from three different DMMs (and other instruments, later on) per second but display them simultaneously as well as plot in real time. The image below shows a simple prototype of what I'd like to achieve. Currently I'm able to view all measurement values, but only after the loop is terminated (as expected).

 

I've also tried putting the indicator array inside the loop to view data in real-time, but of course it does not retain the value per each index; it only increments to the next row and deletes the previous cells per each iteration. Given this background, I'd like to:

 

Any guidance on these will significantly reduce my project time. Thank you all in advance. 

 

DMM_LoopQuestion.PNG

 

 

 

0 Kudos
Message 1 of 5
(451 Views)
Highlighted

1. You should initialize and set up your measurements before you loop and don't close the handles until after the loop.

2. Store your values in a shift register.  Then you can build your array inside of the loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(389 Views)
Highlighted

1. I included a screenshot of a more primitive version of what I was working on, sorry. This was prior to using NI-MAX and tracing the protocols taking place and seeing that there are dozens of commands taking place for one 'read' function. The correct while loop includes only the 'read' block in the loop.

 

2. I tried the shift register, but when the array was outside the loop. If the array is inside the loop, what am I to 'shift register' on the tunnel mode select? the screenshot below shows an attempt to generate an output array from inside the loop. If that array is continuously updated inside the while loop, then an array needs to be initialized from outside the loop to allocate memory. 

 

AnalogEE_0-1597190342866.png

 

 

 

Thank you for your help.

0 Kudos
Message 3 of 5
(350 Views)
Highlighted
Solution
Accepted by AnalogEE

Initialize the shift register with an empty array and then use Build Array to to it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(333 Views)
Highlighted

Great. Appreciate your help.

0 Kudos
Message 5 of 5
(323 Views)