LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Type Cast

Hello!
I´ve got a problem with the type cast function.I want to put the data from
an array to a cluster.As x is the array and as type is the cluster.The array
has a size of ten but the type cast function replace the items till 7 !
Any suggestion ?
If you say that i should use the array ->cluster then you should know that
the data inside the cluster are not of the same type.So it´s not working.
Any solution ?
0 Kudos
Message 1 of 3
(3,193 Views)
The type cast function changes the a value from a data type to its binary
representation and then converts it to the new data type as if it were represented
by that binary. This cannot do the conversion you wish. Manually strip
each element from the array and build your cluster using the array and cluster
tools LabVIEW provides.

-Jim

"AusDeutschland" wrote:
>Hello!>I´ve got a problem with the type cast function.I want to put the
data from>an array to a cluster.As x is the array and as type is the cluster.The
array>has a size of ten but the type cast function replace the items till
7 !>Any suggestion ?>If you say that i should use the array ->cluster then
you should know that>the data inside the cluster are not of the same type.So
it´s not workin
g.>Any solution ?>>
0 Kudos
Message 2 of 3
(3,193 Views)
Jim Kring wrote in article
<398f05d9@newsgroups.ni.com>...
>
> The type cast function changes the a value from a data type to its binary
> representation and then converts it to the new data type as if it were
represented
> by that binary. This cannot do the conversion you wish. Manually strip
> each element from the array and build your cluster using the array and
cluster
> tools LabVIEW provides.

Another feature of the LabVIEW typecast is that it always converts
multibyte numbers into big-endian or vice-versa. So if you have int16,
int32 or something on either side of the typecast you have to take this
into account.
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 3
(3,193 Views)