Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Run RTU implementation on Windows

  • Loading branch information...
commit 09f40c384b026fbd37e6a7c0fa6e8be4f0704a62 1 parent 1ec38dc
@flipback authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  examples/perfomance_rtu.rb
  2. +2 −2 lib/rmodbus/sp.rb
View
2  examples/perfomance_rtu.rb
@@ -10,7 +10,7 @@
srv = RTUServer.new 'com3', BAUD
srv.coils = [0,1] * 50
-srv.discret_inputs = [1,0] * 50
+srv.discrete_inputs = [1,0] * 50
srv.holding_registers = [0,1,2,3,4,5,6,7,8,9] * 10
srv.input_registers = [0,1,2,3,4,5,6,7,8,9] * 10
srv.start
View
4 lib/rmodbus/sp.rb
@@ -25,12 +25,12 @@ module SP
# @option opts [Integer] :data_bits from 5 to 8
# @option opts [Integer] :stop_bits 1 or 2
# @option opts [Integer] :parity NONE, EVEN or ODD
- # @option opts [Integer] :read_timeout default 5 ms
+ # @option opts [Integer] :read_timeout default 100 ms
# @return [SerialPort] io serial port
def open_serial_port(port, baud, opts = {})
@port, @baud = port, baud
- @data_bits, @stop_bits, @parity, @read_timeout = 8, 1, SerialPort::NONE, 5
+ @data_bits, @stop_bits, @parity, @read_timeout = 8, 1, SerialPort::NONE, 100
@data_bits = opts[:data_bits] unless opts[:data_bits].nil?
@stop_bits = opts[:stop_bits] unless opts[:stop_bits].nil?
Please sign in to comment.
Something went wrong with that request. Please try again.