
This is a sample that performs repeated Sampling transfers using the counter function for devices equipped with the high-performance counter.
If you want to perform a single sampling transfer, please refer to Sampling Sample.
When viewing/changing the source code for Infinite 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.
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 [Infinite 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 toSampling Event Notification.

Click the [Start] button.
Click the [Stop] button to end the transfer.
Since the transferred data is recorded in a file, the size of the data file will increase if sampling is continued for a long period of time.
However, if the transfer speed is so fast that the data cannot be recorded to the file in time, recording to the file will stop at that point.
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 [Transfer 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.
â– Supplement
"Overrun Error!" may be displayed in transferring.
This error is displayed if it is detected that the sampling buffer has already been overwritten when a [Specified time sampling completion event notification] occurs.
Because the sampling data is already invalid, no data will be written to the csv file.
Even if "Overrun Error!" is displayed, the sampling process will continue.
To stop the sampling transfer, please click the [Stop] button.
The CPU processing speed of your PC is not fast enough to realize the internal clock set in this sample program.
If you want to [Start] transfer again, please increase the internal clock value.
If the clock condition is an external clock, please slow down the external clock signal.