03-14-2014 07:14 AM - edited 03-14-2014 07:15 AM
I have a weird problem with waveform graph offset,
when I add the offset function labview use 50% of the CPU
03-14-2014 03:23 PM
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
03-14-2014 05:42 PM
I want that the x axis will show the time and the date of the sample
03-14-2014 07:14 PM - edited 03-14-2014 07:16 PM
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.
03-14-2014 07:33 PM
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
03-15-2014 02:02 AM - edited 03-15-2014 08:06 AM
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.