LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to "index" a cluster?


hi,
the only problem i have is that the class name is only giving output as array(on putting a probe), it should ideally give diiferent class names like double etc and then i can typecast accordingly
thanks for the help


0 Kudos
Message 11 of 16
(1,822 Views)
Hi Akash, I guess you didn't follow the link?

TOn
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 12 of 16
(1,819 Views)
hi Ton,
I looked at the link but may be i am not getting what u r telling, currently i am using classname to control my structure and i am not getting all the classnames, also in the numeric case the value is of variant type where as it should be double and in case of array also i am not getting the values

please help
i have attached the new vi
 
thanks for your help
0 Kudos
Message 13 of 16
(1,813 Views)
Hi,

I've edited your VI (the type descriptor you were looking at was the typedescriptor from a variant:

Then I've 'debugged' the TD of the array of dbl's:
Elements of the cluster:
-Array of DBL
-String
-Array of Strings
-2DArrayof DBL
-DBL

Typdescriptors (all in Hex):
-Array of DBL
-00 1C : Length of TD 0x1C =28 decimal
-40 40 : Means Array
-00 01 : 1 Dimension
-FF FF : No length (FF FF FF FF=-1) set currently not used
-FF FF : Length <k> in TD help is a 32 bit
-00 0C : Typedescriptor of Array filling length= C = 12
-40 0A : xx 0A means DBL
-07 4E : The rest is proprietary to NI (unfortunately
-75 6D :
-65 72 :
-69 63 :
-05 41 :
-72 72 :
-61 79 :
The trick for you is to create something to read this data! There are VERY helpful VIs in the OpenG toolkit
Ton

Message Edited by TonP on 10-19-2006 08:58 PM

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 14 of 16
(1,807 Views)
hi Ton,
thanks a lot, however i was able to do what i wanted- i converted the variant to data using that function from labview and then used the class name to run my structure
thanks again


0 Kudos
Message 15 of 16
(1,795 Views)

@TCPlomp wrote:
 
-07 4E : The rest is proprietary to NI (unfortunately
-75 6D :
-65 72 :
-69 63 :
-05 41 :
-72 72 :
-61 79 :

The last part is

07 - Length of String

4E 75 6D 65 72 69 63 - "Numeric"

 

05 - Length of String

41 72 72 61 79 - "Array"

 

The first string is still part of the Array Element Type Descriptor. The Label of the "control" always comes at the end.

The second string is part of the Array Type Descriptor.

 

So you have an Array names "Array" containing a numeric named "Numeric".

 

The names are optional. If you take the entire length of the Type Descriptor and have parsed the rest, any data left at the end indicates the name of the Data field. Note that the designated length of the TD for the Numeric is 12 (including the length). This includes 2 Bytes for Length, 2 Bytes for Type (1st Byte is reserved) and 1 Byte for String Length and 7 Bytes for String.

0 Kudos
Message 16 of 16
(1,046 Views)