示例#1
0
        static void Main(string[] args)
        {
            PCUSimulator pcu = new PCUSimulator();

            pcu.Connect();
            Console.Read();
        }
示例#2
0
 private void button1_Click(object sender, EventArgs e)
 {
     pcu = getPCUService();
     if (pcu != null)
     {
         pcu.EnAutoExp();
     }
 }
示例#3
0
 public Form1()
 {
     InitializeComponent();
     bus.Connect();
     UnregisterPCUService();
     Thread.Sleep(500);
     RegisterPCUService();
     pcu = getPCUObject();
     pcu.Connect();
 }
示例#4
0
 public SCBController()
 {
     otcBtn.ARelBtn = otcBtn.BRelBtn = otcBtn.XRelBtn = otcBtn.XYZRelBtn = otcBtn.YRelBtn = otcBtn.ZRelBtn = false;
     wsdBtn.ZRelBtn = tblBtn.FloatRelBtn = false;
     UnregisterPCUService();
     Thread.Sleep(500);
     RegisterPCUService();
     pcu = getPCUObject();
     pcu.Connect();
     bus.Connect();
     otcxyz = new OTCXYZControllerCLS(bus);
     wsd    = new WSDControllerCLS(bus);
     tbl    = new TBLControllerCLS(bus);
     col    = new CollimatorCLS(bus);
 }
示例#5
0
 /// <summary>
 /// Power up all axis controllers and UPS
 /// </summary>
 public void PowerUp()
 {
     UnregisterPCUService();
     Thread.Sleep(500);
     RegisterPCUService();
     pcu = getPCUObject();
     pcu.Connect();
     bus.StartBus();
     otcxyz.PowerUp();
     wsd.PowerUp();
     tbl.PowerUp();
     col.PowerUp();
     pcu.Connect();
     isPowerOn = true;
 }
示例#6
0
 private PCUSimulator getPCUObject()
 {
     try
     {
         ChannelServices.RegisterChannel(new TcpClientChannel(), false);
         PCUSimulator simulator = (PCUSimulator)Activator.GetObject(typeof(PCUSimulator), "tcp://localhost:6688/PCUSimulater");
         simulator.TestRomote();
         if (simulator != null)
         {
             //  MessageBox.Show("成功获取remote PCU");
         }
         return(simulator);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }