ModbusTCP....Here we go again!

Hello all,
I am evaluating two PLCs and I want to create an HMI for them possibly with XOJO. Modbus communications would be the way to go for me on this, and I have been scouring the past threads on the subject both here, and through Google, but in the end it seems that there is not a clear application example I can use.

in the end I want to do the following:

  1. click a radio button to perform an action in the PLC,
  2. enter information in a text box that will update a variable in the PLC
  3. using modbusTCP to show that the HMI is running, and if it is not, shut down the PLC process… If I can get 1 and 2 working, then this step is a breeze.

So, my question to the community is therean application or module drop in XOJO for ModbusTCP?

Looking forward to teh feedback!


Happy coding! Sooner or later I’ll probably have this need myself, but I’m not aware of any drop-in solutions for Xojo.

Jim - I have used VB in the past with Modbus TCP and RTU. There is a lot of examples out there in VB that you could port across to Xojo maybe. There is also a website that has a open source DLL that might work with Xojo.



FYI Automation Direct has an Arduino based PLC system P1AM 1000 series.
I was never able to quite grasp modbus so I just send a csv string to the device via tcp and parse it in the arduino. From the arduino end I send an XML document to the PC with certain parameters to update my application. I have been doing this for many years via serial and now tcp and it works very well.

Yes I am familiar with the Arduino world, and that is certainly an interesting solution. For now I think I will stick with Visual Studio, which I have working and I will also be looking at trying to get things working with XOJO.



I like c# and c++ as well and use visual studio for many things.
I had a c# application working for my process but for reasons I was never able to figure out I could not get the application to run on certain clients computers. I would get big cryptic errors that took hours to track down and still unable to get it working. Xojo on the other hand is easy to learn compiles and just runs without any problems ever. No crashes no installation problems just runs. That is hard to beat.

Here is an image of what I have come up with for xojo.


That is WAY cool!


Always love seeing people control hardware with Xojo :slight_smile:

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.