01-28-2015 05:35 PM
Hi,
I have an experiment that I have set up through Labview to record data coming in off sensors and other instruments. I have two issues with my code thus far. First, the elapsed time VI doesn't seem to work in that it won't show the elapsed time or stop at the target time. I had this working a couple weeks ago and don't believe I really changed anything so does anyone know why it would stop working?
Secondly, I also have a problem with the reporting. I am having all the data reported to an excel file and it used to work just fine but as I've been adding more items to the code, it has stopped reporting. It seems that there is sometihng wrong overall in my VI but I can't seem to figure it out. Any thoughts?
(Sorry for the mess, still trying to figure out and clean up my VI.)
Thanks!
01-28-2015 06:10 PM
Just glancing at your code for a millisecond, it is clear that the last few steps of the report generation can never execute, because your little while loop can never complete. Thus the "time relative" report waits forever for data.
Your use of "insert into array" (many locations) looks completely misguided.
We are missing a subVI
Why so many formula nodes? You can combine the sequential ones into one with multiple lines. Or you can eliminate them completely and use linear and polynomial evalation functions.
01-28-2015 06:15 PM
For your Elaspsed Time express VI, I don't think you want the autoreset to be on.
As was said, you won't be able to close the report due to your little while loop that will never stop (false wired to the stop condition).
01-28-2015 06:18 PM
Okay yea I understand about the time relative report never being able to work. I was having some trouble figuring out how to add that and never deleted it.
How should I be using 'insert into array'? I am new to programming (especially Labview) and found that this way gave me the correct data type to insert into my report.
Any ideas about why elapsed time isn't working?
01-28-2015 06:22 PM - edited 01-28-2015 06:28 PM
kmarcella wrote:How should I be using 'insert into array'? I am new to programming (especially Labview) and found that this way gave me the correct data type to insert into my report.
You should not need it at all. "Inserting a 1D array into an empty 2D array is not very useful. You are already building the array in the concatenating output tunnel. Maybe all you need is change the tunnel to plain indexing and wire the 1D to them.
The two code paths shown in the picture produce identical output! Try it! (same even if you omit the "build array" that you use in some places.)
01-29-2015 05:41 PM
Got it! Definitely makes it cleaner.
As for the elapsed time express VI, I just wanted an indicator to show the elapsed time and a control to stop the VI once a certain time has passed on the front panel and even both the control and indicator are hooked up to the express VI, it is not expressing the time or stopping on its own. Is there anything else that needs to be connected for this to work?