04-22-2013 09:46 AM
Hello guys,
I have made a subVI that controls the rpm % of a wind tunnel vane. This consists in adquiring 2 values of data within 30 seconds and compare both to see the uniformity of the flux. I use a Labview 2011 version. The problem occurs when i use this subvi in a 2012 version. The 30 seconds turn to 1 minute... I want to ask if its possible for this to be a version problem.
04-22-2013 09:49 AM - edited 04-22-2013 09:50 AM
What is the problem? You haven't told us what is going wrong.
One thing I'd be worried about is that you are comparing two floating point numbers for equality. I don't know why you are using a formula node for what is otherwise (ignoring the fact they are floating point numbers) a simple comparison.
How are you using this as a subVI? Why do you have a loop in this? It is going to run as fast as possible doing the same comparisons over and over on the same data files.
04-22-2013 10:23 AM
Yes u right i dont need the node... i was distracted 😄 thx. The files values are not the same because the rotor rpm takes sometime to get to the % that i command.
When i use the 2011 version of labview there isnt any problem, but on the 2012 the 30000ms timer duplicates and the subvi takes 60000ms to execute!!!! im trying to kown if it can be a version problem. If its not then i assume that its the controller software of the wind tunnel and that's other problem that i have to solve.
04-22-2013 10:30 AM
There is no logical reason for the wait timer to duplicate.
What happens if you change the timer to something else like a smaller value, or a larger value? Would the 2012 version still be duplicated?
Put some more probes or indicators in your VI, I'm still suspicious about the comparing two floating point numbers for equality. See what data is coming out of the two Read functions. Are there any errors? Does the data look the same? If you compare them with a LabVIEW primitive and look at a boolean indicator, what does it show? Put an indicator on your loop iteration terminal. For the subVI to take twice as long, the loop must be running twice.
Is there a reason why you are comparing the two same data points of the same data file?
04-22-2013 10:35 AM
I'm concerned that you are reading a file and then reading it again 3 seconds later. This tells me you are looking for when the other process stops writing data. File IO is a terrible way to share data. Use a Notifier or Queue instead. Much more efficient.
04-22-2013 10:36 AM
The values will duplicate allways on the 2012 version. there is a reason for comparing. i need that the wind flux of the tunnel to be constant for 30 seconds at least( thhis is the verification requirement). Its normal to have flutuations over time so i need to verify the same file.
04-22-2013 10:44 AM
So are you saying that the file is actually changing during the 30 second period of time? What program is creating this data file?
How do you know that the data in the file is the same after 30 seconds? If you are dealing with real world values that you are measuring somehow, then you are comparing them to each other with floating point numbers, there is a chance that the two numbers may never be exactly equal even if you thing for all practical purposes they are.
How do you know that the values aren't exactly the same for 29 seconds, then in the 30th second there is a slight change. As you said "it is normal to have fluctuations over time."
I think there is a flaw in your testing and comparison process that is causing you problems, not an issue with the LabVIEW version. If you were able to get things to work exactly like you wanted with an older LabVIEW version, then it was pure luck.
04-22-2013 10:49 AM
Well thx for the suggestion i gonna try and rethink my process.thx for the help and the speed of response.
04-22-2013 12:32 PM
Just one last question. The software that controls the wind tunnel is USB port and the data file generated is constantly being updated. Is it possible that the constant updating of the data file could delay the execution of the subvi?
04-22-2013 12:43 PM
If something else has control of the file, then the OS will not let other things use the file until that other process releases it. So, yes, the other process writing to the file could be slowing you down.