gitaeuber / mbrtu

modbus master tool for serial modbus communication (modbus RTU)
GNU General Public License v2.0
4 stars 4 forks source link

Timeout option not evaluated? #5

Closed KanteTaete closed 4 years ago

KanteTaete commented 4 years ago

Hello all, I tried to execute mbrtu within a shell script with the following parameters: # config Modbus TTY="/dev/ttyUSB0" BAUD=19200 ADDR=2 REG=0x5B00 PARITY=e TIMEOUT=5000

DATA=( $(mbrtu -d$TTY -b$BAUD -p$PARITY -s1 -a$ADDR -fh -tint32 -n2 -r$REG -O$TIMEOUT -D) )

I get the following error message: ADDR=2 REG=23296 ERROR: Connection timed out unknown call parameter -O - ignoring unknown call parameter -5 - ignoring unknown call parameter -0 - ignoring unknown call parameter -0 - ignoring

Is the parameter "O" not evaluated (it's listed in the help...)?

My version and system: Raspberry Pi running Raspian buster mbrtu version: 0.3.3

gitaeuber commented 4 years ago

Hi!

try to use a different order of parameters. The order is important. Try the "-O" and the "-D" option before the address option.

It's a long time I had a look at this code.

Good luck, Lars

On Thu, 26 Dec 2019 08:27:34 -0800 KanteTaete notifications@github.com wrote:

Hello all, I tried to execute mbrtu within a shell script with the following parameters: # config Modbus TTY="/dev/ttyUSB0" BAUD=19200 ADDR=2 REG=0x5B00 PARITY=e TIMEOUT=5000

DATA=( $(mbrtu -d$TTY -b$BAUD -p$PARITY -s1 -a$ADDR -fh -tint32 -n2 -r$REG -O$TIMEOUT -D) )

I get the following error message: ADDR=2 REG=23296 ERROR: Connection timed out unknown call parameter -O - ignoring unknown call parameter -5 - ignoring unknown call parameter -0 - ignoring unknown call parameter -0 - ignoring

Is the parameter "O" not evaluated (it's listed in the help...)?

My version and system: Raspberry Pi running Raspian buster mbrtu version: 0.3.3

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/gitaeuber/mbrtu/issues/5

-- Schöne Grüße Lars Täuber

KanteTaete commented 4 years ago

Hi, thanks.

I now saw, that it's mentioned in the help of mbrtu. It works regarding this (registers always as last option).