12-06-2012 12:04 AM
hi,
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.
12-06-2012 12:05 AM
One more thing, In your main VI you have several while loops whose closing condition is false. How are you closing your main VI?
12-06-2012 06:01 AM
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...
12-06-2012 06:07 AM
I would suggest add a timeout value let's say 100 and see the result.
12-06-2012 10:33 AM - edited 12-06-2012 10:43 AM
@Aojha wrote:
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.
12-06-2012 10:39 AM
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.
Ben
12-06-2012 10:06 PM
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.
12-07-2012 02:44 AM
The problem is that I can't change value.signalling to read!!!
Uff... I think I will surrender
12-07-2012 02:59 AM - edited 12-07-2012 02:59 AM
I don't know wether I should post this or not, you might be knowing it.
Just trying to help.
12-07-2012 03:59 AM
I try to apply this suggest but the value doesn't change.