node-modbus icon indicating copy to clipboard operation
node-modbus copied to clipboard

Reading Multiple RTU Slave Devices

Open yeongren opened this issue 6 years ago • 3 comments

Hi,

Is there a way to correctly read multiple slave devices in series, with different baudRate and parity?

For example:

ID: 10 Baurate: 9600 Parity : None Stopbits: 1

ID: 15 Baurate: 19200 Parity : Even Stopbits: 0

ID: 17 Baurate: 9600 Parity : Even Stopbits: 1

So the program will loop through each config and set according to the setting.

yeongren avatar Sep 10 '20 09:09 yeongren

I don't know if there is a 'correct' way but simple as it is, just create multiple clients with the named settings and read them. :-)

stefanpoeter avatar Sep 10 '20 10:09 stefanpoeter

@stefanpoeter Currently, i am creating and initializing new clients for each settings in series. But it seems that opening and closing the ports is not ideal in terms of speed.

yeongren avatar Sep 10 '20 11:09 yeongren

That seems to me like a question for the guys from the serialport module.

stefanpoeter avatar Sep 10 '20 11:09 stefanpoeter