element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Industrial Automation
  • Technologies
  • More
Industrial Automation
Forum E14 Community recommendation for ModBus TCP client
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Industrial Automation to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 29 replies
  • Subscribers 288 subscribers
  • Views 892 views
  • Users 0 members are here
  • modbus testing
  • modbus
  • client application
Related

E14 Community recommendation for ModBus TCP client

colporteur
colporteur 2 months ago

I am looking for an application to query a ModBus TCP interface on a scale head?

image

The company I am working for has recently installed a RiceLake 1280 scale indicator with a Modbus TCP interface. The scale indicator is IP capable and resides in a network DMZ. The goal is to have a cloud vendor pull scale data over the network from the Modbus interface. I'm looking for an application that can query the Modbus interface to confirm communication with the interface. 

The scale vendor recommended an application in order to set the Modbus TCP interface IP address. I managed to get that working, proving the interface IP answers an IP ping. DMZ rules have been set in place to isolate the indicator. I want to test that the cloud vendor can get to the Modbus interface and pull the data. I'm thinking maybe there is a software tool like minicom is for serial communication, except the tool is for Modbus.

E14 has some great Modbus resources but nothing to match my search. A Modbus client query tool. I'm hoping there is a community member that has experience with Modbus TCP and that they could recommend application software to perform the task.

  • Sign in to reply
  • Cancel
  • beacon_dave
    beacon_dave 2 months ago in reply to colporteur
    colporteur said:
    I figured someone here would have used a modbus client. Coming up zeros.

    "...This also required using Modbus (TCP) within a Python script to be able to send commands..."

    https://community.element14.com/challenges-projects/project14/musictime/b/blog/posts/100-year-old-player-piano-gets-an-update-music-time-via-python-and-modbus-tcp

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • colporteur
    colporteur 2 months ago in reply to shabaz

    Thanks S. I will it a try next week.

    I have a programmer friend that did something simulator. He had a python script running a modbus server. I couldn't buy him enough beer to make a client:(

    I figured someone here would have used a modbus client. Coming up zeros.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz 2 months ago

    Hi Sean,

    While it's not the best protocol for this (it's a bit "naked"! and the cloud app vendor ought to have come up with better proposals to be honest), but anyway, I was interested, because by coincidence I'm just getting going with Modbus RTU currently (RS-485 instead of TCP, some differences in the protocol). I got curious enough to try to find the user manual for the 1280 Modbus TCP card. I gave that to AI, and it generated the Python code attached below. It complained that the user manual was vague in places, which it is, so I told it to try to make a simulator that accepted a few different function codes, and then try to simulate the cloud side too). 

    The screenshot shows the 1280_simulator.py file running at the left side, it just sits and waits for a connection.

    On the right window, you can see the cloud_app_simulator.py file running, it makes a TCP connection to the 1280 simulator, and then tries a few function codes.

    Currently the code transmits to port 127.0.0.1 and port 1502, you'd need to modify both of those to suit your needs.

    Please don't ask me for modifications or tweaks, I don't know Modbus TCP nor what the AI did! : ) It might be ok but it might not. It might completely fail.

    I suppose one other thing worth doing is perhaps running WireShark, and examining if it successfully decodes whatever is sent by these two simulators. I didn't try that (I've not got WireShark installed currently). I only tried running the Python code on Windows, it should work with Linux but I can't be sure.

    image

    modbus_tcp_python.zip

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • obones
    obones 2 months ago in reply to colporteur

    Well, telnet will tell you if the connection can be established, which is a first "layer" of tests.

    After that, a quick search for modbus TCP lead me to this reddit with a few suggestions: https://www.reddit.com/r/PLC/comments/ncp724/modbus_tcp_computer_client/?show=original

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • colporteur
    colporteur 2 months ago in reply to vmate

    There were a number of solutions reviewed before settling on the DMZ hosting the scale indicator. Considering all the design constraints, the solution mitigates the risk introduced by having the vendor connect and poll the device.

    The goal of the post is to get a lead on a simple software tool to test the Modbus interface, not redesign the network security solution. 

    My first attempt will be telnet. If it works, I'm done. Based on my understanding that you have to write in order to read the interface, I'm not confident telnet is usable. I have the programming guide for the interface, unfortunately the vendor didn't suggest a tool to make it usable to me.

    My preference would be to start with a tool that someone could comment on. My experience with Modbus, is I recently learned how to spell it.  In searching the site for Modbus, there were a few posts, none currently active. A google search for Modbus Client has provided some resources for investigation on Monday. Without any leads here, I will hoe a row to one of the google hits to see what works.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • vmate
    vmate 2 months ago in reply to colporteur

    In general, it is not a great approach to trust the vendor, or anyone else. You might think you trust the vendor itself, but if they get compromised, you get compromised too. You need to minimize your attack surface and trust the absolute least number of entities possible. In your setup, it sounds like there's zero reason for you to ever give access to anything for anyone, and you should be sending data to the vendor instead of them pulling data. Obviously, I don't know your exact constraints or setup, there might be a valid reason to do what you are doing, but consider this carefully.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • colporteur
    colporteur 2 months ago in reply to obones

    If, if, if, if my aunt was a man she would be my uncle.

    There is a trust in the vendor through a VPN tunnel. There is less trust for the scale indicator in the network.

    I never thought of telnet'ing to the interface. I never think of the protocol since it was replaced by ssh. I will give it a try.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps 2 months ago in reply to obones

    In my company, a vpn tunnel into a reverse proxy

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • obones
    obones 2 months ago

    So, to get this clear, you have set up rules that allow an computer out of your control to enter your DMZ and connect to your scale?

    I find this quite dangerous security wise, I would have done it the other way around, with an internal computer talking to the scale, retrieving the values and pushing those to the cloud provider.

    But if you want to test the connection, you can do it with a telnet client, provided you know the port it is listening to. I mean you won't be able to "talk" the right application layer protocol, but at least you'll see if the connection goes through.

    Try first from inside the DMZ, then use a computer from outside (your phone via 4G?) to see if you can still connect. Then, you can hand over the "package" to the cloud vendor who should be able to do the same while knowing which application layer protocol to use and get the proper data out of your scale.

    But once again, I find it quite dangerous to let a third party directly access a machine inside your own organization.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube