Jump to content

Time/event Sequenced Data logger


packstove

Recommended Posts

Download File:post-5627-1158786719.viI am currently working on a project that will continuously log data at set times through the day for a process consisting of two (actually three events. One event triggers at both on and off modes). Depending on the event, data is logged a different rates. One log rate occurs for Event 2 for 30 min unless interrrupted by Event 1 for which there is a differernt log rate that takes over. If Event 2 is not interrupted then a 3rd log rate takes over until interrrupted by Event 1 or 2.

I am in NO WAY asking anyone to do my homework for me :( . The VI operates wonderfully (granted with a heck of alot of polling going on; I have yet to get a handle on event triggered programing with event cases), and it saves files when prompted to. The Problem is I CAN'T GET THE VI TO STOP!! When I try to stop the VI with a Button Controller on the front panel, all loops seem to stop fine but the VI tries to save a final file twice. I only wanted once and the VI will not exit. I can't seem to figure out why. I'm monitoring all loops from the front panel and they all seem to stop. If someone could take a look at it and tell me why it will not stop, it would be greatly appreciated. That's all I'm asking, just help me stop it. Of course any other suggestions are more than welcome :D .

I have attached the VI for your perusal

Link to comment

Lot of parallel loops there :-)

Remember a while loop always executes at least once. I believe your loops are executing twice because you are reading the "stop generation" local in the outer loop without any data dependency on the inner loop. Solution - pass the value from the stop generation local in the inner loop out to the outer loop and use it to stop the outer loop. In your example the outer loop reads the value of the local (F = keep going) and starts the inner loop (based on your case selector). When the inner loop terminates on stop generation, the outer loop executes one more time.

As for why your application won't stop - chances are the queue is waiting for data that will never come. Kill the queue using one of the data writer loops instead.

I hope this is understandable.

Richard

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.