LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform graph problem

Solved!
Go to solution

is there anyway to plot a time(X-axis) versus acquiring data(Y-axis) in a Xy graph the vi i have attached here? and also how can i configure a sampling rate using DAQmx timing palette so that i can acquire a 1 to 100 samples per channel per second.

Thanks in advance,

Regards,

Dinesh

0 Kudos
Message 71 of 95
(1,587 Views)

Use a shift register, as I'm sure has been suggested.

 

sr.png

 

However, this won't do what you want when you change the X and Y values. You should have a case structure or event structure, so that if the X or Y values change, you reset the array to empty (+ new values). Alternatively, and more likely, you need to store all values over time, and index as needed from a 2D Array.


GCentral
0 Kudos
Message 72 of 95
(1,586 Views)

Hi Mr.Butcher,

          I need to know about the second thing that refers 'store values over time and indexing', i don't understand this.

 

 

0 Kudos
Message 73 of 95
(1,580 Views)

What I mean is I assume you want to be able to change the values of X and Y, and display their historical values, not just new values starting when you set those values.

 

For this to work, you need to keep all of the data you acquire in memory. Use a Shift Register and the Build Array (with the mode set to Concatenate using right-click menu) to do this. Index out the appropriate rows of your 2D array (channel vs time) to get specific channels.

 

The tutorials at the top of this forum board should be helpful if you need more guidance. You already have almost all of the components. 


GCentral
0 Kudos
Message 74 of 95
(1,572 Views)

Hi butcher,

   I get it but what it denotes that 'Index out the appropriate rows of your 2D array (channel vs time) to get specific channels' i need some advice in this.

 

Thanks in advance,

Regards

Dinesh

0 Kudos
Message 75 of 95
(1,556 Views)

Hi butcher,

       I have find out the solution, thanks. But i need some example vi for some clarification, either you can send me some example code or i will send my own.

Thanks again,

regards,

Dinesh

0 Kudos
Message 76 of 95
(1,560 Views)

he meant, that you should use the "index array" function


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 77 of 95
(1,555 Views)

Hi butcher,

 I have send you a model vi but i'm not sure is it right or not, but whether it is right how i use this same function in a vi that i made how can i configure to see time vs any channel using enum control have used.

Regards,

Dinesh

0 Kudos
Message 78 of 95
(1,553 Views)

mpf5.png


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 79 of 95
(1,549 Views)

Improved version of your earlier VI, backsaved to 2013. Study the parts especially outside of the loop with the Initialize Array so that you understand the idea for the array sizing. Note the branching locations for the 2D Array so that the Chart doesn't receive the time array.

 

You need to fix your Enums, using a Typedef preferably. Currently the X and Y aren't the same and so it's not obvious why the XY Graph 1 gives strange results but checking to see the actual values makes it clear.

 

model 1_BD.png


GCentral
0 Kudos
Message 80 of 95
(1,542 Views)