10-04-2007 01:12 PM
10-05-2007 03:00 PM - edited 10-05-2007 03:00 PM
Hi hellolv,
The easiest way to write to multiple binary files and have header data is to use the Write to Measurement File VI which can be found in the File I/O palette. This Express VI can automatically create a series of files. To do this, select Save to a series of files (multiple files) in the configuration window. You can edit how these new files will be created by clicking on the Settings… button. This will bring up a new window where you can configure the naming convention, set the replacement property, and determine when a new file will be created.

If you would like to avoid expensive file creation and destruction operations every time you’re ready to write to file, you can perform some string manipulation on the file path to rename the file and use a For Loop along with a timing element (or your sample rate) to control the duration each file that will be written to. The total duration will be the input to the For Loop’s N (in this case 5) multiplied by the input to Wait Until Next ms Multiple, or your For Loop’s N multiplied by your sample rate divided by your number of samples, whichever is longer. The image below shows the block diagram of a modified version of Cont Acq&Graph Voltage-To File(Binary).vi. That VI is also attached to this post.

Message Edited by ryan_d on 10-05-2007 03:01 PM
10-05-2007 03:07 PM
10-26-2007 01:36 PM
10-26-2007 01:49 PM
10-29-2007 09:41 AM