LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP slave

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

 

 

0 Kudos
Message 1 of 8
(3,637 Views)

Hello,

 

Have you seen these documents : 

- Connect LabVIEW to Any PLC With Modbus

- Introduction à Modbus

 

Could you tell us more about your question ? 

 

Have a good day

Eloise
NI France

0 Kudos
Message 2 of 8
(3,596 Views)

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?

0 Kudos
Message 3 of 8
(3,582 Views)

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.

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 8
(3,577 Views)

@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.

0 Kudos
Message 5 of 8
(3,571 Views)

Thank you for the info, I used it many years ago.

It's still possible to modify vis with the new library?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 8
(3,568 Views)

Yep, the new library is class-based, but as far as I can see it's not protected against editing.

0 Kudos
Message 7 of 8
(3,564 Views)

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.

0 Kudos
Message 8 of 8
(3,558 Views)