From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to graph acquired data?

I want to create a VI similar to one of LabVIEW's examples: Graph Temperature VI.

Instead of temperature, I want to plot data (angle of rotation) that I have acquired from my DAQ device vs. time. However, currently...it is not plotting as I want it to. It always appears as a straight horizontal line. Perhaps I am setting the time delay/number of measurements too high or low, I'm not sure. The time delay is 0.0001s and 10,000 measurements. Can someone take a look at my VI and see what I'm doing wrong? Don't worry about the bottom part, just the top part of the VI.

Thanks in advance.

LabVIEW VI.JPG

0 Kudos
Message 1 of 11
(3,482 Views)

The for loop seems sensless. why don't you just wire the DAQ data (after the multiply by 360) directly to a waveform graph?

 

p.s. attaching an image with a DAQ Assistant and dynamic data is also pretty worthless. they both do a very effective job of hiding what is actually being done (i.e. sample rate, number of samples, number of channels, everything else).

Message 2 of 11
(3,471 Views)

Ok, I've wired it directly to a waveform graph.

 

I don't know what to set my samples to read or rate. I know my channels are correct because I can send and recieve information from my DAQ device. Currently my samples to read is set at 10 and rate is

100 Hz. But this causes the motor that my DAQ device is attached to go crazy and won't stop turning.

 

Thanks in advance. 

DAQ Assistant.jpg

0 Kudos
Message 3 of 11
(3,464 Views)

I think I figured out a good sampling rate/ number of samples.

 

I have another question though. I am able to display the angle of rotation of the motor numerically in a table but it only shows the angle of rotation...not the time at which it occured. Is there a way to set the table up so it shows the time the sample was taken as well?

 

Thanks for the help.

0 Kudos
Message 4 of 11
(3,450 Views)
I don't see a table in your code. How are you writing to it?
0 Kudos
Message 5 of 11
(3,443 Views)

Oops...sorry, I did not update my picture after I made the changes.

Now I want a column in my table showing the time as the data is acquired. So if at 1 second the position is 60 degrees it'll display one second in one column and 60 degrees in the other one.

Sorry if I'm not very clear, I'm kind of new to LabVIEW.

 

Any help would be appreciated.

New LabVIEW VI.jpg

0 Kudos
Message 6 of 11
(3,438 Views)

Go to diagram and double click the Build Table function. Select Include time data.

0 Kudos
Message 7 of 11
(3,434 Views)

Hmm...I tried that but it gives me the actual time the VI is run. For example, 14:30 06/18/2009.

 

I don't want that...I just want the time as the data is being acquired. For example, data point one was acquired at 1 second, second data point was acquired at 1.2 second,etc.

 

Any help would be greatly appreciated.

0 Kudos
Message 8 of 11
(3,431 Views)

Not sure if you can set the precision of the time stamps. It is displaying the time that the data is acquired.

 

You might just have to use a real table instead of the Express VI. All of the mecessary time information is embedded in the dynamic data type you are using - dt and t0.

0 Kudos
Message 9 of 11
(3,428 Views)

How I would be able to obtain the time using a real table? Can you show me? (Sorry, I'm quite new to LabVIEW)

 

Thanks. 

0 Kudos
Message 10 of 11
(3,420 Views)