PROC K_IDTOMM
;Version 6
GOTO BEGIN
;
;#**************************************************************************
;#	****PROCEDURE HEADER****
;#
;# 	1.0 	Introduction
;#
;#		1.1	FOT Name:	K_IDTOMM
;#		     MMS-F Name:	IDLE_TO_MDI-M_FORM_1_OPT
;#		     SUM Issue:	3E
;#			Simulator Validation Status: Complete
;#	
;#		1.2	Date:
;#				Created:	18-JUL-94	
;#				Revision: 1.	2-FEB-95	HB
;#						2.	24-MAR-95	HB
;#						3.	5-26-95	RR
;#						4.	11-AUG-95	TB
;#						5.	11-SEP-95	TB
;#						6.	18-NOV-95	TB
;#
;#		1.3	Change Description:
;#
;#			1. Changed name to K_IDTOMM.  Added flexibility to perform this
;#			   procedure regardless of TM submode number.  Removed WAIT
;#			   statements after commands.
;#			2. Updated procedure per SUM 3B.  No TSTOL changes.
;#			3. added mdi proc
;#			4.	Updated to SUM 3C. Updated TBDs. No TSTOL Changes.
;#			5.	Updated SUM ISSUE. No TSTOL changes.
;#			6.	Changed all MDI procedures from tl to fl.
;#
;#		1.4	Point of Contact:	GMiller
;#			FOT Author:	MHill	ATSC/SOHO	286-4799
;#
;#**************************************************************************
;#	2.0	Description
;#
;#		2.1	Narrative Description
;#
;#			To change the TM mode from idle to MDI-M.
;#			To configure the experiment in MDI-M mode (No information 
;#			available about necessary operations for MDI-M transition 
;#			at experiment level.
;#			This procedure is now optional.
;#			
;#		2.2	Intended Use:
;#
;#			Change TM mode Idle to MDI-M, Acquisition Format 1 (optional)
;#
;#		2.3	Duration:	4 minutes 45 seconds		
;#
;#
;#		2.4  References:	SUM Part 7 Fig 1.1.1-1
;#
;#**************************************************************************
;#	3.0	Instructions for Use:
;#
;#		3.1	Parameters Required
;#
;#			None
;#
;#		3.2	Critical Activities
;#
;#			None
;#
;#		3.3	Special Constraints or Activities
;#
;#			Before initiating the mode transition at experiment level it 
;#			is necessary to wait up to 22.5 sec for idle mode to be 
;#			correctly settled 
;#
;#**************************************************************************
;#	4.0	STEPS:

BEGIN:

LOCAL TID

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

ASK "What telemetry subformat is the DHSS in (1-4)?"TID

				
WAIT UNTIL  (P@KKTMFID = "MR/HR $TID") 	;Check the current TM mode
WAIT UNTIL  (P@KKTMMODE = "IDLE") 	;Check the current TM mode


			;Initiating Idle to MM mode	
/KNK1ET6$TID	;Send TCM with data word 1 = 06 and  word 2 = 01.
/SEND
			;Up to 22.5 seconds may be necessary for the change to be 
			;effective and reported in the telemetry

WAIT UNTIL  (P@KKTMFID = "MR/HR $TID") ;Check the current TM mode
WAIT UNTIL  (P@KKTMMODE = "MDI M") 	;Check the current TM mode
			;(available at latest 3 formats after change is commanded).

s m_fl_idtomm

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