LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implicit cast on Variant to Data

Solved!
Go to solution
Highlighted

I'm seeing an implicit type cast at the type-terminal of variant to data and I'm losing the type definition on that wire. Never seen such behaviour before; vtd usually accepts any type definition. Unfortunately I can't share the code. The TypeDef contains clusters (with booleans, boolean arrays, single, integers) and a variant.

 

benjamin-hinrichs_1-1600360988419.png

 

Has anyone seen this before? I'd use TypeCast as a workaround, but it doesn't accept clusters (broken wire).

 

(LabVIEW 2018 32 bits on Windows 10)

0 Kudos
Message 1 of 3
(249 Views)
Highlighted
Solution
Accepted by benjamin-hinrichs

I found the culprit to be a fixed size boolean array. Also coerce to type manages to cast it to a typedef.

benjamin-hinrichs_0-1600413061563.png

Sample code attached.

Download All
Message 2 of 3
(195 Views)
Highlighted

You can replace the data indicator with the type definition. You'll get a coercion dot. 

 

Fixed type coercion.PNG

Message 3 of 3
(173 Views)