04-05-2006 01:19 PM
04-05-2006 01:36 PM - edited 04-05-2006 01:36 PM
Message Edited by smercurio_fc on 04-05-2006 01:36 PM
04-05-2006 01:42 PM
04-05-2006 01:46 PM
I agree with you on the XML functions.
It is only 2 different issues here because I'm trying to compensate for what the XML functions lack.
I know I can use the 7.x option,...but nobody likes to code for functionality which is now deemed obsolete. I want my new, super cool vi to be compatible with LabVIEW 8.0 and all versions further without relying on the 7.x option.
A support person said they've dropped the 'Type Descriptor' in LabVIEW 8 because it is too complex to be useful by the users. We still need the specifics of a control though.
Thanks for the reply.
Craig
04-05-2006 02:01 PM
04-05-2006 05:26 PM
For now, it is probably easier if we assume that I am able to parse the XML file and extract the string values.
Imagine my XML file is like this, and I'm interested in extracting only 'Speed' and 'Distance' in order to populate a cluster control which contains these two values:
<Config>
<Version>
8.0
</Version>
<Speed>
99
</Speed>
<Distance>
150
</Distance>
<Accel>
22
</Accel>
</Config>
So...I have these two string values '99' and '150'...and I have references to the two numeric controls inside the cluster. I want to convert these two string values to the correct numeric format (DBL, I32, etc.) before using populating the numeric control via the [Ctl -> Value] Property using a Property Node...which takes a Variant.
I've attached an example of what I'm talking about..and an image.
04-06-2006 08:51 AM - edited 04-06-2006 08:51 AM

Message Edited by smercurio_fc on 04-06-2006 08:52 AM
04-06-2006 10:47 AM
I'll probably have to do that. I just remember from the old days that fractionals don't always convert exactly to integers....I don't know if the same is still true. I do remember encountering a problem using the 'Quotient/Remainder' SubVI with Doubles.
Will a double hold the maximum value for a U32 or perhaps worst case a U64 now that they are available.
Thanks for the input. I know there are work arounds...I could also look at the text string and determine roughly the size by the number of digits and if a decimal is present or not...then use the 'closest' numeric type. Or, I can use a naming convention similar to standard C (intMyNumber, etc.) and look for the 'prepend' string in the name to determine how to convert the data.
I just like doing it exactly right...with no conversion. Oh well.
Thanks.
04-06-2006 11:20 AM
04-06-2006 12:05 PM - edited 04-06-2006 12:05 PM
Message Edited by johnsold on 04-06-2006 01:08 PM