Show the sample that gets analog input data (CH0) every one second from our device and displays it on the label.
This setting example assumes that the following components are placed in the form.
*Other than DncDaq is using default settings.
①Register AIO000 with device setting.
②Set 1 second cycle with timing setting.
③In the input task, link the data of the device to Label at the timing set in ②.
④Build and execute in Visual Studio.
Display dncLabel on a Windows Forms application
①Select [AIO000] in the device setting of DncDaq Property Screen.
* In this example, "Demo Device" is selected.
②In the timing setting, set the 1 second cycle.
・In the Timing, select Timer and specify 1000 msec with Interval(ms).
③In the input task, link the device data to Label at the timing set in ②.
・Set the device name set in ① in the device.
・Specify Analog (voltage/current value) in the Access type and specify 0 in the Input Num.
・Select dncLabel1 added to the form at the Target, and select the Timing_00 set in ② for Timing.
④Build and execute in Visual Studio.
・Build and execute and make sure that the value of CH0 is input every 1 second.
In this setting, CH0 input data was linked, but setting change is possible in the following form.
・To link with binary value rather than voltage/current value ⇒ Please select [Access type: AnalogBinary] in the Input Task on the DncDaq property screen.
・To link the data of CH0 to CH3 ⇒ Please specify [Input Num: 0-3] in the Input Task on the DncDaq property screen.
・To link the data when button is clicked ⇒ Place DncButton in advance and select [Timing: DncButton] in the Timing on the DncDaq property screen.
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.
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.)]
|