From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding offset to waveform graph freeze labview

I have a weird problem with waveform graph offset,

when I add the offset function labview use 50% of the CPU
CPUOffsetWaveform.png

0 Kudos
Message 1 of 6
(2,942 Views)

Setting dt to 3477673008.569+ does not make much sense. Do you want the timestamp to be wired to t0? Your points are 500 ms apart: the value wired to the Wait (ms) function. dt should be 0.5. You also have "Ignore waveform time stamp on x-axes" checked in the graph properties dialog.  This group of settings does not seem to make sense.

 

What do you want the graph to do?

 

Lynn

0 Kudos
Message 2 of 6
(2,912 Views)

I want that the x axis will show the time and the date of the sample

0 Kudos
Message 3 of 6
(2,901 Views)

Perhaps you meant to wire it to t0?

 

And a different value to dT such as 0.5?

 

Wiring two different arrays to Y in that Build Waveform components means only the 2nd input will actually get put into the Y array.

 

You should use Build Array rather than Insert into Array.  Insert into Array is only useful about 5% of the time when you want to put something into the array in the middle.  When putting at the beginning for end, Build Array is more appropriate and efficient.

 

 

0 Kudos
Message 4 of 6
(2,883 Views)

OK.  You want to set the current time value to the t0 (start time) component of the waveform. Set the dt component to the increment or  time difference between samples, 0.5 s in your example.

 

Then, in the Graph Properties dialog, uncheck "Ignore waveform time stamp on x-axes." Set the X-axis to autoscale.  You do not need the property nodes.

 

I am not sure what the Frezz boolean is supposed to do, so I did not change it.

 

Lynn

0 Kudos
Message 5 of 6
(2,878 Views)

One of the things to remember is that apppending columns to a 2D array is extremely expensive, because the new elements need to be interlaced in memory, requiring new memory allocations with every operation. It is significantly cheaper to append rows instead.

 

Here's a simplified version that is probably better.

 

 

 

Do you really need the cursors? It seems much simpler to just use a chart instead of a graph. That change would also protect from running out of memory eventually.

Download All
0 Kudos
Message 6 of 6
(2,862 Views)