Modbus TCP/IP

Hello All,

Probably this would be 5th or 6th post asking about implementing Modbus TCP/IP with Xojo.

Pardon my understanding of Xojo as I am new to it, but I haven’t been able to find a clear explanation of implementing Modbus TCP/IP with Xojo.

I want to communicate with Digital IO using a windows app.

Can someone please help me with a plugin which I can add to the xojo and use API to communicate with the devices.

I basically want to read & write to coils & registers.

Thanks,

Gaurav Joshi

Well I don’t know what Modbus TCP/IP is, or what Digital IO is, although a quick search tells me the former is a protolcol for supervision and control of automation equipment.

What IP address will the target devices have and how do you set it? What port do they listen on? What research have you done? What documents have you studied to understand the protocol and how it applies to the devices you have? I see also there’s a Wikipedia article on Modbus.

Hello Tim,
Thanks for your response.
I shall try & answer some of your questions based upon my current understanding.
Modbus TCP/IP is basically MODBUS over IP. The Digital IO is nothing but remote IO device which communicates using Ethernet port. The standard port for Modbus TCP/IP is 502. The communication needs to take place something similar to as explained in pyModbusTCP · PyPI.
I am not aware as to how the communication protocol works, since till date, I have used different softwares such as DaqFactory or Matlab which have inbuilt modbus TCP/IP libraries. However, I find there certain limitations within these softwares with regards to ease of use, because of which I want to use Xojo for this new project related to Factory Automation.
If someone can develop standard plugins for Modbus TCP/IP & Modbus RTU, I am even willing to buy them, since I believe this shall help increase the capability of Xojo and thus its reach in Industrial Automation.
Regards,
Gaurav

Hi Gaurav, I am done programming in Xojo using modbus tcp/ip. If interested PM me for more details.

That’s not very helpful to other forum members who might also be interested in more details :frowning:

1 Like

Perhaps there is a different way to approach it.
I have tried to understand modbus but can’t quite get my head around it. It also seems like it is an outdated standard. With the speed of tcp/ip communications there are many methods to transfer data. I wrote my own building automation software using xojo and automation direct arduino compatible plc’s. I use xml on both client and server and it works seamlessly not to mention a lot easier to understand and maintain.
Here is the write up on my project.

1 Like

Its because its a paid module.

I have written a wrapper for an open source library for industrial control protocols including Modbus TCP/IP. See this post for more information:

Dennis

1 Like

Maybe, but very firmly entrenched in many fields and not going away anytime soon I think.

There is another more secure standard to replace MODBUS but the sheer volume of legacy hardware out there means MODBUS will be around for a very very long time yet.

Probably longer than Xojo, frankly.

NB if you don’t know what an industrial PLC is for, think coal or nuclear power stations, steelworks, oil and gas rigs, mines. Trains, process plants, manufacturing facilities for food, fertiliser plants, automatic bagging and pallet machines… Things that tend to go “bang” in a big way in milliseconds.

Particularly safety systems where human life is at risk if there are hazardous undetected failure modes.

NB if what you are playing with is safety-related, ie someone could be harmed if your solution screws up, do not use Xojo, not even for supervisory monitoring and especially not for control. Please obtain and read the relevant standards in your country concerning industrial safety and programmable devices. In UK or Europe EN50126, EN50128 and EN50129.

Aduino, Pi, PIC and similar are tinker toys in comparison.

That is your opinion. Maybe you don’t know what makes a PLC go. They all have Micro-Processors and are ‘programmed’. The devices from Automation Direct are Industrial. Because they are programmed with the Arduino implementation of C++ does not make them a ‘tinker toy’.They are just as industrial and robust as any other brand available and they meet all necessary standards. I have had a lot of experience with many brands of PLC’s they all do the same thing. The P1AM line is just more versatile. If you know what you are doing with Xojo it is as good as any other computer language.

And another thing Modbus is not really a standard because almost all of the manufacturers have their own implementation and it is very obscure.