LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Started with Modbus over RS485 (LabView)

Hello NI Community,

I was thinking about implementing Modbus on LabVIEW. I need your suggestions to start with.

 

I'm also hoping that if someone has already done it. What approach they adopted? (Can share block diagram or VI)




0 Kudos
Message 1 of 24
(359 Views)

Hi Michael,

 


@Michael_Smith wrote:

I'm also hoping that if someone has already done it. What approach they adopted? (Can share block diagram or VI)


There are ready-to-use Modbus libraries on VIPM. They come with example VIs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 24
(345 Views)

Use NI Modbus Library Toolkit for LabVIEW

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
Message 3 of 24
(320 Views)

I used the NI Modbus Library in VI Package Manager. In my case the code for creating a serial master and reading registers of devices looked like this: 

StuartWilson_0-1741733237843.png

 

Message 4 of 24
(264 Views)

Hello Stuart,

I was planning to work around it on LabVIEW RT or FPGA. Those VIs will work in beforementioned? 


@StuartWilson wrote:

I used the NI Modbus Library in VI Package Manager. In my case the code for creating a serial master and reading registers of devices looked like this: 

StuartWilson_0-1741733237843.png

 


 

0 Kudos
Message 5 of 24
(254 Views)

Never needed to do it on RT, but I'm pretty sure it will work the same. FPGA?
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9GYSA0&l=en-US

Message 6 of 24
(249 Views)

Hi Michael,

 


@Michael_Smith wrote:

I was planning to work around it on LabVIEW RT or FPGA. Those VIs will work in beforementioned?


On RT the Modbus libraries can work.

How do you want to access the Modbus messages on a FPGA? Which hardware do you plan to use?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 24
(233 Views)

@GerdW wrote:

Hi Michael,

 


@Michael_Smith wrote:

I was planning to work around it on LabVIEW RT or FPGA. Those VIs will work in beforementioned?


On RT the Modbus libraries can work.

How do you want to access the Modbus messages on a FPGA? Which hardware do you plan to use?


Hello Gerd,

I'm planning to interface Servo Drive with my FPGA over a Modbus

0 Kudos
Message 8 of 24
(169 Views)

Hi Michael,

 


@Michael_Smith wrote:
I'm planning to interface Servo Drive with my FPGA over a Modbus

Ok.

  • Which FPGA?
  • Which kind of Modbus connection (LAN, RS485)?
  • How should your FPGA connect to that Modbus connection?
  • Why do you even want to do that in the FPGA?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 24
(165 Views)

@GerdW wrote:

Hi Michael,

 


@Michael_Smith wrote:
I'm planning to interface Servo Drive with my FPGA over a Modbus

Ok.

  • Which FPGA?
  • Which kind of Modbus connection (LAN, RS485)?
  • How should your FPGA connect to that Modbus connection?
  • Why do you even want to do that in the FPGA?

Dear,

  • myRIO
  • RS485
  • USB to Serial Connector
  • Because I've to rotate a something which is time critical and requires accuracy aswell
0 Kudos
Message 10 of 24
(161 Views)