Line-base code – not so scary?

RC-Studio line base code

reliable controls logo line base code

Why discuss line-base code?

Right after I started my work at IBC I was assigned to the Dealer Certification Program at Reliable Controls Corporation. Before the course, I researched a little into what Reliable Controls (RC) had to offer and the solutions they used in their boxes. So, come with me to find out about Reliable Controls line base code, is it not so scary?

Once I realised that the RC Controllers programming method is done by line-based code instead of Object-oriented, as I know from other well-known Building Automation Systems Manufacturers, I became very sceptical.

I think most BMS Engineers have very similar feelings when they hear about line-based code nowadays. These feelings create a major obstacle that is big enough to prevent technical staff from investigating the topic deeper and check if it is worthy to invest or not.

reliable controls line base code


In this article I would like to discover and present what is hidden just around the corner of the wall.

Introduction to Control-BASIC

Control-BASIC is a line executed language conceptually similar to the Dartmouth BASIC (Beginner’s All-purpose Symbolic Instruction Code). It differs from Dartmouth BASIC in that there are many statements, functions, and operators that relate specifically to the control industry (for instance, START, STOP, OPEN, CLOSE, SENSOR-ON, SENSOR-OFF, LIMIT, FLOAT,

Each logical line of code is identified with a discrete line number. The whole program is executed line by line from the line with minimum number to the END.

The language allows the programmer to create control logic in a quick and efficient manner and provides all the tools necessary to accomplish virtually any control strategy. Code can be copied from one program and pasted into any other program (just by ctrl+C ctrl+V, also to the other controllers).

RC-Studio® editor

The Control-BASIC compiler and de-compiler reside in the BACnet® Advanced Workstation RC-Studio®.

The editor is also used to send compiled code to a controller, restore a complied program from a controller, save, store, and restore Control-BASIC programs to RC-Studio for building program libraries, and editing and monitoring Control-BASIC programs in an operational controller.

RC studio
RC Studio ControlBASIC Editor

The Control-BASIC editor can be used while connected to a live system or in the RC-Studio Simulator mode.

Key features:

  • templates and libraries of ready applications
  • help with custom application from RC Technical Support
  • can realise any sequence of operation
  • automatic integration with Trends, PID loops, Alarms Console
  • extended and comprehensive help files
  • built-in tools which keep the programming and commissioning clear and easy

Features which make life with line base code easier

  • Easy way to renumber the lines

When the RC-Studio Control-BASIC editor is used to automatically renumber the logical lines of a program, it will number the lines in increments of 10, beginning with 10 for the first logical line. The gaps between the lines are used for the future purposes in case of any program modifications.

RC Studio demo
Renumbering the lines
  • Physical Outputs controlled at the very end

The controller’s physical outputs are not assigned until after the very last line in the very last program has been executed. This prevents accidental short-cycling of an output in the event that different values are assigned to an output by subsequent programs.

  • Watch list of the local variables

In Local/Vars mode the current values of any local variables used in the program are uploaded and displayed in the left pane of the Program worksheet. Hovering the cursor over an object or local variable will result in a value feedback box that displays the present value of the object.

RC Studio demo
Watch list of the Local Variables
  • Full control over program execution

In Show Trace mode the program execution trace is uploaded and the trace bits are displayed in the left pane of the Program worksheet. The program lines with a T displayed to the left are the program lines that have been executed by the interpreter. Program lines without a T displayed were not interpreted due to directions within the code.

  • User-friendly way of displaying BACnet Object references

Toggles between two modes that determine how object references are displayed in the Program worksheet. In the Desc/Label mode system points are displayed with their descriptor or label, depending on which name is selected in the Preferences dialog box.

RC Studio demo
Label Descriptors

In Mnemonic mode system points are displayed with their mnemonic.

RC Demo
Mnemonics Descriptors
  • Global functions for a text edition

Opens the Replace dialog box used to initiate a search for the first text string entered, and replacing each occurrence with
the second text string entered. The search begins at the current cursor location.

  • Color code

The RC-Studio 3 Program worksheet features configurable, color-coded, syntax highlighting, The programmer can configure the color code from the CBAS Editor Options dialog. The feature allows to have a control over f.ex.correctness of entering BACnet references.

CBAS Editor

Different font color can be set for various things such a functions, inputs, outputs, line numbers etc.

  • Intuitive access to help files

The syntax for each individual element is discussed and available in RC Studio by pressing F1 what I found very useful during the programming.

RC Studio software manual
Help File

Not everything in code

PID loops are defined in separated section – in your program code you need to just make a reference to the particular PID.

PID loops
PID Loops Window

Alarms can be defined with different priority and behavior (popup, alarm messages, alarm console, hyperlink to graphics, send an email or open a file)

Trend logs can be defined as a single or multipoint. It is possible to log all the values which exist in the controller.

Multipoint trend logs
Multipoint Trend Logs
Single point trend logs
Single Point Trend Logs

COV (Change of Value) log type is possible only in a single Trend Log type. Multipoint Trend Logs support triggered and polled type with configurable interval, precision (bytes) and length.


You can dynamically copy whole programs and automatically change controller device instance and BACnet object IDs. Reliable Controls provide wide libraries of ready applications ready to deploy or you can edit them adjust to your needs and use as your own template. Additionally, the RC Tech Support offers a great help with creating custom applications. It is also possible to create templates of whole controllers – including programs, alarms configuration, variables etc. It is really helpful when there is a large number of controllers on the project with similar configuration (FCU units). Templates are dynamic – it means that all the BACnet references can be automatically changed to particular Device ID of the controller during the template uploading process.

bacnet properties
The library of ready applications


The dynamic flexibility of Control-BASIC allows the programmer to develop programs and functional implementations that can be simple or complex,succinct or convoluted. Control-BASIC syntactic elements have been developed to provide this adaptable environment through inter-operation and simple programming techniques. The core principle behind Control-BASIC is to provide a comprehensive programming language that does not require a comprehensive programmer.

About the author

profile image of szymon

Technical and Training Support Manager

Szymon joins IBC from Global Control 5 where he fulfilled a similar role in product support and training. As IBC’s dedicated in-house engineer, Szymon can assist you with design, training and post-sales support across the IBC range of Building Energy Management Systems, Trend Controls, Reliable Controls and iSMA and Niagara. Chat with him about your project today [email protected]