I trying to get measurement From the Power Supply Agilent E3634 but I become this error (-440 Query UNTERMINATED after indefinite response)
This is my Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Management;
using System.IO.Ports;
using System.IO;
namespace ConsoleApplication1
{
class PortDataReceived
{
public static void Main()
{
SerialPort mySerialPort = new SerialPort("COM1");
mySerialPort.BaudRate = 9600;
mySerialPort.Parity = Parity.None;
mySerialPort.StopBits = StopBits.Two;
mySerialPort.DataBits = 8;
mySerialPort.Handshake = Handshake.None;
mySerialPort.RtsEnable = true;
mySerialPort.ReadTimeout = 1000;
mySerialPort.Open();
mySerialPort.WriteLine("MEAS:VOLT?");
Thread.Sleep(750);
string voltagevalue = mySerialPort.ReadExisting();
Console.WriteLine(voltagevalue);
mySerialPort.Close();
}
}
}
Hi,
you must add LF (line feed) character at the end of each command. For receive data, DTR line must be high. Tested on my E3634 with VB6, VB.net 2015 on PC under windows 7 64 bits.
Regards
Yves