Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

PMC-GPIB with NI-488 DDK very slow when sending GPIB-Commands

Solved!
Go to solution

Hello,

 

I am using a PMC-GPIB board and use the NI-488DDK to develop a GPIB-Interface with VxWorks. It is already working properly, but sending a GPIB command takes about 100 ms which is very slow.

 

Are there any possibilities to speed up the data transfer?

0 Kudos
Message 1 of 4
(2,958 Views)

Hi,

 

can you specify the problem a little bit? Can you say that one special GPIB command makes it slower?

Please post this part of the code. Then I can contact the developers to have a look at it.

But I have to say that this takes some time because the developers are sitting in the USA.

Working on this issue will also take 1-2 weeks in my opinion.

 

Best regards

Suse

______________________________
Certified LabVIEW Developer (CLD)
0 Kudos
Message 2 of 4
(2,947 Views)

Hello Suse,

 

thanks for your fast reply!

 

I wrote a small programm and made a GPIB-Tracing so you can see, what I mean! In my programm I address only one GPIB-device. In the real test environment I have three devices that I have to address. So after every command I have to do an "Unlisten" and specify a new listener address.

Another thing is when I have a command with an odd number of charakters (like "*IDN?" = 5 Charakters) I have to send the last charakter extra. First "*IDN" and then "?". If I would send it together the "?" is not sent! This too causes a time delay as you can see in the GPIB-Tracing!

 

Here is my test-programm:

the first part is for the initialisation of the GPIB-PMC the second part is for the adressing the GPIB-device and sending *IDN? permanently!

At the GPIB-Tracing you can see that every "unlisten" and "listener address 2" takes about 16 ms! And the sending of the "*IDN?" takes about 33 ms!

 

void go(void)
{
    int dev;                       /*Identifier for GPIB-Board*/
    char listener [2];
    char talker[2];
    char buffer [10];
    char buffer2 [10];

    listener [1] = 0;              /*end of string*/
    talker[1] = 0;

    strcpy (buffer, "*IDN");
    strcpy (buffer2, "?");

    dev = ibfind ("gpib0");        /*Initialize the GPIB-Board*/

    ibtmo (dev, T1ms);             /*Set Timeout*/

    ibsic (dev);                   /*Assert interface clear*/

    ibcac (dev, 1);                /*Become CIC synchronously*/

    ibeot (dev, 1);                /*EOT enabled, assert EOI with last byte of send  */

    microT_sleep(1000);            /*wait 1000 microseconds*/

    talker[0] = dev + 0x40;        /*calculates the command-string, which makes the board a talker*/

    ibcmd (dev, talker, 1);        /*Make Board a Talker*/

    while (1)
    {
        ibcmd (dev, "?", 1);       /*GPIB-Command unlisten*/

        listener [0] = 32+2;       /*32 is Offset of Listeners ASCII-Signs, Listener Address 2 */
        ibcmd (dev, listener, 1);  /*GPIB-Command turn the state of the addressed device to listener*/

        ibeot (dev, 0);            /*EOT disabled, do not assert EOI with last byte of send*/ 

        ibwrt(dev, buffer, 4);     /*Send odd number of charakters*/

        ibeot (dev, 1);            /*EOT enabled, assert EOI with last byte of send*/ 

        ibwrt(dev, buffer2, 1);    /*Send last charakter*/
    }
}

 

 

0 Kudos
Message 3 of 4
(2,935 Views)
Solution
Accepted by topic author Cassidian

Hello again,

 

I found a solution for my problem! I realized the execution of the commands is connected to the system clock of vxWorks! This is obviously done in the DDK (Driver development kit).

The system clock can be easily set higher and then the commands are sent faster.

 

Thanks for your time

 

Have a nice day

 

Cassidian

0 Kudos
Message 4 of 4
(2,926 Views)