03-06-2013 04:20 AM
new labview user:-) and i met a problem when i want to change value of one string in cluster, and i want to implement this by using property node value instead of writing directly to data flow or using variable, here attached the picture. no matter i change the cluster in(control) or cluster out(indicator) popery value, the value(probe 7) in dataflow keeps unchanged even i gave the new value via property node value. Thanks in advance to give me some hints on this.
Solved! Go to Solution.
03-06-2013 04:40 AM - edited 03-06-2013 04:42 AM
Hi minyi,
1) It's kind of hard to see what you're doing when you attach downscaled pictures...
2) Even then it's clear you missed the point of DATAFLOW! When checking the value of your "string" by Unbundling from cluster wire you will just get the value that has been read in the first frame. THINK DATAFLOW!!!
3) There's a difference between data in a wire and data in a frontpanel control. Changing the control will not magically change data in a wire. THINK DATAFLOW!!!
4) Reading the string by property node in the last frame you will get the current value of the string...
5) What's wrong with using BundleByName to change the string value in 2nd frame? Why insist on using property nodes? Why insist on breaking dataflow?
03-07-2013 03:19 AM - edited 03-07-2013 03:21 AM
Hi GerdW
Thanks a lot for your reply. The reason I am stubbornly tring to break DATAFLOW is: we have a test system which have about 100 VIs, they have some dataflows connected, some of them will unbundle a string from cluster dataflow to check the value in order to do different cases. Now I want to insert user event by changing the control and influent the cases during running time.
The way I did at beginning is using a global variable(to control the cases) instead of unbundle string from dataflow, this works ok. But then I found there are a lot of VIs which are using the unbundle string. One of the 'lazy' way I tried is change the value via property node(cause by this way, i do not need to find all places where using the unbundle string and replace them by global variable), then I notice it has problem with ' dataflow' , the value in dataflow cluster actually won't be changed by change the value of property node.
I did a test with simple VI ( as attached picture in last post), and after i read your hints, then I think I need to understand the concept of 'DATAFLOW' in labview, it seems my 'lazy' way can not work in this scenario.
I attached the test VI here, do you have furthur suggestion on what I can do in this case?
Mant thanks!
Minyi
03-08-2013 03:22 AM - edited 03-08-2013 03:29 AM
Hi GerdW minyi.
When connecting your wire through a sequence and create a tunnel, you actually create a copy of your data. But when you update the value using a property node, you are using a reference to the original memory space.
This example does not make sense: if you have the wire (which you have) you should always use dataflow programming. In this case it means that you should use the unbundle function.
03-08-2013 03:27 AM
03-08-2013 03:29 AM
Hi GerdW.
Haha, sorry about that
03-08-2013 06:34 AM
Thanks a lot, Alex and GerdW 🙂