GVA SUPPORT

³ 1362406930
Text:
	Բ = 6final

 :using System;
using System.Collections.Generic;
using System.Text;

namespace EXP
{
    partial class user
    //class user
    {
        static int Do(int N, int A, int F, int D_In) { return C.Do(N, A, F, D_In); } 
        public static void UserStendInit()
        {
            //---------Students code----------------BEGIN
            //C.SetStend1();		
            C.SetStend2();
            //C.SetStend3();
            //---------Students code----------------END
        }
//++++++++++++++++++++++++++++++++++++++++++++++++++++++
        public static void UserCrateInit()
        {
            // C.SetDAC(3);	        			//example
            //---------Students code----------------BEGIN
            //C.SetStep(1);
            C.SetADC(2);
            //C.SetCAS(3);
            C.SetDAC(1);
            C.SetDAC(3);
            C.SetADC(4);
            //---------Students code----------------END
        }
//++++++++++++++++++++++++++++++++++++++++++++++++++++++
        public static void UserConnect()
        {
            // Connect.Set(3, 1, 0, 3);			//example
            //---------Students code----------------BEGIN
            Connect.Set(1, 1, 0, 5);
            Connect.Set(2, 1, 0, 6);
            Connect.Set(3, 1, 0, 1);
            Connect.Set(4, 1, 0, 2);
            
            //---------Students code----------------END
        }
//++++++++++++++++++++++++++++++++++++++++++++++++++++++
        public static void Experiment()
        {
            /*
            double T1 = Time.get();
            for (int n = 0; n < 10; n++)
            {
                Console.Beep(5000, 200);
                Time.Pause(1.25);
            }
            double T2 = Time.get();
            double dT = T2 - T1;
            Console.Beep(3000, 500);
            return;
            */


            // int u = Do(3, 0, 0, 0);
            
            double temp;
            Do(1, 0, 17, 50);
            Do(1, 0, 16, 1500);
            Time.Pause(15);
            double res_0, res, T;
            for (int i = 1; i <= 150; i++)
            {
                res_0 = Do(2, 0, 0, 0);
                res = res_0 / 2047.0;
                temp = 78 + res / 0.015;
                T = 0.5 * i;
                if (temp < 81)
                {
                    Do(1, 0, 16, 1500);
                }
                else
                {
                    Do(1, 0, 16, 0);
                }
                Time.Pause(0.35);
                string buf = String.Format("{0:0.#######}\t{1:0.#######}", T, temp);
                C.write(buf);
                temp = 0;
            }

            //---------Students code----------------END
        }

        //++++++++++++++++++++++++++++++++++++++++++++++++++++++
    }
}


====================================