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.
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.
12-07-2012 04:16 AM
Sorry I could not understand from your images. But where are you updating the value of string control??
12-07-2012 04:26 AM
When I receive the message OF0 via tcp (it arrives!), the case structures write the string "Spegni" and the value should change, because the default is null.
12-07-2012 04:38 AM
By looking at your SubVi I found that in your sub vi event structure you have Stop2 boolean. when it is pressed it stops your SubVI. there you are also reading new value. In this event structure new value will be the value of Boolean Stop 2. You have to add another event case with Value(signaling) of string control string or Value to stop your Sub vi.
12-07-2012 04:52 AM
I have this event... case 2.
I attach all my program... I think is better than screenshot!
12-07-2012 05:19 AM
Here I have tried to attach a solution. It could not be the best but can help you. What I think the problem was that once you have connected a while loop for your subvi it can not take updated values from main vi. What I did was used multiple loops for controling a subvi. Hope it solves your problem.
In the main vi there are three buttons to Open a subvi close the subvi and close main program.
12-07-2012 05:56 AM
It works!! Thanks to all for your help!!!!
12-07-2012 10:26 AM
@Aojha wrote:
Here I have tried to attach a solution. It could not be the best but can help you. What I think the problem was that once you have connected a while loop for your subvi it can not take updated values from main vi. What I did was used multiple loops for controling a subvi. Hope it solves your problem.
In the main vi there are three buttons to Open a subvi close the subvi and close main program.
Passing in a control ref from the main VI to the subVI is more robust than writing to a global on the outside and reading it on the inside.
Less potential for race conditions.
12-09-2012 09:52 PM
billko wrote:
Passing in a control ref from the main VI to the subVI is more robust than writing to a global on the outside and reading it on the inside.
Less potential for race conditions.
could you give simple exaple. It will be really helpful.
12-10-2012 12:21 AM
12-10-2012 10:37 AM
@billko wrote:
@Aojha wrote:
Here I have tried to attach a solution. It could not be the best but can help you. What I think the problem was that once you have connected a while loop for your subvi it can not take updated values from main vi. What I did was used multiple loops for controling a subvi. Hope it solves your problem.
In the main vi there are three buttons to Open a subvi close the subvi and close main program.
Passing in a control ref from the main VI to the subVI is more robust than writing to a global on the outside and reading it on the inside.
Less potential for race conditions.
How does a reference minimize the chance for race conditions? The answer is it doesn't. You can still have race conditions because a control reference will allow access to the same control from two places at the same time.