Ada for Automation seeking feedback!

Hello there,
I’m developing Ada for Automation :
https://www.ada4automation.org/
and would like to know if someone as given it a try.

I’m open to suggestions. Comments welcome !

BR,
Stéphane

1 Like

Hi Stèphane,

I have been following A4A for a long while. I am a mechanical engineer and I got interested for a period of time in automation and control. I looked for open source PLC related software and I could not find much. However, I did find your. A few years later I got quite involved with Ada. I though that A4A had ceased development a few years ago as no new commits had taken place for a very long while, specially compared to the pace at which it was developed before. But you seem to be updating it from time to time. I suppose it is a quite mature library already, which is good!

I personally have never used it. I would like to try it out as a communications platform with other systems, but alas, I am far from setting up such a system in the first place. I feel like it could be integrated in other systems quite easily. I also like the demos page.

From a quick glance, I suppose that A4A is being used in some industrial processes no?

Anyhow, sorry I cannot tell much more than that. I am very glad you have created such a piece of software. I find it a shame that it is not more well-known…

Best regards,
Fer

1 Like

Hi Irvise,

I have been following A4A for a long while.

Glad to know ! Thanks for your interest.

I am a mechanical engineer and I got interested for a period of time in automation and control.

I used to be a control engineer for about 15 years, hence this project.

I looked for open source PLC related software and I could not find much.

Well, there are a few. But this is not the goal of “A4A”.
A4A is an Ada framework to help create control applications.
It is also my way to explore an interesting language and technologies found in my domain : communication from fieldbus to cloud.

I though that A4A had ceased development a few years ago as no new commits had taken place for a very long while, specially compared to the pace at which it was developed before.

Well, it depends solely on the time I can spend on it.
There are plenty of ideas, not much time though. And I’m learning a lot of stuff in the meantime : Simple Components, Gnoga, HTML5, CSS, Git, Gitlab, MQTT, Snap7, Docker, Asciidoc… Fortunately, there is a convergence with my job as a developer and support and I can reuse what I learn.

But you seem to be updating it from time to time.

Yes, as time permits. I have also a family and friends !

I suppose it is a quite mature library already, which is good!

I can’t tell. I’m not an Ada professional and A4A lacks peer review.

I personally have never used it.

Perhaps some day.

I would like to try it out as a communications platform with other systems

That’s one of the use cases : gateways.

I am far from setting up such a system in the first place.

Maybe I can help ?

From a quick glance, I suppose that A4A is being used in some industrial processes no?

Could be but I don’t know if it is the case, hence my feedback request.
In my daily job I write C applications. I wish I could use A4A but haven’t done so yet because of customer or application requirements.

Anyhow, sorry I cannot tell much more than that.

No problem. I’m already happy you demonstrate some interest.

I am very glad you have created such a piece of software.

:slight_smile:
Indeed, it’s mostly other’s work glued together with some demos.

I find it a shame that it is not more well-known

Future will tell.

Cordialement,
Best Regards,
Stéphane

1 Like

Looks very interesting. I shall have to consider it against Flutter. I imagine mobile phone support is lacking. Though perhaps via webview apps. Hopefully Linux phones might bring better and free standardisation at some point.

Hello kevlar700,

Thanks for your input.

I understand that Flutter is a SDK to create applications on various platforms somewhat like Qt.

Ada for Automation is completely agnostic regarding UI. You can use GtkAda for desktop, Gnoga for web UI, any SCADA, why not Flutter.
I had started with PcVue (a SCADA from French editor Arc Informatique) communicating using Modbus TCP with A4A demo application, then doing GtkAda, and then using Gnoga, favouring the latter which allows web demos.
In turn, web technologies offer plenty of JavaScript libraries and Gnoga can deal with them as demonstrated :
https://a4a-k0-s7.demo.ada4automation.org/
UI is indeed the most difficult task in control engineering because of the variety of needs and solutions and the education level it requires.
Of course, things evolve so rapidly in this domain, mobile, cloud and web, and get obsolete so quick as well…
On the other hand, Ada is here to stay I think, and so you can build the part controlling your machine or process in Ada to get all the benefits of this language.
Ada 83 → Ada 2023… Hey ! that’s for long lived applications !

BR,
Stéphane

3 Likes

Hello again,

Easy way :

BTW, thank you ! I didn’t know Flutter…
Though one needs to get started with another language, DART, seems interesting to follow.

BR,
Stéphane

Not a big fan of the Dart language but I prefer it to javascript. If you have written a fair amount of javascript then you might prefer React Native. Dart graphing libraries were behind javascript ones, last I checked. I would love to do it all in Ada but Flutter has many widgets and scaling for all screen sizes and plugins for mobile apis like NFC. Dart also has a C FFI to call Ada via.

Thankfully a lot of the boiler plate and OOP Dart constructs can be ignored once in the Flutter APIs.

I still haven’t given Gnoga a proper look to be honest.

Hello,
Not a fan of JavaScript either but since this is the only language the browser understands, one has to deal with it.
Anyway, Ada for Automation is only about integrating various technologies written in foreign languages.
It is not a weakness, it is a strength.
When you do control engineering, you have to deal with many technologies and standards.
Being open is paramount and allows to chose the right technology for the task at hand and deal with legacy.
The more you write in Ada, the more you can reuse though.
BR,
Stéphane

