From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus over Ethernet/TCP

Gentlemen,
 
I am trying to connect to a modbus device over ethernet/tcp and I assumed that this will be a very simple task of simply converting my existing serial modbus code to ethernet equivalents and get the whole show going. However this is not the case.
 
Do anyone out there have any experience on this or is my only solution to buy a library to do this. Modbus in itslef is pretty straightforward and my assumption was that I could simply wrap that in CVI using the TCP libraries. This is not working at all, so I assume there a little more to it than I initially thought.
 
Any pointers and ideas please let me know.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 1 of 33
(10,815 Views)

Hi,

  modbus over ip should simply be a case of tcp on the appropriate port (think that's 502)

http://www.modbus.org/specs.php

the above link should give you the specs you need. (Agree to the terms and then follow the next link which should take you to here : http://www.modbus.org/docs/Modbus_Messaging_Implementation_Guide_V1_0a.pdf)

The Modbus.org website also has a tcp library you can purchase.

Another useful link is here :

www.automationcorner.com

You can always try an activeX control that can handle it instead. I've not tried the ones from the above link, and they're designed for VB, but should drop into cvi ok. No harm in trying.

Hope that helps

Sacha Emery

National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
Message 2 of 33
(10,788 Views)

Does anybody have modbus tcp functions for LabWindows? Can you give them ? This is my e-mail: pi_meson###front.ru. Thnx.

0 Kudos
Message 3 of 33
(10,303 Views)

Hello all,

 

I am working on a project that needs to use LabVIEW to run some of the automatic test to a device over Modbus TCP.  Does anyone have a sample code that would like to share with me?  Please send to my email address at camvong@hotmail.com.  I am really appreciated.

 

Thanks,

 

Cam

0 Kudos
Message 4 of 33
(9,150 Views)

If you really need to perform it in LabVIEW you should post this question to the appropriate board. Even better could be to post in the Industrial Communications board.There are several posts in those boards that refer to Modbus over TCP in labVIEW so I'm sure you can have a powerful help there.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 33
(9,141 Views)

Gents,

 

I have used this a couple of years ago. Please see MODBUS over ethernet sample from the MODBUS foundation, that I ported for CVI.

 

Best regards

 

Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
Message 6 of 33
(9,060 Views)

Hello,

 

I have an example of MODBUS communication over TCP/IP with Labwindows CVI 2013 (see attachments).

 

 

Dr. Amir Nourdine

R&D Engineer

G. Cartier Technologies (France)

Message 7 of 33
(8,954 Views)

i Found this example very useful, thank you

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
0 Kudos
Message 8 of 33
(8,900 Views)

hi,

 

 were to open the TCP adress?

 

 were to write the "enum" and coil?

 

 is it a single output  control

0 Kudos
Message 9 of 33
(8,545 Views)

Hi,

 

When you execute 'modbus.exe' a pop-up dialog box ask you for the TCP-IP adress of your Modbus product.

After validate the TCP-IP adress, a new dialog box opens.

TCP-IP adress of the computer and of the modbus product are dispayed on the bottom of the frame.

 

In 'send in modbus format' you have to enter your coil adress, value to send, select a function (writeCoils, readCoils, ..) and validate.

 

Data sent are written in transmit Box.

Response is witten in Receive box

0 Kudos
Message 10 of 33
(8,526 Views)