Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
GPIB workflow
Hi all,
As I'm exploring GPIB in my environment on multiple instruments, a newbee question - is GPIB essentially hot swappable? Differently put, can I typically just hook it up to an instrument that's running and expect it to smoothly connect? Or is it typically better to connect GPIB while the instrument is off, then turn it on, so it'd scan its "peripherals" during the booting sequence and this would guarantee it's connecting with no issues? I assume there's a rule of thumb, instead of a situation where maybe all instruments may be different and it's hard to tell what's the best approach. I've connected it plenty before, but 95% of the time it's been hooked up to one instrument and so "hot swapping" wasn't a consideration. This is for a TDS754D, reason I'm posting on this board, but I'm looking for some input applicable to any instrument/brand. Thank you, Radu. |
The 488 bus is an addressed bus, which means recognizing an address on a bus and having something respond (think I2C for an example).
toggle quoted message
Show quoted text
So when you hot swap instruments, assuming that you don't glitch something, then an existing address doesn't respond, and a new address doesn't yet get recognized. The controller (and I think it doesn't , unlike USB) start a new connect sequence.? You'd have to program it. That means, to autoconnect, you'd need to be polling the interfaces (all of them), and when one doesn't respond, you need to forget it.? You then need to scan for a new device.? (and 488 has, IIRC, none of that), although the controller? by polling each device. So somewhat different there, and not like USB. Harvey On 3/22/2025 7:47 PM, Radu Bogdan Dicher via groups.io wrote:
Hi all, |
Thank you, Harvey.
If I understand correctly, you're saying that the # GPIB connection may "port" another, "hot swapped" instrument to the same # GPIB? I got impatient after posting this and thought I'd play with it a little more and I connected the GPIB interface to the TDS754D then booted it and it just landed on #4 GPIB. Not sure why on #4 (whether it had to be "elevated" at #4 and why there's three below that having nothing connected). Generally speaking, I'm seeing different instruments landing on a pretty wild "#" GPIB port. I'm always doing a "list" to inquire which GPIBs have something attached. Radu. On Sat, Mar 22, 2025 at 6:54?PM Harvey White via groups.io <madyn= [email protected]> wrote: The 488 bus is an addressed bus, which means recognizing an address on a |
On Sun, Mar 23, 2025 at 03:11 AM, Radu Bogdan Dicher wrote:
The address is selected in the scope (like most other instruments) and you don't have to reboot if you change it. If you have National Instruments GPIB hardware you can try and play with this /H?kan |
On 2025-03-22 10:11 PM, Radu Bogdan Dicher via groups.io wrote:
If I understand correctly, you're saying that the # GPIB connection mayGPIB doesn't have the concept of a "connection". Each device sets its own address, sometimes via DIP switches, sometimes, via front panel commands, etc., but that instrument "knows" its own address. It's up to the user to ensure there are no collisions. There are 31 available addresses - often set by 5 DIP switches. The 32nd address is reserved as described below. The whole concept is quite different from either USB or Ethernet addressing. To start a data transfer (which may be a command, or some sort of data), the Controller (usually a PC adapter of some sort these days; could be an internal board with special drivers, or external like my KISS-488) issues a command to one address (maybe even itself) to become the Talker, and to one or more devices (instruments) to become a Listener. The talker then proceeds to send bytes, ending with a specified termination condition. The Controller usually then turns the bus around, addressing e.g. the instrument to become Talker, and e.g. itself as Listener, and data flows the other way. at the end, it issues Untalk and Unlisten commands (that 32nd address). I include a fairly detailed discussion of GPIB concepts in the beginning of the manual for my KISS-488, which you can download freely at Steve Hendrix |
Steve and all,
Thank you for elaborating on the topic. It's really useful to put some good detail and get a better understanding of the general rules and mechanisms of the protocol. Steve - thank you very much for pointing me to your excellent manual. I am aware of setting a certain "GPIB address" (I've set it myself on a few instruments, and that was in order to avoid conflicting same addresses on multiple units in my environment). I decided as a matter of "intake" to set a unique address to each instrument that lands at my bench and may stay. For the connected TDS754D, here's what my list of devices looks like (see below). Please note though, that the GPIB address set for the scope is "14," and not "4" (which is the reason why I interpreted it as "landing" on #4, as opposed to a deliberate process). I believe some GPIB addresses for different instruments previously connected to the computer would be "07," "08," "29" below (I'm not sure why there's two GPIB_07...). The TDS754D seems to not report its own GPIB #(?)... It does state its firmware version though. (visa) list ( 0) USB0::0x03EB::0x2065::GPIB_07_55137323934351C07071::0::INSTR ( 1) USB0::0x03EB::0x2065::GPIB_07_75935323239351A0F1F0::0::INSTR ( 2) USB0::0x03EB::0x2065::GPIB_08_55137323934351C07071::0::INSTR ( 3) USB0::0x03EB::0x2065::GPIB_29_55137323934351C07071::0::INSTR ( 4) USB0::0x03EB::0x2065::TEKTRONIX_TDS_754D_0_CF_91.1CT_FV_v6.3e::0::INSTR (visa) My initial question was meant to ask a slightly different thing though (I did a bad job explaining). Is it customary to just plug GPIB into a running instrument while making sure the address is different than any other (previously) connected instrument, and then start to talk to the instrument through it? Or doing it while the instrument is off is a safer, "best practice" procedure? I probably am overthinking this, but I typically try to learn a process correctly, rather than trial and error, if I can. Also, hopefully my question is better phrased this time around. Radu. <> Virus-free.www.avg.com <> <#m_-1007817960827559090_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Sun, Mar 23, 2025 at 4:27?AM Steve Hendrix via groups.io <SteveHx= [email protected]> wrote: On 2025-03-22 10:11 PM, Radu Bogdan Dicher via groups.io wrote:If I understand correctly, you're saying that the # GPIB connection mayGPIB doesn't have the concept of a "connection". Each device sets its |
Interleaved.
On 3/22/2025 10:11 PM, Radu Bogdan Dicher via groups.io wrote: Thank you, Harvey.Nope.? The address switches on the instrument control the address (much like I2C does it). HPIB has three functions, all of which can be separate: listener, talker, controller.? For listener and talker the address is set on the instrument.? For controller, there is one only if the instruments are not dedicated listener and controller. For instance, a meter can be designated a talker, and put into talker only mode (interface talks only, ignores address).? The printer can be put into listener mode (interface listens only, ignores address).? Controller not needed. The way the HPIB bus works is that nothing is assigned a role, every instrument/device has a hardware selected address.? The controller knows (because it's been programmed to) what instruments are where.? In the previous example, the controller (now present) would address the meter as a talker, the printer as a listener, and then allow the transfers to occur.? When the controller decides (by monitoring status lines) that the transfer is done, the controller then de-addresses the listener and talker both. Go to the manual or read the back panel.? In my TDS640A, like many other instruments with a display, the functions of the HPIB bus are hidden in a menu.? For older instruments, the settings are on the dip switch. In your case, address #4 was set as a default.? IIRC, it can be any number from 1 to 32. (0 is reserved). With switches, the other three are typically listen only mode, talk only mode, and I'm not sure about the third one. Generally speaking, I'm seeing different instruments landing onThe HPIB system was designed for a well determined system. What you'd have to do to enable some form of hot swap (I think the hardware would forgive it), is to poll instruments periodically, to ask them what they are.? You'd then need a table of active devices.? Any new device would show up at a different address (assuming you did that),? and you'd have to activate that in your software to deal with that instrument.? That makes it a dynamic system. HPIB is not really designed for that, but you can make it play nice. Now this assumes that you have a standard 488 bus controller, such as HP.? The microprocessor based USB to 488 bus controllers work a bit differently, since there's only listener and talker functions to activate,? the controller is a little less of a controller, since it doesn't manage conversations, just roles. Hope that helps a bit. Harvey Radu. |
On 2025-03-23 10:19 AM, Radu Bogdan Dicher via groups.io wrote:
My initial question was meant to ask a slightly different thing though (IIf your incorrect address of 4 instead of 14 was written in hex or octal rather than decimal, I'd suspect a bad DIP switch. But IEEE-488 addresses are usually stated in decimal, and context in the rest of your post suggests decimal, so that's probably the wrong explanation. There should be no problem with hot-plugging, unless there is a data transfer occurring at the same time. Indeed, an instrument would probably be least likely to disturb a transfer in progress if it were powered for at least a few seconds before plugging it in. There's a spec for what fraction of instruments on a bus are allowed to be unpowered - I forget now but it's something like 1/3 or 1/2. As long as you're not actively transferring data at the time, there's no harm in hot-plugging. The original spec calls out terminating resistors to both Vcc (5V always, in that day) and Gnd. I have found that newer instruments sometimes use a simple 1K to 3.3V, which is a very rough Thevenin equivalent. Thanks for the compliment on my KISS-488 manual! Steve Hendrix |
Last time I did serious IEEE programming was writing a driver using PLM-86 for one of the competitors in the MATE program.? That was a LONG time ago.? TMS9914 I think was the chip.
toggle quoted message
Show quoted text
Harvey. On 3/23/2025 9:34 PM, Steve Hendrix wrote:
On 2025-03-23 11:46 AM, Harvey White wrote:IIRC, an IEEE-488 address can be any number from 1 to 32. (0 is reserved).Almost. Valid addresses are 0 thru 30, with 31 reserved for Untalk or Unlisten. |
to navigate to use esc to dismiss