H---+----1T---+-T--T----+T---3----T----4T---+---T5----+-T--6----T----7--T-+--R
.xb:4
.x:14
.r:q
/* RC2KREM.DOC ** 1.22.91 ** (derived from sabusext.inc, 5.23.91) This
file describes the commands used to implement the SA bus remote interface for
the RC2000 antenna controller. See the SA bus specification included with RC
2000 manual for a complete description of the protocol. */
/* RC 2000 BAUD RATE - ADDRESS SPECIFICATION **
The baud rate and address must be set before communication with a host is
possible. These quantities can be specified in the CONFIG mode. The range of
acceptable addresses is 49 to 111. The possible baud rate values are 300,
600, 1200, 2400, 4800, or 9600. The usual SA Bus baud rate is 9600. For
completeness, the transmission parameters are repeated here: 7 data bits, even
parity, 1 stop bit. */
/* RC 2000 ONLINE/OFFLINE **
To enable remote mode on the RC 2000, the internal remote$mode$enable$flag
must be set. This flag is set at the 'REMOTE MODE ENABLE' prompt in CONFIG
mode. When this flag is set, remote mode can be entered in two ways. One way
remote mode can be activated is by depressing the mode button. Remote mode
can be found just after AUTO mode. The second way remote mode can be
activated is when a valid command arrives via the serial port.
If the remote$mode$enable$flag is FALSE and a valid command arrives via the
serial port, the offline reply is sent to the host. Here is the format of the
offline reply...
byte 0 : ACK
byte 1 : A where A is the RC2000 address
byte 2 : 'CC' the command code of the message which
triggered this reply.
byte 3 : 'F' Ascii 'F', for offline.
byte 4 : ETX
byte 5 : 'chksum' the checksum. The checksum character is
simply the bit-by-bit exclusive OR of all
characters in the message starting with the
STX character thru the ETX character. */
/* RC 2000 UNRECOGNIZED COMMANDS - NAK (NEGATIVE ACKNOWLEDGEMENT) REPLY **
If an unrecognized command arrives (one whose command code is either unknown
or whose length is not compatible with the given command code, but which has
the correct address and checksum), a NAK reply is sent to the host. The
format of the NAK reply is ...
byte 0 : NAK
byte 1 : A where A is the RC2000 address
byte 2 : 'CC' the command code of the unrecognized
message.
byte 3 : ETX
byte 4 : checksum */
2
/* DEVICE TYPE QUERY COMMAND **
The SA Bus specifications requires that command character 30h must trigger the
return of the six character device type string. The message format for this
query will be ...
byte 0 : STX
byte 1 : A where A is the RC2000 address
byte 2 : 30h 30 hex - the device type query command code
byte 3 : ETX
byte 4 : checksum
The reply to this query will consist of 11 bytes ...
byte 0 : ACK
byte 1 : A where A is the RC2000 address
byte 2 : 30h the device type query command code
bytes 3-6: 'RC2K'
bytes 7,8: 'XX' where XX is the version number, for example
if the current software version number were
4.31, XX would be '43'.
byte 9 : ETX
byte 10 : checksum */
/* DEVICE STATUS POLL COMMAND **
The SA Bus specification requires that command character 31h cause a device to
return its status information. The reply to this command includes azimuth,
elevation and polarization position, current satellite name, as well as limit,
alarm and drive status information. The status poll command message consists
of 5 bytes and the format is;
byte 0 : STX
byte 1 : A where A is the RC2000 address
byte 2 : 31h the status poll query command code
byte 3 : ETX
byte 4 : checksum
The response to this command will consist of 38 bytes, which will be a
combination of ascii and binary data fields. The binary data will be placed in
the lower nibble of a byte whose higher nibble will be initialized to a value
which will make the result an ascii character. The idea with this response is
to be able to reproduce the information presented on the LCD to the user when
manual mode is active. The format of the response will be;
byte 0 : ACK
byte 1 : A where A is the RC2000 address
byte 2 : 31h the status poll query command code
bytes 3-12 : sat_name This field will contain the satellite name
in upper case letters. If the name does not
occupy the entire field the name will be
left justified and the string will be padded
with blanks. If a satellite name is not
currently displayed, this field will contain
blanks.
bytes 14-18: az position This field will contain the current
azimuth position, formatted in a manner
identical to how the position is displayed
on the front of the unit, ' 0' to
'65535'. If an azimuth limit is active, the
field will contain either ' EAST' or ' WEST'.
bytes 19-23: el position This field will contain the current
elevation position, formatted in a manner
identical to how the position is displayed
on the front of the unit, ' 0' to
'65535'. If an elevation limit is active,
the field will contain either ' DOWN' or
' UP '.
bytes 24-25: pol position This field will contain the current
polarization position, formatted in a manner
similar to how the position is displayed on
the front of the unit, ' 0' to '99', or 'CC'
or 'CW' if a limit is active. As the
polarotor moves counter clockwise (as viewed
looking into the feed horn), the displayed
numbers get greater.
byte 26 : polarization code and autopol status - binary data
7 6 5 4 3 2 1 0
0 0 1 0 $ _ _ _ _
0 x x x * auto pol disabled
1 x x x auto pol enabled
x 0 0 0 'H' polarization code displayed
x 0 0 1 'h' polarization code displayed
x 0 1 0 'V' polarization code displayed
x 0 1 1 'v' polarization code displayed
x 1 0 0 no polarization code displayed
* - Note, 'x' means don't care
4
byte 27 : azimuth movement/alarm status - binary data
7 6 5 4 3 2 1 0
0 0 1 0 $ _ _ _ _
0 0 0 0 no alarms or movement
0 0 1 0 east movement pending
0 0 1 1 west movement pending
0 1 0 0 east movement in progress
0 1 0 1 west movement in progress
0 1 1 1 an auto move is in progress
1 0 0 0 runaway alarm active
1 0 0 1 jammed alarm active
1 0 1 0 limit alarm active
1 1 x x drive alarm active, where xx
indicates what the drive was
doing when the error occurred.
The drive alarm is triggered by
the detection of an overcurrent
condition.
1 1 0 1 overcurrent while idle or brake
1 1 1 0 overcurrent while direction set
1 1 1 1 overcurrent while moving
Note - Higher value status codes have priority over
lower value ones, i.e if as part of an auto move
command the antenna is moving west the status will be
reported as 'auto move in progress' rather than 'west
movement in progress'.
byte 28 : elevation movement/alarm status - binary data
7 6 5 4 3 2 1 0
0 0 1 0 $ _ _ _ _
0 0 0 0 no alarms or movement
0 0 1 0 down movement pending
0 0 1 1 up movement pending
0 1 0 0 down movement in progress
0 1 0 1 up movement in progress
0 1 1 1 an auto move is in progress
1 0 0 0 runaway alarm active
1 0 0 1 jammed alarm active
1 0 1 0 limit alarm active
1 1 x x drive alarm active, where xx
indicates what the drive was
doing when the error occurred.
The drive alarm is triggered by
the detection of an overcurrent
condition.
1 1 0 1 overcurrent while idle or brake
1 1 1 0 overcurrent while direction set
1 1 1 1 overcurrent while moving
5
byte 29 : polarization movement status - binary data
7 6 5 4 3 2 1 0
0 0 1 0 $ 0 0 _ _
0 0 no polarization movement
0 1 cw jog in progress
1 0 ccw jog in progress
1 1 go to H or V in progress
bytes 30-31: These bytes are used to encode the alarm code. The
alarm code (a byte value) specifies the alarm
condition that is presently active. See the table
below for the various alarm codes.
byte 30 : least significant nibble of alarm status - binary data
7 6 5 4 3 2 1 0
0 0 1 0 $ _ _ _ _ least significant nibble
a a a a of the alarm code
3 2 1 0
byte 31 : most significant nibble of alarm status - binary data
7 6 5 4 3 2 1 0
0 0 1 0 $ _ _ _ _ most significant nibble
a a a a of the alarm code
7 6 5 4
Alarm codes
a a a a $ a a a a
7 6 5 4 3 2 1 0
- - - - - - - -
0 0 0 0 0 0 0 0 0 - no alarm active
0 0 0 0 0 0 0 1 1 - low battery alarm
0 0 0 0 0 0 1 0 2 - azimuth alarm
0 0 0 0 0 0 1 1 3 - elevation alarm
0 0 0 0 0 1 0 0 4 - azim count alarm
0 0 0 0 0 1 0 1 5 - elev count alarm
0 0 0 0 0 1 1 0 6 - azim limit corrupt alarm
0 0 0 0 0 1 1 1 7 - elev limit corrupt alarm
0 0 0 0 1 0 0 0 8 - simultaneous azim/elev
flag corrupt alarm
0 0 0 0 1 0 0 1 9 - azim slow speed alarm
0 0 0 0 1 0 1 0 10- elev slow speed alarm
0 0 0 0 1 0 1 1 11- comm port alarm
byte 32-35 : Reserved for future use. This field will contain the
space character, 20 hex or 32 decimal.
byte 36 : ETX
byte 37 : checksum */
6
/* QUERY NAME COMMAND **
This query command instructs the RC2000 to send back to the host computer an
indexed satellite name from the list of located satellites stored in
non-volatile memory. This list is comprised of those satellites that were
saved via SETUP mode in the RC2000. A maximum of 50 can be in the list. This
query command contains 7 bytes and the format is;
byte 0 : STX
byte 1 : A where A is the RC2000 address
byte 2 : 35h the query name command code
bytes 3,4 : 'XX' where XX is the index of the satellite name
being requested. Normally this would be '01'
the first time thru and then incremented
until the 'YY' (YY being the last entry in
the list) satellite name is read. The
maximum possible range for XX and YY is 1
thru 50.
byte 5 : ETX
byte 6 : 'chksum" the checksum
The normal response to this query command contains 19 bytes and the format is
as follows;
byte 0 : ACK
byte 1 : A where A is the RC2000 address
byte 2 : 35h the query name command code
bytes 3,4 : 'XX' where XX is the index of the satellite name
being requested.
bytes 5,6 : 'YY' where YY is the total number of satellite
names contained in the list.
bytes 7-16 : This field will contain the satellite name.
byte 17 : ETX
byte 18 : 'chksum' the checksum
Note that if entry 'XX' does not exist in the list (or the list has no
entries) the NAK reply will be sent back to the host. */
7
/* AUTO MOVE COMMAND **
This command specifies that the controller move the antenna to the azimuth
and elevation positions of a satellite which has been saved via the SETUP
mode. The command contains 16 bytes. Here is the format;
byte 0 : STX
byte 1 : A where A is the RC2000 address
byte 2 : 32h the auto move command code
byte 3 polarization This field can specify 'H', 'V' or ' '
(blank). If this field contains a blank
there is no polarization adjustment. If
this field contains 'H' or 'V' the
polarotor is driven to the satellite's
preset horizontal or vertical position.
byte 4-13 sat_name This field specifies the satellite name.
The sat_name should be in capital letters
and left justified within this field. If
necessary, the name can be padded with
blanks to fill the entire field.
byte 14 : ETX
byte 15 : checksum
The normal reply to this command will be the same as the reply to the status
poll query except that the command code field will be '32h'. Note that if the
satellite name is not found or if autopol is enabled and a polarization is
specified with the command, a NAK reply will be sent to the host. */
/* AZIMUTH/ELEVATION JOG COMMAND **
This command jogs the antenna in azimuth or elevation. The command contains
11 bytes. Here is the format of the command;
byte 0 : STX
byte 1 : A where A is the RC2000 address
byte 2 : 33h the command code
byte 3 : direction This field can specify 'E', 'W', 'D', 'U'
or 'X'. 'E' refers to east, 'W' to
west, 'D' refers to down, and 'U' refers
to up. An 'X' specifies that the antenna
stop moving.
byte 4 : speed This field specifies the jog speed, either
'F' (Fast) or 'S' (Slow). Note that this
field must contain a valid value even if
the direction field specifies 'X' (Stop).
bytes 5-8 : duration This field specifies the duration of the
azimuth jog command in milliseconds. The
valid range of values for this field is
'0000' to '9999'. As a practical matter,
the resolution of the timer used to time
the move is approximately 150 milliseconds,
so any move will be for a time interval
equal to a multiple of approx. 150
milliseconds. Note that this command must
contain a valid value even if the direction
field specifies 'X' (Stop).
byte 9 : ETX
byte 10 : 'chksum' the checksum
The reply to this command will be the same as the reply to the status poll
query except that the command code will be '33h'. */
/* POLARIZATION COMMAND **
The following command specifies a polarization jog. The command contains 6
bytes. Byte 3 can contain one of the following values...
'C'... jog the polarization clockwise.
'W'... jog the polarization counter clockwise. Note that there is
not a duration or a speed associated with these commands.
The duration is fixed and the speed increases as the
polarization continues its movement without being
interrupted. An interruption occurs if another command
does not arrive before the previous polarization command
terminates.
'H'... move the polarotor to the preset horizontal position of the
satellite closest to the antenna's present azimuth position.
'V'... move the polarotor to the preset vertical position of the
satellite closest to the antenna's present azimuth position.
The format of the command is as follows;
byte 0 : STX
byte 1 : A where A is the RC2000 address
byte 2 : 34h the command code
byte 3 : 'X' the polarization movement code
byte 4 : ETX
byte 5 : checksum
The reply to this command will be the same as the reply to the status poll
query except the command code will be '34h'. Note that the NAK reply
will be sent back to the host if autopol is enabled or if 'H' or 'V' is
specified and there are no satellites available in the RC 2000 memory. */
9
/* MISCELLANEOUS COMMAND **
This command performs miscellaneous functions. Here is the format of the
command.
byte 0 : STX
byte 1 : A where A is the RC2000 address
byte 2 : 36h the miscellaneous command code
byte 3 : 'X' the sub-command code
byte 4 : 'Y' the sub-command parameter
byte 5 : ETX
byte 6 : checksum
The sub-command code 'X' can have the following values ...
'X' = 'R' This specifies the azimuth or elevation drive reset
command. This accomplishes the same function as the
RESET mode of the RC 2000: it allows the user to
reset the solid state drive circuits if an azimuth or
elevation alarm has been detected. When the sub-
command code is 'R', the sub-command parameter 'Y'
must be either 'A' or 'E' (for azimuth or elevation,
respectively) to specify which axis will be reset.
'X' = 'P' This sub-command allows the host to enable or disable
the autopol mode. If the sub-command is 'P' the
sub-command parameter 'Y' must either be 'N' or 'F'
(for autopol oN or ofF, respectively).
The reply to this command will be the same as the reply to the status poll
query except the command code will be '36h'. */
/* C PROGRAM **
A C program has been written which allows a user to exercise the RC 2000. The
program runs on an IBM PC (or compatible - running DOS) and was designed to
aid the software developer who is writing programs to control the RC 2000.
All of the commands listed above can be sent to the controller. The program
features three windows. In the top window the user is prompted for commands
to send to the controller. In the middle window, the command strings sent to
the controller are displayed. The bottom window displays all characters
received from the controller. The source code is included with the program
and a developer may examine and freely use any of the routines. A disk
containing this program is included with each controller. */
/* MESSAGE DELIMITERS **
Here are the delimiters used with SA bus messages, along with their value in
hex and decimal.
ASCII name hex value decimal value
STX 2 2
ETX 3 3
ACK 6 6
NAK 15 21 */
Flash Sale Popup