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.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting EABO timeout error with Tektronix Scope

I am a student working on a project for Institute of Plasma Research India
to develop an application in C using Borland C/c++ 4.0 Builder for data acquisition from a Tektronix TDS540D oscilloscope.
I Am using windows98 as my OS
I have Made this rudimentary program to begin with adapted from an example file.


#include
#include
#include

void main() {

int osc,i;
char reading[30];

if ((osc = ibdev(0, 1, 0, T10s, 1, 0)) < 0)
report_error(osc,"Could not open Oscilloscope");

ibwrt(dmm, "*IDN?", 13L);
if (ibsta & ERR)
report_error(osc,"Could not initialize Oscilloscope");

ibrd(osc, reading, 20L);
if (ibsta & ERR)
report_error(osc, "Could not read data from oscilloscope");

reading[ibcnt] = '\0';

printf("Data read: %s\n", reading);



/*Request voltage Reading*/

ibwrt(dmm, "VOLTS?", 6L);
if (ibsta & ERR)
report_error(osc, "Could not trigger oscilloscope");

ibrd(osc, reading, 20L);
if (ibsta & ERR)
report_error(osc, "Could not read");


reading[ibcnt] = '\0';

printf("Data read: %s\n", reading);




ibonl(osc, 0);
}

report_error(int fd, char *errmsg) {

fprintf(stderr, "Error %d: %s\n", iberr, errmsg);
if (fd != -1) {
printf("Cleanup: taking board off-line\n");
ibonl(fd,0);
}
exit(1); /* abort program */
}




After the execution of the program by manually linking this to Borlandc_gpib32.obj file The scope gives the correct information regarding its identification.
However when it comes to the part for taking a reading , i get a EABO error citing time out operations.
Now I am assuming that this is because the command i used to trigger the scope to take voltage readings was incorrect..
Do I need to trigger it to set it up to take Voltage treadings in say DC and then take the readings?..
Ia "VOLTS?" the correct command to take the reading for voltage?
Could Anyone enlighten me on the correct commands used with this instrument?
Thanx a lot.
0 Kudos
Message 1 of 3
(3,171 Views)
Hello,

I looked all over Tektronix's website for a copy of their programmer's reference manual which would be of great assistance in this matter. It seems to be included with the user manual only on disk, so if you happen to have that, it should answer your question regarding the setup of the scope to take a voltage measurement and the proper commands to do so.

Your diagnoses of the problem is most likely correct, especially if you are getting the EABO Timeout error as a result of the ibrd(osc, reading, 20L) command. If you are getting the error in the write, you are having a handshaking or negotiation problem (though since the *IDN? is successful, I doubt that this is the case). If this is not quite what you are seeing or you have further questions that
you feel I can address, just reply to me here.

Incidentally, I noticed looking over your code that the IBWRT() call that sends the *IDN? has a write count of 13, which is more than required. This could possibly be sending odd characters to the scope and confusing it, so you might want to check over that line of code as well.

Scott B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,171 Views)
Thank You Scott B for you insight.
I too had the idea to scour the tektronix site for a programmers manual but was unable to find one for the model I am working on.
I will lessen the count for the"*IDN" command and see whether that will have an effect, though of course I realize there is no substitute for the proper command words.It seems that the most likely and fruitful solution to my problem now is to try and get the programmer's manual or related literature,then I should be able to get a bearing on where the program stands.
Thank you for your assistance.
0 Kudos
Message 3 of 3
(3,171 Views)