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.
(more…)