I am also new in Labview.
But looking at your screenshots I found that
1-your SubVI has an Event structure without any while loop. (Should be avoided Event should be inside While loop).
2- Event structure doesn't have timeout value. (Place a while loop and connect a yimeout value).
I think this should solve your problem.
One more thing, In your main VI you have several while loops whose closing condition is false. How are you closing your main VI?
Yes, this was my first attempt.
Now I have a while loop for the event structures, but I don't need the timeout. If the subVI stopped for a timeout my program wouldn't have sense!
And the main VI in only a change in multiple connections-server.vi example.
I think that my problem is that I have a control reference and not a variable reference (so it works with a button but no with a variable).
I read examples posted here but there are too much difficult for me, because I'm a beginner
I don't know how to put these informations on my program...
I would suggest add a timeout value let's say 100 and see the result.
While I admire your wanting to jump in and help people you really should take some time to learn LabVIEW first before giving advice. You are just starting out yourself and the advice you have given doesn't really address any of the users issues and are basically just reiterating general comments picked up from the forums. A timeout is not required on an event structure unless you require some processing to occur on a regular basis. Adding one just because will not solve any of the issues the OP is encountering. If you are suggesting the timeout be used to check for the stop condition then this is not a very good approach. You turn an event driven system into a polling system which means your task is never idle. Polling loops are generally not recommended over an event driven system.
What I would recommend for the OP to look at would be to use user events to stop any subVIs that contain event structures. If a subVI does not have an event structure the recommended methods of stopping the loop with the subVI would either be using a queue or a notifier. A more basic approach would be to use a functional global.
In your main VI, use a "Value.Signalling" instead of a "Value" property node.
THe difference is the signaling version will fire an event while the "Value" only version will not fire an event.
Actually It was just my suggestion (not copied from any forum). And I did not suggest closing vi through polling event. While programming I have struck many a time due to event timeout. So I asked to see if OP got any progress with this or not. It was just a hit and try suggestion.
I don't know wether I should post this or not, you might be knowing it.
Just trying to help.