LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform chart extremely fast in the x axis

Solved!
Go to solution

Hello, I am getting a horizontal line as the waveform chart is running at fast speeds. Is there a way I can enlarge the scale so that it will display more fine, instead of fast horizontal lines that are difficult to read? In the picture is what I am dealing with... I am using the cRIOMain2 to send data via shared variables to the SingleTunnel2 vi.

WaveformChart.PNG

Download All
0 Kudos
Message 1 of 7
(1,720 Views)

Goal.PNG

This would be the intended goal...

0 Kudos
Message 2 of 7
(1,715 Views)
Solution
Accepted by topic author kepham

Charts plot as fast as you send data to them.  If you are sampling at 1 kHz, you need to plot 1000 (new) points per second (which is about 20 times faster than you can "see" the data).  You can (a) acquire data at a slower rate, or (b) not plot every point.  There are two "easy" ways to do the latter -- plot every Nth (i.e. 20th) point, or average (say 20 points at a time) and plot the averages.

 

Bob Schor

0 Kudos
Message 3 of 7
(1,694 Views)

Hi!

But how to do that if I am not using DAQmx?

0 Kudos
Message 4 of 7
(432 Views)

Hi sahsak,

 


@sahsak wrote:

But how to do that if I am not using DAQmx?


By implementing "senseful" waits in your loops!

 

In your "SingleTunnel" VI there are loops:

  • without any timing, running as fast as possible
  • with a wait of "0" - this might have a reason, but it will mostly not fit with your current implementation…
  • with a timing of "2000": your VI will get very unresponsive when there is a loop running for 20s (10 × 2000ms) just to read some locals and to plot some data…

Do you really think it is good coding style to have 4 frontpanel elements next to each other and have them ALL named "Nozzle 8"???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(414 Views)

Hi GerdW,

 

Thanks for your reply.

 

I am using wait and even tried a timed loop. Now, this solves the problem of "too fast x-axis change", but I am still not getting similar flow of curves as I get when I use DAQmx (idk how to explain this but when I use DAQmx, I could see the nice variation in temperature with time, whereas now it seems like it shows instantaneous values, like zig-zag). Moreover, I am not able to see all the curves I want in the waveform chart. Here is a part of the block diagram with thermocouple-connected channels.

sahsak_0-1738083523586.png

sahsak_1-1738083711969.png

 

The Strange thing is (or idk if it is even strange) that when I connect the waveform chart to an individual channel (one channel per waveform chart), I see the curves as I see in DAQmx (sort of).

 

Do you really think it is good coding style to have 4 frontpanel elements next to each other and have them ALL named "Nozzle 8"???


I am sorry, I should've clarified. This is not me. I am just having similar issue as the original question.

 

Thanks.

0 Kudos
Message 6 of 7
(405 Views)

Hi sahsak,

 


@sahsak wrote:

now it seems like it shows instantaneous values, like zig-zag). Moreover, I am not able to see all the curves I want in the waveform chart. Here is a part of the block diagram with thermocouple-connected channels.

sahsak_0-1738083523586.png

sahsak_1-1738083711969.png

 

The Strange thing is (or idk if it is even strange) that when I connect the waveform chart to an individual channel (one channel per waveform chart), I see the curves as I see in DAQmx (sort of)


Do you read the context help sometimes?

Did you read the context help for a chart? It explains clearly which datatypes will result in which kind of plots!

 

You create a 1D array of your 4 TC values: this will result in one (1) plot, containing the values of all 4 TCs.

When you want 4 plots, one for each TC, then you should use a 2D array or a cluster of 4 elements - as explained in the (context) help!!!

 


@sahsak wrote:

I am sorry, I should've clarified. This is not me. I am just having similar issue as the original question.


Then why did you choose to continue this old thread instead of starting your own thread?

Yes, that's irritating.

Why don't you show your code?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 7
(394 Views)