t_set_regulation (ul_tecar)


   Synopsis:

      This function is called to set the "Tinker Toy" regulation on
      the TECAR server. The status return only reflects status for the
      computer on which this call was made -  to insure that TECAR
      actually did what was requested, the caller should call
      t_read_tt_regulation() and compare the returned values with the
      values that were sent the first time.


   Declarations (FORTRAN):

       CHARACTER TECAR_SERVER*8 /'tecar-a2'/
       REAL*4	 FEEDBACK_GAIN, FEEDBACK_TAU, FEEDBACK_V_BOUNDARY
       REAL*4	 GAIN_CHANGE_TAU
       INTEGER*4 SECTOR_SENSE, POWER_SUPPLY_HOUSE, REGULATION_CONTROL
       INTEGER*2 ISTAT, T_SET_REGULATION


   Declarations (ANSI C):

       #include "tecar.h"
       unsigned char TECAR_server[]="tecar-a2";
       short         istat;
       short t_set_regulation ( unsigned char *const TECAR_server,
                                float *const feedback_gain,
                                float *const feedback_tau,
                                float *const feedback_V_boundary,
                                float *const gain_change_tau,
                                unsigned int *const sector_sense,
                                unsigned int *const power_supply_house,
                                unsigned int *const regulation_control );


   Usage (FORTRAN):

      ISTAT = T_SET_REGULATION ( TECAR_SERVER, FEEDBACK_GAIN,
                                 FEEDBACK_TAU, FEEDBACK_V_BOUNDARY,
                                 GAIN_CHANGE_TAU, SECTOR_SENSE,
                                 POWER_SUPPLY_HOUSE, REGULATION_CONTROL )

   Usage (C):

      istat = t_set_regulation ( TECAR_server, feedback_gain,
                                 feedback_tau, feedback_V_boundary,
                                 gain_change_tau, sector_sense,
                                 power_supply_house,
                                 regulation_control );


   Usage (VAX generic format):

      istat.w.w = t_set_regulation ( TECAR_server.ar.b,
                                     feedback_gain.ar.f,
                                     feedback_tau.ar.f,
                                     feedback_V_boundary.ar.f,
                                     gain_change_tau.ar.f,
                                     sector_sense.ar.l,
                                     power_supply_house.ar.l,
                                     regulation_control.ar.l )


   Arguments:

      Input - readonly:

         TECAR_server	a character string which contains the Internet
                        name of the TECAR server. This name must be
                        resolvable via the Domain Name Service.
			This may be passed either as a pointer to a
		        null-terminated string, or by descriptor
			(under VMS only).

         feedback_gain  maximum gain

         feedback_tau   time constant

         feedback_V_boundary
                        controls the maximum gain

         gain_change_tau
                        delay in gain adjustment

         sector_sense   sector to be used

         power_supply_house
                        the regulating house:
                        House	Value
                        -----   -----
                         B2        0
                         C2        1
                         D2        2
                         E2        3
                         F2        4
                         A2        5
                         A3        6
                         F3        7
                         E3        8
                         D3        9
                         C3       10
                         B3       11

         regulation_control
                        -1 = on
                         0 = off


      Output:

         none


      Returns:

         istat          the status return in ACNET format