LabView_Fool
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by LabView_Fool
-
-
Another problem with that solution is mapping/typecasting the 2D arrays. For some reason, Typecast only works on single dimensional data.
-
In C, it would look something like this:
char dataArray[1024]; // serial data buffer
clusterType myCluster; // some structure
memcpy(&myCluster, dataArray, sizeof(clusterType)); // copy data into cluster
-
Thanks, Darren.
No it's not the Bundle by Name that I'm looking for -- the array of bytes my VI receives is coming over the serial port and it's received as a single dimensional array of bytes. The array of bytes that I receive over the serial port are the members of my cluster and I'm looking for a simple solution for mapping the data into my cluster.
-
Does anyone know how to easily map an array of bytes to a cluster? I'm new to LabVIEW and I'm coming from a C/C++ programming background. My first attempt at solving this problem was by using the Typecast component, which didn't work and gave me an error message complaining about polymorphic data. I contacted NI support, but they tell me I'll need to parse the individual members, bundle, and then pipe into the cluster :headbang:
See attached subVI.
Byte Array to Cluster
in LabVIEW General
Posted
Thanks. I wasn't aware of "Reshape Array".