//default baudrate is 2400 public Bath7341(string section) { this.id = section; string port = Util.ConstIni.StringValue(section, "PORT"); inbuffer = new StringBuilder(100); bInUse = false; dev = new SerialDevice(port, 2400, Parity.None, 8, StopBits.One); dev.DataRecieved += new StrEventHandler(DataHandler); if (dev.Open()) { bInUse = true; } }
//default baudrate is 9600 public WD1529(string section) { this.id = section; string port = Util.ConstIni.StringValue(section, "PORT"); inbuffer = new StringBuilder(100); bInUse = false; invalid_rdg.reading = Convert.ToDecimal(-9999); invalid_rdg.time = DateTime.Now; rdgs[0] = rdgs[1] = rdgs[2] = rdgs[3] = invalid_rdg; dev = new SerialDevice(port, 9600, Parity.None, 8, StopBits.One); dev.DataRecieved += new StrEventHandler(MyDataHandler); if (dev.Open()) { bInUse = true; } }
public FL1560(string section, Scanner2560 sc) { id = section; sc2560 = sc; Serial = Util.ConstIni.StringValue(section, "SERIAL"); dev = new SerialDevice(Util.ConstIni.StringValue(section, "PORT"), 2400, Parity.None, 8, StopBits.One); dev.DataRecieved += new StrEventHandler(DataHandler); marks = new Dictionary <string, string>(); bStable = true; if (dev.Open()) { dev.ClearInBuffer(); bInUse = (TalkTryThree("*IDN?").StartsWith(Serial)); if (!bInUse) { dev.Close(); } } }
//default baudrate is 2400 public Oven9260(string section) { this.id = section; string port = Util.ConstIni.StringValue(section, "PORT"); inbuffer = new StringBuilder(100); bInUse = false; dev = new SerialDevice(port, 2400, Parity.None, 8, StopBits.One); dev.DataRecieved += new StrEventHandler(DataHandler); if (dev.Open()) bInUse = true; }
//default baudrate is 9600 public WD1529(string section) { this.id = section; string port = Util.ConstIni.StringValue(section, "PORT"); inbuffer = new StringBuilder(100); bInUse = false; invalid_rdg.reading = Convert.ToDecimal(-9999); invalid_rdg.time = DateTime.Now; rdgs[0] = rdgs[1] = rdgs[2] = rdgs[3] = invalid_rdg; dev = new SerialDevice(port, 9600, Parity.None, 8, StopBits.One); dev.DataRecieved += new StrEventHandler(MyDataHandler); if (dev.Open()) bInUse = true; }
public ScannerST4012A(string section) { this.id = section; inbuffer = new StringBuilder(); string port = Util.ConstIni.StringValue(section, "PORT"); serial = Util.ConstIni.StringValue(section, "SERIAL"); version = Util.ConstIni.StringValue(section, "VERSION"); dev = new SerialDevice(port,9600,Parity.None,8,StopBits.One); (dev as SerialDevice).NewLine = "\r"; dev.DataRecieved += new StrEventHandler(MyDataHandler); bInUse = false; if (dev.Open()) { dev.ClearInBuffer(); dev.Send(String.Format("LFST4012 {0} R Y\r", serial), true); Thread.Sleep(200); response = ""; dev.Send(String.Format("LFST4012 {0} I V\r",serial), true); Thread.Sleep(200); bInUse = (response == version); if (!bInUse) dev.Close(); } }
public FL1560(string section,Scanner2560 sc) { id = section; sc2560 = sc; Serial = Util.ConstIni.StringValue(section, "SERIAL"); dev = new SerialDevice(Util.ConstIni.StringValue(section, "PORT"),2400,Parity.None, 8, StopBits.One); dev.DataRecieved += new StrEventHandler(DataHandler); marks = new Dictionary<string, string>(); bStable = true; if (dev.Open()) { dev.ClearInBuffer(); bInUse = (TalkTryThree("*IDN?").StartsWith(Serial)); if (!bInUse) dev.Close(); } }