LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement Computing Plotting Data with Live Graph

Hello everyone, I'm not sure if anyone has any knowledge on using the Measurement Computing software with LabView, but I am looking for some advice. I am trying to plot data points at an interval of 1ms or possibly faster. Using a while loop my data does not plot at that speed. It seems that it plots as soon as the while loop allows it as you can see in the picture attached. I also what to be able to see the data live on the graph. This is where my problem comes in. Measurement Computing has a timer that does allow me to take my samples at the rate I desire, but then my live graph does not work. I have attached 2 different renditions of this program that I tried. The one with everything in the while loop allows me to see my data live on the graph, but does not plot the points in 1ms increments. The one with the graph in a while loop will plot the points at the rate I desire, but does not show the graph. I just threw this version together, but it is not ideal. My 2 requirements are that I can watch the graph live and that I am able to choose when to start and stop recording the data as you can see in the first version of my program. Would anyone have advice on how to achieve this?

Download All
0 Kudos
Message 1 of 2
(772 Views)

Hi Devenp,

 

the MeasComp driver is very similar to DAQmx by NI, so you should:

- create a task/channel before the loop, but not inside a loop…

- create a task, which contains all three channels instead of 3 independent tasks. (Does your hardware even allow several tasks for AI channels?)

- let the hardware provide the timing of your loops instead of trying to fix this with the Wait function…

 

You should examine the DAQmx example VIs coming with LabVIEW+DAQmx to learn how to setup simple DAQ routines. (Most probably the MC driver also brings some basic examples!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(725 Views)