A prototype CACSD tool: the FBCad environment
Programs for distributed measurement and process control systems are often coded with custom software, since execution speed is preferred to portability, reusability, formal analysis. As a consequence, the development of reusable high-level software components is not encouraged. The FBCad (Functional Block Computer aided design) environment is a component-based programming system, based on the development of reusable FBs, that supports the design, the simulation and the run-time code generation for distributed control systems.
The main issues of this section are :
FBCad is developed for 32-bit platforms (Windows NT 4.0 or '95). The tool is basically divided into two main parts: one for the definition of new FBs and the library management, and one for the editing and code generation. Most of the functions of the first part are coded using the Powersoft Power++ programming environment, which is a RAD (Rapid Application Development) C++ object-oriented environment. The graphics engine of the second part of FBCad is left to a commercial CAD package (Visio Technical), with which FBCad establishes a client-server relationship. The interactions between FBCad and Visio are implemented through the OLE (Object Linking and Embedding) technology. Visio graphical objects are bi-dimensional, and can be structured on multiple layers. Documents can be saved in many different file formats. The use of OLE technology assures an easy and powerful way to upgrade FBCad, even towards different graphical packages. Fig. 1 is a screenshot of FBCad work environment.
Fig. 1 - FBCad & Visio work area
FBCad models and differences with the IEC 1499 standard proposal
The basic building block of FBCad is the FB, discussed in previous sections. As formerly discussed, the composition of FBs to be implemented on the same control system device defines an application module, while an application is the composition of one or more application modules, to form a distributed control system function. The FBCad environment defines new FB features with respect to the IEC 1499 standard:
In particular, in FBCad an application module is defined as a set of FBs connected on a sheet of the CAD. From the FBCad point of view, a generic industrial-process measurement and control system is a hierarchical set of application modules associated to devices. The devices are interconnected by a network, that supports the most common communication structures like message passing, shared memory, interrupts and analogue signals. A device can execute more application modules, for example reserving a slice of its CPU time for each of them (time sharing).
The main functions of FBCad are:
· the fully guided definition of new FBs using FB Builder (fig. 2);
· graphical definition of the ECC using ECC Editor (fig. 3);
· the management of a standard library, and of many other private libraries of various projects;
· the editing of applications, with the most common editing functionalities (automatic line drawing, the structuring of applications on different layers with customisable characteristics, etc.);
· the auto-documentation, with cross-linking among I/O variables of different pages;
· automatic code generation for a target control architecture and for simulation.
Fig. 2 - Function Block Builder
Fig. 3 - ECC Editor
In detail, FBCad supports the user during the control system ARM definition, through advanced graphic interfaces of the MS Windows environment. In particular, starting from the FRM, FBCad helps the user in defining, in a structured way, the algorithms, the FBs, the module applications and the applications, which describe the low-level and the high-level control system parts. Algorithms, FBs, application modules and applications are defined by using general-purpose algorithms, FBs and application modules taken from the environment libraries, and/or custom algorithms, FBs, and application modules. Service interface FBs are also supplied to interface actuators, sensors and communication networks. In particular, the IEC 1499 standard encourages system vendors to supply service interface FBs to interface their devices with standard FBs, in order to improve the portability of applications. When all modules of all applications are ready and checked by FBCad, the system can be configured, by defining a set of devices and filling up their attributes.
Analysis, simulation and animation
FBCad supports the user also during the complex phases of analysis and verification of a design. The specific functions performed to this aim are:
· strong data type checking at design-time;
· formal analysis on applications (not yet implemented in FBCad) [CARFER98];
· definition of simplified models for the controlled process;
· execution of the control code;
· animation of the events exchange among FBs during simulation for an active insight of scheduling algorithms;
· animation of the simulation results, through a suitable 3D graphical environment previously developed [GENZAG97].
Basically, the process under control is modelled as one or more application modules. In particular, the definition of FBs has been slightly modified so as to allow the simulation of the process under control. The process can be continuous-time, discrete-time, discrete-event, or even hybrid.
As for control application modules, apart from the communication libraries, the control code used in the simulation is exactly the same of the one actually used in the control implementation. As a consequence, what is tested is the behaviour of the actual control code (including synchronisation mechanisms, virtual parallelism among FBs within an application, virtual parallelism among application modules within an application, and "wait" functions), and not the behaviour of a simplified model of the control code, as it is often done in other common simulation environments.
In order to reproduce realistic experiment conditions, each application module (including control ones) is characterised by a relative index of calculus speed.
FBCad can automatically generate the C++ source code for the simulation of the entire system, (robot and control system). Moreover, the control code for a C++ virtual machine, can be automatically generated. This source code can be compiled with a generic C++ compiler on any platform, provided that suitable driver libraries are available.
Back to Main Index ---- Last update : 22 Jan 1998 ---- Creator : Roberto Fabbri