Here describes the basic usage of DncDataSet.
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 DncDataSet, so please refer to that as well.
■When linking with DncDaq
・In the DncDaq input task, it is possible to buffer the DncDaq data when the data linkage destination is DncDataSet.
・In DncDaq, please set the device to acquire data, the acquisition method / timing, and the number of channels you want to display data.
・After setting DncDaq, please execute Use task setting in DncDataSet.
・When working with DncDaq, data will be stored in the DncDataSet each time an input task is executed.
・In FIFO buffer mode, an overflow error will occur if you try to store more data than the DncDataSet buffer capacity.
・Please refer to the GetBufferData column when using the method for how to get the stored data.
・For details on buffer operation such as FIFO and RING, please refer to Operation Mode.
■When using the method
・Shows how to store and retrieve data in DncDataSet using methods.
・For details on buffer operation such as FIFO and RING, please refer to Operation Mode.
①Write data to DncDataSet using the SetBufferData method.
When writing to DncDataSet, it is performed for each data set.
The data set unit indicates how many data are written in one write, and the number of input channels, bits, ports are applicable when linking tasks.
The unit of the data set is 3, and the buffer image with 3 data sets written is shown below.
Total number of datasets: 3 datasets
Total number of data: 9 data
In the above state, if
2 is specified for the number of set data sets in the SetBufferData method,
the data will be written to No.09 to No.14.
If the number of data written has already reached the
buffer limit, it will overflow in FIFO mode and will be overwritten in
the oldest order in RING mode.
②Get the data from DncDataSet using the GetBufferData
method.
When acquiring data from DncDataSet, specify it in units of
dataset.
In the following buffer state, the data that can be acquired when 2 is specified for the number of data sets is shown below.
In FIFO buffer mode: No.00 to No.05
In RING buffer mode: No.03 to No.08
Total number of datasets: 3 datasets
Total number of data: 9 data