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:
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.
Solved! Go to Solution.
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.
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.
Thank you for your help.
Initialize the shift register with an empty array and then use Build Array to to it.