05-14-2022 05:11 PM
Hello everybody,
I'm trying to measure x and y (y depends on x) values using the same instrument, where x is changed manually without involving the instrument. I want to plot a xy graph real-time and save the xy data to excel. If you have a vi which does a similar job, please share it with me.
Thanks
05-15-2022 03:20 PM
This is a very basic task. What do you need help with?
Also note the learning resources listed at the top of the forum?
05-15-2022 05:45 PM
Thank you for your reply.
I figured out creating a xy graph real-time. Now, I'm having trouble saving all x and y data points measured for the graph in an excel sheet/text file.
I've attached a sample vi with stimulated data. Sorry, it needs more proper arrangements. I'm trying to get it work first.
Could you please suggest how I can save all x and y points measured?
Also, if you know how to control the temperature unit using LabVIEW measured by a Keithly 2000 multimeter, please let me know.
Thank you for your help so far.
05-15-2022 05:48 PM
Please "save for previous" (2020 or older) and attach again. I cannot open VIs in LabVIEW 2021.
05-15-2022 05:55 PM
Here it is.
05-15-2022 06:36 PM
Thanks.
Here's a quick draft that can potentially give you some ideas.
05-15-2022 07:58 PM
Thank you very much for the detailed instructions.
I'm writing this VI to control a Keithly 2000 multimeter.
The objective of my project is
- To measure temperature(x) and resistance(y) of a wire/electrolyte by varying temperature using a heater (Get x and y simultaneously with 1 minute time gaps)
-To be able to select "Kelvin" unit for temperature measurement in the vi itself.
-Plot y vs x real-time
-Plot R/R0(y/initial y) vs T(x), use linest function to obtain linearly fit xy graph and slope.
-Save the x,y,y/initial y data points measured in an excel/text file.
I've attached the initial vi I had drafted and the modified vi with shift registers. The feedback node used in the previous vi was just to get model x and y values for me to troubleshoot others parts of the vi. I cannot attach a 2020 version vi here with the keithly palette icons for some reason.
I used a sequence because the multimeter cannot take 2 different measurements at the same time.
More guidance would be much appreciated.
Thank you so much for your help so far.
05-15-2022 10:13 PM
@Zhulfaa wrote:
I used a sequence because the multimeter cannot take 2 different measurements at the same time..
If you line functions up along an error wire, execution order is automatically enforced and hte next cannot start until the previous has completed. The magic of dataflow! Flat sequences are rarely needed and stacked sequences are never needed (there is a reason they disappeared from the palettes years ago!). They make the code extremely difficult to follow and debug. Sequence locals also require ugly wiring. (Stacked sequences had their limited use 25 years ago when monitors were tiny, but now they are simply a hallmark of poor code. You will never see them in well written programs).
Sorry, I won't look at an album of code pictures. We prefer the actual VIs..
As I said, all you need is a state machine with a single outer loop and a few states (idle, wait for next measurement, take measurement, write file, etc.). Accumulate measurement data in shift registers, etc. If the measurements are minutes apart, you might as well do the fit with every graph update as I showed. Doesn't cost much.