07-21-2006 08:11 PM
07-24-2006 06:22 PM
Hello,
Are you sure this is a valid termination method for your instrument? If so, make sure it is configured properly. Are you getting an error? You may also want to try out Hyperterminal to see if you can get a response from your device using this program. Let me know how this goes.
07-25-2006 03:51 AM
Thank you for your response.
I had tryed posted code to open instrument and when I used simple readstring function
(ex:
gpib.Write("OFORMAT ASCII");
string str = gpib.ReadString()
)
I met exception of read timeout.
So I changed read function like this.
public double ReadDCV()
{
gpib.Write("OFORMAT ASCII");
string str = gpib.ReadString(18);
return Convert.ToDouble(str)*1000; //make to mV
}
When I debugged above code, str contains 16 byte string data and 2byte (\r\n).
So I checed device send \r\n terminated string to my program.
Acually by above method I successfuly read ascii values from instrument.
But I would like to know the open method for this type of instrument
by simple ReadString function by using some change of open device setting.
Any suggestion would be greatly appreciated.
PS.
NI MAX also does not read from this device(HP3458A DVM) because of string termination.