As I wrote to SCADA. Part three
Good evening again.
I continue the cycle of my articles, the previous one is here .
The farther into the forest, the thicker the partisans, and the time in days is less and less. But despite the peculiar overload, I still stubbornly continue to improve and apply my indefatigable imagination with engineering ideas to my brainchild, which I’ve thoroughly hooked on. To date, 5 real objects have already been made and implemented on my system, three of which were made by curious third-party developers who were interested in touching the system in action. Although their volume is not so great, but still this is something, the reference is growing. I myself, without exchanging small things, like the one that needs the most, climb into the thick of it - the result of which has already become two major developments in my area: 3,000 I / O points (the system has been working for almost half a year and has now gone into commercial operation ) and here's the recent one at 5500.
Let's start with progress, which, as you know, does not stand still. Another impetus to the thought of “is there life on Mars” was just a system with 3,000 points, where there are already 3 automated workstations in the control room based on my scad. And where is the dispatcher - there are always pictures.
Having played enough with the capabilities of GDI + in terms of graphics, I still gave them what they wanted to see, and having launched the system at the facility for commercial operation, I came to the point that the customer, as an operating person, desperately needed documentation in the form of a “user manual ". The customer was meticulous and asked to provide him with a very detailed version of such a manual, where there would be all possible forms of on-screen mnemonic diagrams of this system. “Yeah, the men said” and started to take a screenshot of them ... Ha, it’s not so simple, somewhere on the 50th screen I felt sick from such a routine, and their constant “let’s fix it here” all the time changed these forms and they had to Screenshot in a new way, modifying the preliminary document for approval at the top. I had to sculpt a specialized runtime function, by which he automatically generates ALL screen forms on the machine in the form of image files (by the way, then I want to use the convenient office MS Word format to automatically collect the manual itself in the necessary SNIP). And so, when the runtime was thought out at the system output and produced 390 screen forms, I was a little sick of the thought that the CPU is not rubber, and GDI + is certainly simple and convenient, but we should already think about modern digital technology bonuses and hardware acceleration options for the video system, and you see, exorbitant appetites of prettiness can soon completely devour the performance of modern processors on such decisions. An additional kick for this was also the remarks of outside observers: “uh, why is CPU loading on the workstation almost always 60-80 percent?”. It’s possible to explain that the processor was created in order to work.
So - armed with thoughts that I was hooked on .Net thoroughly, I began to dig up information, and what modern technologies can offer me. And it began: pathetic attempts at DirectX, OpenGL, and some paid engines based on them to simplify the process for the end developer. As a result, everything was not right - either I didn’t go skiing, or I - ... Well, I’m not a guru in programming at such levels, it was a shame.
In general, I decided that sooner or later, but I still have to touch the WPF technology and work in the XAML format. I felt ... Some horror, I “swallowed” the first WPF and XAML book in 1000 pages in a train for a week, I never read an artist like this in my life. And under the impressions of what he learned in 3 days, he managed to throw a prototype of his new editor of FBD algorithms. Honestly, the first three days I was bursting with a little from the fact that I had not done this before. I was very impressed with the capabilities and technologies, probably as a schoolboy from the first-ever read of a fantastic work of a world classic. But what struck me most was how close I came to this technology when I "invented" my own graphics engine for my scad using DGI + and XML format. Many moments with us with small ones turned out to be almost one to one prototypes from one drawing. Already, even some engineering pride shod.
Without hesitation, I began to study the possibilities of creating a runtime for the current version of my scada, but already with hardware graphics acceleration and additional features of XAML and WPF. Now we’ve got some prototype of the viewer, which allows me to easily open in approximate form the screens of my current skad format and port them on the fly to XAML, and from here the possibilities for sharing the development of the graphical interface are not created by an automaton, but by a real designer in real professional systems . I’m actively trying to work in this direction with Microsoft Expression Blend (it’s used in the videos below).
Along the way, I decided to create the third version of my Modelist technological system for modeling technological objects (from which, by the way, my current FBD editor of algorithms in the box grew), I use it actively to develop the project and its algorithmic part on the test site before sending it to the object. Being in previous versions helped me set up systems without visiting the facility at all, and then started on the facility with a minimum of improvements and twitches of the technology itself. If interested, I can give real-life examples where saving time was truly colossal, and the object itself simply would not have allowed experiments on itself live because of its danger.
Now the new Modeller’s system will be finalized as a regular external debugger for my current version of the scada, it will allow you to connect via the network to a working project under debugging executive modules and in real time replace the current system parameters with a model that the developer himself can also create and debug in runtime mode violating the project itself and not stopping it. This method is now very actively used by us at the training ground to run all our decisions before sending to the object.
It looks something like this (clickable): According to the graph, some of the experiments with the viewer and the hood are:

