Exemplo n.º 1
0
        public QJ55A(string section)
        {
            id = section;
            if (Util.ConstIni.StringValue(id, "Type") == "GPIB")
            {
                dev = new GPIBDevice("GPIB0::" + Util.ConstIni.StringValue(id, "Address") + "::INSTR");
            }
            else
            {
                dev = new SerialDevice("COM" + Util.ConstIni.StringValue(id, "Address"), 9600, System.IO.Ports.Parity.None, 8, System.IO.Ports.StopBits.One);
            }

            inbuffer          = new StringBuilder(100);
            dev.DataRecieved += new StrEventHandler(ParseData);
        }
Exemplo n.º 2
0
        public Scanner(string section)
        {
            id     = section;
            bInUse = (Util.ConstIni.IntValue(id, "InUse") == 1);
            if (Util.ConstIni.StringValue(id, "Type") == "GPIB")
            {
                dev = new GPIBDevice("GPIB0::" + Util.ConstIni.StringValue(id, "Address") + "::INSTR");
            }
            else
            {
                dev = new SerialDevice("COM" + Util.ConstIni.StringValue(id, "Address"), 9600, System.IO.Ports.Parity.None, 8, System.IO.Ports.StopBits.One);
            }

            stype = (ScannerType)Util.ConstIni.IntValue(id, "Model");
        }
Exemplo n.º 3
0
 public QJ55A(string section)
 {
     id = section;
     if (Util.ConstIni.StringValue(id, "Type") == "GPIB")
         dev = new GPIBDevice("GPIB0::" + Util.ConstIni.StringValue(id, "Address") + "::INSTR");
     else
         dev = new SerialDevice("COM" + Util.ConstIni.StringValue(id, "Address"), 9600, System.IO.Ports.Parity.None, 8, System.IO.Ports.StopBits.One);
     
     inbuffer = new StringBuilder(100);
     dev.DataRecieved += new StrEventHandler(ParseData);
 }
Exemplo n.º 4
0
        public Scanner(string section)
        {
            id = section;
            bInUse = (Util.ConstIni.IntValue(id, "InUse") == 1);
            if (!bInUse)
                return;
            if (Util.ConstIni.StringValue(id, "Type") == "GPIB")
                dev = new GPIBDevice("GPIB0::" + Util.ConstIni.StringValue(id, "Address") + "::INSTR");
            else
                dev = new SerialDevice("COM" + Util.ConstIni.StringValue(id, "Address"), 9600, System.IO.Ports.Parity.None, 8, System.IO.Ports.StopBits.One);

            ch_start = Util.ConstIni.IntValue(id, "Channel_Start");
            ch_end = Util.ConstIni.IntValue(id, "Channel_End");

            stype = (ScannerType)Util.ConstIni.IntValue(id, "Model");
        }