Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

iberr == 6[0x6] during execute ibwrtf (Tektronix TDS420)

Why do I get the error message iberr == 6[0x6] when I execute the application? The application communicates with an Tektronix TDS420. The debugger show the function ibwrtf.
Thank you for help.
0 Kudos
Message 1 of 14
(6,451 Views)

TeckEl,

Error 6 is a timeout error.  It means that the command did not go through in the time allotted for it to execute.  This usually means either that there is a problem with the communications link (cable is disconnected, instrument is not ready to receive the command, instrument is not powered on, etc.) or that the command needs more time to execute.  If other commands seem to execute fine and this command is writing a large file, you may need to increase your timeout.  Otherwise, try making sure that the instrument is connected, powered on and responds to other commands, such as the identification command (usually "*IDN?" without the quotes).  You will probably find the problem during this process.

Sincerely,

RossC

Message 2 of 14
(6,443 Views)

Dear RossC,

I´ve set the timeout from 100s to 1000s but it does not help.
Their are 6 devices on the GPIB and all inints does work even the TDS420 init.
So I think every conection is correct.
Could it be that the path is too long?

 
Do you have an other idea?
0 Kudos
Message 3 of 14
(6,440 Views)

The problem is solved. I used the function ibtmo, it was not included. And I´ve set the timeout to 100s.

Thank you

0 Kudos
Message 4 of 14
(6,434 Views)

I'm having the same problem. I want to acquire signals with a Kethley voltmeter and even if I put the time out at 100s it is still giving me the same error message : 6(0x6). I've already posted questions and read some previous posts but I can't find the solution.

For example, the time out is related to the GPIB or the voltmeter?. If I set time out to 10 s, that means I give the voltmeter 10s to do what it is told ?

 

I get the error message many times : for ibwrt function, ibwait, ibrd ...

0 Kudos
Message 5 of 14
(5,104 Views)

@_trent_ wrote:

I'm having the same problem. I want to acquire signals with a Kethley voltmeter and even if I put the time out at 100s it is still giving me the same error message : 6(0x6). I've already posted questions and read some previous posts but I can't find the solution.

For example, the time out is related to the GPIB or the voltmeter?. If I set time out to 10 s, that means I give the voltmeter 10s to do what it is told ?

 

I get the error message many times : for ibwrt function, ibwait, ibrd ...



Reading and writing to a voltmeter is usually not very complicated.

Perhaps you can post a brief snippet of the LabWindows/CVI code you have.

 

 

0 Kudos
Message 6 of 14
(5,096 Views)

Ok,

First, I call the function:

short k1944a_ready (void)
{
    short i;
	
					   
    do { ibwait (bd, 0x4800); ibrsp (bd, &sp); 	 i++; }
    while ((!(sp & 16))&&(i<10));
    if (i==10)
        {
         MessagePopup ("", "Le volmËtre ne rÈpond plus");
         return 0;
        }
			
		
    return 1;
} 

 

from the instrument librairy.

Sometimes the first breakpoint I have is at ibwait line.

Second, I call the function : Mesure_V2(nb_pts,Vb);
This function calls :

void k1944a_acquisition (int voie, int mod, double niveau, int np, double t[])
	
	{
    short i;
    calibre_precedent = 1000;
    while ((calibre[voie]!=calibre_precedent)||(i != np))
        {
        calibre_precedent = calibre[voie];
        k1944a_trigger (voie, mod, 1, niveau, 1);
        i = k1944a_lire_buffer (voie, t);
        }

 

Then k1944a_trigger (voie, mod, 1, niveau, 1); calls :

void k1944a_trigger (int voie, short mode1, int mode2, double niveau, int attendre)
{
    mode1 += mode2;
    if ((mode1>=20)&&(mode1<=23))   Fmt (chaine, "C%dT%d,%fX",  voie, mode1, niveau);
    else                            Fmt (chaine, "C%dT%dX",     voie, mode1);
    k1944a_ecrire (chaine);
    if (attendre != 0)
        {
        k1944a_reading_done ();
        }
}

 and k1944a_ecrire (chaine); calls :

 

short k1944a_ecrire (char *texte)
{
    short ok;
    ibwrt (bd, texte,(long)strlen(texte));
    ok=k1944a_ready ();
    if (ok==0) return 0;
    return 1;
    }

 

where I have problem with ibwrt.

 

To initialize the instrument the function is :

 

short k1944a_init (void)
{
    short ok;
    //bd = OpenDev ("k1944", "");
	bd = ibdev(0,  9,  0,  T100s,
                 1,  0);

	
    if (bd < 0) return  -1;
   // ibclr (bd);
    Delay (1.0);
/*  ibdma (bd, 1);      */
    calibre[1] = 100; calibre[2] = 100;
    ok=k1944a_ecrire ("M24Q0X"); /*si ok=0, le voltmËtre ne rÈpond pas ‡*/
                                 /* l'ordre d'Ècriture                  */
    if (ok==0) return -1;
    return 0;
}

 

 

If you need more tell me.

 

 

Thanks.

0 Kudos
Message 7 of 14
(5,094 Views)

I don't understand all the different things you are doing.

 

Just do a simple write and read to verify communication with the instrument.

You need to be able to take a step before you decide to run a marathon.

 

ibdev()

ibwrt()

ibrd()

Just those three function.

 

Even without getting LabWindows/CVI, involved, you can use NI-488.2 Interactive Control found in MAX to try out that sequence.

 

 

 

 

 

 

Message 8 of 14
(5,092 Views)

I can't. Thanks for help but I can"t explain more or waste time doing what you advise me (even if they are good advice) because I'm in internship, two weeks left, the code is not mine and I discovered Labwindows at the beginnig of my internship (6 weeks ago). If I was developping my own code, of course that I will go step by step.But there are about 6 Source and Header Files. Too long to go through all of this or even recreate a programm to test communication with the variables that will suit later to the original code.

 

Moreover, I thought gpib librairy was developed by NI and I could find somewhere the meaning of errors. Maybe I didn't  look for enough.

 

Many thanks anyway

0 Kudos
Message 9 of 14
(5,090 Views)

There is no simple answer to a Timeout problem.

 

You are going to have to troubleshoot it.

 

If someone else's code doesn't work, and I can't figure out what they are doing, then I prefer going it on my own.

My suggestion takes only a few minutes.

If you can't spare the 5 minutes. Fine.

 

Good luck.

 

 

0 Kudos
Message 10 of 14
(5,082 Views)