10-09-2006 04:55 PM
10-09-2006 05:25 PM
10-09-2006 06:35 PM
@davey31415 wrote:
My last attempt was to make a refnum control in the sub-vi (by dragging from top-level block diagram to sub front panel) and then creating a property node from that refnum control. Using the property node "value" did not give me the value of the control from the top-level vi as I had hoped.
10-10-2006 07:55 AM
I must not have wired the reference, I think I did everything else.
How about using files to store/retrieve data? It seems to me it would make more sense to use a reference to a cluster throughout the entire program unless data needs to be saved between program uses.
10-10-2006 11:07 AM
That really depends on the purpose. Files have the advatage that updated data is typically not lost if the program or computer crashes. 😉
@davey31415 wrote:
How about using files to store/retrieve data? It seems to me it would make more sense to use a reference to a cluster throughout the entire program unless data needs to be saved between program uses.
10-11-2006 01:36 PM
@altenbach wrote:
@davey31415 wrote:
My last attempt was to make a refnum control in the sub-vi (by dragging from top-level block diagram to sub front panel) and then creating a property node from that refnum control. Using the property node "value" did not give me the value of the control from the top-level vi as I had hoped.
Make the refnum control an input connector of the subVI, the wire it to a value property node.In the main VI, create a reference to your desired control and wire it to that connector when you call the subVI.
Okay, I've tried that, here's the error I'm running into:
You have connected wires of 2 different types: source is cluster of 2 elements, sink is cluster refnum of 2 elements.
Is there some way to make these compatible (like a cast maybe) ?
Dave
10-11-2006 01:48 PM
Never mind, I was creating a property node for the refnum (I guess that's obvious from the error message when you think about it). I was wondering why there wasn't a reference input for the property node. I overlooked the 'Property' item near the bottom of the context menu. I think in the future I will just select 'Property Node' from the Application palette. Thanks for the assistance!
Dave