	SUBROUTINE RADIXCTR(COMAND)
C   Jim Walker, 17-NOV-87 for RADIX patch to Diffrac-500.
C   Look in the diffractometer description for the name Philips or Radix.
C   If this is the wrong data collector, call up the right one.
C   Note: use LIB$DO_COMMAND instead of SPAWN so VMS will worry
C   about the exit status for me.  
C   This violates the siemens programming convention of only having
C   one exit point in a program because LIB$DO_COMMAND never returns.
C
	INCLUDE '[102,2]INP.COM'
	INCLUDE '[102,2]IOBLK.COM'	! for IUNIT
	INCLUDE '[102,2]RAWDES.COM'	! for MESPRO
	INCLUDE '[102,2]RAWSPC.COM'	! for MESFLG & IOVER
	INCLUDE '[102,2]XRYDES.COM'	! for DIFDES
	CHARACTER*(*) COMAND
C
C   Look for the name Philips or Radix in the diffractometer description.
C
	IF( (INDEX(DIFDES,'Philips').EQ.0) .AND.
	1 (INDEX(DIFDES,'PHILIPS').EQ.0) .AND.
	2 (INDEX(DIFDES,'Radix').EQ.0) .AND.		
	3 (INDEX(DIFDES,'RADIX').EQ.0) ) THEN
C
C   The name wasn't there.  Clean up the raw file and chain to
C   the right Siemens program.
C
C  First, clear the "measurement in progress flag and close the raw file.
C  This code was copied from the clean up at the end of Siemens DPMES
C  program.
	   MESFLG = 0 !! Sample not measured		
	   IUNIT  = IRAW					
	   IOVER  = 0					
	   CALL RAWHEW					
	   CALL CLORAW('N')           ! close the 'normal' RAW-data file
C
	   CLOSE(ISCR2)	! Close communications file
	   CALL RESUME		      ! wake up the main menu program
	   IF(MESPRO.NE.8) THEN				
C	Normal data collector - Siemens name = ME1, our name = DC1
		CALL LIB$DO_COMMAND('NB1 '//COMAND)	
	   ELSE						
C	Quant data collector - Siemens name = DPQ, our name = DCQ
		CALL LIB$DO_COMMAND('NB2 '//COMAND)	
	   ENDIF
	ENDIF						
C
C  Return to collect data on the radix databox.
	RETURN
	END
