LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

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
(1,189 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.

LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 2 of 6
(1,173 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!

0 Kudos
Message 3 of 6
(1,164 Views)

Almost sounds like an issue with SV deployment...

 

Ben

0 Kudos
Message 4 of 6
(1,156 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.



Certified LabVIEW Architect (CLA), Certified LabVIEW Embedded Systems Developer (CLED) and Certified TestStand Developer (CTD)
MediaMongrels Ltd. - NI Alliance Partner | GDevCon :: 21-22nd August 2019 :: Birmingham, UK
0 Kudos
Message 5 of 6
(1,153 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 ^^ Smiley Happy



CLA // LabVIEW 2016 // BALUG // Unofficial Forum Rules and Guidelines
0 Kudos
Message 6 of 6
(1,143 Views)