Documentation > Instruction Manuals
Quad Switch Controller - 2.01.001
Introduction
The Quad Switch Controller (2.01.001) is an USB controller that allows you to connect 4 track switch motors, boom barrier motors or decoupler motors to your computer.
USB Communication Protocol
Introduction
From firmware version 2019.01.1 onward, the quad switch controller has two communication protocols: a binary one and ASCII one. Older versions of the controller only have the binary communication protocol. The binary one is used by nControl™ to communicate with the controller. The ASCII protocol is fully documented and can be used to integrate the quad switch controller into a your own custom software application.
This section is only useful if you want to integrate the controller in your own software. It's not relevant in case you're using the controller with nControl™
The information on this page is intended for personal, non-commercial, use only. Commercial use without prior written approval by 4DBrix LLC is prohibited.
Connecting to the Controller
You can communicate with the quad switch controller over a serial connection. The default baud rate is 38400. Keep in mind that the controllers start up using the digital communication protocol, so you need to switch them to the ASCII protocol before you can use the commands listed in this manual.
To connect to your controller, make a serial connection using 38400 baud and then send the command:
mod,asc;
to switch the controller to the ASCII protocol. Once that's done, you're ready to start using the controller.
ASCII Commands
Auxiliary Device Commands
cmd,port,data;
Send serial data to an auxiliary device. This command can only be used if the port has been configured as a serial out port.
  • port specifies the port of the controller.
  • port specifies the data string that has to be sent to the auxiliary device.

Controller Info
get,serial;
Request the serial number of the controller.
get,type;
Request the type of the controller.
get,version;
Request the firmware version of the controller.

Communication Mode
mod,asc;
Switch the controller to the ASCII communication protocol.
mod,bin;
Switch the controller to the binary communication protocol.

Port Configuration
prt,port,serwri,baud;
Configure the specified port as a serial out port. This mode allows to send serial data over the third pin of the port.
  • port specifies the port of the controller.
  • baud specifies the baud rate for the serial communication.
prt,port,srv;
Configure the specified port as a servo port. This is the default, this command only has to be executed to return to servo port mode after the port had been configured as a serial out port.
  • port specifies the port of the controller.

Servo Motor Commands
srv,port,off;
Switch the servo motor off. It's advisable to switch the motors off once they are in position. Keeping the motors on for an extended amount of time can overheat and ultimately damage them.
  • port specifies the port of the controller.
srv,port,on;
Switch the servo motor on. When the motor is switched on it will move to the last requested angle, in case the motor is not already in that position. When the controller is powered up the default angle is set to 90 degrees. If that doesn't work for you application, you have to change the angle before switched the motor on.
  • port specifies the port of the controller.
srv,port,angle;
Set the angle of the servo motor.
  • port specifies the port of the controller.
  • angle specifies the angle in degrees: 0-180.
srv,port,get;
Request the current servo angle from the controller. This will only work after the angle has been set, it does not retain the angle when the controller is powered down.
  • port specifies the port of the controller.

Controller Settings
set,baud,rate;
Change the baud rate of the serial communication. The new baud rate is stored in the EEPROM of the controller and will be used next time the controller boots.
  • rate specifies baud rate.
Example
Use the following procedure to switch a servo motor on port 1 to 45 degrees:
  • Make a serial connection to the controller using 38400 baud.
  • Send the command mod,asc; to switch the controller to ASCII mode
  • Send the command srv,1,on to switch the motor on
  • Send the command srv,1,45 to move the motor to the 45 degree position
  • Wait to give the motor time to move to the requested position, e.g. wait 300ms
  • Send the command srv,1,off to switch the motor off
Versions
2016.12.1
  • Support for nControl™ (digital communication protocol)
2018.11.1
  • Added support for ASCII communication protocol. Port 3 and 4 will not set the motor to 90 degrees at startup! You might have to initialize the angle before switching on the motor.
2019.01.1
  • Added support for auxiliary serial devices