14 March
2008
Digg digg it  |  Slashdot slashdot.org  |  Reddit reddit  |  del.icio.us del.icio.us  |  Technorati Technorati

Some answers to the Devil Framework, the Universe and Everything.

Last week I've received an email with an interesting set of questions about the Devil Framework and I've learned that all email posted by our mail server is mysteriously considered spam by Yahoo!.

Let's start with a question from me: does any one know how to remove an IP address (X-YahooFilteredBulk: 66.139.77.213) from Yahoo's spam list?

Lets go on with the other question. (PS: I've not included the name of the person who sent the very interesting email for privacy reasons, but you know who you are. Thank you.)

First, the hard question. Is the release weeks, months, or years away?

Short answer: months (3 or 4, I hope).

Long answer: the product is finished and already operating at client plants, but it lacks enough documentation to make it usable for development by others except its creators (and sometimes we discover functionalities we have forgotten, shame on us). I'm working on it right now.

Now the easy questions. Are there any restrictions on the packages one can use in the plugins?

No, a plugin can install external libraries and extension of any. If you can build a wrapper to them, and you can legally use them, you can certainly add them to the framework using a plugin or a library module. Indeed almost all the system extensions (like SNMP, Ethernet/serial PLC interfaces, non-Qt widgets, etc.) are provided via plugins.

And no, the framework has no licensing restrictions against it.

What is required for resources to run the system? Memory? Hard Drive? Minimum CPU?

Off the shelf disk space usage is around ~100Mb for the server instances and ~120Mb for the client (size varies by platform distribution, with the Mac OS X one been the fattest of all with ~180Mb for the client).

For what concerns CPU and memory it really depends on what you are going to do with the framework.

More RAM you have the better: we have servers performing data mining jobs that require over 2Gb RAM for in memory data processing. Usually the server occupies a minimum of ~300Mb, the console a minimum of ~150-200Mb. Python is not very memory friendly and it tends to occupy large chunks of it before releasing any (anyhow it worths the trouble). Memory is cheep, buy as much as you can.

Any modern low-end single core CPU should be enough for basic data processing needs. As before, this depends on what you are going to do and how you are going to do it: Python is an interpreted language and for intensive data processing it requires more CPU cycles than, say, C: if you need top speed it's better to implement a Python wrapper around a C library. You can also take advantage of your shiny multi-core multi-processor system, despite the (in)famous Python GIL, using a simple module we have developed that lets you transparently run and query objects in separate Python processes.

Have you done any throughput tests? For the sake of discussion, if you had a system with 10 Collector nodes and 5 IceBridge Consoles, what is the order of magnitude for the number of events per second that could be handled.

When we made throughput tests for the Events sub-system we achieved ~3000-4000 events/sec per server node on old AMD Athlon 3200 CPUs. As always this depends on what you are doing on the collected events. Event pre-processing, post-processing and archival can drastically change performances (if you apply a Fourier transform on a set of events to generate another event that triggers some actions and is used for situations detection with other thousand of events, you can imagine that performances decrease a lot).

The IceBridge console has a different set of problems (and solutions).

The basic design concept around which the whole system is developed is that almost all event processing and manipulation has to be performed at the nodes nearest to the event source, with the upstream event flux containing only data meaningful to the "higher" layers.

An example may be useful: lets say we have a set of PLC that are queried by some Collectors managed by a central MCP server.

The Tags System is a plugin that implements "abstracted tags". If you are familiar with SCADA software like WinCC and friends you already know what tags are. Otherwise, just consider a tag as a "smart" variable that gets (and sets) some data from a "device", processes it, archives it (using multiple consolidation functions, time resolutions and retention time spans) and generates "update" events the are propagated to selected parents.

The Tags System is fully integrated into the Devil Framework 's distributed architecture, so you can query any tag from any console or parent node with code like "env.api.tags_system.tags_managers['PLC_1'].tags['auto_destruction_status'].get ()" or using one of the provided widgets.

We have created tag providers for PLCs, custom refrigerator devices, SNMP, Devil Framework's internal system monitor, custom Python code, etc. Creating a new tag provider is quite easy and you can do it in a hundred lines of code.

Could each IceBridge console handle 2000-5000 events per second? If one created widgets that monitored and displayed u to 20 pieces of data per object read from an attached device and then created a view with 200 of these widgets on it, would it bring the system to it's knees or would that be reasonable?

I've not done any test like this but I think that updating so much data would slow down things quite a lot (to say the least). As I said above it's really better to use the distributed system to perform the processing and to selectively query/be notified for/of updates.

Your blog entries describe the IceBridge Console as a viewer for data being collected and processed from the other nodes like a SCADA system or a Distributed Control System Console. Could you foresee any problems running that in reverse?

We already have widgets that can be directly binded to tags, so in example, you can have a slider connected to a tag and when you move it the tag value is updated (and the device connected to it either), an vice-versa.

Is there any reason that someone could not set up widgets that would allow a user to create a graphical model in designer mode and then have the Application Server send data based on that model out to the attached devices?

If you want to know if you can use the Views Editor to directly write something like ladder logic programs, no, you can't. But there's no technical limitation that prevents you to write a widget that lets you develop programs in ladder logic.

Otherwise, if you want to design a form that lets you edit a "production recipe" (tables with some data, flags, etc.) and apply it to to the Application Server and to some of the connected devices, there's no problem at all. Remember that from any console, if you have the right permissions, you can transparently make any call to any node of the system.


Category Devil Framework 
Posted by alex at 13:38 | Comments (3) | Trackbacks (0)
<< Atomic Batteries Included | Main | A reminder on how NOT to do software development. >>
Comments
Re: Some answers to the Devil Framework, the Universe and Everything.

Thanks for the update and the information. My questions were centered around the use of the Devil Framework as the basis for a low-cost, more friendly Distributed Control System (DCS). The problem I see with the current generations of process automation systems is that the low-cost PLC/SCADA systems take too much time to configure and maintain but still are not low enough cost to use in many applications. The integrated DCS's are easier to configure and maintain (not easy enough) but are way too expensive to use for many applications. I think there is a need for a system that a process engineer can configure. The engineer's only "programming" experience may be writing macros in Excel but he/she understands the process and the equipment inside out.

The engineer should be able to configure the process control system for a simple process by dropping widgets (pumps, valves, motors, sensors, loops) on a screen to draw a picture of process and then configuring those widgets to match the behavior of the corresponding devices. The set of graphic objects should have corresponding control objects that can be downloaded into the controller, history objects that can be downloaded to the history collection system, etc.

So, after "drawing" the process and downloading the system, the engineer should be able to switch to Run Mode and monitor the process and perform manual actions with no other configuration required. Is that too much to ask?

Posted by: Carl Lemp at March 14,2008 15:07
Re: Some answers to the Devil Framework, the Universe and Everything.

Carl, I understand what you are looking for, but I'm sorry to say that we can't do it right now. The idea is intriguing and you started hot discussions here at the office. Nothing prevents somebody to build a plugin for that, but I think it will be a really tough and time consuming piece of software to write. Some of the problems to solve would be:

- The design of the logic description language itself. Making it too simple will rule it out for the "usual" exception cases.
- Cross-compilation of the logic for controllers made by different vendors.
- Configuration management when you mix the system with what we have already implemented (if you use it to resolve more difficult cases).
- A large set of object should be written and tested to make it useful, a quite time consuming task.

And this are just the few I get out of my mind. The more I think about it the more I find problems or threadoffs. But I recognize that having a system like that at a reasonable price could make a really disruptive technology.

Posted by: Alex at March 14,2008 16:46
Re: Some answers to the Devil Framework, the Universe and Everything.

Alex,
I agree that if you are trying to build everything from one side, it would be close to imposible. I'm thinking more of prebuilt libraries where the libraries could be built up one project at a time. The first thing I would need is objects at each end point. That's what caught my eye about the Devil Framework. It looks like it has everything needed for the graphics end and it looks flexible enough to add the interfaces and properties needed to supply the required data at the other ends. Next I would need a PLC or controller that supports classes like DeltaV in the US or CodeSys in germany. There may be others as well (and I'd be happy to hear from anybody that knows about them). Finally, I need some kind of History object class. I have not looked into this yet but it's got to be the easiest end to build objects in. What I was picturing is a pre-built set of classes that are designed and already exist in each of their respective worlds. They are all designed to work with each-other so that when I drag a valve widget onto a display and then download the controller, the only work that has to be done is to instantiate an instance of the valve class in the control database and configure it based on the settings defined when the valve widget was created and configured by the engineer. Same thing, but easier on the history side.

I have worked with DeltaV for years and that system does a good job integrating the control system with the history system but the graphics is still tacked on as a separate system that has to be configured. In recent versions, they finally have real classes. I have not used CodeSys but, in DeltaV, when you create the class, you define the set of parameters that are necessary to configure an instance of that class. You can then create instances of devices by filling in rows of parameters on a spreadsheet and running a bulk-import to create the control objects.

So, when configuring the valve widget, I would see setting several set of parameters or, if the software was smart, it would set them for me based on some site specific rules. 1) Parameters that define the physical device (fail direction, timeouts, etc) 2) Parameters that define how the device should look on the display (color, size, rotation, etc) 3) Parameters that define the class to use in the control system and the properties of that class (I/O location) 4) Parameters that define what history should be collected from the device 5) Parameters that define the operator's interface to the device (faceplate and detail data). Some or most of that would be configured with default values when the widget class was created but could be over-ridden if necessary.

Some companies I have worked for have already created libraries of devices and Emerson provides a very basic set with the DeltaV system. For typical process industies, there are a dozen or so that need to be created. Yes, to be flexible, they become complex but, for a system integrator or a large user, they would only need to be created once and then maintained like you would maintain any other software.

If CodeSys or some other vendor provides, for low cost PLCs, the class type capabilities that DeltaV provides for their integrated system and I could interface the Devil Framework to CodeSys to create instances of objects from the library, wouldn't I be 80% of the way there? What am I missing (other than enough programming experience to realize how hard this is)?



Posted by: Carl Lemp at March 14,2008 23:57
Trackbacks
Please send trackback to:http://www.dlevel.com/blogs/alex/28/tbping
There is no trackback.