GVA SUPPORT

³ 1362403844
Text:
	Բ = 5final

 :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);
            int U = 2047;
            Do(1, 0, 17, 50);
            Do(3, 0, 17, 50);
            Do(3, 0, 16, U);
            for (int i = 1; i <= 10; i++)
            {
                Do(1, 0, 16, i * 200);
                Time.Pause(35);
                int res_0 = Do(2, 0, 0, 0);
                int res_1 = Do(4, 0, 0, 0);
                double res0 = 5.0 * res_0 / 2047.0;
                double res1 = 5.0 * (res_1) / 2047.0;
                double temp = (res_0 * 5.0 / 2047.0) * 0.015 - 196.0;
                double R_x = 1000.0 * res1 / (5.0 - res1);
                string buf = String.Format("{0:0.#######}\t{1:0.#######}", R_x, temp);
                C.write(buf);
            }

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

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


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