Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Can not open a gpib interface instructment session by VISA at VxWorks

Solved!
Go to solution
I have a VXIpc770 (runs VxWroks 5.5) with GPIB interface.
After booting, i load below modules:
nivxi.o, vxiedit.o, resman.o, victext.o, nigpib.o, ibic488.o, visa.o
it works if use ibic function to control my GPIB instructment. below is the code: (it is a example code on the user manual )
 
int getInst()
{
    char buf[1000];
    printf("find board\n");
    int board = ibfind("gpib0");
    if( board == -1 ) {
        printf("fail to open board\n");
        return -1;
    }
   
    printf("ibsic, status=%x\n", ibsic(board));   
    printf("send command '@!', status=%x\n", ibcmd(board, (void*)"@!", 2));
    printf("send command '\\04', stauts=%x\n", ibcmd(board, (void*)"\0A", 1));
    printf("write '*IDN?', status=%x\n", ibwrt(board, (void*)"*IDN?\n", 6));
    printf("send command ' A', status=%x\n", ibcmd(board, (void*)" A", 2));
    printf("read, status=%x\n", ibrd(board, buf, 1000));
    buf[ibcnt]=0;
    printf( "%s\n", buf );
    ibonl( board, 0);   
}
 
but if i use VISA function. i don't work.
viOpen( &rm , "GPIB0::1::INSTR", 0, 0, &inst)
the error status is bfff0011 means no such instructment
(i can open other instructments such as "VXI0::24::INSTR" use by VISA)
 
how do i config the visa to make it works?
 
 
0 Kudos
Message 1 of 8
(4,720 Views)

Hello Zodicx,

What versions of the GPIB and VISA drivers are you using?  Are you using the NI-488.2 DDK?

Have you been able to use VISA to open a serial port and communicate that way?  I would be curious about this because it would show if VISA is configured correctly on your system.

Steven T.

0 Kudos
Message 2 of 8
(4,680 Views)
I don't know what version the GPIB and VISA drivers are. Can you tell me how to check it?
 
I can use viFindRsrc function to find below instructment:
ASRL1::INSTR
ASRL2::INSTR
VXI0::0::INSTR
VXI0::8::INSTR
VXI0::24::INSTR
 
and i can use viOpen to open ASRL1::INSTR and VXI0::8::INSTR etc.
 
i was follow VXI "Getting Started with Your VXIpc Embedded Controller for VxWorks" to load the nivxi.o and visa.o etc.
 
0 Kudos
Message 3 of 8
(4,651 Views)
Hello,

You can check the versions in the Measurement and Automation Explorer (MAX), by expanding the Software section of the tree on the left. 

Gavin Fox
Systems Software
National Instruments
0 Kudos
Message 4 of 8
(4,638 Views)
I check my gpib driver version is NI-488 for VXIpc for VxWorks, v2.2 and National Instruments NI-VISA(TM) Software for VxWorks. Version 2.5.1.
 
i do not have any ideal that have "Measurement and Automation Explorer" software in the "VxWorks".
0 Kudos
Message 5 of 8
(4,630 Views)
Hi zodicx,

NI-VISA 2.5.1 did not support GPIB on VxWorks, although it supported other VxWorks 5.5 resources such as serial communication.

Gavin Fox
Systems Software
National Instruments
0 Kudos
Message 6 of 8
(4,615 Views)
Ok.
Can you tell me what version of NI-VISA suport GPIB on VxWorks.
Thanks.
0 Kudos
Message 7 of 8
(4,604 Views)
Solution
Accepted by topic author zodicx
Hi zodicx,

There is no NI-VISA GPIB support for VxWorks.  Are you able to use GPIB directly?

Gavin Fox
Systems Software
National Instruments
0 Kudos
Message 8 of 8
(4,593 Views)