Class: ModbusPoller485
- Inherits:
-
Object
- Object
- ModbusPoller485
- Includes:
- ModbusPoller
- Defined in:
- lib/LMG_modbus.rb
Overview
Class to poll modbus 485 interfaces
Constant Summary
Constants included from ModbusPoller
Constants included from Test
Test::REGISTER, Test::RESULT_POS1, Test::RESULT_POS2, Test::RESULT_POS3, Test::RESULT_POS4, Test::WRITE_VAL_POS1, Test::WRITE_VAL_POS2, Test::WRITE_VAL_POS3, Test::WRITE_VAL_POS4, Test::XLUP
Instance Method Summary collapse
-
#initialize(slave_addr, com_port, path_to_base_ss, path_to_modpoll) ⇒ ModbusPoller485
constructor
- slave_addr
-
the address of the modpoll server.
-
#run ⇒ Object
Call run to begin the test.
Methods included from Test
#close, #create_test, #open_result, #run_modbus_write
Constructor Details
#initialize(slave_addr, com_port, path_to_base_ss, path_to_modpoll) ⇒ ModbusPoller485
- slave_addr
-
the address of the modpoll server.
- com_port
-
the serial interface attached to the modpoll server (e.g. com1, com2, com3…).
- path_to_base_ss
-
the spreadsheet that contains the modbus datapoints to poll.
- path_to_modpoll
-
the path to the modpoll executable.
304 305 306 307 308 309 |
# File 'lib/LMG_modbus.rb', line 304 def initialize(slave_addr, com_port,path_to_base_ss,path_to_modpoll) prepare_test(path_to_base_ss,path_to_modpoll) @base_cmd = 'modpoll -o 5.0 -1 -p none -c ' @slave_addr = slave_addr @target = com_port end |
Instance Method Details
#run ⇒ Object
Call run to begin the test
311 312 313 |
# File 'lib/LMG_modbus.rb', line 311 def run super end |