LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect a PLC via Modbus RTU serial communication

Solved!
Go to solution

Can anyone guide me on how to connect a PLC to LabVIEW via Modbus RTU serial communication? I have Productivity 2000 PLC from Automation Direct and I am using LabVIEW 2020. Please don't write about using OPC servers. I want to use Modbus RTU serial communication. Once again, I want to use Modbus RTU serial communication.

0 Kudos
Message 1 of 10
(2,878 Views)

@Rob28 wrote:

Can anyone guide me on how to connect a PLC to LabVIEW via Modbus RTU serial communication? I have Productivity 2000 PLC from Automation Direct and I am using LabVIEW 2020. Please don't write about using OPC servers. I want to use Modbus RTU serial communication. Once again, I want to use Modbus RTU serial communication.


Well all that information should be in the device manual.

 

But in general any common USB to RS232 or USB to RS485 adaptor can be used for Modbus RTU, again the manual should say what type you need.

 

Once you have the physical connections made you should install the LabVIEW Modbus library

 

I must state that the manual for your device is going to become very important as it should contain a "register map" and all the information you will need to know to use your device. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 10
(2,868 Views)

I am sorry but I think you did not understand my question. I am talking about PLC connection to Labview. Its done by creating a server. Please see attached image for better understanding.

0 Kudos
Message 3 of 10
(2,863 Views)

@Rob28 wrote:

I am sorry but I think you did not understand my question. I am talking about PLC connection to Labview. Its done by creating a server. Please see attached image for better understanding.


Hmm.... I swear you said:

 

@Rob28 wrote:

Can anyone guide me on how to connect a PLC to LabVIEW via Modbus RTU serial communication? I have Productivity 2000 PLC from Automation Direct and I am using LabVIEW 2020. Please don't write about using OPC servers. I want to use Modbus RTU serial communication. Once again, I want to use Modbus RTU serial communication.


But whatever...

 

Please give a better description of what you are trying to do then.

 

BTW: I HAVE programmed a Modbus device using the method I wrote above using a USB-RS485 converter and teh LabVIEW Modbus library I linked to. 

 

I never had to create a "sever" of any type, so I don't know what you are even trying to do in your picture

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 10
(2,859 Views)

I want to use LabView I/O servers to connect my PLC to LabVIEW. I do not want to use OPC. I want to use Modbus. Its the same thing which I asked in my 1st question. 

The thing which you are explaining, every child knows how to do it. I think you don't even know what a PLC is. Please don't respond to this thread.

0 Kudos
Message 5 of 10
(2,854 Views)

 

Good luck

 

========================
=== Engineer Ambiguously ===
========================
Message 6 of 10
(2,851 Views)

Hi Rob,

 


@Rob28 wrote:

I want to use LabView I/O servers to connect my PLC to LabVIEW. I do not want to use OPC. I want to use Modbus. Its the same thing which I asked in my 1st question.


So in the 5th (and your 3rd) message in this thread you finally told us what you want to achieve.

None of the messages before that mentioned any "I/O server plugins for Shared Variable Engine", "to be created with DSC module"…

It's definitely NOT the same thing as asked in the 1st message!

 


@Rob28 wrote:

The thing which you are explaining, every child knows how to do it. I think you don't even know what a PLC is. Please don't respond to this thread.


You really should learn to create better question, right from beginning.

No need to complain about "bad" answers when the question was wrong/unclear!

 

  • Why do you want to use the SVE to communicate with your PLC?
  • Why don't you want to go the easy route of using a Modbus library with a RS232/485 port directly? (Especially when "every child" is able to use that?)
  • Do you have the DSC module available/included with your NI license?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 10
(2,788 Views)

Dear Sir,

I try to do as your guide for connection of PLC fx3u, but it seem to not work.

Could you show me your same VI for reference?

Thanks

0 Kudos
Message 8 of 10
(253 Views)
Solution
Accepted by Rob28

Rob28_0-1730472968652.png             Rob28_1-1730473000503.png

 

 

0 Kudos
Message 9 of 10
(247 Views)

Dear Sir,

I appreciate your help.
For testing connection, I have connected a CAS-CI 200A load indicator via RS 232 to Labview using 2 methods: VISA and Modbus library, as in the attached. However, it seems that only the VISA connection worked, and the Modbus master did not.

Please help me to solve this matter.

Tks

 

0 Kudos
Message 10 of 10
(68 Views)