CCS Modul   E_TABLEROTATE
 
   $Id: e_tablerotate.C,v 1.8 2005/09/01 07:11:40 sniff Exp $
   ---------------------------------------------------------------------
   Short description: 	call of TABLE_ROTATE
   ---------------------------------------------------------------------
   Projekt:		ACC
   Sourcefile:		m_tablerotate.C
   Autor:		SSE/C.Hermann (20.02.96)
   Zielsystem:		PC Linux
   Sprache:		C++
   ---------------------------------------------------------------------
   Prototyp:
   MPI Schnittstelle
   int e_tablerotate(shm_stringpointer *zeilen_wert
	   ,long index1
	   ,long anzahl)
   
   ---------------------------------------------------------------------
   Aufruf: im Vectorinterpreter
   
	 (*funktionen[modulnummer])
	    (Ssp_expand_zeile
	     ,Ssp_expand_wert
	     ,p_verwaltung->begin_modulblock
	     ,p_verwaltung->anzahl_modulparameter);

   
---------------------------------------------------------------------
Description:
   
   Module parameters:
1 PRUEFSCHRITT
   	GAUDI step number
   ------------------------------
2 POSITION
   	PAV- Position
   ------------------------------
3 ANSTEUER_UNIT
   	Name of the device (see PAM-Config file)	
   ------------------------------
4 ACHSE
	definition of the used axis
	X or Y
5 KOORDINATE
	Coordinate-Value in deg (relative +/-180° to the
	desiered aim => ZIEL)
6 RUNDUNG
	rounding value for the value from KOORDINATE.
	(number of digits after the decimal point)
7 WINKELSPEED
	deg-speed in ged / sec
8 MODUS
	M : move to the desierd coordinate + wait
	    till the position is reached
	S : send the command to move to the desired coordinate to the control,
	    but do NOT wait till the position is reached.
	L : Wait till the engine has stopt
9 ZIEL
	AIM ; aim character of the Rotate-Control-Config-File
	T : Triple-mirror
	A : Absorber
	J : Justage
	Z : Aim-Simulator
	R : move to reference point
10 TIMEOUT
	Timeout in sec
11 ERGEBNIS
	return-value
12 FEHLERFLAG
   
   
   ...
   
---------------------------------------------------------------------------------------------------------------------
 Configuration
---------------------------------------------------------------------------------------------------------------------
   
 **Configuration of the Table-Rotate-Control** 
     
   In the main PAM-Config-File (i.e. ccs7483.cnf) you have to enter a line with the "UNITS".  
   Here you difine the link to the HW-UNIT-File (i.g. hw_units_ccs7483.cnf).
   
   Example of an entry in the  PAM-Config-File:
      UNITS			= hw_units_ccs7483.cnf
      
   In the HW-Unit-FILE must be an entry for the used Table-Control. 
   
   Format of the Entry-Line:
      Unit-Name;0;Driver-Typ;0;0;0;-;-; 	.
      
   Example:		
      DREHTISCH;0;0;0;0;0;-;-;
      
   When the testlist is loding the information of the Unit-Name and Drivertype are retrived.
   
   In our example:
      Unit-Name:	DREHTISCH
      Driver-Typ:	0	( 0 is ISEL )
   
   
   With this Information, the parameters for the serial connection are retrieved from the 
   PAM-Config-File (i.e. ccs7483.cnf) 
  
   
 **Configuration of the serial connection**     
   
   In the PAM-Config-File (i.e. ccs7483.cnf) has to be the entry TABLE_ROTATE_DEV_DREHTISCH_CNF.
   Here you define the link to the Serial-Config-File (i.e. tablerotate_dev.cnf).
   In this file are the definitions of the serail parameters.
