It is a sample of interval timer and stop watch timer.
This sample program requires selection of a device with timer function.
Sample specification |
※This is the initial value of the sample program. |
Program name |
Timer |
Timer ID |
0 |
Event |
Event that interval elapses |
1. Specify the desired program name, run the
program, and a CUI(Character User Interface) menu that looks like the
one above will appear.
Appearance may vary depending on software version.
2. Initialize
・When selecting the command [1:
AioInit], you can specify the device name.
Notifies the device driver to start using the specified
device.
When specifying the device name, AioInit will be
executed and the CUI menu will be displayed again.
3. Operation of Interval Timer
・When selecting the command [3
: Interval Timer Operation Start], you can use the interval processing.
When specifying the desired interval value in [usec],
the interval processing will start.
When you start the interval processing, the CUI
menu will be displayed again.
・The notification count will be displayed each time the interval value matches.
・When selecting the command [4
: Interval Timer Operation Stop], the interval processing will stop.
When the interval processing has stopped, the CUI
menu will be displayed again.
4. Operation of Stop Watch Timer
・When selecting the command [5
: Stop Watch Timer Operation Start], the stop watch timer processing will
start.
When stop watch timer processing starts, the CUI
menu will be displayed again.
・When selecting the command [6
: AioLapTmCount], the elapsed time will be displayed.
When the elapsed time is displayed, the CUI menu
will be displayed again.
・When selecting the command [7
: AioResetTmCount], the elapsed time will be reset.
When the elapsed time is reset, the CUI menu will
be displayed again.
・When selecting the command [8
: Stop Watch Timer Operation Stop], the stop watch timer processing will
stop.
When stop watch timer processing is stopped, the
CUI menu will be displayed again.
5. Exit
・When selecting the command [9
: AioExit], it will notify the device driver that the use of the current
device is complete.
Data can be acquired from different devices (e.g.
AIO001, etc.) without terminating the program.
When AioExit is executed, the CUI menu will be
displayed again.
・To perform data acquisition processing again, select the command [1 : AioInit] and specify a new device name to perform device initialization processing.
6. Processing to terminate the program
・When selecting the command [q : Quit], the program will terminate.