Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Setup GPIB controller on a PC and GPIB listner on PXI

$
0
0

Hello everybody, I was advised to repost  my original question  from the PXI board, to the current board to get more exposure. 

So here is the question again,

 

I have a PXI system on PXIe-1078 chassis, with PXIe-8821 controller (win7, 64bit).

The NI-VISA and NI-488.2 installed. 

I have to pick up text messages, or send/receive short text files using GPIB communication.

"Text Message" represents sort of a command to do stuff with my PXI system, then return results to the host.

The communication is synchronous - meaning, the "Host" sends a text command. The listener picks up, performs the action, and return result. Meanwhile, the "Host" waits for MY application to finish the job.

 

Now, I'm trying to recreate this scenario. Set up a "GPIB listener" on PXI controller, that picks up incoming GPIB  events, handles that event, then sends data back.

For now, I'm doing the following:

Simple CVI application to trigger GPIB events on my PC, and other application that picks up these events on PXI PC(the controller).

Here are some of my code details:

GPIB "events" Sending side:

setupFunction()

{

   glGPIBdevice = ibfind ("GPIB0");

   if(0<glGPIBdevice)
  {
     ibsic (glGPIBdevice);
     ibsre (glGPIBdevice, 1);
     ibdev (0, 0, NO_SAD, T30ms, 1, 0);

     found = 1;
   } 

}

sendFunction()

{

      status = ibwrt (glGPIBdevice, "HELLO", 5);

}

 

RECEIVING SIDE (PXI)

main()

{

        glHnGPIBDevice = ibfind ("gpib1");
       ibrsc (glHnGPIBDevice, 0);
       status = ibInstallCallback (1, EVENT, ProcessGPIBEvent, 0);

}

void CVICALLBACK ProcessGPIBEvent()
{
        MessagePopup ("GPIB Event", "GPIB event recieved.");
}

 

For now, that scheme doesn't work for me. 

Any ideas what do I miss?

 

Thanks for the support Smiley Happy 


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>