LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems continuously writing measurement file

Solved!
Go to solution

I am a new user to labview, so forgive me if this is simple and try your best not to judge my program as it is a work in progress. I have been trying to create a data acquisition using an activex controlled box and the complexity of a single loop slowed it down so much that it did not work correctly. I have moved on to a consumer/producer loop now, but when I try to start logging, it only logs the first instance and will not continue recording any more instances unless I continue switching the enqueue switch. Am I doing something wrong or is there a better way to do this?

0 Kudos
Message 1 of 3
(2,291 Views)
Solution
Accepted by topic author CTSFranklin

Your VI shows that you need the "enqueue element" button switched on in order to enqueue data to your consumer loop.  It is set for "switch" action rather than "latched" which means it will stay on once pressed until you press it again to turn if off.

 

But I think the problem you are having is that you have an event structure in the same loop that has no timeout on it.  That event structure sits there waiting until an event happens, then it allows the loop to iterate, can come back around again to wait on the event structure.  The events that are registered in the event structure are Stop, Value change;  Start Logging, Value Change; and the Value change of several of your numeric controls.  So unless one of those events occurs, your producer loop is going to keep pausing.  I'd recommend either putting in a timeout value on the event structure, or moving the event structure out of the loop and putting it in its own "user interface" loop.

0 Kudos
Message 2 of 3
(2,282 Views)

Ravens Fan,

 

Thank you very much for the help. It was the fact that I did not have a timeout wired. Everything works as expected now. I knew it had to be something simple.

 

I'm a Giants fan, but go Baltimore.

 

-Franklin

0 Kudos
Message 3 of 3
(2,266 Views)