/// <summary>
        /// Executes the instrument I/O task.
        /// </summary>
        public BK2831E_ReadVoltageResults Run( )
        {
            if (_instrumentSession == null)
            {
                throw new ArgumentNullException("_instrumentSession");
            }

            BK2831E_ReadVoltageResults outputs = new BK2831E_ReadVoltageResults();

            // Query step
            // Does a VISA Write
            _instrumentSession.Write(":FETC?\n");
            // Parses out one ASCII number separated by one or more delimiters
            outputs.Token = _reader.ReadDouble();
            _reader.ReadMatch(",;\r\n\t");
            // Read and discard the rest of the response
            _reader.DiscardUnreadData();

            // Query step
            // Does a VISA Write
            _instrumentSession.Write(":FETC?\n");
            // Parses out one ASCII number separated by one or more delimiters
            outputs.Token2 = _reader.ReadDouble();
            _reader.ReadMatch(",;\r\n\t");
            // Read and discard the rest of the response
            _reader.DiscardUnreadData();

            return(outputs);
        }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
        /// <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);
        }