LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview elapsed time and reporting

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!

0 Kudos
Message 1 of 6
(3,304 Views)

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.

 

0 Kudos
Message 2 of 6
(3,293 Views)

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).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(3,288 Views)

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?

0 Kudos
Message 4 of 6
(3,285 Views)

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.)

0 Kudos
Message 5 of 6
(3,283 Views)

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?

0 Kudos
Message 6 of 6
(3,218 Views)