Discussions au sujet de NI LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Select U8 or U16

Bonjour à tous,

 

Je souhaite sectionner pour le "Chaîne hexadécimale en nombre" différent type de data en fonction de l'entrée.

Pour un certain type, des U8 et pour un autre des U16. 

 

Lorsque je fais une "Structure Condition" qui choisit le type U8 ou U16, j'ai un problème de coercition.

 

U8_U16.png

 

Je ne vois pas comment arranger cela. Dans la mesure ou si c'est vrai, il prend le U8 et si c'est faux il prend le U16. 

À aucun moment ils ne sont liés...

 

Du coup je n'arrive pas à comprendre comment faire autrement. 

 

Si qqun à une idée c'est volontiers

 

Cordialement,

Romain

 

Download All
0 Kudos
Message 1 of 2
(987 Views)

The output terminal will coerce to the highest number of bits. With numerics, there's simply no way around it.

 

You'll have to either use variants (or a data class hierarchy), or pass a Boolean to indicate if it's a 16 or 8 bit integer. And then make informed decisions later on.

0 Kudos
Message 2 of 2
(971 Views)