03-03-2009 08:17 AM
I've got a fixed point number that I convert to a variant. I then flatten it to a string. Now when I try to reconstruct the variant by using "Flattened String to Variant", I get error 116. I'm currently using LabView 8.5. Do any of you know if this issue has been fixed in later releases?
03-03-2009 08:36 AM
Hi OptEn_Mar...,
is it a known issue? Do you use the correct FixedPoint settings?
Mike
03-03-2009 09:27 AM
03-03-2009 09:39 AM - edited 03-03-2009 09:41 AM
Hi OptEn_Mar...,
you are correct, i see the same behavior. There are two work arounds if you need the data as string.
Hope it helps.
Mike
03-05-2009 04:14 AM
03-05-2009 04:53 AM
OptEn_Marius wrote:
... Your solutions depend on knowing what you are working with. However, I need a generic solution for any type of fixed-point number.
Hi OptEn_Marius,
if you want to transform your fixedpoint to variant and later back, then you also have to know what you want to get back.
For every transformation back from string or variant to a specific type you have to select the type you want to get, also with the type cast function.
Mike
03-05-2009 05:15 AM
What I do once I have the variants is to analyze each one's type by using the openg block "Get TDEnum from Data". Since I then know what I'm working with I know what type to wire into type terminal of the "Variant to Data" block. With regards to a fixed-point number I simply wire in a double to the "Variant to Data" block when I do the final conversion - the double I end up with is fine for the purpose I'm using it for. The problem however comes back to "Flattened String to Variant" vi that does not want to work with fixed-point types. Do you know if NI fixed this in later releases? I'm currently using version 8.5.
03-05-2009 05:56 AM - edited 03-05-2009 06:00 AM
Hi OptEn_Marius,
see this link http://zone.ni.com/reference/en-XX/help/371361D-01/lvhowto/funcs_support_fxp/. There are all supported functions and "Flatten String to Variant" or back is not on the list.
Mike