LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

unflatten from string

hello all,

When using the invoke node VI to get control values it has two outputs:
Get Control value and Type Descriptor. How are these used to correctly
reassemble the data, without knowing the previous format of the data
(any number format would do). Is not the Type Descriptor supposed to
hold this information from when the data was flattened to string?
However, when used as the type for the unflatten from string a error and
a integer array are produced. Is there any way to interpret the value
stored in the type descriptor to pass the unflatten node the correct
input? Or would this mean having a case statement for every possible
data type?

In other words, i want to be able to get a number from the front panel
of another VI a
nd then use it without knowing what type (integer,
single, or double) it is (let the coercion dot do it's thing so that
only the control name has to be standardized).

Any information or examples would be extremely helpful.

thanks,
joel
0 Kudos
Message 1 of 2
(1,597 Views)
There is an info on type descriptors in Labview online reference. Each data
type has a descriptor byte or dword, which is located at specific offset,
these offsets and type values should be in the LV reference. E.g array has
its own descriptor, then array element type has its own, etc. Also a number
of elements in the array should be at some offset. If you have SQL toolkit,
then there are some examples where vi finds out the type of cluster
controls, before constructing the query.
Hope it helps.

joel wrote in message
news:38064BD7.45541AC2@americasm01.nt.com...
> hello all,
>
> When using the invoke node VI to get control values it has two outputs:
> Get Control value and Type Descriptor. How are these used to correctly
> reassemble the dat
a, without knowing the previous format of the data
> (any number format would do). Is not the Type Descriptor supposed to
> hold this information from when the data was flattened to string?
> However, when used as the type for the unflatten from string a error and
> a integer array are produced. Is there any way to interpret the value
> stored in the type descriptor to pass the unflatten node the correct
> input? Or would this mean having a case statement for every possible
> data type?
>
> In other words, i want to be able to get a number from the front panel
> of another VI and then use it without knowing what type (integer,
> single, or double) it is (let the coercion dot do it's thing so that
> only the control name has to be standardized).
>
> Any information or examples would be extremely helpful.
>
> thanks,
> joel
0 Kudos
Message 2 of 2
(1,597 Views)