Introduction from Steve Jones, S4 Group Managing Partner.
We are always on the lookout for products and services that complement our own. In this case we found SWFTEC when searching for something else on the web. It caught my eye as something that our more sophisticated partners might be able to utilize in the process of extending and enhancing legacy Metasys® systems. We didn’t have an application at S4 to utilize GPG so we have not tested it ourselves. However, we invited Stephen Frey to be a guest author for a Gateway article explaining what GPG is and how it could be applied to Metasys® N2 devices. If you decide to jump in and try the product we would like to share your experiences with our readers. Here is what Stephan had to say.
The SWFTEC Graphic Program Generator (GPG) software is a general purpose tool for generating programs and other types of files from a diagram produced by placing symbols on the computer screen. It can be used for what is now called Function Block Programming. This typically uses symbols representing control program functions like signal selectors, PI or PID controls, math functions, switching functions, logic functions like AND, OR and NOT gates, time delays, analog and binary variables and analog and binary inputs and output points. Symbols are placed on the diagram and connected together using connector symbols to produce a diagram representing a control system. Here is a very simple example. The system can produce much more complex diagrams.
Diagrams such as this can be processed into a control program and loaded into a controller.
One of the main applications that GPG has been used for has been to produce custom applications for the Johnson Controls Inc. (JCI) Metasys® ASC line of N2 bus control devices. These are the VAV, UNTs and AHU controllers. Normally these are programmed using JCI’s HVACPRO or WinPRO software. This software uses a question and answer session to assemble a program that is downloaded to the controller. The applications are normally limited to the choices available in the software. The GPG WinPRO Application Builder allows the user to draw a unique control system and process it into a custom application that is added to the HVACPRO database so that it shows up as a program that can be selected just as any standard program and then downloaded into a controller. This eliminates the application limitations of the standard Q&A session. The Metasys® Application Specific Controllers are no longer application specific. I have used this tool in my controls work for decades with good results. The relatively low cost ASC controllers could be used to do anything and they have proven to be very reliable controllers. They have been used on large chiller plants, boiler plants, complex air handling units, pump stations, cooling towers and more. Unfortunately for this application JCI has obsoleted this product line. You can obviously use this tool to do more with the ASC controllers you already have but new controllers are no longer available. You can find used surplus ones online.
Being a general purpose tool, GPG can be used to program other controllers and produce other types of files from the diagrams produced. The output of the program is controlled by attribute files associated by name with the symbols on the diagram. The attribute files are text files that determine what is produced. By writing a new attribute file set and perhaps creating new symbols GPG can be made to do new applications. For example I have explored using GPG to produce programs for JCI’s FX series controllers, Arduinos, Parallax’s Propeller Chip, and MicroChip PIC Processors to name a few. I plan to use GPG as the programming tool for controllers I am designing.
The connection engine in the tool allows for very flexible drawing schemes. It can do more than just typical Function Block stuff. For example the symbols can be things like fans and coils and dampers found in Plant diagrams. I use GPG to produce the graphics I use in the User Interface.
Plant diagrams like this can be used for the user interface but can also be used to produce the control programs. Attribute files associated with things like dampers and fans and coils with valves can include the program code to actually control that object. The GPG connection engine allows connections to be formed between symbols even though there is no connection symbol, like a line, between them. So connections can be formed between the objects in a Plant diagram. This capability can be used to produce models and simulations of the system represented by the Plant diagram. Very powerful Model Based or Simulation Based Control Systems can also be produced in this way. This is a major paradigm shift from the HVAC controls of today introducing amazing, almost magical, capabilities. This capability can also be used to produce very powerful diagnostic and maintenance systems that utilize the plant diagram to understand the relationship of the objects. It can really know how the system works, explain problems, predict consequences and suggest solutions in a detailed way. So GPG has an interesting future ahead of it.
The history of the GPG tool might be interesting too. It started as a program I wrote for my TI-99/4A home computer back in 1981. The TI computer had the ability for the user to create 8 x 8 pixel characters. You could create your own symbols to use on the screen in your programs. I wrote a few games including a unique Tank War game using these user characters. I realized that the characters could also be symbols for math functions or logic functions, whatever. So my Graphic Program Generator tool was born to produce BASIC programs and FPUBASIC programs. FPUBASIC was a compiled tiny BASIC language that I wrote for JCI’s JC85 system FPUs. The FPU was a microprocessor based panel that just served as the I/O interface for the system’s minicomputer. I reverse engineered the firmware used in the FPU and modified it so that programs could be loaded and the FPU could then control systems on its own. I also experimented with the Plant diagram Model Based and Diagnostic stuff mentioned above using the TI computer and some home brew computers back in the 1980s. I moved the tool to the IBM PC and Microsoft BASIC world by just listing the programs to the TI computer’s serial port and capturing the text on the IBM PC. I then modified the code to be compatible with the slightly different syntax. Later on it became a compiled Quick Basic program and when Microsoft Windows and Visual Basic came out I did the Windows version. The program has seen several improvements over the years and is currently a Visual Basic 6.0 Program. It runs on Windows 98 through Windows 10. Well I think so. I haven’t actually tested it on 8.0 or 8.1 but I am using it now on Windows 10. Mostly I have used it on XP where JCI’s HVACPRO can function.
You can find out more about GPG on my little website, SWFTEC.COM. I haven’t updated the site in years but I plan to do so shortly. GPG can be purchased for individual use and it can also be licensed for use by other companies who wish to have a quick development path to a Graphic Programming tool for their own products.
Stephen W. Frey
Owner/Engineer SWFTEC, swftec.com, email@example.com