Sparky Posted October 1, 2008 Report Share Posted October 1, 2008 I would like to be able to update a picture control in the main application VI from a sub vi. I need to reference the picture control and send the reference to the VI. I am not sure how to do this. I have been reading on refnum's and refnum controls, but cannot seem to see how to do this. Can anyone help? Thanks Quote Link to comment
TobyD Posted October 1, 2008 Report Share Posted October 1, 2008 QUOTE (Sparky @ Sep 30 2008, 12:13 PM) I would like to be able to update a picture control in the main application VI from a sub vi. I need to reference the picture control and send the reference to the VI. I am not sure how to do this. I have been reading on refnum's and refnum controls, but cannot seem to see how to do this. Can anyone help? Thanks Right click on the picture control and select Create --> Reference. You can then drag that reference onto the Front Panel of your SubVI to create a control to wire your input terminal to. Quote Link to comment
PaulL Posted October 1, 2008 Report Share Posted October 1, 2008 Exactly. See the attached file for an example. Paul Quote Link to comment
David Boyd Posted October 2, 2008 Report Share Posted October 2, 2008 QUOTE (Sparky @ Sep 30 2008, 03:13 PM) I would like to be able to update a picture control in the main application VI from a sub vi. I need to reference the picture control and send the reference to the VI. I am not sure how to do this. I have been reading on refnum's and refnum controls, but cannot seem to see how to do this. Can anyone help? Thanks I *must* be missing the point of both your original question and the responses you've received so far. I don't see why you need a reference to the picture control in the subVI to change the contents of the picture on the caller's front panel. Can you not simply pass the subVI the existing picture data and pass the modified picture data back from the subVI, to the indicator on the calling VI FP? Unless you need to change an attribute of the picture, as opposed to its data, the reference passing just circumvents dataflow. Perhaps if we asked the same question with "numeric indicator" substituting for "picture control", my objection would be more obvious. Best regards, Dave P.S. to Paul: all I found in your zip attachment was an .lvproj file - no VIs. Also, you might want to update your profile to show you're posting LV8.6. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.