07-27-2017 11:56 PM
Well, you could create several clusters, each containing up to 256 elements, until you reach 4001 elements.
Or you can take the alternate approach: calculate the size of the entire struct, in bytes; allocate an array of that many U8; and pass it to the function (by array data pointer) in place of the cluster. Then, you can index out individual bytes or array subsets to get the struct elements of interest. It appears that the total size of the struct is 16180 bytes.
07-29-2017 04:56 PM - edited 07-29-2017 05:01 PM
Actually I would create an array of 4044 int32 values, since all the elements in that cluster are 4 byte values (a BOOL is a Windows datatype that can represent '0' and 'not equal 0' for False and True, but it uses 32 bits.
Then you can fairly easily extract the correct value and for floats will need to put it through the Typecast node to convert it into a float value. Or since the huge array and most other values are all floats you could make the array contain floats and convert the ones that are really int or BOOL values with the Typecast function.
08-02-2017 08:23 PM
Worked on the ways to get the mixed data type and here's the results.
Set up an array of int32 with 4055 elements.
On the output side, i wired array to int32 indicator and the first 9 element (integers showing correctly)
Also, extract 10-14, 4 elements with SGL conversion and indicator. showing random numbers.
(probably i need to use type cast instead of conversion. let me see how it works out)
I think even though the bytes are initiated for enough space, it still cannot be mixed between INT32 and SGL. I will do more investigation.
08-03-2017 07:53 AM - edited 08-03-2017 07:55 AM
You didn't properly convert the int32 to an SGL! You should use the Typecast function to convert the interpretation of the four bytes from an int32 to a float. It should work then. If it doesn't you may also have to put a Byte Swap and a Word Swap into the int32 wire.