07-03-2007 01:50 PM
07-04-2007 06:45 AM - edited 07-04-2007 06:45 AM
Hi,
In memory:
If the data is written on a Intel machine (PC) it's Little-Endian
If the data is written on a Motorola platform (Mac) it's Big-Endian
But software can make it's own Endian
Because LV started on a MAC, data in a binary files was written in Big-Endian till LV7
Message Edited by K C on 07-04-2007 01:46 PM
07-04-2007 11:48 AM
Before LabVIEW gave a choice of byte order, everything in LabVIEW was big endian on any platform (to e.g. read or write a little endian file, you had to re-order the bytes manually).
You can safely assume that any old LabVIEW program does big endian unless you see some explicit byte operations in the code.
You did not attach the required subVI ("formatFordata..."), so we cannot really tell anything. Please attach that subVI. Thanks!
07-05-2007 10:04 AM
07-05-2007 09:13 PM - edited 07-05-2007 09:13 PM
Message Edited by mikeporter on 07-05-2007 10:15 PM
07-06-2007 10:01 AM
07-06-2007 10:41 AM - edited 07-06-2007 10:41 AM
@rlg50 wrote:
Ok i see why it is text that is being written and that is why you can replace the write to binary to a write to text file, but I don't understand what the enumerated "start, end, current" is used for. Could it be a special case of some sort?
Well, the "start, end, current" is an input for a stock LabVIEW function, so the online help will give you the answer you need. When writing to a file, you can either start writing at the beginning of the file, overwriting what's there, at the current file position, or at the end of the file (appending the new data to the existing file). Here "end" is used and the new data is appended to the existing file data.
While you're at it, you might want to clean up the code a bit. All your subVIs contain outer while loops that serve no purpose. You can delete them without any change in functionality. SubVIs only need a dummy while loop if you have uninitialized shift registers (e.g. action engine), but in this case, the loop is no longer a dummy. 😄
Let's have a quick look at your "format for data..." code. The while loop is useless. Much of the code is overly complex, for example have a look at the two details shown in the image. It shows your code fragments and better alternatives.
.
Message Edited by altenbach on 07-06-2007 08:42 AM
07-06-2007 01:02 PM
07-06-2007 02:08 PM