Hi everyone,
I've got a new question. Currently I am working on the final part of an application of mine that consists of several while loops running simultaneously:
- DAQ loop: acquires data, adds a relative time in seconds and feeds it to a data queue
- Visualization loop: calculates different physical properties (requires some calculation time) from the first data queue and shows it on the screen in XY graphs (to be able to see a complete measurement). Depending on which tab the user activates in the tab control, different sets of XYgraphs are shown to accomodate different views. If the measurement is running (run button pressed), a second data queue is fed by the data from the first queue
- Storage queue: takes data from the second data queue and stores it into a spreadsheet file
- 2 additional loops to control the motors in the measurement
- An event loop that checks which buttons are pressed
Don't worry if there is something unclear, not everything matters in this thread. Now since I am using XYgraphs to show my data (I tried different types, but this suits my purpose), the performance of the program is determined by the continuously reloading of large sets of data for the graphs. To reduce this problem, I want to exclude some points from my calculation. Now every datapoint is plotted. I would like to plot points that are a multiple of x seconds (lets say a multiple of 1 second: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...). I attached a figure of the subvi I created to try to do this.
The subVI takes the relative timestamp (in seconds) and the desired multiple (1 second), calculates the mod(timestamp,multiple) and checks whether it is almost zero (if it is zero, it is a real multiple, but since this will not always occur I put in a certain threshold). As a result I get a confirmation to use the point or discard it. While it works for a simple case, in the complete program, it doesn't work.
I was wondering if someone would have an idea as to how I should solve this. I don't mind that the points used are not exactly the multiple, I just want to exclude a lot of points to reduce the loss in performance.
Thx
Giovanni Vleminckx
---------------------------------------------------------------------------------------
Using LabVIEW 8.5 on Windows7