minimal documentation

412 views
Skip to first unread message

Paolo Ferrentino

unread,
Jul 23, 2019, 10:20:59 PM7/23/19
to modbus-tk
Hi Luc,
congratulations for your efforts in maintaining this group and  modbus-tk.
It's first time I use modBus, aiming to install your lib on nano jetson. 
I tyried yesterday to install and use modbBus TCP server, but I cannot figure out how go on, which others pieces to setup.
Please, give to your community 30 min of your time drwings by pencil an example of  block schematics with the order of the transactions of modbus-tk indicating also the modules names.
This avoids a lot of wasting time who approach this  wonderful lib.
Many many thnaks.
Paolo (from Italy)

Luc JEAN

unread,
Aug 13, 2019, 6:39:32 AM8/13/19
to modb...@googlegroups.com
Hello Paolo,

Thanks for your kind message and sorry for late answer.

I agree that doc should be improved and unfortunately I don’t think that it will not take only 30 minutes :-) Any help on this topic is welcomed.

I recommend to get started by looking at the examples https://github.com/ljean/modbus-tk/tree/master/examples

If you want to use ModbusTCP server, this one is what you need : https://github.com/ljean/modbus-tk/blob/master/examples/tcpslave_example.py

First we create and start a TCP server which is listening for queries from a master. 

A server can handle several slaves that you must create in your code by calling « slave_1 = server.add_slave(slave_id) » where slave_id is an integer

with the new slave, you can add data blocks by calling « slave_1.add_block('0', cst.HOLDING_REGISTERS, 0, 100) »

Please look at the code for definition of the different arguments

Then when the master queries a slave for some values matching a data block, it answer with corresponding values. The value can be changed with « slave.set_values(name, address, values) »

The example is a small console app with some basic commands for setting up the server interactively.

I hope it helps

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/633cf990-94ed-428f-a824-bbf4c30721c4%40googlegroups.com.

Jackson Matheson

unread,
Nov 20, 2019, 1:26:25 AM11/20/19
to modbus-tk
Hi Luc,

Happy to assist with expanding documentation where possible,

I am currently using modbus_tk as part of a project to design a critical infrastructure monitoring system.

We should hit market in 8 months and hope to have detailed documentation on all modules which are used in the project so future developers can easily work with the project, this includes modbus-tk which we are in the process of documenting.

If any financial assistance would assist in your continued development on this project, both documentation and development, feel free to send me a donation link and i can organize that with management.

Thanks,
Jackson Holmes-Matheson
To unsubscribe from this group and stop receiving emails from it, send an email to modb...@googlegroups.com.

Luc JEAN

unread,
Nov 22, 2019, 11:29:43 AM11/22/19
to modb...@googlegroups.com
Hello Jackson,

Thanks you for your help on documentation. I will be pleased to include in the project  if you want.

I don’t plan any new things open Modbus-tk and I just answer questions and fix bugs when possible. If you have any request let me know.

Can you tell me more bout your company and project … just for my information.

Best
luc


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/db5ef69b-1f2e-4487-b254-6f3e548b40ce%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages