📜 ⬆️ ⬇️

As I wrote to the skad. Part three

Good evening all over 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 the day is less and less. But in spite of the peculiar overload, I still persevere in improving and attach my indefatigable fantasy with engineering thoughts to my brainchild, which I have already thoroughly sat down on. At the moment, 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 feeling the system in action. Although their volume is not so great, but still it is already 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 on my scale: 3000 I / O points (the system has been running for almost half a year and has now gone into commercial operation ) and here is the recent 5500. But about all the innovations just below and in the text ...

Let's start with progress, which as we know does not stand still. The next impetus to the thought “is there life on Mars?” Was just a system with 3000 points, where there are already 3 AWPs in the control room at my base. And where is the dispatcher - there are always pictures.
Having played enough with the GDI + capabilities 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 approached the moment that the customer, as an operator, became needlessly required documentation in the form of a “user manual ". The customer got meticulous and asked to provide him with a very detailed version of such a manual, where there would be all possible forms of screen mimics of this system. “Aha, the men said,” and began to take a screenshot of them ... Ha, it's not so simple, somewhere on the 50th screen I felt sick of such a routine, and their permanent ones “right here let's correct” all the time modified these forms and they had to be screenshot in a new way, modifying the preliminary document for approval at the top. I had to sculpt a specialized runtime function, according to which he himself on the machine generates ALL screen forms in the form of image files (by the way, then I want to use the convenient format of the MS Word office, in order also to automatically collect the manual itself in the required SNIPe). And when, at the output of the runtime system, I thought and gave out 390 screen forms, I got a little popheloh from the thought that the CPU is not rubber, and GDI + is of course simple and convenient, but you should already think about modern digital technology bonuses and hardware acceleration capabilities for the video system, but then you see, the exorbitant appetites of the beautiful can soon on such solutions completely devour the performance of modern processors. An additional kick for this was also made by outside observers: “uh, and why is the CPU load on the automated workplace almost always 60-80%?”. Explain that the processor was created in order to work — it is possible, but still it must not only be oriented towards the graphics, even if it is the operator’s workstation.
So - armed with the thought that I was thoroughly addicted to .Net, I began to dig information, and what can modern technologies offer me? And so it began: the miserable attempts of samples from DirectX, OpenGL and some paid engines based on them to simplify the process for the final developer. As a result, everything is not right - either I didn’t drive skis, or I - ... Well, I am not a guru in programming at such levels, it became offensive.
In general, I decided that sooner or later, but I still have to touch WPF technology and work in the XAML format. I felt ... Horror of some kind, I first swallowed the first book on WPF and XAML in 1000 pages in a train in a week, I never read an artist like that in my life. And under the impressions of what he studied in 3 days, he managed to distribute the prototype of his new editor of FBD algorithms. To be honest, for the first three days I was already bursting with a little because I hadn’t done it before. I was very impressed by the possibilities and technologies, probably as a schoolchild from the first-ever read fantastic work of a world classic. But what impressed me most was how close I got to this technology when I “invented” my own graphics engine for my DAD and DXI + format. Many of the moments with small-scale we turned out to be almost one in one prototypes from one drawing. Already, even some engineering pride was blasted.
Without hesitation, I started exploring the possibility of creating runtime for the current version of my game, but with hardware accelerated graphics and additional features of XAML and WPF. Now I’ve got some prototype of the viewer, which allows you to easily open the screens of my current format, scans and port them to XAML on the fly, and this opens up the possibility of separating the development of a graphical interface not by a machine gunner, but by a real designer in real professional systems for that purpose . I am now actively trying to work in this direction with Microsoft Expression Blend (it is he who is used in the videos below).
Along the way, I decided to create the third version of my modeling system technological object Modelist (from which, by the way, my current FBD editor of algorithms grew in the scape), I use it actively to work out the project and its algorithmic part on the test site before being sent to the object. While still being in previous versions I helped me set up the system without visiting the facility at all, and then run on the site with a minimum of improvements and twitching of the technology itself. If it is interesting, I can give real examples where time saving was truly enormous, and the object itself simply would not allow experiments on itself alive because of its danger.
Now, the Modelist system will be improved as a regular external debugger for my current version of Scuda, it will allow you to connect to the running project via the network under debugging execution modules and in real time replace the current system parameters with a model that the developer himself will also be able to create and debug in runtime mode. breaking the project itself and not stopping it. This method is now very actively used by us at the site to drive all our decisions before being sent to the site.
Looks like this (clickable):
image

Graphically, some of the experiments with the viewer and blend:



')
And here is a bit of a new Modelist:

The truth here is a very early version of the 3-day, now it is already a little matured and can do more than on the video.
It is noteworthy that the size of the application, that on the video is only 100 KB, is somehow not even solid for modern scada systems.
I was particularly interested - I even put this version on trial at one of the forums, I was especially pleased with one of the comments: “Now I understand why the Germans lost the war.”. By the way, he was the only one, for some reason, people were either too lazy to watch, or simply there was nothing to say after that.


