Permalink
Browse files

Reduced max write to 800 coils

after teting with Premium PLC
  • Loading branch information...
1 parent 2db57e3 commit 8819d4979e03a658c525a0710fd91df7642e0e2e Tallak Tveide committed May 21, 2012
Showing with 2,005 additions and 4 deletions.
  1. +1 −1 lib/modbus-cli/commands_common.rb
  2. +1 −1 lib/modbus-cli/version.rb
  3. +3 −2 spec/write_command_spec.rb
  4. +2,000 −0 tust.yml
@@ -2,7 +2,7 @@ module Modbus
module Cli
module CommandsCommon
- MAX_WRITE_COILS = 1968
+ MAX_WRITE_COILS = 800
MAX_WRITE_WORDS = 123
DEFAULT_SLAVE = 1
@@ -1,5 +1,5 @@
module Modbus
module Cli
- VERSION = "0.0.7"
+ VERSION = "0.0.8"
end
end
@@ -53,8 +53,9 @@
it 'should split large writes in chunks for coils' do
client, slave = standard_connect_helper 'HOST', 502
- slave.should_receive(:write_multiple_coils).with(100, [0, 1] * 984)
- slave.should_receive(:write_multiple_coils).with(2068, [0, 1] * 16)
+ slave.should_receive(:write_multiple_coils).with(100, [0, 1] * 400)
+ slave.should_receive(:write_multiple_coils).with(900, [0, 1] * 400)
+ slave.should_receive(:write_multiple_coils).with(1700, [0, 1] * 200)
cmd.run %w(write HOST %M100) + [0, 1] * 1000
end
Oops, something went wrong.

0 comments on commit 8819d49

Please sign in to comment.