Hello,
I 've readen some post but no response. I try to develop a soft to command an logic controler
The communication protocol is modbus TCP
Is somebody have class to communicate in modbus TCP or tips to make it
thanks in advance
Noel
Hello,
I 've readen some post but no response. I try to develop a soft to command an logic controler
The communication protocol is modbus TCP
Is somebody have class to communicate in modbus TCP or tips to make it
thanks in advance
Noel
Noel,
I have used a C library on Github that provides support for Modbus TCP and EtherNet/IP. I have not used the Modbus TCP portion but the EtherNet/IP works very well with Rockwell ControlLogix PLCs. The Github URL is:
https://github.com/libplctag/libplctag
I’ve written a Xojo wrapper module for the library. You can get it at:
libplctag
The wrapper is written for version 2.3 but it should work for the current 2.4 version. I usually put the dll file in the same folder as the executable.
Dennis
Hello @Noel_Wetischek !
You’ll notice that whenever someone posts about Industrial Automation there are only a small handful of us that work in this industry, so the replies aren’t as rapid as on other topics.
I’ve done a great amount of programming for Modbus RTU, and it’s my understanding that Modbus TCP/IP is basically “Modbus RTU over IP”… or so I hear.
I’m overdue to look into this topic so I’ll start digging now and see if there isn’t some help I can offer.
Welcome to the Forum by the way!
Hi Noel,
I’m taking a look at the official spec on this (Modbus_Messaging_Implementation_Guide_V1_0b.pdf) and it’ll take me several reads to absorb and not fall asleep. I’ll also likely find some software that emulates a Modbus TCP/IP “Client” (formerly referred to as “Master”) that’s intended for use debugging “Server” nodes. And I’m headed out for a week holiday with family, so it’s unlikely I’ll have more to contribute to this thread till after the 29th of the month. However, I really do hope I can be of help. My company has a need to fully understand and work with this protocol - so it’s something I plan on sticking to. Best of luck for now!
William,
This page, http://www.dalescott.net/modbus-development/ has a good listing of Modbus simulators. Worth checking out.
By the way, I confirmed my Xojo wrapper for the libplctag library (see my earlier post) does work with version 2.4 of the library. If you are on Windows, the 2.4 version is worthwhile since Windows performance has been improved.
Dennis
Thanks a lot Dennis and William
I’ll try your wrapper soon.
I have first to understand how to call/load the external library
Noel
Is the wrapper still around ? The Google link seems to be not working ![]()
Many Thanks ![]()
Hi there,
I made this small library / app to connect to my hitachi heat pump using modbus
it is a reusable library all written in xojo.
hope this helps.
tested on macos only but should work on other platforms
Hello all,
VNS Xojo Modbus is a free, open-source (MIT) Modbus client library written in pure Xojo
(API 2) — no plugin, no native library, no Declare. Version 1.1 is out:
Drag a ModbusTCPClient onto your window, fill in its events in the IDE, and read:
ModbusClient1.Address = "192.168.1.50"
ModbusClient1.ReadHoldingRegisters(0, 10) ' connects by itself
' ModbusClient1.RequestCompleted(request As ModbusRequest)
For i As Integer = 0 To request.Values.LastIndex
System.DebugLog(request.Values(i).ToString)
Next
AddHandler needed.hr1080:int16, ir30:float32:cdab,co5, hr1089.4) with scaling, units, labels, “no data” values and write ranges, and let theModbusRTUClient, a SerialConnection subclass with the sameModbusTransport interface: the same poller works over TCP or RTU.
The RTU part has not been tested on a real device: I don’t have a serial Modbus device. The
frames and CRCs are checked against reference values by the self-test, and everything compiles
and runs on macOS, but nothing has been tried on a real RS-485 / RS-232 line yet.
If you have a Modbus RTU device (meter, PLC, inverter, sensor…) and a USB serial adapter, could
you give VNS Modbus RTU a try? There is a short test list in
docs/RTU_TESTING.md —
start with the loopback (FC 08), which touches no register. Save log… produces a report with
the versions, settings and every frame; post it here or open a GitHub issue. “It works” is a
useful answer too!
tools/, so you can try everything withoutFeedback, questions and pull requests welcome.
Jean-Yves
@Jean-Yves_Pochez what perfect timing! I’m doing a rebuild of some devices that have both Modbus TCP and RTU. This is a busy week, but I will do my utmost best to assist you - and very much appreciate your no-plug-in approach!