LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare Variant data

LabVIEW 2018. I try to compare Variant data that include IMAQdx camera session name. Both variants have similar data, but when I compare these variants LV says it false and when I compare IMAQdx raw data its says true. I try it with empty session name and with filled, results are same. Why this is happen? If we try to use this VI with VISA refnum data then variants will be compared true.

 

Camera refnum variant.png

 

Camera variant.jpg

0 Kudos
Message 1 of 4
(1,245 Views)

data 1 and data 2 are the same... My guess would be the Variant To Data nodes return an error.

 

I'm not sure why a cast from a string to an IMAQdx camera session would succeed. Just because one is a string, and the other has a name string?

 

I'd convert the IMAQ session to an IMAQ session, and then get the name with methods intended for an IMAQ session. Then compare it to the other string. 

Message 2 of 4
(1,223 Views)

There is no error in Variant cast, all works fine. Attached example with filled data and add visa example.

 

Camera variant 2.jpg

0 Kudos
Message 3 of 4
(1,206 Views)

I would assume the Camera information is part of the Variant, while the VISA information is an attribute, that'd explain why the variant comparison is different.

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
Message 4 of 4
(1,201 Views)