.
   
   Example:
      PAM-Config-File:		
	 TABLE_ROTATE_DEV_DREHTISCH_CNF        = tablerotate_dev.cnf
   
      tablerotate_dev.cnf:
	 TR_DEVFILE		= /dev/ttyS0
	 TR_BAUDRATE		= 9600
  
  
 **Configuration of the rotate-control**
      
   In the PAM-Config-File (i.e. ccs7483.cnf) there has to be an entry  TABLE_ROTATE_<DrvTypName>_CNF
   (i.e. TABLEROTATE_ISEL_CNF for the ISEL-rotate-control).
   Here you define the link to the Rotate-Control-Config-File (i.e. tablerotate_isel.cnf). 
   In this file the parameters of the Rotate-Control are defined.

   Example:
      PAM-Config-File:		
	 TABLE_ROTATE_ISEL_CNF	= tablerotate_isel.cnf
   
   Rotate-Control-Config-Files:
      *-----------------------------------------------------------------------
      *| Config for ISEL-Control                                             |
      *|                                                                     |
      *| ! ACHTUNG AUTOMATISCH ERSTELLT; AENDERUNGEN KOENNEN VERLOREN GEHEN! |
      *|                                                                     |
      *| Erstellt : Wed Feb 20 13:47:18 2002                                 |
      *|                                                                     |
      *-----------------------------------------------------------------------
      * engine data
      *    1. entry : Max. Winkelgeschwindigkeit Grad/s 
      *    2. entry : Max. Ansteuerfrequenz Schritte / s
      *    3. entry : Min. Ansteuerfrequenz Schritte / s
      *    4. entry : Typ. Ansteuerfrequenz Schritte / s
      *    5. entry : Schrittweite Grad / Schritt       
      MOTDATA; 55.549999; 10000; 30; 4000; 0.005550

      * Liste of aims
      *  one aim per line
      *    1. entry : AIM (ZIEL) - caracter for GAUDI-Module       
      *    2. entry : Name (for dokumentation)
      *    3. entry : horizontal value                     
      *    4. entry : vertical   value                     
      G; GRUNDSTELLUNG                 ;      18018;          0
      N; NULLPUNKT                     ;         10;         20
      A; ABSORBER                      ;         30;         40
      T; SPIEGEL                       ;         50;         60
      J; JUSTAGE                       ;         70;         80
      Z; ZIEL                          ;         90;        100

   
  ---------------------------------------------------------------------
   Funktionsbeschreibung:
   
   Beschreibung der ModulÏbergabeparameter:
1 PRUEFSCHRITT
   	GAUDI PrÏfschritt
   ------------------------------
2 POSITION
   	PAV- Position
   ------------------------------
3 ANSTEUER_UNIT
   	Name des GerÌtes laut PAM Beschreibungsfile	
   ------------------------------
4 ACHSE
	Angabe der Achse, die verfahren werden soll
	X oder Y 
        bzw
        H = Horizontal
        V = Vertikal
5 KOORDINATE
	Koordinatenwert in Grad (Abweichung +/-180° vom
	Zielpunkt => ZIEL), der angefahren werden soll
6 RUNDUNG
	Rundungskriterium fuer Werte im Parameter KOORDINATE.
	Anzahl der Nachkommastellen
7 WINKELSPEED
	Winkelgeschwindigkeit in Grad / Sekunde
8 MODUS
	M : Anfahren der angegebenen Koordinate + warten, bis
	    der Motor die Position erreicht hat.
	S : Kommando : "anfahren der Koordinate" an Motorsteuerung
	    senden. Aber nicht warten, bis die Koordinate erreicht 
	    wurde.
	L : Warten, bis Motor "anfahren der Koordinate" abgeschlossen
	    hat.
        I: Initialisierung (Referenzfahrt und Anfahren Beladepunkt)
        C: ??
9 ZIEL
	Zielauswahl aus Motorbeschreibungsdatei
	T : Triple-Spiegel
	A : Absorber
	J : Justage
	Z : Zielsimulation
	R : Referenzfahrt
10 TIMEOUT
	Timeout in Sekunden
11 ERGEBNIS
	Rueckgabewert
12 FEHLERFLAG