Analog Input Sample (Graph Linkage: Basic Mode)


Show the sample that gets analog input data (CH0) every one second from our device and displays it on the graph.

This setting example assumes that the following components are placed in the form.

*Other than DncDaq is using default settings.

 ・DncDaq

 ・DncGraph


■Setting Content

①Select [AIO000] in the Device on the DncDaq property screen.

②In the input task, link the data of CH0 of AIO000 of the device to Graph.

③Perform task linkage by DncGraph.

④Build and execute in Visual Studio.

 

 

■Execution Screen Image

Display dncGraph on a Windows Forms Application

 

 

■Setting Example

①Select [AIO000] in the device setting of DncDaq Property Screen.

  * In this example, "Demo Device" is selected.

 

 

②In the input task of DncDaq, link the CH0 of AIO000 of the device to Graph.

・In the Device, select the device name AIO000 set in ①.

・Select Analog (voltage/current value) as the Access type and enter [0] in the Input Num.

・Select dncGraph1 added to the form at the Target.

・Select Timer for the Timing and check that the time Interval(ms) is 1000. (Both are default values)

   

 

③Perform task linkage by DncGraph

・Open the DncGraph property screen and press the [Use task setting] button to reflect the contents of the Input Task set in ②.

・If task linkage is successful, the line (Line_00) of CH0 is created if this example is created, and the Y axis of the graph is +/- 10V.

 

 

④Build and execute in Visual Studio, and make sure that the data is linked to the graph.

 

In this setting, the input data of CH0 are linked, but setting change is possible in the following form.

 

・To display CH3 data as a graph    ⇒ Please enter [3] in the Input Num of the Input Task.

・To increase the sampling speed    ⇒ Please enter [10] in the Interval(ms) of the Input Task.

・To link with binary value rather than voltage/current value    ⇒ Access type for the Input Task: Please select Binary.

 

 

The above settings can be changed not only the screen display in the designer mode, but also the screen display in the application startup.

* For details, refer to the Show property screen.

 

 

If DncDaq Init processing (initialization processing) is failed

DncDaq is set to perform automatic initialization at application startup by default.

 

If initialization is failed, the property page is displayed again.

The factors that fail to initialize may be considered if you are trying to refer to a nonexistent device or not found the component registered in the task setting.

 

For details, refer to the [The property screen is displayed when the application startup. (Init fails.)].