03-05-2013 02:13 PM
Hi All,
I am using string contols in my college project. When there is data in the strings my machine will operated but when i press a reset button (controls case structure) i am writing the string values to file, then re-initialising strings to default (empty string) using invoke node. This all worked well until i created bound variables for the strings so they could be published over the network. When i press reset in the client vi the data writes to file but the bound strings in the clint vi will not invoke node and display an empty string, is there any way around this.
Thanks David
03-08-2013 06:33 AM
Hi David,
My name is Larry and I am an Applications Engineer here at National Instruments. I think I understand what you are trying to achieve here. My question is:
Would it not be suitable to use a local variable for reinitialisation of the variables?
Also another means of publishing the strings over the network would be to use "Network Shared Variables" created in the project. These are much easier to work with than data binding.
Tell me what you think about this.
Kind Regards,
03-08-2013 08:42 AM
Hi Larry,
Sorry, i said bound variables, i actually have them as network shared variables in a project. Am i incorrect in saying that i cannot use use local variables or invoke node with network shared variables. If i can use them, how can I reset them in the client VI using a Boolean button.
Thanks
David
03-24-2013 05:26 PM
Hi David
You should be able to reset network shared variables with a Boolean button by using an event structure. When the event triggers you could just wire in a default value into another reference to the variable. The following link shows some useful information on event structures if you're unfamiliar with them.
http://www.ni.com/white-paper/3331/en
Let me know if you want anymore information or want me to make a quick example for you.
Many thanks
Dan.H
NIUK AE
03-24-2013 05:41 PM
What is the type of client you are using? Is that another PC? In any case you may have to poll the boolean value (shared variable) and reset the control to default by using the case structure. You cannot fire an event through the network and I don't think its the right option as long as you are not using the FP of the client.