08-30-2010 06:31 AM
I am programming a simulation for nuclear rewetting for a visitor centre at my company in Switzerland. It involves heating a "fuel rod" and then filling the chamber with water. The pump automatically starts once the rod core reaches 750C. After this, a requirement stipulates that flow rate be checked to ensure the pump is operating at the necessary conditions. If it isn't, the heater must be shutdown to avoid, well... meltdown. However, we must allow 10 seconds for the pump to respond, while still allowing a DAQ rate of 10-100Hz.
The challenge is that I can't add a delay in my main loop else delay all acquisition, but I can't figure out how to trigger a peripheral loop (with DAQ for the single channel of checking flow) from the main loop, and when the peripheral loop determines if flow has initalised, respond back to the main loop with the okay.
I think much of my confusion is in the interaction of the loops and the default feedback nodes that labview is putting in willy nilly. Would the only solution be to have two 'main' loops that don't communicate with eachother but rather do the same thing while operating on different timing? Tell me if you want me to post the file (although its on an unnetworked computer and I didn't think it would be too useful).
Thanks+ Curran
Solved! Go to Solution.
08-30-2010 07:06 AM
Can you post your code and I would be happy to take a look and offer some suggestions.
08-30-2010 07:25 AM
Here it is! It is not in any form of completion unfortunately.
So reading in the temp with NI9213 and watercolumn height with NI9215, we determine to turn on the pump with NI9472. NI9421 determines whether the pump is on (there is flow) and I must respond accordingly.
I have 3 scenarios similar to this one as well, so having redundant loops with different timing like I mentioned would be way to heavy. I think I may have though up of a solution? At the time the pump is initiated, we record the iteration and wait for a number of iterations that correspond to 10s to pass before fulfilling the pump shutoff requirement?
08-30-2010 07:30 AM
I couldn't get that file to work...
Try these as a backup.
08-30-2010 07:41 AM
OK the vi you gave me did not really help me solver your problem. I made a quick example to so you a concept of what I believe that you are asking for. You will have to make it a bit more complex. If you have questions let me know.
08-30-2010 07:47 AM
I know nothing about version compatability with lab view except it causes me quite a few problems. I am only running 9.0, is there an easy way to read your file?
08-30-2010 07:57 AM
Here is a 9.0 version.
08-30-2010 09:13 AM
Okay, I used some ideas from your example and I think I have something that will work although it is a bit bulky.
Just one question. This is the sub VI that I have in the original main loop. Will having the 'first call' in this sub VI rather than in the loop of the main VI result in it being the first call in every iteration of the parent loop?
08-30-2010 09:32 AM
Using the VI that you sent I made an example of what I think you are asking. The vi does not reset once the first occurance has been called. I am not sure if you will need to reset this first occurance at some time in the program or if it is working the way you want it to.
08-30-2010 09:53 AM
No, I don't want it to reset, so it should be good. If I am having problems once I get it up and working, I only have to take the first conditional statement out of the subVI and put it in the main VI anyway.
Thanks for all your help, I think I have a grip on this now.