Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Data transfer between two GPIB controllers. Is this possible?

I am new to GPIB protocols and programming, please help me.
 
My current test setup is as follows. A WinXP PC with NI PCI-GPIB interface card connected to a WinXP notebook's USB 2.0 port via NI GPIB-USB-HS external controller. The application I am writing will run on the notebook and supposedly communicate with the application running on the PC via GPIB protocols. That's my setup so far. Eventually, a GPIB instrument will be connected and controlled solely by the app running on the PC.
 
Here goes my questions:
 
1.  Is it possible for the two GPIB controllers to communicate with each other?
  • If yes, how to manually (or programmatically via NI-488.2 commands) setup the communication channel.
2.  I encounter the error message "No GPIB Interfaces Found" while running the "Getting Started Wizard" on my notebook with the GPIB setup described above. The "NI-488.2 Troubleshooting Wizard" indicated that NI-488.2 Software are present, but clicking on the "Retest" button always result in the "No GPIB Interfaces Found" message. I could not proceed from here. However, winxp detected and indicate the presence of the GPIB-USB-HS device in Device Manager. I'm stuck here and I think the GPIB-USB-HS external controller is not setup properly. Any idea what I could do to resolve this?
 
Thank you.
Chin
0 Kudos
Message 1 of 8
(4,900 Views)
Chin,

I'm not really an expert in GPIB  networking. It is some years ago when I studied GPIB basics in order to have my setup up'n run.
What I _think_ is that it might work this way, but you have to program that explicitely. Both controllers have to swith the controller in charge in order to gain control on the bus cable.

But I'd suggest re-thinking that setup. It is probably much easier to establish another connection (LAN would be easieset) between the two computers.  Than you could utilize one of the established mechanisms to communicate and/or control  the other app.

To your 2nd Q: Try to find the GPIB IF in MAX (measurement and automation explorer). Try to communicate with it from within MAX before trying anything from LabVIEW.

HTH    and
Greetings from Germany!<br>-- <br>Uwe
0 Kudos
Message 2 of 8
(4,894 Views)
Hi Lul,


What I _think_ is that it might work this way, but you have to program that explicitely. Both controllers have to swith the controller in charge in order to gain control on the bus cable.

Can you elaborate the part on switching the controller in charge? Currently, both the controllers are CIC at PAD 0 as they reside on seperate host. Do you mean switching one of them to non system controller?

But I'd suggest re-thinking that setup. It is probably much easier to establish another connection (LAN would be easieset) between the two computers.  Than you could utilize one of the established mechanisms to communicate and/or control  the other app.

If communication between controllers are possible, this setup will likely stay as the app on the PC is written long time ago and GPIB based. Actually, I prefer LAN as I am familiar with Winsock programming.


To your 2nd Q: Try to find the GPIB IF in MAX (measurement and automation explorer). Try to communicate with it from within MAX before trying anything from LabVIEW.

Thanks, I will try installing the NI-488.2 ver 2.3 driver that comes with the card. The current driver is 2.4 which I downloaded from NI after reading about the performance issue in 2.3.
Regards,
Chin

Message Edited by ccchin on 09-29-2005 05:48 PM

0 Kudos
Message 3 of 8
(4,884 Views)
Chin,

AFAIK there can be just one controller on a GPIB bus. So if you connect two of them you have to ensure that just one is CIC at any given time. So your app has to changed anyway.
But as I said, I'm not a great expert at this area, so I may be wrong.
Greetings from Germany!<br>-- <br>Uwe
0 Kudos
Message 4 of 8
(4,875 Views)
 

Hi Lul,

Thanks for your help. I manage to get my GPIB-USB-HS card working by simply reinstalling the 2.4 driver. Previously, I chose "custom" install but this time round "typical" install did the job.

After reading the article at https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2XtCAI&l=en-US and playing with the Interactive Control uitlity, I managed to get the two controllers to talk to each other.

As mentioned by you, the article also said that one of the two controllers must be set as CIC. However, I managed to get both talking to each other with both controllers set as CIC. For those interested, the following is what I did with my setup as described in my original post:

PCI-GPIB setup: Interface name=GPIB0, PAD=1 , SAD=0, System Controller check, rest default.

