1 The design (will) have two serial ports: a local serial port using the
2 Arduino Mega USB port and a remote serial port accessible via an RS422
3 link. The commands are text strings in human readable form comprising
4 a command string and zero or more numeric arguments. The arguments
5 can be separated by commas or white space and the command is
6 terminated with a <CR>. If a command does not parse, the parser
7 responds with a nack (character N). If ths command was successfully
8 parsed the response is an ack (character A). This ack is that the
9 command has been accepted and some event is delivered to the state
10 machine. It does not mean that the action requested (such as
11 stepping a motor over a stepping distance) has completed.
12 Numeric arguments will be either a floating point or integer
13 value depending on the command requirements.
15 Both serial ports will accept the following serial commands:
17 az <base_speed> <acceleration> <slew_speed> <steps>
18 base_speed, accelleration, and slew speed are floating point and
19 steps is an integer (32 bit)
20 This command arms the azimuth stepper driver to start stepping at an
21 initial (base) speed then accellerate to the final (slew) speed. The
22 stepper maintains the slew speed until a step position where it must
23 decelerate to reach the base speed at the final stepping position. If
24 the acceleration cannot reach the slew speed at the mid-point of the
25 stepping distance then the stepper commences deceleration at the
26 mid-point of the stepping distance to reach the base speed at the
27 final stepping position. This command does not start the stepping
28 motion. In order to synchronise the azimuth and elevation stepping,
29 the state machines are armed with the data and a separate command
30 starts the stepping motion of one or both steppers.
33 Set the base speed for the next azimuth stepping request. Base speed is
37 Set the acceleration for the next azimuth stepping request. Acceleration is
41 Set the slew speed for the next azimuth stepping request. Slew speed is
45 Set the stepping distance for the next azimuth stepping request. Steps is
46 a 32 bit integer. Unlike all other azimuth request parameters, this value
47 is consumed when a stepping request is performed and must be set for a
51 Set the azimuth stepping direction to clockwise for the next stepping request.
54 Set the azimuth stepping direction to counter-clockwise for the next stepping
57 el <base_speed> <acceleration> <slew_speed> <steps>
58 base_speed, accelleration, and slew speed are floating point and
59 steps is an integer (32 bit)
60 This command arms the elevation stepper driver to start stepping at an
61 initial (base) speed then accellerate to the final (slew) speed. The
62 stepper maintains the slew speed until a step position where it must
63 decelerate to reach the base speed at the final stepping position. If
64 the acceleration cannot reach the slew speed at the mid-point of the
65 stepping distance then the stepper commences deceleration at the
66 mid-point of the stepping distance to reach the base speed at the
67 final stepping position. This command does not start the stepping
68 motion. In order to synchronise the azimuth and elevation stepping,
69 the state machines are armed with the data and a separate command
70 starts the stepping motion of one or both steppers.
73 Set the base speed for the next elevation stepping request. Base speed is
77 Set the acceleration for the next elevation stepping request. Acceleration is
81 Set the slew speed for the next elevation stepping request. Slew speed is
85 Set the stepping distance for the next elevation stepping request. Steps is
86 a 32 bit integer. Unlike all other elevation request parameters, this value
87 is consumed when a stepping request is performed and must be set for a
91 Set the elevation stepping direction to raise the dish on the next stepping
95 Set the elevation stepping direction to lower the dish on the next stepping
99 Start azimuth stepping based on all requested parameters.
102 Start elevation stepping based on all requested parameters.
105 Start both azimuth and elevation stepping based on all requested parameters.
108 Commands defined in the ui.py file
109 Commands defined in the ui.py file
110 command signal arguments
111 'az', 'COMMAND_AZIMUTH_SIG', 'dddu'
112 'ab', 'COMMAND_AZIMUTH_BASE_SIG', 'd'
113 'as', 'COMMAND_AZIMUTH_SLEW_SIG', 'd'
114 'aa', 'COMMAND_AZIMUTH_ACCELERATION_SIG', 'd'
115 'at', 'COMMAND_AZIMUTH_STEPS_SIG', 'u'
116 'acw', 'COMMAND_AZIMUTH_CLOCKWISE_SIG', ''
117 'acc', 'COMMAND_AZIMUTH_CCW_SIG', ''
118 'el', 'COMMAND_ELEVATION_SIG', 'dddu'
119 'eb', 'COMMAND_ELEVATION_BASE_SIG', 'd'
120 'es', 'COMMAND_ELEVATION_SLEW_SIG', 'd'
121 'ea', 'COMMAND_ELEVATION_ACCELERATION_SIG', 'd'
122 'et', 'COMMAND_ELEVATION_STEPS_SIG', 'u'
123 'eu', 'COMMAND_ELEVATION_UP_SIG', ''
124 'ed', 'COMMAND_ELEVATION_DOWN_SIG', ''
125 'sta', 'COMMAND_START_AZIMUTH_SIG', ''
126 'ste', 'COMMAND_START_ELEVATION_SIG', ''
127 'stb', 'COMMAND_START_AZ_EL_SIG', ''