The ep5 Educational Broadcasting Foundation

education in technology for schools and public broadcasting

ep5BAS — What It Is

What is ep5BAS, and why should you care? Good question . . . we're glad you asked.

Two more industrial autoclaves built by the author and controlled by PCs running programming in C.
(Left) Made parts for the F-14; (right) repaired Boeing airliners.

Just what does it do?

ep5BAS at first glance is a general-purpose building automation system, hence the name. It exists as a collection of source code intended to be used by C# programmers as starting points for fully customized and unique applications.

Available as both individual modules and complete applications, this code will be available to all as full Visual Studio solutions. The modules will demonstrate the practical usage of specific capabilities, such as scheduling lights-on and lights-off across an entire week. The full applications will give users examples, from which they can take what they find useful, of typical programs used to automate previously manual processes.

Unlike run-of-the-software-mill varieties of BAS, this one is whatever the programmer wants it to become. It can be used, via modification of existing code, to accomplish almost anything, limited by the developer's skill level and the objective for which the program is created.

Think of it as a cookbook or diner menu: you choose what looks useful from the various modules, programs, and solutions, and revise them as needed. It will be up to you to decide if ep5BAS is more a learning environment or a production resource.

Among the skillsets which the ep5BAS project needs to develop and encourage is one critical for beginners, neophytes, and the easily confused: how to find detailed and on-point information specific to what the programmer is doing, right here and right now.

Where did it come from?

It's a combination of several worthwhile objectives. It arose initially as the central project in "The Art of Programming", an educational series proposed for both the Internet and high schools throughout the English-speaking world. After a modest amount of preparatory work, we realized that this was the archetypal open-source project. It utilizes one of the most universal and useful of programming languages; it has an abundance of educational capability; and it contributes something of genuine economic value in an enormously wide variety of fields. From residential to commercial to full-on industrial applications, a general purpose automation resource boasts undeniable applicability.

Where is it going to?

ep5BAS will consist of a constantly expanding number of full programs. Each will be made up of modular components designed to give full voice to the concept of code reusability. From the design of the code to its documentation, each program or module can be used either as it is or as a template or prototype or example to be modified or rewritten to do what the particulars of the moment require.

For teaching how to do something without having the teacher standing right there, alive and attentive, the best thing will always be a jolly good example, with no details omitted to save paper.

We have not yet selected the optimal open-source license model, but we categorically guarantee that ep5BAS, in its entirety, will be available at no cost and with as few strings and constraints attached as good judgment requires. Naturally, ep5BAS code and all services will be supplied AS-IS, with a total disclaimer of liability.

What does it cost?

Nothing.

What does it run on?

ep5BAS is software, and software is nothing without the hardware platform which supports it. Industrial control encompasses a vast range of devices and technologies, and no system ought be asked to do all things. Thus, ep5BAS will begin as programming for desktop computers connected to comparatively simple I/O. This will mean – at the low end – the 8255 PPI Mode 0 TTL DIO model for strictly localized control of real-world systems having tens to, at most, a very few hundred digital I/O points, and – at the high end – three fieldbus technologies for systems with centralized control of local and distant I/O arrays of hundreds of digital, analogue, and other I/O points, or more.

LattePanda 3 Delta

Initially, ep5BAS will be written for Windows 10 running on 64-bit hardware. This will include conventional desktop computers, their hardened industrial equivalents, and the more powerful of the postcard-sized SBCs, such as the LattePanda 3 Delta and, for more demanding applications, the Sigma. Users will be encouraged to expand the range of compatible hardware, doing the appropriate testing on their own, in the tradition of open-source software.

As the 8255 approach suggests itself for the more modest all-digital installation, we have opted to focus on simple, off-the-shelf hardware, preferably relying upon external hardware such as USB devices, rather than PCI and PCIe cards inside the computer. In some instances, this external I/O processor may be connected via Ethernet. In all events, the I/O processor will utilize its own driver software, called by the C# program as necessary. This yields the very simplest, easiest, most straightforward means of communication with the real world. This processor, whether a bare circuit board or a DIN-rail-mounted enclosure, connects to the I/O racks by means of 2-inch, 50-conductor flat cable. The digital I/O points are read and written via 8-bit ports, each bit in a single byte representing one channel of digital I/O.

For more involved, more flexible, larger installations, we will focus on three fieldbus technologies, connected to the control computer generally by Ethernet and, as required, by an RS-485 serial link. These are Modbus, EtherCAT, and BACnet. Modbus has a long history of use, especially in industry, and works on serial connections for limited implementations, and Ethernet, for higher performance. EtherCAT has technical advantages over older technologies and represents a better choice if looking forward or not requiring compatibility with old systems. BACnet will be the best choice in applications involving building automation in which the computer will need to connect directly to building systems, such as HVACR.

Given ep5BAS's objective of being a general-purpose automation tool, we see the primary application methodology to be Ethernet connection via EtherCAT to fieldbus couplers with connected I/O located throughout the installation, even to the extent of fibre-optic links for distances of up to twenty kilometers (twelve miles). Fieldbus couplers offer the greatest flexibility and the fewest limitations in using digital, analogue, and other I/O types as required by the unique circumstances of the installation.

Okay, what is it not?

Mostly, ep5BAS is not to be used in applications or circumstances involving safety of life and/or property.

ep5BAS certainly is not an application generator. Unlike some of the proprietary software provided with industrial or commercial control system hardware, it does not enable the user to plug in his specifics and get a working program back, one which runs solely on the vendor's hardware.

Rather, ep5BAS is, in a sense, a “cookbook” approach to applying the incredibly powerful C# language to a broad range of real-world situations.

It will not be intended for use by those completely unable to write C# code, yet, tangentially, some of its purpose will be to help those with no programming ability of any kind to develop such a skill. It is simultaneously a learning tool and a working tool.

What criteria drive ep5BAS?

  • Designed for ease of use, specifically in the writing of the most reliable code possible
  • Full compatibility with all major (and even some minor) fieldbus standards, ensuring maximal operability in the real world
  • Optimized for reusability and clarity rather than for efficiency or speed
  • Sufficiently diversified to accommodate the greatest feasible range of applications and hardware
  • Usable at the lowest reasonable cost . . . but never with the penalty of consumer-grade cheapness