From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-27-2014 04:36 AM
I have a device name Time Electronics 5075. I am trying to use the SimpleReadWrite.2010 in National Instruments\NI-488.2\Examples\DotNET4.0\SimpleReadWrite\cs to comunicate with the device.
I can open the connection and send commands to the device by using this code
device = new Device((int)boardIdNumericUpDown.Value,(byte)primaryAddressNumericUpDown.Value,(byte)currentSecondaryAddress); device.IOTimeout = TimeoutValue.T100s; device.Write("X0/A1/F0{13}");
But I am stuck at
stringReadTextBox.Text = device.ReadString();
I get the error "Time limit exceeded to complete operation."
I don't know exactly should I add
device.Write("T/D{13}");
before the device.ReadString() or not. But I get the same error for both cases.
Some info: Visual Studio 2010, Measurement Studio 2013, NI.488.2, Windows 7 Pro
Any idea?
10-27-2014 11:06 AM
Have you actually read the manual for this instrument or are you just guessing?
10-28-2014 03:44 AM
I did read the manual. But it is quite short that you can see in the attachment. Thanks
10-28-2014 07:21 AM
Hi,
instead of: device.Write("X0/A1/F0{13}");
try
device.Write("X0/A1/F0\n");
or
device.Write("X0/A1/F0\r");
Given the age of your device you might have to change some of the settings for your gpib board. (Bus timing for example)
Are you able to communicate with the device in NI-MAX?
Curt
10-29-2014 02:26 AM - edited 10-29-2014 02:44 AM
Hi,
I have adjusted my code according to your suggestions and now I can send commands to the instrument except reading data from it. I also changed the bus timing but it does not work. I cannot use NI MAX to communicate with the instrument. It just does not show when scanning instruments even though another TE 5025 instrument connects in the same GPIB cable and working normally. I guess the reason NI MAX does not work with TE 5075 sine it is compatiple with IEEE 488/1978 interface bus but NI GPIB USB HS is compatiple with IEEE 488.2. However EasyCal, a software that accompanies with the TE 5025 communicate normally with it. Any new idea?
Many thanks,
Thang
10-29-2014 04:19 AM
Hi,
Did you try sending
device.Write("D\n");
before the readstring command?
Curt
10-29-2014 04:39 AM
Hi,
Yes, I did. Hereafter is my actions (just for testing) by entering a single command into a text box and send to the instrument by pressing the Send button, i.e not hard code.
device.Write("A0\n"); // AUTORANGE OFF -> worked
device.Write("A1\n"); // AUTORANGE ON -> worked
device.Write("X1\n"); // 150ms -> worked
device.Write("X0\n"); // FILTER OFF -> worked
device.Write("F1\n"); // AC VOLTAGE ->worked
device.Write("F0\n"); // DC VOLTAGE -> worked
device.Write("T\n"); // TAKE READING -> worked
device.Write("D\n"); TRANSMIT VALUE TO IEEE -> nothing happens
Press Read button
device.ReadString(); -> timeout error
Thanks
Thang
10-29-2014 05:57 AM
HI,
Have you used NI OI Trace or NI-Spy to track comms between the pc and meter?
Curt
10-29-2014 06:38 AM
Hi,
There might be an issue with the terminating character.
In the manual it states
6.10 Terminating Character
All command strings must end with a terminator character for the string to execute. This may
be either a line feed or carriage return character as set by the T1 or T2 command.
but there's no T! or T2 listed in the command set
There's a V1 and V2
Maybe you can try sending one of these commands to set the terminating character
Jusu a thought
Curt
10-29-2014 10:39 PM - edited 10-29-2014 10:50 PM
Thank you Curt_C,
I have attached the screen capture of NI IO Trace. I just open the session, send two commands T\n and D\n to the device and readstring. The red one are errors on reading. The last one is close session.
I think \n is the correct terminator. It works with most of commands, just get stuck with ReadString.
Kind regards,
Thang
PS: I also attached GPIB Interface Properties for more info