03-14-2018 05:20 AM
Hello,
I need help. I'm working with the library Modbus and I want to create a Slave. Is it possible to get, to show, the request from client (or master) ? I want to know what register the client wants to read.
thank you
03-15-2018 02:53 AM - edited 03-15-2018 02:54 AM
Hello,
Have you seen these documents :
- Connect LabVIEW to Any PLC With Modbus
Could you tell us more about your question ?
Have a good day
Eloise
NI France
03-15-2018 08:25 AM - edited 03-15-2018 08:27 AM
Which Modbus library are you using? I recommend NI's free library which is available from here: https://forums.ni.com/t5/NI-Labs-Toolkits/LabVIEW-Modbus-API/ta-p/3524019
Have you started by creating a Modbus TCP slave with the library? What problem specifically are you encountering?
03-15-2018 08:30 AM
Are you using the free Modbus library? I used it in the past to render Modbus slave some of our systems.
This library is almost open source, so you can view, debug and possibly modify (carefully!) all contained vis.
I corrected myself a bug in a previous library version.
03-15-2018 08:48 AM
@pincpanter wrote:
Are you using the free Modbus library? I used it in the past to render Modbus slave some of our systems.
This library is almost open source, so you can view, debug and possibly modify (carefully!) all contained vis.
I corrected myself a bug in a previous library version.
Be aware that this library has been replaced by the newer one I linked to above.
03-15-2018 08:51 AM
Thank you for the info, I used it many years ago.
It's still possible to modify vis with the new library?
03-15-2018 09:39 AM
Yep, the new library is class-based, but as far as I can see it's not protected against editing.
03-15-2018 11:04 AM
Thank you for yours answers.
I have find the solution. I can retrieve the register asked from the client. It is in the data in the Modbus Data Unit.
Modbus Data unit :
--> Function code
--> Data
---> Register
----> Length
I would have liked the complete ethernet frame but we can't... I have find an other solution.
Thank you.