LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

toVar on VARIANT input omittable

Solved!
Go to solution

I wonder if it's unreasonably imprudent to omit the "toVar" block when using the "Enqueue Message" block. I do believe that having the "toVar" at this point tends to unnecessarily bloat my block diagram.

This is the Enqueue Message Block from NI's CMH template.

coercion.png

Actor Framework
0 Kudos
Message 1 of 3
(536 Views)
Solution
Accepted by Quiztus2

That red dot you see is an implicit To Variant node that the LabVIEW compiler adds to the code.

 

So yes in most cases it is not necessary. Some people have however a sacrosanct rule to never ever have any red coercion dot in a diagram. Personally I'm a little more lenient about that rule. 🙂

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 3
(507 Views)

@rolfk wrote:

That red dot you see is an implicit To Variant node that the LabVIEW compiler adds to the code.

 

So yes in most cases it is not necessary. Some people have however a sacrosanct rule to never ever have any red coercion dot in a diagram. Personally I'm a little more lenient about that rule. 🙂


There's even instances where it cost performance, so if you have overly zealous coworker add a note that you deliberately left it.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(441 Views)