This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus profile mapping vs script
#1
Hello.
I want to compare serial bus loading in case of use modbus mapping feature and modbus script control in the case of sequential registers access.
Modbus protocol assumes that read/write operations with multiple sequential registers can be performed using single request. Caller can to specify function, first register index, registers number and size. So if I need to read 64 sequential registers that have 4 bytes length I can:
* Create single read request to read 256 bytes.
* Create 64 requests to read 4 bytes on each request.

My questions are:
- When I use mapping feature does LM engine is smart enough to understand that some registers in the profile map are sequential and to create one request but not 64 requests?
- If I use 'luamodbus' library (class instanced?) does code below creates one request to read 20 registers, or 20 requests will be created to read each register?
Code:
i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19 = mb1:readregisters(0, 20)
Reply


Messages In This Thread
Modbus profile mapping vs script - by Andey - 19.11.2020, 10:14

Forum Jump: