
Interrupt occurs by the timer, count is performed in the application.
This sample program must use with the device
which is adopted Timer function.
Please refer "Support
Device" to verify the model number of your device.
Sample specification |
* This is the initial value of the sample program. |
Program name |
./Counter/timer |
The using procedure is as follows:
input the device name, initialization, set the time for timer.
Terminate by typing the return key.
1. Specify the desired program name, run the program, then it will wait
for you to enter a device name.
Please specify the device name that was set in
the Configuration Tool.
Notifies the device driver to start using the specified
device.
For example, if you specify the device name
as [CNT000], the execution result of CntInit will be displayed as shown
below.
After that, it will wait for you to enter the timer
time.
For CntInit, please refer to [Init and Exit Processing].

2. Timer Time Setting
Specify the timer time in milliseconds and execute CntSetTimeUpEvent.
For example, if you specify 1000, the execution
result of CntSetTimeUpEvent will be displayed as shown below.
After that, the line [time = xx] will be displayed
at 1 second intervals.

3. Press the return key to terminate the sample program.