TobyD Posted December 19, 2007 Report Share Posted December 19, 2007 I'm was playing with the Open VI Object Reference function today, but I'm having trouble getting it to work in one application. My front panel is divided into 3 panes and I'm trying to access a boolean indicator in one of the panes. I'm confused about the name/order convention that the VI accepts. Using just the control name does not work. I've tried Pane#/control name and many other variations of the same. Can anyone point me in the right direction (or is there an easier way to get the job done)? Quote Link to comment
Ton Plomp Posted December 20, 2007 Report Share Posted December 20, 2007 QUOTE(TobyD @ Dec 18 2007, 11:45 PM) I'm was playing with the Open VI Object Reference function today, but I'm having trouble getting it to work in one application. My front panel is divided into 3 panes and I'm trying to access a boolean indicator in one of the panes. I'm confused about the name/order convention that the VI accepts. Using just the control name does not work. I've tried Pane#/control name and many other variations of the same. Can anyone point me in the right direction (or is there an easier way to get the job done)? Well the pane is just a FrontPanel thing, the block diagram don't know about them, so it shouldn't be anything different than a single pane VI. But unfortunately not the 'Open VI Object Reference' The following code should work: http://lavag.org/old_files/monthly_12_2007/post-2399-1198046848.png' target="_blank"> Notice the error out will be true on completing this code since the second pane (in my case) doesn't have the 'Boolean' control. The funny thing is the 'Owner' of the Boolean is not the Pane but the Panel. Good luck, Ton Quote Link to comment
Aitor Solar Posted December 20, 2007 Report Share Posted December 20, 2007 Yes, it seems you have to access specifically through the container pane: Maybe it's easier to access to it through the block diagram: Both work. Saludos, Aitor Quote Link to comment
silmaril Posted December 20, 2007 Report Share Posted December 20, 2007 QUOTE(tcplomp @ Dec 19 2007, 07:48 AM) http://lavag.org/old_files/monthly_12_2007/post-2399-1198046848.png' target="_blank"> This confuses me What is this item you use to get the control reference from the pane reference and control name? I can't find it in my LabVIEW. Is this part of normal LabVIEW (and I'm just to stupid to find it) or do I need a scripting license for this? Quote Link to comment
Ton Plomp Posted December 20, 2007 Report Share Posted December 20, 2007 QUOTE(silmaril @ Dec 19 2007, 10:36 AM) Is this part of normal LabVIEW (and I'm just to stupid to find it) or do I need a scripting license for this? Yes and No, it is installed by the OpenG 'Additional Application Control' package. Ton Quote Link to comment
Aitor Solar Posted December 20, 2007 Report Share Posted December 20, 2007 QUOTE(tcplomp @ Dec 19 2007, 10:53 AM) it is installed by the OpenG 'Additional Application Control' package. Well, the "Open VI Object Reference" function is inside LabVIEW, though is not shown in the palette. That OpenG package "just" gives an easy way of placing it in the block diagram . Saludos, Aitor Quote Link to comment
TobyD Posted December 20, 2007 Author Report Share Posted December 20, 2007 QUOTE(tcplomp @ Dec 18 2007, 10:48 PM) http://lavag.org/old_files/monthly_12_2007/post-2399-1198046848.png' target="_blank"> Good luck, Ton Thanks for the replies. This is the way I ended up doing it, I was just hoping there was something a little more compact. I googled the VI and found the patent that NI filed that describes it (Patent # 7159183 - Discussed under Figure 13) and it says: QUOTE name/order identifies the name or order, e.g. zplane order, of the object for which to obtain a reference. The name/order input may be a simple string, an array of strings, or a numeric constant. An array of names may be used if the object is a nested object. For example, to access the status boolean of an error cluster in an array called "myArray", the name array may be: ["myArray", NULL, "status"]. I thought I should be able to do something with an array of names to "drill down" to the indicator ["myPane", "myBoolean"]. Unfotunately everything I tried crashed LabVIEW. Quote Link to comment
Val Brown Posted December 20, 2007 Report Share Posted December 20, 2007 QUOTE(Aitor Solar @ Dec 19 2007, 02:58 AM) Well, the "Open VI Object Reference" function is inside LabVIEW, though is not shown in the palette. That OpenG package "just" gives an easy way of placing it in the block diagram .Saludos, Aitor Is there an easy way to navigate to and find it if you're not using OpenG? Quote Link to comment
Aristos Queue Posted December 20, 2007 Report Share Posted December 20, 2007 QUOTE(Aitor Solar @ Dec 19 2007, 03:58 AM) Well, the "Open VI Object Reference" function is inside LabVIEW, though is not shown in the palette. That OpenG package "just" gives an easy way of placing it in the block diagram . And, in fact, without the OpenG tools, you cannot add it to the palettes. This is a rusty nail of LabVIEW and was definitely never intended to be exposed to end users. But end users find it useful and worm their way into all LV's nooks and crannies. I've had to start hiding easter eggs at the extreme edges of things just to keep them from being found quickly... Quote Link to comment
Val Brown Posted December 20, 2007 Report Share Posted December 20, 2007 QUOTE(Aristos Queue @ Dec 19 2007, 03:28 PM) And, in fact, without the OpenG tools, you cannot add it to the palettes. This is a rusty nail of LabVIEW and was definitely never intended to be exposed to end users. But end users find it useful and worm their way into all LV's nooks and crannies. I've had to start hiding easter eggs at the extreme edges of things just to keep them from being found quickly... So the short answer is: No, there is no easy way without OpenG. Are you also suggesting by this that Open VI Object Refence ought not to be used??? Quote Link to comment
Aristos Queue Posted December 20, 2007 Report Share Posted December 20, 2007 QUOTE(Val Brown @ Dec 19 2007, 05:05 PM) Are you also suggesting by this that Open VI Object Refence ought not to be used??? That's my standard advice for any unreleased, undocumented, unsupported aspect of LabVIEW. But people have been very successful using these things anyway. It's a lot like getting medical certification for a LabVIEW program. NI doesn't have LV itself certified for use in medical equipment, and we don't (to the best of my knowledge) help a customer get that certification for their VI hierarchy. But some customers have gotten a particular hierarchy certified. If you can make it work, then use it. But it isn't officially supported, and your AEs won't generally even know about it, and they won't find any documentation about it in their database -- it's something only an R&D programmer or a hacker user would be able to help you with.READ THIS POST FOR MORE DETAILS: http://forums.lavag.org/VI-Scripting-Readme-First-t1207.html Quote Link to comment
Val Brown Posted December 20, 2007 Report Share Posted December 20, 2007 QUOTE(Aristos Queue @ Dec 19 2007, 05:01 PM) That's my standard advice for any unreleased, undocumented, unsupported aspect of LabVIEW. But people have been very successful using these things anyway. It's a lot like getting medical certification for a LabVIEW program. NI doesn't have LV itself certified for use in medical equipment, and we don't (to the best of my knowledge) help a customer get that certification for their VI hierarchy. But some customers have gotten a particular hierarchy certified. If you can make it work, then use it. But it isn't officially supported, and your AEs won't generally even know about it, and they won't find any documentation about it in their database -- it's something only an R&D programmer or a hacker user would be able to help you with.READ THIS POST FOR MORE DETAILS: http://forums.lavag.org/VI-Scripting-Readme-First-t1207.html Understood and, in general, I agree absolutely with this. I greatly prefer to stick with processes, etc that AEs can support but can also bump up to R&D as needed. That having been said, I'm still using the legacy serial i/o functions so....I don't even follow my own advice on everything! 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.