GPIB-USB-HS setup: Interface name=GPIB0, PAD=2, SAD=0, System Controller check, rest default.

PCI-GPIB:                               GPIB-USB-HS
========                                ===========
ibfind gpib0                            ibfind dev1 (NB: dev1 is PCI-GPIB)
ibwrt "hello"  ---------------------->  ibrd 5 (retrieve "hello" string)
ibrd 5 (retrive "HELLO" string) <-----  ibwrt "HELLO"
ibonl 0                                 ibonl 0
 
The following also works:
 
PCI-GPIB:                               GPIB-USB-HS
========                                ===========
ibfind dev2 (dev2 is GPIB-USB-HS)       ibfind gpib0
ibwrt "hello"  ---------------------->  ibrd 5 (retrieve "hello" string)
ibrd 5 (retrive "HELLO" string) <-----  ibwrt "HELLO"
ibonl 0                                 ibonl 0
 
Note that the controller that reference a device must not reference a device that has the same PAD as itself. For example, "ibfind dev1" on the PCI-GPIB card in this case will not work when executing ibrd & ibwrt.
 
I will now write some program to test it out programmatically. Hopefully, it's not some quirks of IBIC that allows two system controllers to talk to each other. Smiley Happy
 
Regards,
Chin
0 Kudos
Message 5 of 8
(4,865 Views)
Chin,
 
Wanted to point out one important thing regarding CIC (controller-in-charge).  You should make the computer that is making the ibdev() call the controller in charge by calling ibfind("gpib0") and then calling ibsic() on that board.  You can then proceed with the ibdev call.  Checking the "System controller" box allows your board to become CIC, but does not necessarily make it CIC.  Stated another way, SC (System Controller) is a necessary but not sufficient condition for CIC.  You can see if you're CIC in the status word that is returned in ibic:  (cmpl cic) would indicate CIC-ness, but (cmpl) alone would not.
 
What does CIC mean?  It means that this is the card that gets to do all the addressing on the GPIB Bus.  When you do an ibwrt from the CIC, it will address itself as a talker and the target device as a listener.  What happens when you do an ibwrt on non-CIC from the ibfind board descriptor?  It has to wait for the CIC to address it before it puts anything out on the GPIB bus.
 
Hope this makes sense, and good luck with your PC-to-PC application.
 
Scott B.
GPIB Software
National Instruments
0 Kudos
Message 6 of 8
(4,862 Views)

Hi Scott,

I had thought the terms SC and CIC are synonymous. It is really perceptive of you to detect and correct my misconception. Thanks to you, I understand better now. Please assist me with some questions that pops into my head while reading your reply.

Q1:  In my PC-to-PC setup (both are SC), if PC1 is first configured as CIC by an app when it execute, sometime later another app on PC2 execute and attempts to configure PC2 as CIC using command "ibsic".  What will happen?  Will CIC on PC1 prevent PC2 from taking over as CIC (since PC1 did not relinquish CIC with "ibpct")?  Who will become the CIC?

Q2:  Can PC2 (non CIC) open a communication channel to PC1 (CIC) using the "ibdev" command as follows?

     : ibfind gpib0                        (note that ibsic is not called, so non CIC)

     gpib0: ibdev 0, PADPC1, 0, 13, 1, 0   (where PADPC1 is the primary address of gpib card on PC1, the CIC)

     ud0: ibwrt "HELLO CIC"

If not, what is the proper way to do it?

Looking forward to your reply to clarify my muddled thoughts. And I can't wait till Monday to test it out back in office. Thanks Scott.

Regards,

Chin

0 Kudos
Message 7 of 8
(4,837 Views)
Hi Scott,
 
I must apologize for so many copies of uncomplete messages in this thread.
 
Actually, I only submit my message one time when it was completed. However, I did several Preview Post while editing the message. I didn't know that previewing post will actually post it. I really got a shock when I see so many repetitive copies. Sorry about that. I tried deleting the invalid posts but there are no facilities for me to do it.
 
My valid post is the message just before this one.
 
Chin

Message Edited by ccchin on 10-02-2005 01:35 AM

0 Kudos
Message 8 of 8
(4,836 Views)