LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write to binary question

Hi all,

I have an application which stores data. First it stores some particular information in a header file. And then it acquires data in some other. THey all are stored in binary format. I convert them in text file with Graph Acquired Binary Data.VI . I have no problem with the rest of the files, but with the header. The message when I convert it  is ' Cannot read from binary file'. Since with all the rest the conversion works, I assumed it is the writing to binary that is flawed. I peered the  program but I didn't succeed to find an explanation.
I would be really grateful if you can have a clue about it and share it with me.
I attached the application, I hope one of you can be of help. I annotated the area involved with writing the header binary file with "write the header file I' and 'write the header file II'(the action is divided, there is a single file).

Thank you very much.
Dana
0 Kudos
Message 1 of 6
(3,149 Views)
How are you performing the read? The way you're writing the header you're mixing data types in what you're writing out. You first write out a 1D array of DBL and then a 2D array of I32. If in your read you don't match the way you've written out the data then you'll get that error message.
Message 2 of 6
(3,140 Views)
Yes, indeed, it is the data type that don't match. Thank you very much.
There would be 2 questions relative to labview:
- how can one inhibit a message box? For example, there are times when I don't want labview to ask me whether I want to replace my file or not? I just want him to replace it without asking.
- I am using NI USB 6255 acquisition system and do the acquisition in binary files. Is this data (which is a lot!) stored in a buffer/memory of the device? I came acrross an error prompting me that the memory is full, while converting the binary data into text with the examples provided in labview. How does the device interplay with the pc memory? what would this message convey?

All the best,
Dana
0 Kudos
Message 3 of 6
(3,125 Views)
For your first question: In your specific VI you are using the Open_Create_Replace VI. In one case you're using it with the "open or create" mode. In the other case you're using it with the "create or replace" mode. This second way is what's causing the advisory dialog. If you don't want to display advisory and replace the file anyway, then wire a True constant to the "advisory dialog?" input.

For you second question: The 6255 does have a certain amount of memory, and it's limited to 4095 samples. How this memory is used is dependent on how you do the data acquisition. If you do buffered acquisition then you're basically having the card collect data and store it into its buffer. Then your application would read data out of the buffer. If you don't read data out of the buffer fast enough then you will get the buffer filled up and then new data will have to force out old data. There are lots of examples that ship with LabVIEW that show you how to do data acquisition. Open the Example Finder (Help->Find Examples, and in the tree open "Hardware Input and Output" and then "DAQmx". You can also start here: Getting Started with NI-DAQmx.
0 Kudos
Message 4 of 6
(3,118 Views)
It worked - thank you again.
I only looked in the context help for some terminal, and this one, 'advisory dialog,' was not there. I set it to false.
All the best,
Dana
0 Kudos
Message 5 of 6
(3,112 Views)
By default, the Context Help doesn't show the labels for those terminals that are optional. You can click on the little icon in the lower left to toggle this:



Message Edited by smercurio_fc on 03-07-2008 03:52 PM

Message Edited by smercurio_fc on 03-07-2008 03:52 PM
Message 6 of 6
(3,110 Views)