LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ASAM e.V. DataPlugin for MDF4

I am using the ASAM e.V. DataPlugin in LabVIEW to create MDF4 files. However, I don't see an option to frequently flush the buffer to the file in the data storage module. Does anyone know if this option is available in LabVIEW for MDF4 files? Additionally, the ASAM e.V. DataPlugin does not support reopening a file and appending data to it once it has been closed. Does anyone have a workaround to frequently save the data in the buffer to an MDF4 file, rather than creating small-sized files frequently?

0 Kudos
Message 1 of 2
(146 Views)

The "DataPlugin" interface is not (to my knowledge) really designed for "editing" files, but more for a file conversion process.

 

My suggestion would be to do one of the following: 

a) write your data to a TDMS file (which does support flushing buffers, multiple writes etc) and then convert it to an MF4 after your done (You can use the "Convert to TDM or TDMS.vi" as a template for that operation.

b) maintain the buffers in memory in LabVIEW, and just write the file when you've collected all the information you want to write.

c) the python package "asammdf" is an actual API for ASAM MF4 files, and you could use that package to do what you want (I believe).

 

I'm not 100% sure that the MF4 spec actually allows for "editing" files.. but I'm not an expert on that spec -- typically the pattern I see is that the file is "rewritten" with the new information included.

0 Kudos
Message 2 of 2
(103 Views)