PROC C_FL_MANPREP
;VERSION 1
GOTO BEGIN
;
;#**************************************************************************
;#	****PROCEDURE HEADER****
;#
;# 	1.0 	Introduction
;#
;#		1.1	FOT Name: 	C_FL_MANPREP
;#		   	CDS Name:      C_TS_MANPREP	
;#		   	CDS Issue:	
;#			Simulator Validation Status:
;#
;#		1.2	Date Created:  19-NOV-95
;#			    Revision: 1) 30-NOV-95 
;#
;#		1.3	Change Description:	
;#
;#			1) Changed TS to FL. Changed the logic of the
;#			   IF ESLE to check for 16 or 32.
;#
;#		1.4	Point of Contact:	Jeff Pain
;#			FOT Author:  Tom Moore ATSC/SOHO 286-4799
;#
;#**************************************************************************
;#	2.0	Description
;#
;#		2.1	Narrative Description
;#            
;#             Prepares the CDS instrutment for S/C maneuvers.
;#			It is assmued that ALL S/C maneuvers take place
;#             during ground contact. It is assmued that under 
;#             normal circumtances that S/C maneuvers are pre-planned           
;#             and contained in the SOHO time-line for the day. Thus
;#             the CDS planning tools should take care to ensure that 
;#             observations are terminated be for S/C maneuvers.
;#
;#		2.2	Intended Use:
;#             To safe the CDS instrument before a S/C maneuvers.
;#			
;#
;#		2.3	Duration:	
;#
;#		2.4	References: Memo from Eric Sawer to Rich Kavanagh
;#                         dated 24/8/95.
;#
;#**************************************************************************
;#	3.0	Instructions for Use:
;#
;#		3.1	Parameters Required
;#
;#			C_FL_SHUTDOORS
;#
;#		3.2	Critical Activities
;#
;#			TBD
;#
;#		3.3	Special Constraints or Activities
;#
;#			TBD
;#**************************************************************************
;#	4.0	STEPS:

BEGIN:

IF (P@CMD_STATE#TELECOMMAND = "AVAILABLE") THEN
ELSE
	/CLEAR		;Clearing the Command Buffer.
ENDIF

LOCAL standby, snooze
LET standby = 32
LET snooze = 16

IF ((CKCMODE .NE. $standby) .OR. (CKCMODE .NE. $snooze)) THEN
     ;---------------------------------------
     ; CB4DIS ==> Disable Deferred Commands.
     ;---------------------------------------
     /CMD CB4DIS
     WAIT ; Check command buffer
     /SEND
     WAIT 60
     ;---------------------------------------
     ; CB5ABORT ==> Abort Sequence.
     ;---------------------------------------
     /CMD CB5ABORT
     WAIT ; Check command buffer
     /SEND
     WAIT 60
     ;---------------------------------------
     ; CB5SBY ==> Standby Mode.
     ;---------------------------------------
     /CMD CB5SBY
     WAIT ; Check command buffer
     /SEND
     WAIT UNTIL (CKCMODE .EQ. $standby)

ELSEIF (CKCMODE .EQ. $snooze) THEN
     ;---------------------------------------
     ; CB5SBY ==> Standby Mode.
     ;---------------------------------------
     /CMD CB5SBY
     WAIT ; Check command buffer
     /SEND
     WAIT UNTIL (CKCMODE .EQ. $standby)  
ELSE 
     ;-------------------------------------
     ; Mode of instrument is unkown!
     ; 'GO' to exit procedure.
     ;-------------------------------------
     WAIT
     GOTO OUT
ENDIF

;------------------------------------------
; Type 'GO' to start the procedure to  
; shut the CDS instrument doors.
;------------------------------------------
WAIT
START C_FL_SHUTDOORS
   
OUT:
;#************************************************************************** 
;#	5.0	Final Constraints
;#
;# Monitor the CDS S/C temperature sensors.
;#
;# After the S/C maneuver is over run the 
;# procedure c_ts_man_rec.
;#
;#**************************************************************************
RETURN
ENDPROC