How do you automatically increment the filename when the file reaches a certain size?

Last Modified: 3rd Jan 2013
Category: Data Acquisition > DASYLab
Platform: All
Version: All
Article Ref.: 13C52
»Return to previous search
»Print friendly version of this article.
1 person has found this article useful.

DASYLab 13C52 By using the Multifile option in the File Write module, the block size can be used to determine when a new file is to be written. When n channels are merged, both the sample rate and the blocksize are increased by n. The number of blocks per second is unchanged. To create files compatible with Excel for example, the File change condition (whether the channels are merged or not) should be: 64000/${BLOCK_SIZE} As this expression cannot be directly typed into the File change options, a Global Variable can be defined and used instead. To do this, open Options > Global Variables and Strings > Define Global Variables. Define a new Global Variable with a suitable name such as FILE_CHANGE, and the expression 64000/${BLOCK_SIZE}. By clicking on the Definition button from the Global Variable list window as above, the following Expression box should appear allowing you to define the Global Variable using expressions. From this expression box, you can rename the Global Variable, and by ticking the Calculate expression automatically option, the Expression builder window and buttons will become active. From here you can enter values, functions, variables and strings etc as below to build the expression. For this example, we can type in the constant value of 64000 and the / operator for division. To acquire the block size automatically, we can access a list of predefined Global Variables by clicking on the Variables button. This will open the following list of available Variables that can be used. Select the BLOCK_SIZE variable and click OK. This will enter the variable into the expression as below. Click OK to set the expression to the Global Variable. When you are returned to the Global Variable list window, you will notice that the name has been updated and the value has automatically changed based on the expression that has been defined. Once the Global Variable has been set, return to the worksheet and double click the Write module to open the properties window. Click on the Multifile button to open the "Multifile" setup. Ensure the Multifile Enable option is selected and configure the File change conditions as below by referencing the Global Variable that has been defined. As the Multifile option has been enabled, DASYLab will automatically write to a new file when the defined size has been reached. Merged Channel Data If the channels have been merged using the Multiplexer/Demultiplexer module in the Data Reduction module group, it is also essential that for each of the input channels, the Type of Input data is set to "Mixed Samples", and the correct number of channels in the merged channel is defined. To do this, double click on the Write Data module and in the properties window, select the ASCII file type and click on the Options button. This will open the ASCII format options window. Set the Type of input data to Mixed single values and set the Number of channels to match the number of channels merged using the Multiplexer/Demultiplexer module. How Do I? DASYLab All All en DASYLab

If you can't find a solution on the Knowledge Base then please contact us on the Technical Support Request Form or by email or by telephone on +44 (0) 203 695 7810

For the time being we are unable to offer the following product ranges although we are currently working hard to increase the number of products we can offer in the future. Please contact us to talk about alternative products that we may be able to offer you.