Modbus RTU Commands Explanation

290 views
Skip to first unread message

Ragy Samy

unread,
Mar 12, 2021, 7:22:34 AM3/12/21
to modbus-tk
Hello there,

I have a very simple, naive question ..

I'm new to using the modbus_tk library so I don't really understand the parameters passed to the read and write commands ..

In the following commands for example:

#logger.info(master.execute(1, cst.READ_COILS, 0, 10))   

I know that "1" refers to the slave address .. and if the "0" refers to the coil's register address, so what does the "10" refer to ??

#logger.info(master.execute(1, cst.WRITE_SINGLE_COIL, 7, output_value=1))
 
Does the "7" here refer to the address of the coil's register or to the bit number 7 in a specific register ??

Is there any documentation for this library that describes the parameters and options of each command ?

Thanks in advance ..

Luc JEAN

unread,
Mar 12, 2021, 7:41:45 AM3/12/21
to modb...@googlegroups.com
Hello,

There are some examples in the examples folder. 

The doc was using epydoc which is not supported in python3. The doctorings  in source code should help to understand how it works. Any help for restoring epydoc is welcomed.

Best
luc

--
You received this message because you are subscribed to the Google Groups "modbus-tk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modbus-tk+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modbus-tk/f3d095fe-13fd-4ac9-aff2-347d7e25ab5dn%40googlegroups.com.

Ragy Samy

unread,
Mar 14, 2021, 4:15:22 AM3/14/21
to modbus-tk
Thank you sir for your concern and reply .. but I don't think that I quite understood what meant ..
Would you please explain more ?
Reply all
Reply to author
Forward
0 new messages