From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-25-2012 03:53 AM
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
09-25-2012 04:07 AM
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.
09-25-2012 04:13 AM
Hi worldvi,
I think in this case You should look for a state machine.Please provide some more details.
09-25-2012 04:35 AM
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
09-25-2012 04:43 AM
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
09-25-2012 05:45 AM
here it is ...
09-25-2012 06:01 AM - edited 09-25-2012 06:03 AM
You missed the subvis
Are you saying that you are getting a False as the input to the case structure?
09-25-2012 06:35 AM - edited 09-25-2012 06:40 AM
@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.
09-25-2012 09:58 AM
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.