11-11-2009 03:03 PM
johanneshoer wrote:
@Vsh:
1. and 3.: Better like this?
I dont see much difference in the latter image except for the shift register wires are straightened a bit
2. How can I overgive a value to an event structure if the terminal of that value is already used somewhere else in the VI?
Like altenbach has already mentioned you can use the entire False case (Pause) inside the event structure. You just have to add a value change event for Pause boolean. You can eliminate locals, and value signaling property also wouldnt be necessary.
11-13-2009 07:18 AM
@Gerd,
all right, now I understand. Thank you again.
@altenbach:
My intention for using the event structure was the following:
If I have lots of data and because of that the change of X-scale minimum and maximum takes some considerable time. So I put it in an event structure to achieve parallel code execution, so that the modification of the X-scale does not slow down the rest of the program. Unfortunately the performance did not become better with the event structure, it semms to make no difference.
I already suspected that the continuously change of the array size would be a bottleneck. Thanks for the hint, I will change that, like you said. I try to keep the array size constant.
Greetings
Johannes
LabVIEW 7.1
11-13-2009 07:46 AM
@altenbach:
It just came into my mind, the reason for modifying the array size or better say for adding and deleting data from the array was to obtain a "scrolling graph".
You understand what I mean?
By adding new data at the end of the array and deleting the oldest data in the first row, the graph in the chart moves from right to left.
How can I achieve a moving graph without excessive array operations?
Let me guess, I simply place a waveform chart and let it scroll? Am I right that I do not need any arrays any more?
Uh, if I had know that before, it would have saved me some work
11-13-2009 07:58 AM
11-13-2009 08:06 AM
johanneshoer wrote:
Hmm.... Waveform Chart will probably not work, because I need the current time in the x-axle....
This thread may be useful to you.
11-13-2009 08:22 AM - edited 11-13-2009 08:22 AM
Thanks Tim,
but as you can see, I have an unsteady cycle time. I doubt, that a maveform chart would be the right chart in this case. Stil I would be happy, if I can avoid the array modifications somehow.
11-13-2009 09:48 AM - edited 11-13-2009 09:52 AM
Ok,
now I tried something different:
I do no longer add new data in a new element and do no longer remove old elements, but I simply replace existing elements in the data array with the new data. The graph does not depend on the index of the element, because the x scale of the chart is the data-time and not the index of the array 🙂 I also change the array size only if neccessarry, e.g. if the user zooms in or out in the chart.
I think this method is more efficient. Right?
But there is stil a bug:
If I enlarge the data array (by changing the x scale time), new elements are added and filled with "0" and you can see that in the chart
Later these elements will be overwritten with new data.
With what should I fill the new elements so that the chart does not display them?
11-13-2009 10:01 AM - edited 11-13-2009 10:06 AM
Sorry there are some other bugs.
Please do not use the vis attached to this message. Somehow I can not remove them...
11-13-2009 10:20 AM
johanneshoer wrote:With what should I fill the new elements so that the chart does not display them?
Use NaN. 🙂
11-13-2009 10:35 AM