trouble understanding GPIB controllers - Page 1
Forum section: electronics / testgear

author: cncjerry
author_rank: Unknown
timestamp: June 19, 2015, 04:41:47 am
content: 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

author: eas
author_rank: Frequent Contributor
timestamp: June 19, 2015, 08:51:23 pm
content: 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.

author: eas
author_rank: Frequent Contributor
timestamp: June 19, 2015, 09:00:36 pm
content: Thisseems like it might be relevant.

author: free_electron
author_rank: Super Contributor
timestamp: June 19, 2015, 09:15:28 pm
content: GPIB is really easy , if you do it right, and not try to outsmart the system.a couple of things to knowController : the device that initiates a transport .Primary controller : the ALWAYS sits at address 0. sometimes called the controller in chargeSecondary controller : dormant , sits at address 31the 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 listenTalker : the device putting data on the busListener : the device receiving.Master Talker : the CIC is sending data to a slaveMAster Listener : the CIC is waiting for the slave to send data backSlave listener : the slave is listening for incoming dataSlave 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.

author: cncjerry
author_rank: Unknown
timestamp: June 19, 2015, 10:11:49 pm
content: 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?

author: steve_tech
author_rank: Newbie
timestamp: July 02, 2015, 10:02:59 pm
content: Check EZGPIB on web. I use it and like it.