From Friday, January 17th 11 PM CDT (January 18th 5 AM UTC) through Saturday, January 18th 11:30 AM CDT (January 18th 5:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
(4,130 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
(4,089 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
(4,075 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
(4,070 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
(4,064 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
(4,061 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
(4,057 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
(4,051 Views)