-
Couldn't load subscription status.
- Fork 46
Open
Labels
Milestone
Description
I think that a serious project must be thread safe. I offer to add it to rmodbus-2 and this code will be working a perfect:
sl1 = ModBus::TCPClient.new("192.168.1.1").with_slave(1)
sl2 = ModBus::TCPClient.new("192.168.1.2").with_slave(2)
Thread.new do
loop { puts sl1.holding_registers[0..10] }
end
loop { puts sl2.holding_registers[0..10] }