And here is a little according to the new Modeller:
The truth here is a very early 3-day version, now it has already matured a little and can do more than on the video.
It is noteworthy that the size of the application, which is only 100KB in the video, is somehow not even solid for modern scada systems.
Those who are especially interested — even posted this version on one of the forums on trial, especially pleased with the only comment: “Now I understand why the Germans lost the war.” By the way, he was also the only one, for some reason the people were either too lazy to watch, or there was simply nothing to say after that.
But the graphics are graphics - and I also try not to forget about services. At the beginning of June, another interesting situation arose that prompted me to include in my skad more advanced work with project signal tables, or rather, to perform a project development service according to the initial data of the ToR.
A little background: they come to me on May 31 from TK on one system in which 5500 I / O points, the benefit is a system without graphics, BUT - the source nodes of the system are gateways for a very large project on another platform that does not know how to work with iron , which is presented below, but mine can. And you need to work with the bottom-line equipment through the built-in drivers, but with the top skad you should already work on ModBus TCP / IP exchange over the network, that is, full support for ModBus TCP / IP Slave mode.
Well, you don’t need to draw screens, you just need to configure all this in the project and prepare documentation for the address spaces using the ModBus TCP / IP protocol for top-level developers.
It seems like a feasible and simple task, but, again, this is the BUT:
1) In terms of deadline, they reached the point that the system should be shipped to the object on June 10th !!! And not just shipped but also finished, that is - working!
2) In TK, all materials, including signal tables, are presented in PDF format, which is also closed with a password. I HATE designers working in PDF (how many I do not work, all the time this format only causes braking in the development process)! At least once, they would be forced to make their own systems according to the documentation presented in this format.
3) Since the system is a gateway, the top-level developers are sitting idle, because they need documentation on gateways with registering each parameter according to ModBus, without it, the top level cannot be completed and launched.
In general, the conditions are funny ... To my question, “where were you before and why did you delay the project?” they just spread their hands and began to start old songs about the main thing ...
Okay. I sat down and thought and realized that the first thing to do was pull all this information into the project. However, 5500 signals to beat with pens according to visual documentation in PDF - the monkey will have to work and there will be many such monkeys, but there are none, like time. An attempt to go through the PDF reader gave a cool document, where the names are like those, but sometimes not the same ones, for example, the current designation "I" somewhere turned into the symbol "1". And all these little things greatly spoiled the general structure of the received text, and again there is no time to edit it. About scraping the password with the utility, the idea also did not take root. And then I got the idea to finish the mechanism of working with signal tables, which I already put in some form in the developer's environment. Well, as they say, "Valera, it is your time!" (from)
There were 10 days ahead and quite a bit of free time, as well as the main rule from the well-known cartoon: “It is better to lose a day, but then fly in two hours!”. And “flying” along a similar route with typical solutions ahead loomed very strongly.
Based on current requirements, I expanded the ranges a little and “screwed up” a little more than was necessary for this case, but then I just got into a rage.
The idea was as follows: the developer in the scada-system constantly receives TK, where the main initial data for the formation of the project parameters database is a signal table. The signal tables themselves are mainly represented in structured formats (csv, excel, word, DBMS tables), of course, the temptation is to throw all this structured variety through a regular clipboard using the copy-paste method, which I did. Now, to quickly generate a set of project signals, you can simply copy the signal columns from the TOR directly to the scada project through the clipboard. Since some objects of equipment with their lists of parameters are often repeated, or there is a possibility of their repeated use in the future, the ability to import and export ready-made signal tables from the skad to XML files has been added. The format is simple so it can even be used for automated processing by third-party tools. In the signal table itself, a service has been created for group editing of parameters, dragging and dropping signals between sections, and some accompanying small service.
Considering that the processing of discrete signals is carried out in a pack in a packed form in the formats: byte, word, double word, long integer, for each discrete signal, you can pre-determine the group and its input number by USO, which will determine its bit number in this group.
In addition, for the convenience of analyzing flights on the project, when comments are received from the inspectors, the signal table received interactivity: each signal in the table, after automatically constructing the project parameters database, received a real link to the project component and even to the source of this signal in the project its hardware descriptor. This enables the developer to open the signal table, select the “problem” signal and quickly position in the project on the component that processes it. And already further it is possible to expand from this component with the standard transition functions for dependencies the entire processing chain of this component in algorithms, screens and inter-component communications, analyzing where and what has been done wrong and why it does not work.
As a result, having spent about a week of breaks in free time on developing such a service and debugging it, the apogee and triumph of technologies came: the initial project in the SCADA system was assembled absolutely from scratch using the existing TK, with the generation of output forms of documentation indicating registration system parameters accurate to bits with full comments, names and more, in just 1 hour of work in the scad! Only the parameter address cards for the project in HTML format on both areas (HEX and FLOAT) weigh almost a megabyte. All this was immediately handed over to the top-level developers, including the project itself, and the next day the result of a successful preliminary test was obtained.
The work on this, of course, is not 100% complete, however, a serious backlog has been made for the design and formation of standard developments for the future with standard solutions.
Just last week I returned from this facility, where in 1.5 days I combed the current version of the project and launched it! Voila, you can jump over your head.
Now, according to the results, I supplement the scada with a service for quick replication of text components from signal tables to dictionary logs, graphics, because the signal text is a kind of information parameter that is somehow used in the project, so why fill it with pens every time, if it is already in project as a resource?
As an example, I also sketched a short video on this technology:
Okay, I’m going to round off, but I wanted to do it a little, but it turned out as always - some kind of informational diarrhea, which gives me no peace of mind or brain during the coding process.
Thank you for your attention to those who read to the end. But, I assure you, this is not the end, I’m more and more convinced that this is only the beginning ... I read literature, write, implement and many process control system developers have already started working and testing my system in relation to their tasks, which is only good for her! See you soon on Habr and not only!
I continue the cycle of my articles, the previous one is here .
The farther into the forest, the thicker the partisans, and the time in days is less and less. But despite the peculiar overload, I still stubbornly continue to improve and apply my indefatigable imagination with engineering ideas to my brainchild, which I’ve thoroughly hooked on. To date, 5 real objects have already been made and implemented on my system, three of which were made by curious third-party developers who were interested in touching the system in action. Although their volume is not so great, but still this is something, the reference is growing. I myself, without exchanging small things, like the one that needs the most, climb into the thick of it - the result of which has already become two major developments in my area: 3,000 I / O points (the system has been working for almost half a year and has now gone into commercial operation ) and here's the recent one at 5500.
Let's start with progress, which, as you know, does not stand still. Another impetus to the thought of “is there life on Mars” was just a system with 3,000 points, where there are already 3 automated workstations in the control room based on my scad. And where is the dispatcher - there are always pictures.
Having played enough with the capabilities of GDI + in terms of graphics, I still gave them what they wanted to see, and having launched the system at the facility for commercial operation, I came to the point that the customer, as an operating person, desperately needed documentation in the form of a “user manual ". The customer was meticulous and asked to provide him with a very detailed version of such a manual, where there would be all possible forms of on-screen mnemonic diagrams of this system. “Yeah, the men said” and started to take a screenshot of them ... Ha, it’s not so simple, somewhere on the 50th screen I felt sick from such a routine, and their constant “let’s fix it here” all the time changed these forms and they had to Screenshot in a new way, modifying the preliminary document for approval at the top. I had to sculpt a specialized runtime function, by which he automatically generates ALL screen forms on the machine in the form of image files (by the way, then I want to use the convenient office MS Word format to automatically collect the manual itself in the necessary SNIP). And so, when the runtime was thought out at the system output and produced 390 screen forms, I was a little sick of the thought that the CPU is not rubber, and GDI + is certainly simple and convenient, but we should already think about modern digital technology bonuses and hardware acceleration options for the video system, and you see, exorbitant appetites of prettiness can soon completely devour the performance of modern processors on such decisions. An additional kick for this was also the remarks of outside observers: “uh, why is CPU loading on the workstation almost always 60-80 percent?”. It’s possible to explain that the processor was created in order to work.
So - armed with thoughts that I was hooked on .Net thoroughly, I began to dig up information, and what modern technologies can offer me. And it began: pathetic attempts at DirectX, OpenGL, and some paid engines based on them to simplify the process for the end developer. As a result, everything was not right - either I didn’t go skiing, or I - ... Well, I’m not a guru in programming at such levels, it was a shame.
In general, I decided that sooner or later, but I still have to touch the WPF technology and work in the XAML format. I felt ... Some horror, I “swallowed” the first WPF and XAML book in 1000 pages in a train for a week, I never read an artist like this in my life. And under the impressions of what he learned in 3 days, he managed to throw a prototype of his new editor of FBD algorithms. Honestly, the first three days I was bursting with a little from the fact that I had not done this before. I was very impressed with the capabilities and technologies, probably as a schoolboy from the first-ever read of a fantastic work of a world classic. But what struck me most was how close I came to this technology when I "invented" my own graphics engine for my scad using DGI + and XML format. Many moments with us with small ones turned out to be almost one to one prototypes from one drawing. Already, even some engineering pride shod.
Without hesitation, I began to study the possibilities of creating a runtime for the current version of my scada, but already with hardware graphics acceleration and additional features of XAML and WPF. Now we’ve got some prototype of the viewer, which allows me to easily open in approximate form the screens of my current skad format and port them on the fly to XAML, and from here the possibilities for sharing the development of the graphical interface are not created by an automaton, but by a real designer in real professional systems . I’m actively trying to work in this direction with Microsoft Expression Blend (it’s used in the videos below).
Along the way, I decided to create the third version of my Modelist technological system for modeling technological objects (from which, by the way, my current FBD editor of algorithms in the box grew), I use it actively to develop the project and its algorithmic part on the test site before sending it to the object. Being in previous versions helped me set up systems without visiting the facility at all, and then started on the facility with a minimum of improvements and twitches of the technology itself. If interested, I can give real-life examples where saving time was truly colossal, and the object itself simply would not have allowed experiments on itself live because of its danger.
Now the new Modeller’s system will be finalized as a regular external debugger for my current version of the scada, it will allow you to connect via the network to a working project under debugging executive modules and in real time replace the current system parameters with a model that the developer himself can also create and debug in runtime mode violating the project itself and not stopping it. This method is now very actively used by us at the training ground to run all our decisions before sending to the object.
It looks something like this (clickable): According to the graph, some of the experiments with the viewer and the hood are:

