04-27-2017 10:13 AM
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! 🙂
04-28-2017 03:31 PM
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.
04-29-2017 04:40 AM - edited 04-29-2017 04:45 AM
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 🙂
05-01-2017 10:32 AM
"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
05-01-2017 12:56 PM
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.
05-02-2017 11:38 AM
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
05-02-2017 11:39 AM
05-02-2017 12:05 PM
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".
05-03-2017 09:49 AM
You might want to try posting this question here for more visibility...
http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/bd-p/140