12-03-2020 06:43 AM - edited 12-03-2020 07:09 AM
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.
12-03-2020 07:41 AM
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.
12-03-2020 08:09 AM
There is no error in Variant cast, all works fine. Attached example with filled data and add visa example.
12-03-2020 08:20 AM
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.