It appears that the Variant to Data primitive *or* the Control Value.Get method does not like to work with complex typedef'd data.
This used to work in LV2009SP1 but now give me error 91 in LV2010.
Has anyone else run into this?
-John
Posted 24 September 2010 - 02:05 AM
Posted 24 September 2010 - 02:48 AM
'FP References': cluster of 18 elements
'Run': Boolean Refnum
'': void
'Loop': Boolean Refnum
'': void
...
'Value': cluster of 18 elements
'Run': Boolean Refnum
'': boolean (TRUE or FALSE)
'Loop': Boolean Refnum
'': boolean (TRUE or FALSE)
'Abort': Boolean Refnum
...
Edited by SuperS_5, 24 September 2010 - 02:49 AM.
Posted 27 September 2010 - 06:39 PM
Posted 28 September 2010 - 08:01 PM
Posted 28 September 2010 - 08:54 PM
Edited by ShaunR, 28 September 2010 - 09:25 PM.
Posted 28 September 2010 - 09:35 PM
If you uncheck "Include Data Type" on the VI server reference classes ( Run, abort. Text display tree etc). It works.
And if you save it to 2009 and add the "include Data Type" it fails. A default setting has changed maybe?.
Variant to Data bug 2009.zip 31.24K
110 downloads
7299252 Variant to Data bug.zip 33.11K
124 downloadsPosted 28 September 2010 - 09:41 PM
Your example of the 2009 also fails on my 2009 SP1 (error 91). But if I remove the strict type it works again. I can switch backwards and forwards between it working and not working, so I'm not sure what you mean by "adding back the strict typedef setting has no effect"Ok, so removing the include datatype fixes the issue. And adding back the strict typedef setting has no effect. So my bug is the 'include datatype' problem. FWIW, the original with all the data types included and the strict type defs still works in 2009SP1 (this has been in my code since 8.2 and always worked until upgrading to LV2010)
Here is the LV2009SP1 version where the datatypes are included and the typedefs are strict and it generates no errors.Variant to Data bug 2009.zip 31.24K 110 downloads
But NI did find a bug with the strict type defs. Here is the example from NI support where they demonstrate the strict typedef bug using simple datatypes:7299252 Variant to Data bug.zip 33.11K 124 downloads
I might get two CARs out of this one. Nice...
Edited by ShaunR, 28 September 2010 - 09:50 PM.
Posted 28 September 2010 - 09:49 PM
Your example of the 2009 also fails on my 2009 SP1 (error 91). But if I remove the strict type it works again.
Posted 28 September 2010 - 09:54 PM
Edited by ShaunR, 28 September 2010 - 09:58 PM.
Posted 28 September 2010 - 10:00 PM
Nope you are right (only 1/2 a rep point then
) When I launched your example (dbl clicked) it switched to 2010 instead of my usual 2009.
Posted 28 September 2010 - 10:08 PM
And replace 1 small insignificant bug with 20 whopping huge onesNext time I will write my app in OOP and try to avoid these issues of getting data via VI Server methods.
Posted 28 September 2010 - 10:13 PM
And replace 1 small insignificant bug with 20 whopping huge ones