console : RS485

RS485 communication mode control sample program(BX-220 Series, BX-830 Series)

  ・The following files are created by executing make.
      ./rs485, ./rs485.o

    Example))Get/Set RS485 operation mode.
    If you execute without arguments, you get the operation mode.
      $ ./rs485 0x08
                 |___   bit0:RXD(Receiver)setting
                             0:Reception enable
                             1:Reception disable
                        bit1:TXD(Sender)setting
                             0:Transmission enable
                             1:Transmission disable
                        bit2:termination resistance setting
                             0:disable
                             1:enable
                        bit3:RS422/485 communication mode
                             0:EC mode
                             1:RTS mode
      ※The following communication mode can be set.
       (Setting of terminating resistor of bit 2 (0x04) can be set independently of communication mode setting.)
       0x00 : fullduplex
       0x08 : halfduplex_rts
       0x02 : halfduplex_ec_read(write desable)
       0x01 : halfduplex_ec_write(read desable)