LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart time

Hello,

 

I am trying to get a chart to display the time across the x-axis from 0 seconds to the time when the stop button is pushed. I have attached the code.

 

Thank you.

0 Kudos
Message 1 of 12
(3,860 Views)

Your code makes very little sense. What is the point of sequentially charting detected frequencies. Don't you want to chart them as multiple plots?

 

To get the correct time axis, all you need is to set the offset and increment of the x axis. The last graph should probably be a graph, not a chart, though. Are you aware of the difference?

 

I don't have DAQ. Can you modify your example to use simulated signals instead?

 

 

0 Kudos
Message 2 of 12
(3,822 Views)

What do you mean by the last graph? I am new to labview, just started working with it yesterday so I am just learning. I am going to produce a frequency graph and an amplitude graph while listening to bearings to determine what frequency and amp good and bad bearings produce.

0 Kudos
Message 3 of 12
(3,812 Views)

I was able to figure it out, thank you for your help. I hope I wasn't too much trouble. I just made those charts inside the loop in order to make sure I was getting a signal while running.

0 Kudos
Message 4 of 12
(3,805 Views)

@kloste22 wrote:

What do you mean by the last graph?


I am glad you figured it out.

 

LabVIEW is a dataflow language, so the graph with the terminal outside the loop will only get data once the while loop stops. This makes it "the last". 😄

 

If you are new to LabVIEW, I would recommend going through some of the tutorials here.

Message 5 of 12
(3,799 Views)

I have attached my code with a signal generator instead of my DAQ device. Why won't it output to the graphs? Thank you.

0 Kudos
Message 6 of 12
(3,755 Views)

As I said, it is all in the dataflow. Your graphs will update once the while loop has finished, i.e. after you press the stop button.

 

Have you done some of the turorials as I suggested above?

 

However, your code has serious problems! First of all, the code runs as fast as the computer allows, potentially accumulating GBs of data in the autoindexing output tunnels. Once you finally press stop, your graphs might have millions of traces and it could take a long time (or even forever if you run out of memory) until the graphs show. This is insane!

0 Kudos
Message 7 of 12
(3,745 Views)

I transposed the array and the graph showed up. He mentioned using an intialize array in one of the tutorial videos if you have a large array, what exactly does that do? I've been trying to figure out what exactly that does and haven't been successful. Would indexing the array work? Thank you for your patients, I appreciate it.

0 Kudos
Message 8 of 12
(3,731 Views)
Your statements and questions make absolutely no sense.

Since you don't know the final array size, you cannot pre-initialize. Right?
0 Kudos
Message 9 of 12
(3,727 Views)

Tha's what I was confused about because the array size is going to be changing depending on how long I take readings from the DAQ.

0 Kudos
Message 10 of 12
(3,724 Views)