PROC G_FL_RTNSAF_M
;Version 4
GOTO BEGIN
;
;#**************************************************************************
;#	****PROCEDURE HEADER****
;#
;# 	1.0 	Introduction
;#
;#		1.1	FOT Name:		G_FL_RTNSAF_M
;#		    MMS-F Name:	N/A	
;#		    SUM Issue:		N/A
;#			Simulator Validation Status:
;#
;#		1.2	Date Created:	11-SEP-94
;#				Revision:	1. 14-NOV-94	MH
;#						2. 25-APR-95	MH
;#						3. 19-OCT-95	TB
;#						4.  6-DEC-95	MH	
;#
;#		1.3	Change Description:	
;#
;#			1. Deleted 2 sub heater turn-ons as not necessary
;#			2. Deleted /GCPORPR, /GCQWRPR after initial substitution heater
;#			   check as they are not necessary (informed by J. Charra).
;#			   Changed Sub Heater A cmd from /KNQG1FR to /KNQGAFR.
;#			3. Changed name from TS -> FL. No TSTOL Changes.
;#			4. Deleted hard waits from beginning of proc - vacuum etc.
;#			   Deleted commands for substitution heaters. OCD-40.
;#			
;#		1.4	Point of Contact:	CCazeau	286-6374
;#			FOT Author:	MHill	ATSC/SOHO	286-4799
;#
;#**************************************************************************
;#	2.0	Description
;#
;#		2.1	Narrative Description
;#
;#			If door was open when "Emergency Switch-OFF took place, Door will
;#			be closed as soon as possible
;#
;#		2.2	Intended Use:
;#
;#			RETURN TO SAFE AFTER FS MAIN CHANNEL EMERGENCY SWITCH-OFF 
;#
;#		2.3	Duration:	5 min
;#
;#		2.4	References:
;#
;#**************************************************************************
;#	3.0	Instructions for Use:
;#
;#		3.1	Parameters Required
;#
;#			None
;#
;#		3.2	Critical Activities
;#
;#			None
;#
;#		3.3	Special Constraints or Activities
;#
;#			Perform Switch-ON prerequisites from G_FL_PWRON included below.
;#
;#**************************************************************************
;#	4.0	STEPS:

BEGIN:

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

WAIT	;Check GOLF Units are within temperature ranges

/GCDOMPN	;Select Door Main Power (Nom)
/GCDOMMN	;Select Door Main Motor (Nom)
WAIT		;Verify command buffer contents
/SEND
	
WAIT 5		;For POCC processing delay

;SWITCH GOLF MAIN POWER ON
/KNGPWANN	;Nominal
WAIT		;Verify command buffer contents
/SEND
WAIT UNTIL (P@GSPWA = "ON")


WAIT	;CHECK EXPERIMENT INPUT CURRENTS GIPWA AND GIPWB

;CHECK GOLF ENTRANCE DOOR IS CLOSED
/GBDOCL
WAIT		;Verify command buffer contents
/SEND
WAIT 80

WHILE (GSDO <> 0) DO
	/GBDOCL
	WAIT		;Verify command buffer contents
	/SEND
	WAIT 80
ENDDO

;SWITCH GOLF MAIN POWER OFF WITH NOMINAL COMMAND
/KNGPWAFN	;NOMINAL
WAIT 		;Verify command buffer contents
/SEND
WAIT UNTIL (P@GSPWA = "OFF")
WAIT UNTIL (GIPWA = 0)

;#************************************************************************** 
;#	5.0	Final Constraints
;#
;#		None
;#
;#**************************************************************************
ENDPROC