Counter Input Sample (Level Linkage)


The following is an example of acquiring the CH0 count value from our device every second and displaying it on the level meter.

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

*Components other than DncDaq use default settings.

 ・DncDaq

 ・DncLevel


■Setting Content

①Register CNT000 with device setting.
②In the timing setting, set the 1 second cycle.
③In the input task, link the device data to the Level at the timing set in ②.
④Build and execute in Visual Studio.

 

■Execution Screen Image

Display DncLevel on a Windows Forms application

 

■Setting Example

①Select [CNT000] in the device setting of DncDaq Property Screen.
Select [External signal source] and [Number of input phases] according to the connected counter signal.

 

 *In this example, "CNT24-4(PCI)H" is selected.

For "CNT24-4(PCI)H", there are two signal connectors.

When connecting a signal to connector CN1 on the product's bracket, select [External Signal Source = Photocoupler].

When connecting a signal to connector CN2 on the product's bracket, select [External Signal Source = TTL].

  

②Set the 1 second cycle in the Timing settings.
   ・Select "Timer" for the Timing and specify 100msec for the Interval(ms).

 

③In the Input Task, link the device data to the Level at the timing set in ②.
・In the Device, set the device name set in ①.
・Specify Count in the Access type and specify [0] in the Input Num.
・Select dncLevel1 that was added to the Form as input destination, and select Timing_00 that was set in ② as timing.

   

④Build in Visual Studio.
・Build and run it, and check that the CH0 count value is updated on the Level meter every second.

 

 

 

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.)].