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.
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.
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.
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.
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.
srv,port,angle;
Set the angle of the servo motor.
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.
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.
Example
Use the following procedure to switch a servo motor on port 1 to 45 degrees:
Versions
2016.12.1
2018.11.1
2019.01.1
|