in reply to Re: RTU instead of TCP MBclient
in thread RTU instead of TCP MBclient

Thank a lot. So this module is inappropriate for RTU. But please help me with another module: Modbus::Client It demands:

$bus = new Modbus::Client "/dev/cua00", POSIX::B19200; .

For Windows the second parameter I suppose it is filehandle I can open it with opening of serial port. But what is the first parameter for Windows? Here there are quotes:

1. the first kind is the serial device the modbus is connected to. If this type of parameter is specified, Modbus::Client optionally accept a second paramater to define the baud rate. By default, Modbus::Client will initiate communications at 9600 baud, no parity.

2. NOTE FOR WINDOWS USERS: For finer control of the serial connection, it is possibly better if you open the connection and pass the FileHandle to the new method. This is because Windows does not implement POSIX::Termios

What parameters should be for WIndows?

$bus = new Modbus::Client "???", ???;

Replies are listed 'Best First'.
Re^3: RTU instead of TCP MBclient
by Corion (Patriarch) on Oct 07, 2016 at 08:42 UTC
      So it is enough only one parameter that is filehandle instead of two?

        I have not used the module, so I don't really know.

        But looking, a second time, at the source code, I find no mention of the parameter $speed and $addr in the code path likely taken on Windows, so maybe it would be worth a try.