User Tools

Site Tools


tcs:periodic_error_correction

Periodic Error

Periodic Error is caused by imperfections in the worm gear that drives the right ascension axis. It periodic over one full rotation of the worm gear. TCSng corrects for this by mapping the error along an indexed rotation of the worm gear. This is called training.

Periodic Error Correction (PEC)

If the PEC has been trained, periodic error can be corrected. Begin this process by turning the PEC on. Once the PEC has been turned on, TCSng waits for an index pulse from the worm gear. This can take several minutes.

TCSng PEC Commands and Requests

PEC requests and commands follow the TCSng protocal. Communication is executed through TCP/IP sockets. There is only on command/request per socket.

Requests

There are two PEC Requests. “PECSTAT” and “PECPROG”.

PECSTAT

“PECSTAT” returns four items condition, count, index, mode in that order. The condition can be 0 (OFF), 1 (ON), or 3 (WAITING) . WAITING simply means waiting for an index pulse. The mode can be 0 (OFF), 1 (ON) or 2 TRAINING. Count is the number of times since PEC was turned on that TCSng saw an index pulse in other words the number of full revolutions of the worm gear. Index is how far along this rotation since the last index pulse. The index starts over at each new index pulse.

Only when the mode reports 1 (ON) is the periodic error being corrected.

If you sent a PECSTAT request like this TCSNG TCS 123 REQUEST PECSTAT

you would get back TCSNG TCS 123 [condtion] [count] [index] [mode] ie. TCSNG TCS 123 3 0 0 1

Conditon
Value Meaning
0OFF
1ON
3WAITING
Mode
Value Meaning
0OFF
1ON
2TRAINING

PECPROG

“PECPROG” returns two items, progress and correction . The progress is only non zero while the PEC is being trained. It is the percentage of the completed rotation of the worm gear since the index pulse. The correction is only non-zero when the pec is on. It will be zero when the pec is off or being trained. It is the amount the telescope will move in right ascension to correct for periodic error in arcseconds.

Commands

The only PEC command is “PEC” it has one argument. This argument can be “ON”, “OFF”, or “TRAING”. Anything else will be ignored with no indication from TCSng. If you turn the PEC on you will set the PECSTAT condition to 3 (WAITING) and the PEC mode to 1(ON). When the index pulse is found both the condition and the mode will report 1 (ON). Turning the PEC off will lose the index. Turning the PEC on when it is already on will set the PEC condition to 3 (WAITING) essentially turning off corrections until the next index pulse.

Commanding the PEC to TRAIN will make the current PEC corrections unavailable. Only someone with root access to the TCSng computer will be able to recover it.

Example Scripts

tcs/periodic_error_correction.txt · Last modified: 2014/06/17 19:23 by scott