General purpose input/output control sample program
・The following files are created by executing make.
./dio, ./dio.o
Example 1) Get the input state of the input port.(BX-220 Series, BX-830 Series)
* If you execute without arguments, you get the input state.
$ ./dio 0 0
| |___ Specify the output setting to the general output port
|__________ mode : 0 Get status of general input port,
1 Specify output to general output port.
* Please refer to the wiring diagram below and create cable for self loop.

Example 2) Get the state of the general-purpose I/O port.(BX-956S Series, BX-T210 Series, BX-M1500 Series, BX-M2500 Series, BX-T3000 Series, BX-T310-J Series, BX-M310-J Series)
$ ./dio
* Please refer to the wiring diagram below and create cable for self loop.

Example 3) Get the state of the general-purpose I/O port.(BX-825 Series)
* If you execute without arguments, it will display command line options.
$ ./dio 0 0
| |___ Specify the output setting to the general output port
|__________ mode : 0 Get status of general input port,
1 Specify output to general output port.
* The bx-825 general purpose input 5-7 has a debounced circuit, and the input de-bouncer setting is enabled by default.
Therefore, there is a time lag until the set value is reflected when accessed continuously.
* Create a self-loop cable referring to the connection diagram below.

Example 3) Get the state of the general-purpose I/O port.(BX-U200 Series)
* If you execute without arguments, it will display command line options.
$ ./dio 0 0
| |___ Specify the output setting to the general output port
|__________ mode : 0 Get status of general input port,
1 Specify output to general output port.