2 Likes

Thank for your work with A4A :slight_smile:

I myself has worked with automation S7/300,400,1200.

I would really like to see Ada as a PLC programming language (Ada 83 for start, perhaps later SPARK2014)

Have a look at https://openplcproject.com - How about Ada in the IDE…?

One more project of interest for connectivity is

GitHub - open62541/open62541: Open source implementation of OPC UA (OPC Unified Architecture) aka IEC 62541 licensed under Mozilla Public License v2.0.

I think this is what is called an IO-Server - A centralized database for process data. The IO-server relays process data to/from all kinds of devices via all kinds of protocols. The user just connects to the IO-Server and the world opens…

How about a simple/reduced Ada binding for starters…

Hello Jesper,

Thanks for your interest.

I would really like to see Ada as a PLC programming language (Ada 83 for start, perhaps later SPARK2014)
Yes, that’s missing between C and C++ available in some proprietary solutions.

I know Beremiz since ages but I think it’s better to keep things separate : Ada for high and low level stuff, PLC languages when your customer insists to use them.

I know open62541, the company I’m working for is using it along with some other folks including competitors. It provides OPC UA Client and Server and is plain C.

How about a simple/reduced Ada binding for starters…

I’ve started to learn Data Science and so in the process Python.
It’s a big amount of things to learn, especially for my old brain !

I don’t have much time to invest in Ada for Automation for now but I’m open to discussion and waiting contributions.

BR,
Stéphane

1 Like

I’m not an expert on industrial automation, so I cannot give specific feedback. If you accept a general suggestion, include it in Alire, it will give it visibility and facilitate usage.

1 Like

Goodmorning Stéphane,

I fully agree.
LAD is constructed for a specific purpose, and Ada cannot do it any better in that area. However, ST may be substituted by Ada/SPARK; especially when it comes to higer level of logic and safety related.
I wrote a thin SQL client for S7/300 with Industrial Ethernet in ST (Structured Text, basically Pascal). I told it to our companys S7 supplier - he looked kind of unwell.
Today SQL connectivity is done via graphic terminals / SCADA systems or specialized hardware!
He is a supplier og that as well of course - surprise surprise :wink:

I should be possible to write an Ada binding without too much problems.

It is good to keep them grey working. Nothing beats experience!
How do you validate the results in DS anyway? Pen and paper…?

MVH/MFG,
Jesper

Hi Jesper,

Domain Specific Languages are created for specific needs as name implies.
The problem is that they are often used outside of their scope, sometime because of customer choice, sometime because PLC programmer’s experience or economics, i.e. license costs…
Anyway, either one needs to use several of them to tackle different tasks or end up with using wrong tool.
I believe those DSL are useful but I think that with Ada one can write better code.
Of course, the learning curve is not the same but in the long run it’s much more powerful.

I wrote a thin SQL client for S7/300 with Industrial Ethernet in ST (Structured Text, basically Pascal).

Great !

I should be possible to write an Ada binding without too much problems.

Yes possibly but time is a scarce resource.
Client part looks quite easy but server would take more time I think.
And the modelling of the server domain needs to be done and then you have again a lot to learn.
Have a look to :
https://hub.docker.com/r/hilschernetpi/netpi-opcua-server
I would stick to C and write only a little API to interface with an Ada application.

How do you validate the results in DS anyway? Pen and paper…?

What do you mean ?

MVH/MFG,

What does this mean ?

BR,
Stéphane

1 Like

Hi mgrojo,

Thanks for the suggestion.

I’ve started learning using Alire but again time is a scarce resource.

I’m sure it can help and I’ve seen that Simple Components and Gnoga are already available in Alire catalogue.

It’s on my ToDo list ! :slight_smile:

BR,
Stéphane

2 Likes

Hej Stéphane,

LAD (Ladder Logic) is constructed for electricians modelling circuit diagrams. Electricians are typically (or was) not trained in programming. LAD is very useful for finding electrical problems like a failing sensor/actuator in the production area.
I like the feature of viewing the state of a running system.

MVH,
Jesper Q

Hej (Hi) Stéphane,

Med Venlig Hilsen - With friendly salute (singularis)
Mit Freundlichen Grüßen - With friendly salutes (pluralis)

And what does that mean :slight_smile:

LAD (Ladder Logic) is constructed for electricians modelling circuit diagrams. Electricians are typically (or was) not trained in programming.

Yes, this is why I believe those DSL are still useful. Because a lot of PLC programmers are not trained as programmers.

LAD is very useful for finding electrical problems like a failing sensor/actuator in the production area.

Sure, but you need to have a programming device and know the program.
I think it would be better to have better diagnostics embedded in the application that you could consult from web page or hand-phone.

I like the feature of viewing the state of a running system.

When the system is complex or runs too fast, it is not that interesting.

BR,
Stéphane

Hej Stéphane,

A client would be nice for starters.

Well, if the server logic (business logic?) is sound and well designed it ‘should’ be relatively easy to translate that into Ada/SPARK I guess…
All the protocols and drivers could still be in C.

Mvh,
Jesper