/// <summary> /// Executes the instrument I/O task. /// </summary> public pingBK2831eResults Run( ) { if (_instrumentSession == null) { throw new ArgumentNullException("_instrumentSession"); } pingBK2831eResults outputs = new pingBK2831eResults(); // Query step // Does a VISA Write _instrumentSession.Write("*IDN?\n"); // Parses out one ASCII string as long as the specified string length outputs.Token = new string(_reader.ReadChars(17)); // Read and discard unparsed response data _reader.ReadMismatch(",;\r\n\t"); _reader.ReadMatch(",;\r\n\t"); // Parses out one ASCII string separated by one or more delimiters outputs.Token2 = _reader.ReadMismatch(",;\r\n\t"); _reader.ReadMatch(",;\r\n\t"); // Parses out one ASCII string separated by one or more delimiters outputs.Token3 = _reader.ReadMismatch(",;\r\n\t"); _reader.ReadMatch(",;\r\n\t"); // Read and discard the rest of the response _reader.DiscardUnreadData(); return(outputs); }
/// <summary> /// Executes the instrument I/O task. /// </summary> public DUTMfgModeResults Run( ) { if (_instrumentSession == null) { throw new ArgumentNullException("_instrumentSession"); } DUTMfgModeResults outputs = new DUTMfgModeResults(); // Query step // Does a VISA Write _instrumentSession.Write("mfgt= 1\n"); // Parses out one ASCII string separated by one or more delimiters outputs.Token = _reader.ReadMismatch(",;\r\n\t"); _reader.ReadMatch(",;\r\n\t"); // Read and discard the rest of the response _reader.DiscardUnreadData(); // Read step // Read and discard unparsed response data _reader.ReadMismatch(",;\r\n\t"); _reader.ReadMatch(",;\r\n\t"); // Parses out one ASCII string separated by one or more delimiters outputs.Token2 = _reader.ReadMismatch(",;\r\n\t"); _reader.ReadMatch(",;\r\n\t"); // Read and discard the rest of the response _reader.DiscardUnreadData(); return(outputs); }