04.30
11

Home automation hardware Handyman (Part 2)

by admin ·

Once described in the first part of this loose series of articles, such as a small project to control an external hardware can be installed, is explained in part two a little lower are entered into the OpenAPC software.

The aim here is to set up a software structure, which is also particularly suitable for larger and more complex control tasks. Is also to be shown how to control such a system using the built-in scripting capabilities of the software package can be.

Updates and their consequences

But first a little review on the first part of the article required. Here, using the version 1.2 of the OpenAPC visualization software, a project was created for shutter control. With the release of this new article to the current version 1.4 has become the software has undergone some changes that have taken in the context of bug fixes and minor functional differences with him. On the project described here the changes were fortunately no influence, but unfortunately it can happen again and again that a project requires the original version of such a software error in order to function properly, according to a later update to just to cause problems.

So annoying, these incompatibilities are so common they are, unfortunately, even for business: it is necessary for software updates in all cases, regression tests carried out with existing projects in order to check whether the software is still working just as you would expect. And often it is just related to the reason why the industry uses very old versions of a specific software on their machines: just because it is ensured only with this version is that the systems still work as desired.

It is common practice to fix software bugs and errors genuine manufacturers, even if it can change the behavior. However, with new features meticulous attention to the fact that the behavior does not change compared to the previous versions. And who uses very large numbers of software that the manufacturer can of course also express special requests. It will even go so far as the bugs are not corrected for specific customers explicitly to retain the old behavior.

Control by script

But after this trip to the (problem) world of professional automation back to the visualization of the shutter control. In the following, the existing project a little to be expanded. So shall the place of the ToggleButtons for switching the shutter button for easy now “high,” down “and” Stop “are used, which are no longer an editor created in the flow control block diagram, but via an external script.

The user should be in the future just press one of three buttons just to trigger an action that monitors the complete script here the state and controls the outputs of the parallel port according to the last user action.

The OpenAPC software brings script interpreter with two: one for Lua , an be learned easily and beautifully structured language, and one for instruction lists (Instruction List, IL), a simple, assembler-like language, which from the world of automation and programmable logic controllers ( SPS / PLC) is known, where it is used frequently.

However, it is – what at first a little surprised – not possible to run these scripts directly in the vicinity of the open player. This is a detour through an additional element necessary to the so-called “interlock” server. This instance serves as a central communications and interface between all components to work together, the open player in a project may have. In other words, one is not dependent on a single instance of a script interpreter, but it is more complex systems actually possible to treat some aspects of control in separate scripts. This increases the clarity and maintainability of a project enormously.


But now to the practical implementation of the project. Since the previous shutter control is not all too complex and the changes to make something larger, it is worth it at this point definitely to set up a completely new project. Here, first a few global settings are necessary, which are made ​​in the dialogue project, which means the menu File – Open Project settings can be>. This offers some possibilities to adapt the project. So here, the size of the window chosen in the later are the controls, as well as its background color. Other parameters such as time-out for control flow and timers are accurate only for projects of interest, where the logic control flow editor block diagram is taken over one of (what no longer be the case is indeed the first time here in this example).

Interestingly, it is again with the option External Applications Server interlock use, however. Here is the above-mentioned central communication body which is required if external scripts should be used. This option is therefore to activate.

Furthermore, it is still an interesting configuration option for touch screens: if this option is activated, the software automatically takes care of ensuring that the user can enter text and figures, even if it has no keyboard. As soon is selected in the open player a corresponding input field will open an on-screen keyboard, with the text and numbers can be entered through the computer screen, which are then automatically incorporated into the appropriate input box.

Tags: , , ,

Leave a Reply