Today I am here to present a project that I am working on, in which I mainly intend to show the power of artificial intelligence when it comes to software development and to execute ideas quickly and with quality. I will show an example of a functionality already integrated into the SCADA platform with artificial intelligence and Django. OPC client/server.
This "Little SCADA" is a platform where I intend to add functionalities developed with the help of artificial intelligence, such as OPC communications with different elements (PLC, OPC servers, etc.).
The beauty of this platform is that it is developed almost 99% with AI, following my ideas and guidelines. After several months of testing and experiments, one of the main conclusions I draw from working this way (Human thinks + AI works) is that by narrowing down and reducing problems to their simplest form, AI is the best ally you can have, as we will see with examples.
Tools used for the foundation of the platform:
- Django: for the structure of the web-based application.
- Visual Studio Code: for developing the project and running servers.
- Chat GPT 3.5 and 4: for developing the platform's functions, as well as general assistance and image generation.
- GIMP: for image modification.
The rest of the tools I have been using have been more specific for concrete functionalities, such as the one I will present in this article.
OPC Client: reading variables and graphing them in real time.
In this example, we will generate an OPC server with Python with 1000 integer variables, which vary simply, and then read them from our LittleSCADA application displaying a graph of the one we select. We will do all this trying to minimize human development work, letting AI generate our code.
Note: the intermediate codes used for creating this application are not shown to avoid making the reading of the article cumbersome. If you have any questions, you can always email me.
Step 1: Creating the OPC server
The first thing we will do is generate an OPC server on our own PC at localhost with Python. In my case, I have told it to have the variables (the 1000) increase to 100 and then back to 0, to see the sweep, but anyone could give it any behavior they wanted to simulate anything.
It is as easy as telling ChatGPT: "make me a server with Python that serves 1000 integer variables, that vary from 0-100". It will return a code that will almost certainly work because the example is super simple, and you will be able to run it by executing your Python application. If all goes well, you will get something like this:
And we will have the server listening. To ensure that the variables do what we wanted, and before creating a client in Django, it is interesting to verify it with a free client like UA Expert.
First discover the OPC server