LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A small problem while displaying values in a table

Hi,

 

I am displaying some 'values vs time' in a table in a while loop. Every time a new value comes in, it is displayed in the table under the last value. Is there any way I could switch it other way round meaning that every new value goes is added on the first row of the table (for both time and the value).

 

Another issue I have is; The table displays 20 values every second. Can I change this to 200 values per second ?

 

I hope I explained my problem but I have attached the VI snippet and the way my table looks like in a block diagram.

 

Many Thanks,

 

Awais 

 

123.pngCapture123.JPG 

0 Kudos
Message 1 of 5
(2,740 Views)

You can do something like this.

 

But this is not a very good method since i am inserting the new values to the begining of the build array function.

 

The better way would be to convert the "Simulated signal" to "waveform type" (the Y and dt) values and then build the 2D array by i"nserting them at the end of the build array function" and then "reversing" it.

 

Guru

Regards
Guru (CLA)
0 Kudos
Message 2 of 5
(2,721 Views)

Thank you so much

 

I am actually plotting a numeric value (not a waveform) into the table. The numeric values will change over the time (as I am taking values from a sensor). I used simulate signal function just for an example. Thank you again.

 

As for the other issue that I have, I can plot only with the interval of (50 milli-second) as you would have noticed after running the VI. Is there any way I can get values every ( 0.5 or 1 milli-second) ?

It would be great help.

 

Many Thanks,

 

Awais 

0 Kudos
Message 3 of 5
(2,709 Views)

I did not get the second part

 


 I can plot only with the interval of (50 milli-second) as you would have noticed after running the VI. Is there any way I can get values every ( 0.5 or 1 milli-second) ?


Can you elaborate the same?

 

Guru

Regards
Guru (CLA)
0 Kudos
Message 4 of 5
(2,704 Views)

awais.h wrote:

Thank you so much

 

I am actually plotting a numeric value (not a waveform) into the table. The numeric values will change over the time (as I am taking values from a sensor). I used simulate signal function just for an example. Thank you again.

 

As for the other issue that I have, I can plot only with the interval of (50 milli-second) as you would have noticed after running the VI. Is there any way I can get values every ( 0.5 or 1 milli-second) ?

It would be great help.

 

Many Thanks,

 

Awais 


You actually are 'plotting' a waveform. The waveform is the 100 samples of the sine wave. Each iteration, you get 100 new rows. The simulated timing is 1000 Samples/sec but since you did not select to simulate acquisition timing, that is meaningless as well as your statement about the plotting interval. Your program is not simulating actual hardware.  Change the simulte function or use the DAQmx functions with a simulated device.

0 Kudos
Message 5 of 5
(2,673 Views)