tallakt/modbus-cli — Issue #3: Unable to dump coil data on Schneider PLC
Author: tallakt
Created: 2011-12-22 07:49:01+00:00
State: open

The problem is most likely to do with long files/memory dumps

```ruby
$ modbus dump ../tmp/sinter_m0000.yml
/usr/local/lib/ruby/gems/1.9.1/gems/rmodbus-1.1.0/lib/rmodbus/slave.rb:262:in `query': A value contained in the query data field is not an allowable value for server (ModBus::Errors::IllegalDataValue)
from /usr/local/lib/ruby/gems/1.9.1/gems/rmodbus-1.1.0/lib/rmodbus/slave.rb:102:in `write_multiple_coils'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/commands_common.rb:123:in `block in sliced_write_coils'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/commands_common.rb:122:in `each_slice'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/commands_common.rb:122:in `sliced_write_coils'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:56:in `execute_single_file'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:47:in `block (2 levels) in execute_slave'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:46:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:46:in `block in execute_slave'
from /usr/local/lib/ruby/gems/1.9.1/gems/rmodbus-1.1.0/lib/rmodbus/client.rb:66:in `with_slave'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:45:in `execute_slave'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:40:in `block (2 levels) in execute_host'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:40:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:40:in `block in execute_host'
from /usr/local/lib/ruby/gems/1.9.1/gems/rmodbus-1.1.0/lib/rmodbus/client.rb:39:in `initialize'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:39:in `new'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:39:in `execute_host'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:34:in `block in execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:34:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/lib/modbus-cli/dump_command.rb:34:in `execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/clamp-0.3.0/lib/clamp/command.rb:73:in `execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/clamp-0.3.0/lib/clamp/command.rb:64:in `run'
from /usr/local/lib/ruby/gems/1.9.1/gems/clamp-0.3.0/lib/clamp/command.rb:126:in `run'
from /usr/local/lib/ruby/gems/1.9.1/gems/modbus-cli-0.0.2/bin/modbus:6:in `'
from /usr/local/bin/modbus:19:in `load'
from /usr/local/bin/modbus:19:in `

'
```

File looks like this

```
---
:host: 10.226.212.201
:slave: 1
:offset: "1"
:data:
- 0
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-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