But graphics are graphics - and I also try not to forget about services. At the beginning of June, another interesting situation arose that pushed me to include more advanced work with the project signal tables in my project, or rather, perform the project development service based on the initial TK data.
A bit of background: they come to me on May 31 from TK to one system, in which there are 5500 I / O points, since the system is without graphics, BUT - the original nodes of the system are gateway for a very large project on another scale that does not know how to work with hardware , which is presented below, and mine - is able. And you need to work with the low-end equipment through the built-in drivers, but with the top scud, you can exchange ModBus TCP / IP over the network, that is, full support for ModBus TCP / IP Slave mode.
Great, you don’t need to draw screens, you just need to configure all this in the project and prepare documentation for address spaces via ModBus TCP / IP protocol for top-level developers.
It seems to be a feasible and simple task, but, again this is BUT:
1) The deadlines reached the point that the system should be shipped to the site on the 10th of June !!! And not just shipped but ready, that is - working!
2) In the TOR, all materials including the signal tables are presented in PDF format, which is also covered with a password. I HATE designers working in PDF (how many I do not work, all the time this format causes only braking in the development process)! For once, make them make their own systems for documentation submitted in such a format.
3) Since the gateway system, the top-level developers are out of work, because they need documentation on the gateways with registering each parameter on ModBus, without it, the top level cannot be completed and not started.

In general, the conditions are funny ... To my question “where were you before, and why did you delay the project so much?” They just threw up their hands and began to get old songs about the main thing ...

Okay. I sat down and thought and realized that the first thing to do was to pull all this information into the project. However, 5500 signals to beat with pens on the visual documentation in PDF - monkey work and such monkeys will need a lot, but they are not, as well as time. Attempting to go through the PDF reader issued a cool document, where names like those, and sometimes not, for example, the current designation "I" somewhere turned into a symbol "1." And all these little things badly spoiled the general structure of the received text, and again there is no time to edit it. About the scrap password utility, too, the idea did not catch on. And then I got the idea yet to finish the mechanism of working with the signal tables, which I have already laid in some form in the developer environment. Well, as they say "Valera, it's your time!" (C)

There were 10 days ahead and quite a bit of free time, as well as the main rule from the well-known cartoon: “It's better to lose a day, but then in two hours to fly!”. And “fly” along a similar route according to standard solutions loomed very much ahead.

Based on the current requirements, I expanded the ranges a bit and “screwed” a little more than was necessary for this case, but then I just went into a rage.
The idea turned out to be the following: the developer in the scada-system constantly receives TK, where the main initial data for forming the base of the project parameters is the table of signals. The signal tables themselves are mostly represented in structured formats (csv, excel, word, DBMS tables), of course, there is a great temptation to throw all this structured diversity through the usual clipboard using the copy-paste method, which was done by me. Now, to quickly generate a set of project signals, you can simply copy the signal columns from the TK directly to the project via the clipboard. Since some equipment objects with their parameter lists are often repeated, or there is a possibility of their repeated use in the future, the ability to import and export the ready-made signal tables from Scud to XML files has been added. The format is simple, so it can even be used for automated processing by third-party tools. The signal table itself contains a service for group editing parameters, dragging signals between sections and some accompanying minor service.
Given that discrete signals are processed in a scaled packaged format: byte, word, double word, long integer, for each discrete signal, you can pre-define the group and its input number using the OCR, which will determine its bit number in this group.
In addition, for convenience of debriefing on the work of the project, when comments come from the reviewers, the signal table received interactivity: each signal in the table after the automatic construction of the database of project parameters for them received a real link to the project component and even to the source of this signal in the project its hardware descriptor. This allows the developer to open the signal table, select the “problem” signal and quickly position in the project on the component that processes it. And from then on, it is possible to unwrap the entire processing chain of this component in algorithms, screens and intercomponent connections by analyzing where and what is done wrong and why it doesn’t work.

As a result, having spent about a week of free time for developing such a service and debugging it, the apogee and triumph of technologies came: the original project in the SCADA system was built from scratch using the existing TK, with the generation of output forms of documentation containing registration system parameters with bit accuracy with full comments, names and other things, in just 1 hour of work! Only address maps of parameters for a project in HTML format for both regions (HEX and FLOAT) weigh almost a megabyte. All this was immediately transferred to the top-level developers, including the project itself, and the next day the result was obtained on successful preliminary testing.

The work on this is of course not completed 100%, but a serious groundwork has been made for the design and the formation of typical developments for the future on typical solutions.
Literally, last week I returned from this object, where in 1.5 days I hairstyle the current version of the project and launched it into work! Voila, it is possible to jump over the head.
Now, according to the results, I supplement Scud with the service of fast replication of text components from the tables of signals to dictionary journals, graphics, because the signal text is a kind of information parameter that is used in one way or another in the project, so why should it be filled with pens each time if it already has project as a resource?
As an example - also sketched a small video on this technology:



Okay, I will wrap it up, but I wanted a little, but it turned out as always - some kind of informational diarrhea, which does not give me peace of mind for my hands in the process of coding.

Thank you and 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 already many developers of automated process control systems started to work and test my system for their tasks, which is only good for it! See you soon on Habré and not only!

Source: https://habr.com/ru/post/150196/


All Articles