
This is a sample that performs a single sampling transfer using the counter function for devices equipped with the high-performance counter.
If you want to perform repeated transfers, please refer to Infinite Sampling Sample.
When viewing/changing the source code for Sampling Sample, please refer to [Flow Chart for Sampling Mode].
This sample program requires use with a high-performance counter type device.
To check the counter type of the device you are using, please refer to [Counter Type Specifications].
This sample program uses callback function for event processing.
Step to Operate
Enter the device name registered by Configuration Tool into Device Name. Click the [CntInit] button.
Click the [Counter Mode] button to display the [Counter Mode Setting] dialog.
Set the counter mode and click the [OK] button.
For details about counter mode settings, please refer to Counter Operation Mode Setting.
For details about [Count Mode] item, please refer to Sampling Mode Setting.

Click the [Condition...] button to display the [Sampling Condition Setting] dialog.
Set the sampling conditions and click [OK] button.
For details about sampling conditions, please refer to Sampling Condition Setting.
For details about [Transfer Number Event Notification] item, please refer to Sampling Event Notification.

Click the [Start] button.
When sampling is complete, [Stopped!] is displayed in the [Status] text box.
Click the [Data...] button to display the sampled data.
Click the [Count] button to display the number of transferred data into the [Count] text box.
Click the [Status] button to display the transfer status into the [Status] text box.
Click the [CntExit] button to end the use of the device.
Click the [Exit] button to end the program.