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: 

VI Stop - shared variable vs. notification

Hi,

My main VI contains several paralell measurement and process loops. In order to stop the execution, i impemented a shared variable node in each VI. However, I also use notifiers to communicate between a paralell running measurement and a process VI.

After creating the notifier, which reference goes through a cluster to reach other VIs, the measurement VI sends the notification, then the process VI wait for it, and in case of controlled shutdown (as controlled shutdown i mean the value of the shared variable node is set to true, which shuts down the while loops), then it relases the notification.

The problem is the following: whenever I first run the main VI, the communication goes well. If I stop it using the shared variable node it stops, but in the next execution the measurement block only forwards one data.
If I stop the Main VI with the abort button, it works well next time also, maybe because it stops the whole project before relasing the notification. Then I concluded deleting the Release Notifier block might help, but it stops the whole measurement-process communication.


I completely clueless what could be my next move.

Thanks for helping in advance:

gazsi3

0 Kudos
Message 1 of 6
(3,700 Views)
We are graphical programmers and have a hard time reading long paragraphs of code descriptions. Please attach a simplified version of your VI instead.
0 Kudos
Message 2 of 6
(3,684 Views)

Sorry, you are right. Now I atatched both VIs which are reading the sensors and processing it.
Both are closed with stop shared variable.
Thanks again!

Download All
0 Kudos
Message 3 of 6
(3,675 Views)

Almost sounds like an issue with SV deployment...

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 6
(3,667 Views)

Do you reset your shared variable to 'false' before anything else happens in your VI? If you don't reset it, the loops will still read it as 'true' from the previous run of the VI and everything will shutdown. You need to initialise the variables when your VI starts.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 6
(3,664 Views)

@gazsi3 wrote:


If I stop the Main VI with the abort button, it works well next time also, maybe because it stops the whole project before relasing the notification. Then I concluded deleting the Release Notifier block might help, but it stops the whole measurement-process communication.


If you are obtaining the new notifier every time the program runs, having the release notifier is the right thing to do. When you press abort, that means you are not setting your Stop variable to True, which should be the target of your troubleshooting. When you stop with the shared variable, does the Stop variable remain True the next time the program runs? This could be the reason you are not seeing "communication", your loops aren't running!

 

Edit: Yeah, what they said ^^ 🙂

0 Kudos
Message 6 of 6
(3,654 Views)