Rotator Controller

Rotator Controller Comms Protocol


In keeping with other ZL1BPU micro/PC control projects, the Rotator Controller has a native "KISS" protocol which allows easy direct control, easy software debugging, and simple but reliable PC control. Communications is at 9600 bps, n-8-1, and is bidirectional.

No guarantee is given or implied that the "commercial" commands supported will work in all applications. The developer is not privy to the manufacturers' or software developers' design and control specifications. Similarly, while tests have shown this design to work well with the type of rotator quoted, no guarantee is given or implied that the controller will operate with or be suitable for all other such equipment.

Commands

There are four ZL1BPU native mode commands, which can be used directly from a Terminal program or a specialized control application. No <CR><LF> sequence is required after the native commands, which are shown in GREEN in the table. There are also three commands provided for compatability with commercial controllers. These are shown in RED in the following table:
ZL1BPU NATIVE PROTOCOL

Gnn   (GO)
Command sends rotator to heading nn, where nn is a two-character HEX-ASCII value 0x00 to 0xFF. If calibrated to 2/step, anticlockwise (South) corresponds to 0x00 and clockwise (South) to 0xB4 (180 decimal).
The controller responds with "G nn<CR><LF>"
R   (REPORT)
The controller responds with "R hh dd<CR><LF>", where "hh" is the current heading, and "dd" is the demand (requested heading). Both values are in HEX-ASCII, 0x00 to 0xFF.
S   (STOP)
The controller stops rotating, and makes the current heading the requested position.
The controller responds with "S<CR><LF>"
V   (VERSION)
The controller reports its hard-coded firmware version. It responds with "V xy<CR><LF>" where "x" is the version major number, and "y" the minor version number, i.e. Version x.y is reported.
COMMERCIAL COMMANDS

A<CR>xxx<CR>   (ORION)
ORION format command sends rotator to heading xxx, where xxx is a three-digit DECIMAL value 000 to 359.
Mxxx<CR>   (YAESU)
YAESU format command sends rotator to heading xxx, where xxx is a three-digit DECIMAL value 000 to 359.
Py<CR>   (SARTEK)
SARTEK format command sends rotator to heading y, where y is a single byte HEX value 0x00 to 0xFF. Calibration must be set to give a clockwise reading 128 higher than the anticlockwise reading.
The "R", "S" and "V" commands need not be used by PC applications. REPORT is used to poll the controller to learn the present position when idle. STOP is useful in PC programs and in direct control where an incorrect heading has been given, or a better one discovered while on the move. VERSION allows for later upgrade of software and firmware without interoperability problems.

"G", "A" and "M" position commands are completely equivalent, and are all supported by a single version of the firmware without interaction. The "P" command is similar, but requires different calibration. It is not recommended unless the intended application software supports no other position control command.

Invalid commands, and position commands with impossible headings are ignored.

Responses

Unlike many commercial controllers, status is reported while the rotator is operating, and when the controller detects an error. An assembly-time option allows periodic heading reports while the rotator is idle. The format of these messages is "X nn<CR><LF>", where "nn" is the current heading, or error data (error flags). The prefix letter "X" gives information about the controller operating state. The prefix letters are:
G nn   (POSITION RECEIVED)
Response to "G" command nn, where nn is a two-character HEX-ASCII value 0x00 to 0xFF, representing the requested heading (the demand). Occurs only once, in reponse to each command.
= nn   (IDLE)
Rotator has reached heading nn, where nn is a two-character HEX-ASCII value 0x00 to 0xFF. This message is repeated every two seconds (when enabled - it is normally off).
< nn   (DOWN)
Rotator is moving "down" (anticlockwise), and is currently at heading nn, where nn is a two-character HEX-ASCII value 0x00 to 0xFF. This message is repeated twice per second.
> nn   (UP)
Rotator is moving "up" (anticlockwise), and is currently at heading nn, where nn is a two-character HEX-ASCII value 0x00 to 0xFF. This message is repeated twice per second.
$ nn   (INIT)
Rotator is initializing, and thinks it is at heading nn, where nn is a two-character HEX-ASCII value 0x00 to 0xFF. This message is repeated three times at power-up, every two seconds.
!P nn   (POT ERROR)
!R nn   (ROTATION ERROR)
Controller has detected an error. The letter "P" indicates a rotator feedback pot fault, while "R" indicates a rotation (motor) problem. The value "nn" represents the system error flags as a two-character HEX-ASCII value 0x00 to 0xFF. This message is repeated twice per second. Rotator control is disabled. Errors are reset by sending a further position command or removing power.
R hh dd   (REPORT)
Response to the R Report command, used to poll for position when rotator is idle. In the controller response, "hh" is the current heading, and "dd" is the demand (requested heading). Both values are in HEX-ASCII, 0x00 to 0xFF.
There is no comms response to invalid messages, and no comms response to Commercial Commands. Only the native ZL1BPU commands evokes responses, and these are always in ZL1BPU format.


BACK