hepman Posted April 1, 2008 Report Share Posted April 1, 2008 Dear All, is it somehow possible to find out with code if a terminal in a Sub-Vi Connector pane is connected or not. Best Regards Hepman Quote Link to comment
Eugen Graf Posted April 1, 2008 Report Share Posted April 1, 2008 QUOTE (hepman @ Mar 31 2008, 09:30 PM) Dear All,is it somehow possible to find out with code if a terminal in a Sub-Vi Connector pane is connected or not. Best Regards Hepman You can define your connectors as required, so you will get an error if this connector is not connected. Quote Link to comment
Aristos Queue Posted April 1, 2008 Report Share Posted April 1, 2008 QUOTE (hepman @ Mar 31 2008, 02:30 PM) is it somehow possible to find out with code if a terminal in a Sub-Vi Connector pane is connected or not. No, it's not. Quote Link to comment
orko Posted April 1, 2008 Report Share Posted April 1, 2008 I played around with this and was partially successful, but wasn't able to get it to work quite right as you can see by the end of the thread. Quote Link to comment
gb119 Posted April 1, 2008 Report Share Posted April 1, 2008 QUOTE (Aristos Queue @ Mar 31 2008, 08:32 PM) No, it's not. But it would be really really nice if it were. Sure the trick of using a 'null' default value works but I've done too many enums that go ["don't change","on","off"] to represent what ought to be naturally boolean data that I might want to change. Actually, how about having an XNode that wraps the sub-vi calls and somehowpasses the connected term types into the sub-vi - trivially by the sub-vi having a 'special' terminal that is only used by the XNode to tell it which of the other terminals are wired. Perhaps there's a more elegant way thi can be done with tagging a reference to a contro on the subvi with the connection data. It's sort of cheating, but might do the trick. Quote Link to comment
Aristos Queue Posted April 1, 2008 Report Share Posted April 1, 2008 QUOTE (Gavin Burnell @ Mar 31 2008, 04:03 PM) Actually, how about having an XNode that wraps... I believe that yes, you could make something like that work. Quote Link to comment
hepman Posted April 11, 2008 Author Report Share Posted April 11, 2008 QUOTE (orko @ Mar 31 2008, 09:58 PM) I http://forums.lavag.org/Wired-property-t8950.html' target="_blank">played around with this and was partially successful, but wasn't able to get it to work quite right as you can see by the end of the thread. Dear Orko, thank you very much for your Solution. I optimized it a little bit with/for LabView 8.5. Best Regards Marcel Quote Link to comment
orko Posted April 11, 2008 Report Share Posted April 11, 2008 Marcel, This looks good. I've modified the ConnectorPane_Core.vi to work when there is more than one subVI on the ConnectorPane_Wired_example.vi (it was throwing an error since you were closing the references too early). You can see an example of the problem I had with this on the enclosed example. When there are more than one subVI with the same name on the example's block diagram, this doesn't work. I wonder if perhaps explicitly passing in the VI reference (instead of relying on the list of callers) to the core VI would solve this problem... Quote Link to comment
TG Posted April 17, 2008 Report Share Posted April 17, 2008 QUOTE (hepman @ Mar 31 2008, 08:30 PM) Dear All,is it somehow possible to find out with code if a terminal in a Sub-Vi Connector pane is connected or not. Best Regards Hepman \ A trick I sometimes use is to set the default to zero or some other number that is useless to the Vi then test for it in the VI. The assumption is that the caller would never send in a zero or a -99999999.000000001 etc.. I know it isn't perfect but it will get you moving on at least. Quote Link to comment
gb119 Posted April 18, 2008 Report Share Posted April 18, 2008 QUOTE (Aristos Queue @ Mar 31 2008, 09:17 PM) I believe that yes, you could make something like that work. I've just posted a first trial at doing this http://forums.lavag.org/Determing-if-a-control-is-wired-in-the-caller-t10604.html&view=getnewpost' target="_blank">here 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.