ServoCenter™ 4.1 SC-BASIC Built-in Sequencer
The ServoCenter 4.1 controller provides a built-in Sequencer / BASIC Interpreter called SC-BASIC that allows the ServoCenter board to be programmed to perform various tasks via the use of a simple tokenized BASIC-like scripting language. This feature can be used to implement customer specific logic, I/O, and servo control tasks without the need for a PC or other external command device.
Sequencer Overview

The ServoCenter 4.1 controller provides a built-in Sequencer / BASIC




Interpreter called SC-BASIC that allows the ServoCenter board to be programmed to perform various tasks via the use of a simple tokenized BASIC-like scripting language. This feature can be used to implement customer specific logic, I/O, and servo control tasks without the need for a PC or other external command device.
The use of a fully functional scripting language allows the sequencer to perform complex logical and control tasks that can run independently on the SC4.1 board itself. The sequencer programs are stored on the SC4.1 board in a non-volatile EEPROM memory that retains the program even when the unit it reset or powered off. The loaded sequencer program can be started remotely via the “Start Sequencer” command and supports the passing of a parameter byte when a sequence is started. The sequencer also implements a “Sequencer Startup” feature that allows a loaded script to be executed when the SC4.1 board is reset or powered up thus allowing the SC4.1 board to be used as a stand-alone controller.
Sequencer Features
The SC-BASIC language was designed for the ServoCenter 4.1 Servo Controller as a simple, easy to learn language that is specifically suited to the architecture and problem domain of the controller board. SC-BASIC supports a syntax that will be familiar to users of other flavors of BASIC (such as QBASIC and Visual Basic) as well as some instructions and built-in functions that are specifically suited to the SC4.1 controller board.
SC-BASIC supports the following features:
Compact tokenized program format.
4096 bytes of non-volatile program space.
Familiar structured BASIC-like language syntax.
Dynamic variable allocation.
Support for up to 64 simultaneously allocated global and local integer variables.
Support for up to 16 user-defined subroutines / functions.
Scripts can be passed a parameter byte when started via the “Start Sequencer” command.
Scripts can be started upon board reset / power up via the “Sequencer Startup” feature.
Sequencer status and sequencer error reporting.
Built-in servo control and digital I/O functions.
Additional built-in functions for commonly needed programming tasks.
Sequencer communication support allows the sequencer to print/receive messages.
Sequencer Start / Stop / Reset control functions.
Summary of Manual Contents
The Language Reference and Programming Guide is a full guide to using the Sequencer application, including both the Control Panel sequence editor and the programming methods.
General Sections include:
- Language Reference
- comments
- variables
- arithmetic operations and expressions
- relational and logical operations
- language statements
- built-in functions
- ServoCenter Sequencer Control Commands
- protocol command summary
- protocol command details
- Using the ServoCenter Control Panel Sequence Editor
- sequencer programming tab
- basic use tutorial
- more advanced examples
- SC-BASIC Programming Examples
- hello world
- hello world sub
- servo exercise
- servo exercise with sub
- digital I/O exercise
- show all ADC values
- move all servos to a random position
- demo of global variable retaining value
- demo of CmdArg
- Appendix
- hexadecimal/decimal/binary nibble conversion chart
- hexadecimal/decimal ASCII chart
- token specification
- error codes
SC-BASIC Programming Examples
Description | Source Code | |
|---|---|---|
Hello World | ' Simple Hello World Program | |
Hello World Sub | 'Hello World Program using a Sub Procedure. | |
Servo Exercise | ' This program exercises all 16 servo channels by | |
Servo Exercise with Sub | ' This program exercises all 16 servo channels by | |
Digital I/O Exercise | ' This program exercises all 16 Digital I/O channels by | |
Show All ADC Values | ' This program prints the ADC values for all 8 ADC channels. | |
Move All Servos to a Random Position | ' This program moves all servos to a random position. | |
Demo of Global Variable Retaining Value | ' The following program demonstrates the ability of SC-BASIC to retain | |
Demo of CmdArg | ' This program illustrates the use of the CmdArg function to control | |
Download Sequencer
- ServoCenter 4.1 Sequencer / SC-BASIC Application
- The ServoCenter 4.1 Sequencer is included with the ServoCenter 4.1 Control Panel Utility. The sequencer is designed as a simple, easy to learn language specifically suited to the architecture and problem domain of ServoCenter 4.1.

