07-06-2015 01:07 PM
Are you sure CallPCI.vi is being called twice or just the code inside is being run twice?
I commented out CallPCI.vi and instead put an I32 on a shift register. Anytime the CallPCI.vi case is run it increments that shift register. I only see that getting incremented once per timer elapsed. Try out the attached code. I don't have 2010 installed (running in 2013) so maybe it's an issue that was fixed in 2013?
07-06-2015 01:11 PM
(Looking at the Que version):
Why do you have a case structure around the enqueueing if both cases contain the same code? Maybe you don't want to enqueue anything in the FALSE case? This would also eliminate the case structure in the lower loop which you then can utilize for the error instead (run empty case on error). What's the typical boolean value going into the "reset" input of elapsed time. Your logic is way too convoluted to easily tell from the diagram, especially since "LCC Commercial Power" gets manipulated from the consumer loop and from the front panel.
07-06-2015 01:40 PM
This is my first experience with queues and notifiers. I followed an example I saw online and put me code in it. I see your point with the case structure. I will take them out.
The typical boolean value going into the "reset" input of elapsed time is set in the properties and it is to not reset the value because I want to show the total time since the alarm started.
07-06-2015 01:58 PM
The shift register is a splended Idea. When I run it with the shift register it goes 0,1,2. I think this is because the program I am calling takes about 2 minutes to run while in the meantime the upper loop and the que continutes to run. I even took out the CallPCI.vi and just used the system exec.
07-09-2015 12:34 PM
On the "Wait on Notification" there is an option to ignore previous. I tried changing that to true and it works great now. Thank you both for your help.
07-09-2015 12:36 PM
Now I am trying to figure out a good way to make this into a sub-vi, however am not having much lick. I am just learning about sub-vi's. Do you have any suggestions?
07-09-2015 02:14 PM
Since this is an interactive subVI, you should go to "VI properties...window apparance...customize" and change it to show the front panel when called and close afterwards.