Documentation > Instruction Manuals
Starter Controller - 2.01.004
Introduction
The Starter Controller (2.01.004) is an USB controller that has 2 servo motor ports
(track switch motors, decoupler, boom barrier motors, etc.), one light port (traffic light or level crossing light)
and one train detection sensors port. It allows to connect and control motors, lights and sensors with your computer.
Installation
Configuring the Controller
From firmware version 2019.01.1 onward, the starter 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 sensor 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 relvant 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 starter 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.
LED Commands led,port,led,on;
Switch an LED on.
led,port,led,off;
Switch an LED off.
led,port,led,power;
Set the brightness of an LED.
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,sen;
Configure the specified port as a sensor port.
This is the default, this command only has to be executed to return to sensor port mode after the port had been configured as a serial out 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.
Sensor Commands sen,port,off;
Switch sensor feedback off.
The controller will no longer return any feedback from the specified sensor port.
sen,port,cont,interval;
Request continuous sensor feedback.
sen,port,above,interval,threshold;
Request continuous sensor feedback only if the value is above the specified threshold value.
sen,port,cross,threshold;
Request sensor feedback only if the value crosses, goes above or below, the specified threshold value.
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
Motor
Use the following procedure to switch a servo motor on port 1 to 45 degrees:
Light
Use the following procedure to set the brightness of the LED:
Sensor
Use the following procedure to get a sensor value from port 1 every 100 milliseconds:
Versions
2017.03.1
2018.08.1
2019.01.1
|