* * *

Author Topic: ModBus with lazarus  (Read 969 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 1720
ModBus with lazarus
« 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?
Ubuntu and Mac
Lazarus: 1.8.0
FPC: 3.0.4

tr_escape

  • Sr. Member
  • ****
  • Posts: 341
  • sector name toys | respect to spectre
    • Github:
Re: ModBus with lazarus
« Reply #1 on: May 17, 2018, 11:08:39 am »
My advice is pascalscada I am still using for my few projects.

xinyiman

  • Hero Member
  • *****
  • Posts: 1720
Re: ModBus with lazarus
« Reply #2 on: May 17, 2018, 11:42:30 am »
Thanks. Are there any small examples to understand how to use modbus with lazarus and pascalSCADA?
Ubuntu and Mac
Lazarus: 1.8.0
FPC: 3.0.4

tr_escape

  • Sr. Member
  • ****
  • Posts: 341
  • sector name toys | respect to spectre
    • Github:
Re: ModBus with lazarus
« Reply #3 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.
« Last Edit: May 17, 2018, 01:16:21 pm by tr_escape »

tr_escape

  • Sr. Member
  • ****
  • Posts: 341
  • sector name toys | respect to spectre
    • Github:
Re: ModBus with lazarus
« Reply #4 on: May 17, 2018, 01:15:05 pm »
For other pics

af0815

  • Full Member
  • ***
  • Posts: 171
Re: ModBus with lazarus
« Reply #5 on: May 17, 2018, 07:32:24 pm »
Do you need a modbus master or slave ? Serial modbus or modbus over IP ?

Andreas
regards
Andreas

jamie

  • Hero Member
  • *****
  • Posts: 835
Re: ModBus with lazarus
« Reply #6 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.


tr_escape

  • Sr. Member
  • ****
  • Posts: 341
  • sector name toys | respect to spectre
    • Github:
Re: ModBus with lazarus
« Reply #7 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.


 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus