LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if a sub-VI connector is linked? / Détecter si un connecteur est raccordé

Solved!
Go to solution
Good morning, 

I develop under LabVIEW 2009 SP1, I have a sub-VI with facultatives connectors and I shall want to do operations so if the connector, in relation with,  is connected. I shall be able to use a Enum input to now what I want to do, but I would like to make simpler 

 

The question is: 
Is it possible to know, in a sub-VI, if a facultative connector (input) is connected when it's called? 

Thank you for your help 

 

 

Bonjour,

 

Je développe sous LabVIEW 2009 SP1, j'ai un sous VI avec des connecteurs facultatifs et je voudrai réaliser des opérations que si le connecteur en question est raccordé. Je pourrai utiliser un énum de commande pour indiquer ce que je veux faire, mais je souhaite faire plus simple.

La question est:

Est-il possible de savoir dans un sous VI, si un connecteur d'entré facultatif est raccordé à l'appel  ?

 

Merci pour votre aide 

0 Kudos
Message 1 of 3
(2,327 Views)

There's no existing method for detecting this. The simplest is to add an invalid value and make that the default (see here for an example).

 

See here for an explanation of why this will probably not be implemented.


___________________
Try to take over the world!
Message 2 of 3
(2,315 Views)
Solution
Accepted by topic author BGR72

Make the connector Type "Variant" and convert from Variant to the type of control you want inside the subVI - if unwired by the correct input type, you will get error 91

 

James

Message Edited by James W on 05-21-2010 10:36 AM
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 3 of 3
(2,296 Views)