10-02-2010 07:43 AM
Solved! Go to Solution.
10-02-2010 10:44 AM
hello,
many thing but the mains i see :
- There is no time delay (wait) so cpu is always 100%
- why opening xls file at each loop iteration couln't you opening once in a table and then picking up data
- a minor why using so many if and not a case selector ?
Regards
Tinnitus
10-02-2010 12:25 PM
tinninus,
If by replacing 'read from file', you mean making a local variable, I have already tried that where I write to a local variable on the first call after switching on the "SWITCH ...LOAD" and then in the next flat sequence, I read that variable. But it didn't help. Instead this made the program even slower for some reason.
Do you mean a 'case structure' or a case selector? I am using the 'Select' block for 'if' 'else' scenarios. The reason for keeping all of those select blocks is due to the nature of the signal that I am acquiring from a sensor. (I am happy to explain this in detail if you think this is root of the problem).
Awais
10-02-2010 04:29 PM
As long as you are using the read/write from/to file, you will never achieve that fast a rate. Why don't you operate on the data kept in a shift register?
10-03-2010 01:53 AM
tried using shift registers as well.. didn't make any difference. One thing I noticed was that removing the graphs from the front panel solves the problem completely. The challenge is to keep the graphs there and still get a faster rate (close to 30 results per second)...
10-03-2010 10:15 AM
I think your biggest problem is that you are using a comination of shift registers and building an array, along with the Build Table Express VI.
The Build Table Express VI maintains a history of what has already gone to it and adds more data to the array. So there you have a growing array inside of it. But you take those results and build that array into another array you are maintaining on the shift register. So that shift register is growing exponentially on each iteration based on the new larger array coming out of the express VI.
10-03-2010 11:39 AM
The Build Table VI adds every new element at the bottom of the list whereas I need the new data to be placed at the beginning of the table. I couldn't think of any efficient way of doing this.. possibly because of my limited skills in labview. Is there any better way of reversing table values?
10-03-2010 01:22 PM
Swap the order of the inputs into the Build Array function so the new data goes into the upper input and the older data from the shift register goes into the lower input. Then eliminate the Build Table Express VI since the Build Array function and shift register is already building the table for you.
10-03-2010 01:47 PM - edited 10-03-2010 01:49 PM
Just tried this method (replacing table with array using shift-registers)...As I need the time against each value, I had to make a cluster with each element of cluster having time stamp (from get time function) and the result that is a 'double'. Still the same speed (16-18 results per second)...
10-03-2010 01:58 PM
Post your latest VI so we can see.