And here is a little according to the new Modeller:
The truth here is a very early 3-day version, now it has already matured a little and can do more than on the video.
It is noteworthy that the size of the application, which is only 100KB in the video, is somehow not even solid for modern scada systems.
Those who are especially interested — even posted this version on one of the forums on trial, especially pleased with the only comment: “Now I understand why the Germans lost the war.” By the way, he was also the only one, for some reason the people were either too lazy to watch, or there was simply nothing to say after that.
But the graphics are graphics - and I also try not to forget about services. At the beginning of June, another interesting situation arose that prompted me to include in my skad more advanced work with project signal tables, or rather, to perform a project development service according to the initial data of the ToR.
A little background: they come to me on May 31 from TK on one system in which 5500 I / O points, the benefit is a system without graphics, BUT - the source nodes of the system are gateways for a very large project on another platform that does not know how to work with iron , which is presented below, but mine can. And you need to work with the bottom-line equipment through the built-in drivers, but with the top skad you should already work on ModBus TCP / IP exchange over the network, that is, full support for ModBus TCP / IP Slave mode.
Well, you don’t need to draw screens, you just need to configure all this in the project and prepare documentation for the address spaces using the ModBus TCP / IP protocol for top-level developers.
It seems like a feasible and simple task, but, again, this is the BUT:
1) In terms of deadline, they reached the point that the system should be shipped to the object on June 10th !!! And not just shipped but also finished, that is - working!
2) In TK, all materials, including signal tables, are presented in PDF format, which is also closed with a password. I HATE designers working in PDF (how many I do not work, all the time this format only causes braking in the development process)! At least once, they would be forced to make their own systems according to the documentation presented in this format.
3) Since the system is a gateway, the top-level developers are sitting idle, because they need documentation on gateways with registering each parameter according to ModBus, without it, the top level cannot be completed and launched.
In general, the conditions are funny ... To my question, “where were you before and why did you delay the project?” they just spread their hands and began to start old songs about the main thing ...
Okay. I sat down and thought and realized that the first thing to do was pull all this information into the project. However, 5500 signals to beat with pens according to visual documentation in PDF - the monkey will have to work and there will be many such monkeys, but there are none, like time. An attempt to go through the PDF reader gave a cool document, where the names are like those, but sometimes not the same ones, for example, the current designation "I" somewhere turned into the symbol "1". And all these little things greatly spoiled the general structure of the received text, and again there is no time to edit it. About scraping the password with the utility, the idea also did not take root. And then I got the idea to finish the mechanism of working with signal tables, which I already put in some form in the developer's environment. Well, as they say, "Valera, it is your time!" (from)
There were 10 days ahead and quite a bit of free time, as well as the main rule from the well-known cartoon: “It is better to lose a day, but then fly in two hours!”. And “flying” along a similar route with typical solutions ahead loomed very strongly.
Based on current requirements, I expanded the ranges a little and “screwed up” a little more than was necessary for this case, but then I just got into a rage.
The idea was as follows: the developer in the scada-system constantly receives TK, where the main initial data for the formation of the project parameters database is a signal table. The signal tables themselves are mainly represented in structured formats (csv, excel, word, DBMS tables), of course, the temptation is to throw all this structured variety through a regular clipboard using the copy-paste method, which I did. Now, to quickly generate a set of project signals, you can simply copy the signal columns from the TOR directly to the scada project through the clipboard. Since some objects of equipment with their lists of parameters are often repeated, or there is a possibility of their repeated use in the future, the ability to import and export ready-made signal tables from the skad to XML files has been added. The format is simple so it can even be used for automated processing by third-party tools. In the signal table itself, a service has been created for group editing of parameters, dragging and dropping signals between sections, and some accompanying small service.
Considering that the processing of discrete signals is carried out in a pack in a packed form in the formats: byte, word, double word, long integer, for each discrete signal, you can pre-determine the group and its input number by USO, which will determine its bit number in this group.
In addition, for the convenience of analyzing flights on the project, when comments are received from the inspectors, the signal table received interactivity: each signal in the table, after automatically constructing the project parameters database, received a real link to the project component and even to the source of this signal in the project its hardware descriptor. This enables the developer to open the signal table, select the “problem” signal and quickly position in the project on the component that processes it. And already further it is possible to expand from this component with the standard transition functions for dependencies the entire processing chain of this component in algorithms, screens and inter-component communications, analyzing where and what has been done wrong and why it does not work.
As a result, having spent about a week of breaks in free time on developing such a service and debugging it, the apogee and triumph of technologies came: the initial project in the SCADA system was assembled absolutely from scratch using the existing TK, with the generation of output forms of documentation indicating registration system parameters accurate to bits with full comments, names and more, in just 1 hour of work in the scad! Only the parameter address cards for the project in HTML format on both areas (HEX and FLOAT) weigh almost a megabyte. All this was immediately handed over to the top-level developers, including the project itself, and the next day the result of a successful preliminary test was obtained.
The work on this, of course, is not 100% complete, however, a serious backlog has been made for the design and formation of standard developments for the future with standard solutions.
Just last week I returned from this facility, where in 1.5 days I combed the current version of the project and launched it! Voila, you can jump over your head.
Now, according to the results, I supplement the scada with a service for quick replication of text components from signal tables to dictionary logs, graphics, because the signal text is a kind of information parameter that is somehow used in the project, so why fill it with pens every time, if it is already in project as a resource?
As an example, I also sketched a short video on this technology:
Okay, I’m going to round off, but I wanted to do it a little, but it turned out as always - some kind of informational diarrhea, which gives me no peace of mind or brain during the coding process.
Thank you for your attention to those who read to the end. But, I assure you, this is not the end, I’m more and more convinced that this is only the beginning ... I read literature, write, implement and many process control system developers have already started working and testing my system in relation to their tasks, which is only good for her! See you soon on Habr and not only!