SUBJECT: Control system rebuild project cbdebug.hlp
TITLE: TCS software debugging tools
DATE: 24 August 1994
AUTHOR: W. Cruise REVISION: 1.0
Because of the antique nature of the HP 1000 computer, and because of the general lack of familiarity with this beast, the paper goes into significant detail on the use of the HP 1000 facilities. If any user wishes to learn more about the HP 1000, and its RTE-6/VM operating system, there are many manuals around which can be helpful in studying this system.
The following are just some of the ways the TCS can be used in troubleshooting the cass bonnette control system. Many of the methods require that the TCS be logged in and operating on another terminal, some require that the user be logged into the TCS on his terminal, while some require a quiet computer, without any other users competing for the bonnette resources. Many of the test facilities can be used in several ways, but operate about the same no matter how they are started. This list describes most of the ways you can interact with the bonnette system.
CBENG can be operated in several forms, and their differences are explained below. This first section covers the common aspects of using CBENG.
physical user -HssH+ inc abs stop velocity
X -171.399 -179.999 -1599964 2109336 1 5.00000
Y -103.500 -100.000 -1999986 10054753 1 5.00000
Z 401.002 0 10927979 1
phys off cal off user off
X -2231.297 -8.600 0.000 Galil I/O: 0, err: 0
Y -9922.595 3.500 0.000 I/O stats: 123456, 0, 0
Z 11072.856 0.000
Filter: 7
ND: 1
CM Rot: 6 TCS mirror pos: 0
CM Trans: 1 Limits: park (+)
Probe: 1
Plate: 1
On plate: 1
Y chain: 1
GO XY: 1
GO Trans: 1
over ride: 1
Normally only the soft limits will get hit. In some cases the system might get onto a hard limit, and there should be two -'s or +'s showing that both the soft and hard are activated. If the soft fails, then only the hard would be on. There should never be a case where the hard limit is on, and the soft is not. If this happens, there has been a hardware failure.
The encoder scale factor for X & Y is 20,000 counts/mm. For the Z axis it is 8571.42857142 counts/mm.
The conversion from raw encoder reading to a position in user coordinates is raw reading/1024 + physical offset + calibration offset + user offset. All the offsets are in millimetres.
0 motors are running, independent mode1 motors stopped at commanded independent position
2 decelerating or stopped by FWD limit switches
3 decelerating or stopped by REV limit switches
4 decelerating or stopped by Stop Command (ST)
6 stopped by Abort input
7 stopped by Abort command (AB)
8 decelerating or stopped by Off-on-Error (OE1)
9 stopped after Finding Edge (FE)
10 stopped after Homing (HM)
This is the number which must be adjusted if the encoder is replaced, or otherwise disturbed. The physical calibration references are included in the cass bonnette system documentation.
Thus, 0 represents good I/O, and increasing negative values indicate I/O problems. If the number goes below -6, the control program returns error codes to the host computer when it attempts bonnette operations. The value is restrained so that it will not go below -18.
1 unrecognized command3 command not valid in program
4 operand error
6 number out of range
7 command not valid while running
8 command not valid while not running
9 variable error
14 EEPROM check sum error
16 IP incorrect sign during position move or IP given during forced deceleration
17 command not valid while program running
20 Begin not valid with motor off
21 Begin not valid while running
22 Begin not valid because of Limit Switch
Basically the first number should count and the other two should be zeros. However, in practice there are usually one or two errors showing in the individual read fail value. The system fail counter stays zero. Typically, the communications works flawlessly, and there are no more occasional errors during operation. If the Galil controller fails, the failure counters start up, and keep incrementing until the controller is reset.
While these values were put in to monitor suspected communications problems, which in fact didn't exist, they are being left in to actually monitor communications quality. If anything odd is noted in the second and third values, it should be reported, and the cause investigated.
CM ROT CM TRANS TCS mirror pos NOTEn/c 1 0 park
n/c 2 -1 exchange
1-7 3 1-7 mirror in center
1 park
2 exchange
3 center of the field
0 no mirror is mounted
1 small visible mirror
2 large visible mirror (seldom used)
3 IR mirror (never used)
4 extended path IR mirror
It may also show a 99 if there is some error reading the mirror bits, or if an
illegal combination of bits is set.
This is an optional message which can occur on the same line as the Z axis offsets. Its appearance indicates that the main bonnette control program was not running during the last three CBENG screen updates. The control program updates a heartbeat counter each time it runs. CBENG checks this heartbeat each time it updates the display. If it is identical for three consecutive times, the message is put up.
Typically the message indicates that the main control program is either not running, or is stopped for some reason. This would be a good time to use the RTE "WH" command to determine the status of the bonnette programs.
It is also possible for the bonnette control program to get hung up by a prompt being left on the screen at the main TCS console. This is indicated on the WH display by CBCTL being suspended in state 2 on EQT 11 for the T.O. console, or EQT 15 or 16 for a remote terminal. The cure here is to just press ENTER on the console to get rid of the prompt.
When CBENG is running and updating the display it is necessary to "break" the program to get its attention. How this is done varies with how CBENG was run in the first place. It always involves the RTE BR command, but the actual form will vary. Once CBENG receives the break request, it issues a "Enter Galil command or "EX" to exit:" prompt.
At this point anything entered other than "ex" or "EX" is sent directly to the Galil controller. Everything is converted to upper case, so it is OK to enter Galil commands in lower case. The program waits a short time for a response from the Galil, and then displays this exactly as received. It is possible to enter several Galil commands on one line, separated by the ";" character. Usually the results are correctly displayed. However, if the command execution takes too long, some of the final data may be missing. In this case shorten the command line next time.
Because CBENG must coexist with the normal bonnette control program, which is continually issuing information and control requests to the Galil controller, there are contention problems when performing pass through commands. This is handled by a handshake system which delays the next routine command from the control program so the pass through can occur without interference. This normally works well, but may on occasion permit a collision of commands from the two programs.
Due to the continual updating of the terminal screen by the CBENG program any other activity on the terminal can cause a real mess. Pressing the terminal's CLEAR DISPLAY key when the cursor is at the top of the screen clears everything below it, and CBENG then redraws the screen correctly. A little practice will get the timing right. It also helps to try timing command entry to occur when the cursor has paused at the bottom of the display between updates. Again, a little practice will help. No matter how messed up the display gets it should be possible to clear it up and get back to an operational mode.
The Galil pass-through may be used when CBENG is run this way. To get CBENG to ask for a Galil command, first get a TCS command prompt and issue the break command, BR,CBENG. This causes CBENG to issue its "Enter Galil command or "EX" to exit:" prompt.
If the RU command elicits a "NO SUCH PROG" message, then use the CBENG command once, as described above. This automatically installs the program in the OS.
The Galil pass-through mode operates the same as if CBENG were executed with the CBENG command.
For CBENG to work, either the TCS or bonnette session must be running on another terminal. If it is not, CBENG will just report on what was left in memory at the end of the last TCS session. After three loops the "cass bonnette control program has died" message will be displayed if no cass bonnette control program is running.
To exit CBENG get a system break mode prompt and enter OF. To use the pass through feature, get a system break mode prompt and enter BR.
Anything entered is sent directly to the Galil controller. Everything is converted to upper case, so it is OK to enter Galil commands in lower case. The program waits a short time for a response from the Galil, and then displays this exactly as received. It is possible to enter several Galil commands on one line, separated by the ";" character. Usually the results are correctly displayed. However, if the command execution takes too long, some of the final data may be missing. In this case shorten the command line next time.
The following printouts are currently set up.
0 Turns off all debug messages
8 Velocity mode data every 4 loops, including rate statistics
Reports all command strings launched to Galil
9 Additional velocity mode data every loop, including steps taken
Additional info on command launches and status
11 Max output every loop, which includes:
many Commands structure values
hex values of all SID card I/O buss addresses
XYZ absolute positions
Galil stop codes