LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implicit cast on Variant to Data

Solved!
Go to solution

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)

----------
Although I've been 10+ years long fan of LabVIEW, I started to discourage engineers to start new projects in a SaaS language. NI must first regain trust within its community.
0 Kudos
Message 1 of 3
(1,371 Views)
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.

----------
Although I've been 10+ years long fan of LabVIEW, I started to discourage engineers to start new projects in a SaaS language. NI must first regain trust within its community.
Download All
Message 2 of 3
(1,317 Views)

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

 

Fixed type coercion.PNG

Message 3 of 3
(1,295 Views)