LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visual Control of an Analog Signal, varying in time

Solved!
Go to solution

Hello,

 

Here is my setup (Fig. 1), where Coil X - "Simulate Signal" block, that emulates an analog value that varies in some way.

This value is result of a signal processing on analog inputs ... in this setup I've choosed SIN wave just for simplicity.

Is it possible to visualize the evolution of this signal in time ... I mean the "time window" on "Voltage" graph should advance (Fig. 2).

I've tried to use XY graph instead (Fig. 1, at th bottom), applaying the iteration counter of the "While loop" to serve as "Time".

but have got an error message: "You have connected 2 terminals of different types".

 

What could be a solution (of course if what I want is realisable)

 

Thanks in advance

 

Pavel

 

Fig. 1

Signal_Simulation_Issue - Block Diagram.JPG

 

Fig. 2

 

Signal_Simulation_Issue - Front_Panel.JPG

0 Kudos
Message 1 of 9
(3,423 Views)

Hi Pavel,

 

use a chart instead of the XY graph…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(3,418 Views)

Thanks GerdW,

 

It's much better.

Fig. 1 shows modified block diagram.

But I would like to implement something like "running window" on the axis of time ... i.e. display last 2 seconds of the waveform evolution.

Actually whole Time axis is displayed ... starting from 0 to the last instant (Fig. 2, Fig. 3).

 

Would it be possible to implement such window ?

 

Best Regards

 

Pavel.

 

Fig. 1

Signal_Simulation_Issue - Block Diagram (2).JPG

 

Fig. 2

Signal_Simulation_Issue - Front_Panel (2).JPG

 

 

Fig. 3

 

Signal_Simulation_Issue - Front_Panel (3).JPG

 

0 Kudos
Message 3 of 9
(3,407 Views)

Hi Pavel,

 

set the history length of your chart as needed…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 9
(3,391 Views)

Better ... but some incomprehension persists:

  • I've tried to set "Number of waveforms in chart history buffer" to 4, but the value 10 was actually set (i.e. I see 10 last periods). What is the reason of such "rounding"
  • If a signal is alearoire, what would be the "measure" of the history buffer ?

Thanks

 

Pavel

0 Kudos
Message 5 of 9
(3,382 Views)

Hi Pavel,

 

it seems the chart expects a minimum of 10 "samples" per plot. I guess it's due to keep memory handling at a reasonable level…

What is "alearoire"?

You set the history buffer to a length that fits your display requests. When you have data coming in at 1kS/s and you want to display the last 3s you set a history length of 3000 samples. (This applies to scalars and arrays of samples, but doesn't apply to waveforms. Here you set the number of waveforms, but you have to know the number of samples in/length of each waveform!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(3,364 Views)

 

@GerdW wrote:

Hi Pavel,

 

it seems the chart expects a minimum of 10 "samples" per plot. I guess it's due to keep memory handling at a reasonable level…

What is "alearoire"?

You set the history buffer to a length that fits your display requests. When you have data coming in at 1kS/s and you want to display the last 3s you set a history length of 3000 samples. (This applies to scalars and arrays of samples, but doesn't apply to waveforms. Here you set the number of waveforms, but you have to know the number of samples in/length of each waveform!)

Probably you have a reason ... I've tried 15 samples and it was kept.
Concerning "aleatoire", sorry I've been confused (it's not an english word), I meant random signal, like one on Fig.1.
There is no the notion of "period" ... and probably my real-life signal will looks like this.
How to manage the "History Buffer" in this case ?
Thanks.
Pavel
Fig. 1
signal_aleatoire.jpg

 

0 Kudos
Message 7 of 9
(3,343 Views)
Solution
Accepted by topic author Pavel_47

Hi Pavel,

 

you don't "manage" the history buffer of a chart, you set it at edit time. At run time it's fixed!

 

There's no difference between periodic and non-periodic signals: You measure with a certain sample rate and you decide how many sampes are kept in the buffer. Point.

 

When you want to have a variable buffer (or: variable x scale range) you need to buffer on your own and use a graph instead. So we are back to your original question: the context help will show you the expected datatypes for charts and graphs, when you hover the mouse over their terminals!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 9
(3,339 Views)

Yes !

 

I've changed SIN frequency to some rational value, e.g. 5.6Hz and observed a rational number of periods on the chart, so you have reason - "History Buffer" is releated to number of samples.

 

Thanks

 

Pavel

0 Kudos
Message 9 of 9
(3,326 Views)