LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Setup GPIB controller on a PC and GPIB listner on PXI

Hello everybody, 

I am trying to setup a GPIB communication between a PC to a PXI controller.

I have the following setup:

Chassis PXIe-1078

Controller PXIe-8821

GPIB interface module - PXI-GPIB

GPIB-USB-HS+ between my PC and the PXI-GPIB interface module.

 

What should be the sw configuration on PC side, and how should I configure my PXI side in order to exchange information. 

Current setup of NI_MAX attached. 

For now, NI-MAX identifies the GPIB-USB adapter, on both sides. 

 

Thanks in advance for the support! 🙂

Download All
0 Kudos
Message 1 of 9
(3,826 Views)

Can you give a bit more detail into the overall application goal you are trying to accomplish? 
Also, what happens when you click on the VISA error that you have displayed? 

Without having much more detail into your application, you will want to have NI-488.2 and NI-VISA installed. 

 

0 Kudos
Message 2 of 9
(3,777 Views)

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

I have 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 🙂

0 Kudos
Message 3 of 9
(3,774 Views)

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

 

What were the circumstances of this successful communication? Were you using CVI code to perform this task?

 

-Mitchell | NI

0 Kudos
Message 4 of 9
(3,757 Views)

I use CVI code for all over the project. And my communication is unsuccesfull at all, for now. It would be successful if I could process incomming GPIB event, perform some task upon this event and send back data over GPIB. I've posted on the top of thread my system setup and CVI code in order to clarify my problem.

I would appreciate any help to understand what do I miss.

Thanks.

0 Kudos
Message 5 of 9
(3,753 Views)

Before we start testing with CVI code, we should test to make sure that a GPIB connection can be made. Take a look at this guide for connecting a device using GPIB from NI MAX.

 

http://www.ni.com/getting-started/set-up-hardware/instrument-control/gpib-connect

0 Kudos
Message 6 of 9
(3,735 Views)

This is also a good tutorial

 

http://www.ni.com/tutorial/2761/en/

0 Kudos
Message 7 of 9
(3,733 Views)

Thanks for the links. I will dig their contents also.

Just to remind - I am making a PC to PC GPIB communication, not PC to Instrument. So probably SCPI commands will not work. I expect, there is some programmatic way to configure 2 PCs to communicate with each other over GPIB.

Both PCs don't detect each other - both ways - when you click on "Scan for Instruments" in NI-MAX. Probably because neither one of them is "INSTRUMENT".

0 Kudos
Message 8 of 9
(3,731 Views)

You might want to try posting this question here for more visibility...

 

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/bd-p/140

0 Kudos
Message 9 of 9
(3,719 Views)