console : dio

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.
      dio1.png(12083 byte)
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, BX-T5000-J Series, BX-M4600/BX-M4600P2x/BX-M4600P4 Series) $ ./dio * Please refer to the wiring diagram below and create cable for self loop. dio2.png(5539 byte)
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. dio3.png(29010 byte)
Example 4) 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. Example 5) Get the state of the general-purpose I/O port.(BX-M540-J Series) $ ./dio * Please refer to the wiring diagram below and create cable for self loop. dio5.png