02-20-2006 06:28 AM
Hello Experts
I am using LabView 7.0 with PCI 6040 DAQ. I have created two separate files, one file is Binary that collects binary raw data from 16 channels of the DAQ. The second file contains variable length Header, i.e the information about all 16 channels and physical conditions of the recording. I am trying to merge these two files to form a single file that contains a text header at the top and followed by the binary data. I am unable to figure out that how can I append binary data to a text file.
I need help from users please.
Ciao!!!!
Nabeel
02-20-2006 06:46 AM
Hi Nabeel
take a look at 'High speed Data Logger.VI' and 'High speed Data reader.VI' from examples shipped with labVIEW
This should solve your problem
Regards
Dev
02-20-2006 07:46 AM
Thanks Dev, That was quick.
Okay Let me explain to u the background. I m getting data from 16 channels for one second ( one record ) of it and store it to the disk. Its a sort of real time data acquisition and saving. Header record is produced first, it contains the information about the patient and then the acquisition of the data starts. At the end all together saves in one file. The reader of this specific file is a Standard Reader.
If i am unable to find the VI u recomended. The data logger Vi i have is simply bundling the data and in my case it seems not fessible.
Any Idea??
ragards
Nabeel
02-20-2006 09:31 AM
02-20-2006 09:51 PM
02-20-2006 11:15 PM
Hi,
My first thought is to use the Flatten to String function on the binary data. Now you can use Concatenate String to marge the two components and write to disk.
Or, you can us the Bundle function to make a cluster of the string header and the binary data. The resulting cluster can be written to disk using the write binary data function. You can always use Labview to read these files once they have been written, just use the Read Binary File function, and connect the empty cluster control (use a type def) to define the incoming binary file.
I attached a simple example, but I am not perfectly clear on all the details so I hope the example will lead you int he right direction.
If you intend at some point to read the data with an application other than Labview, please let me know, Labview has its own unique way of storing data in memory and you would need to properly decode it.
More questions?
Chris
02-20-2006 11:16 PM
02-21-2006 03:01 AM
I am working on Implementation of EDF file format (European data Format) in Lab View. This file format is widely becoming a standard to acquire and store the physical data of patients. In short, the specification of the file can b read at ( http://www.hsr.nl/edf/specs/edf.html ). Most of the companies that develop equipments for EEG (electroencephalogram) are implementing this format to read and write data. In my experiments I am also using the same file format but just to acquire and store. For reading and analysing the data Matlab is widely used instead of Labview. Dev, I have just start introducing myself to the idea of Data loggers.
Dear Chris I have labview 7.0, is it possible to reload the file for 7.0? If not can you load it as a picture format?
Regards
Nabeel
02-21-2006 08:56 AM
02-21-2006 09:17 AM
Hi Nabeel,
I'm agree with Chris, you have to write your file as datalog file using a cluster in order to represent your data format (string+array).
On attached you can see the VI sent from Chris but downgraded to LV 7.0.
Regards
MarcoC