LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel loop timing

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?

Message 11 of 17
(1,020 Views)

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

Message 12 of 17
(1,015 Views)

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. 

0 Kudos
Message 13 of 17
(995 Views)

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.

0 Kudos
Message 14 of 17
(983 Views)

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.

0 Kudos
Message 15 of 17
(936 Views)

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?

0 Kudos
Message 16 of 17
(932 Views)

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.

0 Kudos
Message 17 of 17
(889 Views)