Sampling Sample [Sampling]


Appearance

 

Overview

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

  1. Enter the device name registered by Configuration Tool into Device Name. Click the [CntInit] button.

  2. 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.

  1. 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.

  1. Click the [Start] button.

  2. When sampling is complete, [Stopped!] is displayed in the [Status] text box.

  3. Click the [Data...] button to display the sampled data.

  4. Click the [Count] button to display the number of transferred data into the [Count] text box.

  5. Click the [Status] button to display the transfer status into the [Status] text box.

  6. Click the [CntExit] button to end the use of the device.

  7. Click the [Exit] button to end the program.