Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.apo.nmsu.edu/Telescopes/HardwareControllers/AxisControllers.html
Дата изменения: Sat Feb 28 04:19:37 2015 Дата индексирования: Sat Apr 9 23:27:11 2016 Кодировка: Поисковые слова: п п п п п п п п п |
This manual describes the axis controllers that are currently used on the 3.5m telescope. Much of the information also applies to the MCP used to control the SDSS 2.5m telescope.
Axis controllers move the telescope axes and instrument rotators. They execute the complete servo-feedback loop, including setting the motor current, reading various kinds of encoders and handling the limit switches.
Input and output are line-based ASCII.
Each command is echoed. A command may also produce one or more lines of data (e.g. STATUS or DRIFT) or error messages (though few commands report error messages). After all output is shown for a command, the controller outputs one "OK" to indicate that it has finished processing this command and is ready for a new command. This "OK" may appear on its own line, or at the end of the last line of output (the command echo, or data). The "OK" may be preceded by one or more spaces, and it must be preceded by at least one space if it appears at the end of a line of other data.
Commands are processed quickly, and a command may not be finished when the OK is output. For instance MOVE P or STOP can take quite awhile to execute, but the OK appears as soon as the command is started. In addition, the axis controllers never output unsolicited output. Once the OK has been output for a command, there will be no more output until a new command is run (unless the axis controller reboots). Thus one must poll for status.
All of these values are floating point and a decimal point may be required for input.
Commands marked with (*) are not used by the TCC. They are generally included for use by engineers, or for symmetry with other commands or controller command sets.
Increment the current position by step by count times. Count defaults to 1.
Example:
Moves the position by 0.5 degrees. This is convenient for bumping a rotator's position when manually zeroing the position, such as the NA2.
Decrement the current position by step by count repeats. Count defaults to 1.
Turn on or off the controller's debug messages. Default is off. Valid values for state are off or on.
Causes the telescope to move at its current velocity until further notice. The command returns the following information: position, velocity, and time. DRIFT exists because precomputed slews are much easier to compute if the telescope is initially moving at constant velocity. The TCC always issues a DRIFT command (and uses the returned information as the initial path of the telescope) before computing a new slew.
Sample output:
221.3300000 0.00000 6935.400 OK
Alias: H and ?
Print command list, and if executed with a command, print help for that command. Not all commands have help.
Displays the code version and the axis ini revision number
axis code: 2009-10-16 379M, axis.ini version $Revision: 1.41 $
Alias: I
Halts the axis and does everything possible to put the controller into a known state, ready for use. This includes resetting all status bits (except for any conditions that are still valid after the INIT completes). The controller need not wait for the halt to finish before returning.
See also RESET
log a message to syslog
Alias: MAXV
Sets the maximum allowed velocity.
Alias: M
Stops the axis at the current position (overshoots and returns).
Flushes the command buffer of any queued MOVE pos vel time or MS.OFF time commands and leave the controller in the MS.OFF state.
Alias: M
Moves to the given position.
Alias: M
Moves along the path p(t) = pos + vel (t - tnow), where tnow = time at which you issue the command.
Alias: M
Specifies the final position, velocity, and time for an interpolated path details on interpolated paths. When this command is received, one of four things happens:
Once an interpolated-motion command expires, one of two things happens:
Several commands immediately supersede interpolated motion and flush the command buffer, including:
Does nothing (a null offset).
Offsets by the given amount. See the note below on +MOVE commands.
Offsets by the amount p(t) = pos + vel (t - time_of_command), where time_of_command is the time at which the you issued the command. See the note below on +MOVE commands.
Offsets by the amount p(t) = pos + vel (t - time). See the note below on +MOVE commands.
+MOVE commands are applied to all MOVE commands (all flavors) already received, including those commands still in the command buffer. +MOVE commands are NOT applied to commands received afterwards.
Displays last twenty fiducial (e.g. magnesensor) positions. All values are degrees. The edge is 0 for a rising edge, and 1 for a falling edge as the fiducial is crossed. If the correction is made, it is indicated under the correction column, and it is the average of the errors for the rising and falling edges.
Sample output:
ms.dump time position velocity error edge correction 1266860307.600 74.814029 0.241533 0.000954 1 0.000524 1266816131.180 59.597493 1.485286 -0.003319 0 0.000000 1266816131.330 59.819334 1.485286 -0.000797 1 -0.002057 1266839360.530 59.810348 -1.376835 0.006240 0 0.000000 1266839360.680 59.590300 -1.376835 0.001925 1 0.004082 1266839369.990 44.817815 -1.607564 0.012479 0 0.000000 1266839370.120 44.606302 -1.605523 -0.007002 1 0.002738 1266860253.490 44.615251 0.252483 -0.014001 0 0.000000 1266860254.160 44.825963 0.252483 0.006281 1 -0.003860 1266860268.360 59.597959 1.462901 -0.003784 0 0.000000 1266860268.510 59.821265 1.462901 -0.002728 1 -0.003256 1266860306.680 74.595496 0.336560 0.000096 0 0.000000 1266860307.600 74.814029 0.241533 0.000954 1 0.000524 OK
Disables automatic correction of position errors when fiducials (e.g. magnesensors) are passed. If a fiducial is passed with such large error that MS.ON could not correct it even if it were enabled, the appropriate status bit is still set (see MS.ON for information about this status bit).
Any pending "MS.OFF time" commands are flushed. Note that the correction from the last fiducial passed is saved and will be applied as soon as MS.ON or CORRECT is issued.
Note: MS.OFF is the default state, and this is re-established at each INIT.
See also MS.OFF time and MS.ON.
Like MS.OFF, except disabling does not occur until the time specified. If the specified time has already passed, disabling occurs immediately.
MS.OFF or MS.ON flush a pending "MS.OFF time" command. If another "MS.OFF time" command is received while an old one is pending, the new one supersedes the old one.
Several commands flush queued MS.OFF time requests and (except as noted) immediately put the controller into an MS.OFF state. These include:
Enable position error corrections on the falling edge of a fiducial. The position error is the average between the position error measured on the leading and trailing fiducial edge.
There are two conditions when the controller does not make the correction. First, if the error is larger than a threshold, the correction is postponed until the next fiducial is seen. This helps to ignore noisy fiducial errors, but, it requires a slew past two or more fiducials to correct a large error. The second condition is if the correction can not be made before the current motion is complete. The controller knows how much time is left before motion stops, and it decides if the correction can be made before motion stops. If it can not make the correction, then a status bit is set. If a subsequent fiducial crossing can be corrected, the correction is made, and the status bit is cleared.
NOTE: If the error is too large to correct, the correction can manually be applied.
NOTE: The previous controller would set a status bit on an uncorrected fiducial crossing, and it ignored further corrections until a CORRECT command (manually apply the error) or a REMAP command is sent.
There really is no reason to remap an axis, because we always can guess roughly where the axis is, and then we can manually correct the offset error. There are two advantages to this, 1) it is quicker to find the axis, and 2) it does not require driving into a limit.
See also MS.OFF and MS.OFFtime.
Set/get the motor output limit. No argument returns the limit. Value is integer percent, 0 to 100. The output is +-10 volts, so 55% is +-5.5 volts.
Use the DATAQ display to check the setpoint.
Alias: P
Drive the axis to the stow position.
Hardware resets the controller and halt any motion. Note: motion limits and the fiducial mapping are not lost. See also INIT
Sets the position limits. The limits may be specified in either order, i.e. the resulting lower limit = MIN (pos1, pos2), whereas the upper limit = MAX (pos1, pos2).
Changes the internal measure of telescope position (incremental encoder position converted to degrees) to the specified value. This command can only be used when the motion is stopped. The update is bumpless because the encoder position is set at the same time as the error is zeroed. This command is used when the controller loses the current encoder position.
For the SDSS MCP only: triggers the computer to set time based on NTP. All other controllers should ignore this command.
Returns the state of the hardware and controller as follows:
position velocity time status_word index_position
where:
Sample output:
0.0000306 0.00000 1664.320 3147777 0.0000000 OK
See alsoMS.DUMP
Set the step size to be used by + and - commands.
Alias: X
Immediately stop the current motion. This is useful if the motion needs to be abruptly stopped, for example there is a resonance or you are about to run into a limit. This is similar to pushing the E-Stop.
Set zero position. This is the same as set.position(0).
See also set.position.
Status bits indicate error (or warning) conditions. Some status bits are "sticky" in the sense that if the problem appears and then goes away, the relevant bits should remain set until the condition is cleared by an INIT. The limit bits, fiducial bits, and stop bit are not sticky.
Axis controller status bits are shown in the following tables (one for the 3.5m axis controllers, one for the SDSS 2.5m MCP).
Bit | Hex | 3.5m Meaning | |
0 | 00000001 | Motor control buffer empty | |
1 | 00000002 | Time ran out on an interpolated move (MOVE pos vel time) | |
2 | 00000004 | At or past the min position | |
3 | 00000008 | At or past the max position | |
4 | 00000010 | not used | |
5 | 00000020 | not used | |
6 | 00000040 | Min limit switch has been encountered | |
7 | 00000080 | Max limit switch has been encountered | |
8 | 00000100 | Overspeed tripped | |
9 | 00000200 | not used | |
10 | 00000400 | not used | |
11 | 00000800 | One or more stop buttons in | |
12 | 00001000 | Disable switch | |
13 | 00002000 | Motor output disabled | |
14 | 00004000 | Motion error | |
15 | 00008000 | Slip detected, motor encoder differs from Heidenhain by more than 12" | |
16 | 00010000 | 100 Hz clock signal missing | |
17 | 00020000 | not used | |
18 | 00040000 | Amplifier over temperature | |
19 | 00080000 | Current limit on motor(s) exceeded | |
20 | 00100000 | not used | |
21 | 00200000 | not used | |
22 | 00400000 | not used | |
23 | 00800000 | not used | |
24 | 01000000 | The last fiducial position error was too large | |
25 | 02000000 | The fiducial was found behind its mapped position | |
26 | 04000000 | The fiducial was found ahead of its mapped position | |
27 | 08000000 | The fiducial was passed with negative velocity | |
28 | 10000000 | A correction for this fiducial was negative | |
29 | 20000000 | Motor velocity exceeded | |
30 | 40000000 | Controller restarted | |
31 | 80000000 | Always zero |
Bit | Hex | SDSS 2.5m Meaning |
0 | 00000001 | Motor control buffer empty |
1 | 00000002 | Time ran out on an interpolated move (MOVE pos vel time) |
2 | 00000004 | At or past the min position |
3 | 00000008 | At or past the max position |
4 | 00000010 | Velocity has been limited to the max set value |
5 | 00000020 | Acceleration has been limited to the max set value |
6 | 00000040 | Min limit switch has been encountered |
7 | 00000080 | Max limit switch has been encountered |
8 | 00000100 | In closed loop (opposite of bit 11) |
9 | 00000200 | Amplifier OK (opposite of bit 12) |
10 | 00000400 | No stop buttons are in (opposite of bit 13) |
11 | 00000800 | Out of closed loop |
12 | 00001000 | Amplifier is bad |
13 | 00002000 | One or more stop buttons is in |
14 | 00004000 | Semaphore taken |
15 | 00008000 | not used |
16 | 00010000 | 1 Hz clock signal missing |
17 | 00020000 | clock_slow_signal |
18 | 00040000 | clock_not_set |
19 | 00080000 | not used |
20 | 00100000 | not used |
21 | 00200000 | not used |
22 | 00400000 | not used |
23 | 00800000 | not used |
24 | 01000000 | The last fiducial error was too large to correct |
25 | 02000000 | not used |
26 | 04000000 | not used |
27 | 08000000 | not used |
28 | 10000000 | not used |
29 | 20000000 | Windscreen bump going down or clockwise (sticky) |
30 | 40000000 | Windscreen bump going up or ccw (sticky) |
31 | 80000000 | Always zero |