<< mdaq_time Blocks mdaq_udp_recv >>

MicroDAQ toolbox >> MicroDAQ toolbox > Blocks > mdaq_to_file


Saves data to file

Block Screenshot


This block saves data to file. Resulting file is located on MicroDAQ user disk in the 'dsp/data/' directory. Block supports binary and text mode. Data can be imported from MicroDAQ user disk with mdaqFileData() function. MicroDAQ user disk can be accessed with Xcos tools menu 'Tools -> MicroDAQ user disk'. 'File type' block parameter is used to select between text and binary file. Data can be written to file in text of binary format. Depending on selected option data can appended to previous content of the file or data will be written to empty file (Create option).

Rising edge on Trigger input(2) will create new file. To define sequential file name use '%d' in block filename paramter e.g 'data_%d.txt'. It will produces files: data_0.txt, data_1.txt, data_2.txt etc. If '%d' isn't included in file name data will be written to one file.

Block Input/Output ports

  • input(1) - data to be written to file

  • Report an issue
    << mdaq_time Blocks mdaq_udp_recv >>