Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

DDK NI-488 Vxworks

<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8"><meta name="GENERATOR" content="OpenOffice.org 1.1.5 (Linux)"><meta name="CREATED" content="20070213;15383800"><meta name="CHANGED" content="16010101;0">

We have VxWorks 6.3 running on a Pentium4 SPB. I have gotten the DDK to compile and run the chat program between two systems. My problem is how do I get the GPIB card to talk to an instrument. The instrument has an address of 14. The data to send is “R6\n”

Here is what I'm trying to do:

To initialize the card:

ibonl( card 1);
ibrsc(card 1);

if ((ibsta & (CIC | ATN)) == (CIC | ATN))
{
ibgts(card, 0);
}
ibtmo(card, timeout);
ibsic(card);

To send the data:

ibeos(card, 0x1400 | termchar);
ibtmo(card,timeout);
ibwait(card, TIMO | CIC);

char spebuf[] = { '?', 0x20, 0x18, 0x40, 0}; /* UNL, MLA, SPE, OTA */
char spdbuf[] = { 0x19, '_', 0}; /* SPD, UNT */

spebuf[3] += primary_address;
ibcmd(card, spebuf, 4);
ibcmd(card, spdbuf, 2);
ibwrt(card, data, data_length);
ibwait(card, TIMO | SRQI);

During the write I get the following error: “ERROR EADR returned GPIB not correctly addressed.”

What am I doing wrong?


0 Kudos
Message 1 of 3
(7,582 Views)
HI Vxhead,
 
There are several things that may be happening to cause this error. One of them may be the way that you have called ibgts. Please refer to this link and error EADR(3) for several reasons why you might be getting this error. Let me know if this explains and fixes the error for you.
 
 

Regards
Krista S.
Applications Engineering
National Instruments
Message 2 of 3
(7,570 Views)

Yes, the infromation was usefule and helped me fix the problem.

 

 

0 Kudos
Message 3 of 3
(7,560 Views)