From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sequence structure

Hi, I have a sequence of programm that are executing one by one and I want that in the last sequence set a false value to true,in a way that after it executed again it should be set to false automaticaly.would you please guide me ?! thanks

0 Kudos
Message 1 of 9
(2,401 Views)

Please post your code or the screenshot of the same.

 

It is difficult to understand your issue and suggest solutions, with the above description alone. When we see the code, we can tell you what needs to be done.

 

 

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 2 of 9
(2,397 Views)

Hi worldvi,

                 I think in this case You should look for a state machine.Please provide some more details.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 3 of 9
(2,394 Views)

ok, maybe I have to explain more;

I use Stacked sequence structure which includes 4 sequences and these structures are executing one after the other from the beginning , and at the end of all these structures I want to send a true value out which means the execution is done, then I use this true value in another function as a condition  to continue the rest of program. and the point is here that this value after finishing the execution of this function each time returns to false value for next execution.

sry that I don't know how to attached a pic of my VI, since I am beginner.

 

thanks

0 Kudos
Message 4 of 9
(2,389 Views)

Hi,

     You can upload your VI by:-

      1.First save your VI

      2.While posting a message there will be a provision for attachments.Attach your VI in it.And then post it 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 5 of 9
(2,383 Views)
0 Kudos
Message 6 of 9
(2,362 Views)

You missed the subvisSmiley Happy

 

Are you saying that you are getting a False as the input to the case structure?

0 Kudos
Message 7 of 9
(2,353 Views)

@worldviol wrote:

Hi, I have a sequence of programm that are executing one by one and I want that in the last sequence set a false value to true,in a way that after it executed again it should be set to false automaticaly.would you please guide me ?! thanks


You talk about having a sequence structure with a booelan output that is initially FALSE, but becomes TRUE once the sequence structure has completed?

 

If this is the case, then you might be slightly misunderstanding how outputs from a sequence structure work.  Nothing will be outputted from the structure until all the cases have completed.  So the boolean value will only be ever 'read' once (by this, I mean it will only be seen by anything outside the loop once), at the very end.  You can set the boolean to true wherever you want in the sequence structure (on any of the sequences) and it will appear at the end as you desire.  Then, set the value to FALSE again straight after the next section of code has read the TRUE value (beware of race conditions).

 

However, as has already been suggested, you might want to consider using a different coding architecture to realize your intentions.



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 8 of 9
(2,341 Views)

Look under the synchronization pallette. There is a function called "First Call" that looks like a little peace sign. The first time it executes, it's output is true. Any subsequent calls return a false.

 

But seriously consider looking into the state machine as danil33 suggested.

=====================
LabVIEW 2012


0 Kudos
Message 9 of 9
(2,315 Views)