Here describes the basic usage of DncWriteFile.
For information on how to place it on the form and how to set properties, please see How to use DAQ-DNC.
We also prepared a sample using DncWriteFile, so please refer to that as well.
■When linking with DncDaq
・In the DncDaq input task, it is possible to save DncDaq data as a fike when the target of the data linkage is DncWriteFile.
・In the DncDaq, set the device, the acquisition method / the timing, and the number of channels to display the data to acquire the data.
・After setting DncDaq, please execute Use task setting in DncWriteFile.
・When linked with DncDaq, each time the input task is executed, the file is opened and closed when the writing is completed.
■When using the method
・Shows the procedure for saving measurement data from methods and properties.
①Specifies the file name to save the data.
②Specifies the number of columns to write to the data.
③Use the Open method to change the file to writing state.
④Use the WriteLineData method to append the data you want to write.
The data is specified as a one-dimensional array.
* At this time, data with more than the number of columns specified in ② will be ignored.
■Data Image
In the above data, if ColumnNum is 3 and FirstColumnType is TimeStamp, the following line will be appended.
Additional line image: 2022/03/28, ch00 data, ch01 data, ch02 data
⑤Use the Close method to complete the file write.
・If you select Create Mode in WriteMode, the entire file will be overwritten with the written contents, and if you select Append Mode, lines will be appended.
・The data written to the file is reflected when the Close method is executed, but if FlushMode is enabled, it will be reflected every time it is written.