Author Topic: trouble understanding GPIB controllers  (Read 2318 times)

0 Members and 1 Guest are viewing this topic.

Offline cncjerryTopic starter

  • Supporter
  • ****
  • Posts: 1308
trouble understanding GPIB controllers
« on: June 19, 2015, 04:41:47 am »
I've been writing code to control various GPIB connected instruments on my PC.  I use VB.net and Keysight VISA though I have tried others.  I guess my basic question is whether it is possible to have my vb.net application look like another instrument with its own GPIB address?

As I mentioned in another thread, a device I am calibrating prints to address 18.  I would like my VB.net program to startup and register on the network as address 18.  That way as the device is calibrating I can get the results.

I looked at a few programs that act as printer emulators but unless I am missing something, what they do is send a request to the instrument and then wait for a response.  Since in this case the instrument is controlling a voltmeter as well as a printer (which it thinks is on address 18), I can't really send it a print request.

I also looked at the python visa code and it looks like it operates the same way.

Ideas?

Thanks
 

Offline eas

  • Frequent Contributor
  • **
  • Posts: 601
  • Country: us
    • Tech Obsessed
Re: trouble understanding GPIB controllers
« Reply #1 on: June 19, 2015, 08:51:23 pm »
I tried looking at VISA docs and found them difficult to grok.  In general though, if what you want to do is supported, you'll probably be looking for a way to "listen." Listening is common term in these communications contexts, and seems to be part of the vocabulary around GPIB. There is also the concept of a Controller, which seems to be a device that initiates communication.

Sorry I can't be of more help, but often times, figuring out the right search terms can help unlock the puzzle.

 

Offline eas

  • Frequent Contributor
  • **
  • Posts: 601
  • Country: us
    • Tech Obsessed
Re: trouble understanding GPIB controllers
« Reply #2 on: June 19, 2015, 09:00:36 pm »
This seems like it might be relevant.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: trouble understanding GPIB controllers
« Reply #3 on: June 19, 2015, 09:15:28 pm »
GPIB is really easy , if you do it right, and not try to outsmart the system.

a couple of things to know

Controller : the device that initiates a transport .

Primary controller : the ALWAYS sits at address 0. sometimes called the controller in charge
Secondary controller : dormant , sits at address 31

the primary controller can send the secondary controller a message that it releases the bus. at this point 31 and 0 swap addresses .

the CIC ( controlle rin charge) owns the bus. he drives the transport. everything else is a SLAVE and needs to listen

Talker : the device putting data on the bus
Listener : the device receiving.

Master Talker : the CIC is sending data to a slave
MAster Listener : the CIC is waiting for the slave to send data back
Slave listener : the slave is listening for incoming data
Slave talker : the slave is sending data back in response to a request.


In your case : You will be a slave device. simply configure your GPIB adapter to be at an address different form 0 or 31. you now are a slave device and can only respond to requests.

i think you need to hook into iblstn. your program will then wait for an event.

you really do NOT want to use VISA to build a slave.... VISA is for masters.
talk directly to the GPIB32 dll.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline cncjerryTopic starter

  • Supporter
  • ****
  • Posts: 1308
Re: trouble understanding GPIB controllers
« Reply #4 on: June 19, 2015, 10:11:49 pm »
This is making sense now as the device I want to calibrate takes over address 0.  Since my computer is on 0 the device fails unless I unplug the gpib cable.

I don't have labview and the reference though it looks like what I want, can't be read without it. 

I can write in about any language but don't have a recent copy of labview.  The code that comes with keysight can probably do it but I don't see a way to put it into listener mode changing the address as well.

Thanks, any more hints?  C code?
 

Offline steve_tech

  • Newbie
  • Posts: 5
Re: trouble understanding GPIB controllers
« Reply #5 on: July 02, 2015, 10:02:59 pm »
Check EZGPIB on web. I use it and like it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf