LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hardware push button

Based on 1 or true being start and 0 or false being stop (or not started yet),  I reworked the logic in the 3 loops.  The lower left loop only stops if the DAQ read is False (stop) and the shift register is False (meaning that the loop Has been started.)  The upper left loop only stops once the boolean goes to True (start).  The main loop only stops when the boolean is False Or you have a true in all of the booleans coming from each state machine.
 
I realized now what is happening with the subVI.  Go in and set its VI properties for Execution to Reentrant.  Because it is non-reentrant, the VI can't run until the previous instance of it is finished running.
0 Kudos
Message 111 of 117
(1,369 Views)


Ravens Fan wrote:
I realized now what is happening with the subVI.  Go in and set its VI properties for Execution to Reentrant.  Because it is non-reentrant, the VI can't run until the previous instance of it is finished running.


I already did that but it's still not working. It's especially noticeable in the cool mode. Like I can still do with the tiny delays in the heat mode  but it takes forever in the cool mode.
0 Kudos
Message 112 of 117
(1,365 Views)


smm wrote:

I already did that but it's still not working. It's especially noticeable in the cool mode. Like I can still do with the tiny delays in the heat mode  but it takes forever in the cool mode.

Are you sure you set the subVI to reentrant?  This would be the Tsub VI.
 
It really shouldn't be necessary to do that gate method I was talking about, because to the human eye you would never see which of the 6 units would have started first once you have the program set so that all units are truly running in parallel.

 


Message Edited by Ravens Fan on 03-04-2008 10:02 PM
0 Kudos
Message 113 of 117
(1,351 Views)
Yes I did. I did the same thing.
0 Kudos
Message 114 of 117
(1,342 Views)
The Tsub Vi is re-entrant. Should the other subvis in the Tstat subvi be re-entrant as well like the wait-plus vi?
0 Kudos
Message 115 of 117
(1,337 Views)

Setting the wait plus VI as re-entrant solved the issue. OK there is just one last thing. In the main while loop, where we have the Action engine AE Boole and the output of the compound arithmetic block wired to the or then the stop button. When the output of the compound arithmetic is true the output of the or should be true and should stop the program execution right (considering that a False input means startand a True input means stop (or not started yet) based on the logic in above loop and main loop for the hard start/stop button). But it does not stop and the run button still looks active. The VI is now not even set to run on opening.

 

0 Kudos
Message 116 of 117
(1,334 Views)
The wait Plus being re-entrant makes sense.  Since it is the sub-VI that is truly making the other subVI wait.  I'm glad to see you were able to drill down through the code to find that it was the one causing the issue.Smiley Happy
 
In that little piece of code you show, the wire coming from the compound arithmetic is now blue indicating an integer rather than green indicating a boolean.  And the Not function is missing between the Read subVI and the Or function.
 

smm wrote:
Setting the wait plus VI as re-entrant solved the issue. OK there is just one last thing. In the main while loop, where we have the Action engine AE Boole and the output of the compound arithmetic block wired to the or then the stop button. When the output of the compound arithmetic is true the output of the or should be true and should stop the program execution right (considering that a False input means startand a True input means stop (or not started yet) based on the logic in above loop and main loop for the hard start/stop button). But it does not stop and the run button still looks active. The VI is now not even set to run on opening.


Now you are saying the way the logic was back in my reply #107.  Then in your reply #109 you said it was the opposite.  Now what you wrote above matches what I said in #107.  Which way is it??????Smiley Mad
 
It is either A:
Start:  Button closed, boolean reads true
Stop:  Button open, boolean reads false
(this is the logic in #109 and is the more logical situation)
 
Or B
Start:  Button open, boolean reads false
Stop:  Button closed, boolean reads true
(this is the logic in #107)
 
You are going to need to figure out how you want your buttons to work.  Then set the boolean logic to work according in each of the 3 loops.    Also, do the booleans coming out of the subVI's mean True is an error and you want all of them when True to Stop the program.  Or True means everything is okay, and you want all of the to be false to stop the program?
 
You are the programmer, you are going to need to sit down, step through the sequences logically and figure out how to make the code do what you want it to do.Smiley Wink
0 Kudos
Message 117 of 117
(1,323 Views)