Lazarus

Programming => General => Topic started by: xinyiman on May 17, 2018, 10:59:07 am

Title: ModBus with lazarus
Post by: xinyiman on May 17, 2018, 10:59:07 am
Hi guys, I need advice. I have to make a commercial product that uses the modbus protocol. I saw that mbutils and pascalSCADA exist. The first I tried to download it and seemed abandoned (over all the name identifies a beta version). The second seems better but less specific. I have to use only the modbus. What do you recommend?
Title: Re: ModBus with lazarus
Post by: tr_escape on May 17, 2018, 11:08:39 am
My advice is pascalscada I am still using for my few projects.
Title: Re: ModBus with lazarus
Post by: xinyiman on May 17, 2018, 11:42:30 am
Thanks. Are there any small examples to understand how to use modbus with lazarus and pascalSCADA?
Title: Re: ModBus with lazarus
Post by: tr_escape on May 17, 2018, 01:13:21 pm
Ok.

My project created on windows 7 but pascal scada can be work on linux too.

You need a modbus device on my project my modbus device was modsim software.

I contact two software by com0com project.

So if you look at project you will see a com port connector, a modbus protocol component, a tag number component and a modbus block component.

But you have to connect this components with by a tag bit for bit states and a blockelement for analog values.

Also Analog values can be scale 0..100 like as. I used linearscale componet.

So modsim running on COM7 and my project running COM6 and checked com port component as active

Thats all.

Note: I can't add whole pictures in one message but you can solve.
Title: Re: ModBus with lazarus
Post by: tr_escape on May 17, 2018, 01:15:05 pm
For other pics
Title: Re: ModBus with lazarus
Post by: af0815 on May 17, 2018, 07:32:24 pm
Do you need a modbus master or slave ? Serial modbus or modbus over IP ?

Andreas
Title: Re: ModBus with lazarus
Post by: jamie on May 17, 2018, 11:57:34 pm
I am currently picking away at an HMI interface that will have the Modbus Serial/Ethernet server built in and it will
support ASC/RTU.

 Other servers I may make it to connect with OPC drivers.

 But currently I am working on a common access point for the HMI port that will see these different types of
drivers/hardward interfaces as transparent so it'll be easy to simply add a new data link without touching the HMI code.

Title: Re: ModBus with lazarus
Post by: tr_escape on May 18, 2018, 08:28:35 am
I am currently picking away at an HMI interface that will have the Modbus Serial/Ethernet server built in and it will
support ASC/RTU.

 Other servers I may make it to connect with OPC drivers.

 But currently I am working on a common access point for the HMI port that will see these different types of
drivers/hardward interfaces as transparent so it'll be easy to simply add a new data link without touching the HMI code.

Some of HMI/Operator Panel devices allows create your own scripts, I used once Delta HMI it has got scripts but ofcourse not working as OOP or pascal style.

Title: Re: ModBus with lazarus
Post by: avra on January 22, 2019, 12:54:44 am
I have to use only the modbus. What do you recommend?
This one has both master and slave (MODBUS TCP only) and has a Lazarus package:
https://github.com/coassoftwaresystems/delphi-modbus
Title: Re: ModBus with lazarus
Post by: avra on January 22, 2019, 12:58:31 am
Other servers I may make it to connect with OPC drivers.
Latest Kassl dOPC client works with Lazarus and supports OPC UA (!!!), XML, DA, AE and HDA:
https://www.kassl.de/opc/delphi.shtml
Title: Re: ModBus with lazarus
Post by: af0815 on January 22, 2019, 06:27:39 am
I have to use only the modbus. What do you recommend?
This one has both master and slave (MODBUS TCP only) and has a Lazarus package:
https://github.com/coassoftwaresystems/delphi-modbus
It is running well with Lazarus and on RasPi. Master and Slave are smooth working, but you have to dig into the managment of the buffer and to undersstand, how modbus is working and what parts of data are transfered.
The component itself use Indy(10) this was for me in the past more an issue, in the meantime indy is available in OPM.
TinyPortal © 2005-2018