03-14-2010 11:04 AM
Hi all,
Is there a way to write a fixed size character array to a binary file? I notice that when I try to create an array of unsigned bytes labview prepends the array with a pascal type length in front of the array. Any way to keep this from happening?
03-14-2010 11:24 AM
03-14-2010 11:59 AM
03-14-2010 01:34 PM
03-14-2010 06:10 PM
You hadn't mentioned anything about clusters in your message. I imagine that clusters written out to a binary file will always have some additional info. Since it is a more complicated datatype that can take on an infinite number of datastructure variations.
And to quote from the detailed help for the Write to Binary File VI "Arrays and strings in hierarchical data types such as clusters always include size information."
03-15-2010 05:13 AM
Ravens Fan wrote:You hadn't mentioned anything about clusters in your message. I imagine that clusters written out to a binary file will always have some additional info. Since it is a more complicated datatype that can take on an infinite number of datastructure variations.
And to quote from the detailed help for the Write to Binary File VI "Arrays and strings in hierarchical data types such as clusters always include size information."
Yes I agree. Please tell us exact what kind of structure you want to write file. It is no problem to write clusters or pure arrays to a binary file. But the methods used differ some.
03-15-2010 07:05 AM
03-15-2010 07:22 AM
Can you post some code. If you want to write a C struct that will be read by a non Labview application. You must consider problems with different Endian format. Also a C struct and a Labview cluster is not the same. The items in a C struct will always have the same size. This is not true for the items in a Labview cluster.