Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

repeat addressing / gpib readdressing ?

Solved!
Go to solution
I mainly have used LabVIEW and LabWindows/CVI for instrumentation controller.
At my new job, they use Visual Basic 6.
 
I have come across some older instruments that require repeat addressing / gpib readdressing.
Can some explain to me what it is and most importantly how I need to deal with it?
They have a FAQ that taks about using ibconfig().
The other instruments on the bus in the test rack do not have this issue.
 
Thanks in advance.
0 Kudos
Message 1 of 4
(4,206 Views)

The device-level call for NI-488.2M API ibconfig() function does this.

ibconfig( ud, ibcREADDR, 1);

The ibcREADDR is a constant value (=0x0006). Setting this attribute to non-zero (such as 1) enables Repeat Addressing for the device represented by "ud".

In VB6, the syntax will be:

CALL ibconfig( ud, 6, 1)

0 Kudos
Message 2 of 4
(4,193 Views)
Solution
Accepted by topic author nyc_(is_out_of_here)

@nyc_(is_out_of_here) wrote:
Can some explain to me what it is and most importantly how I need to deal with it?

A normal flow of communication on the GPIB is to send some command bytes (with the ATN line asserted) to place the devices on the bus in the correct addressing state (1 device is addressed as a talker and 1 or more devices are addressed as a listener). Afterwards, the ATN line is unasserted and the talker will place data bytes on the bus for the listeners to listen to.

With the NI-488.2 device-level API, the driver normally caches the current addressing state of the bus. If you do multiple consecutive commands and the addressing state is already in the correct state, NI-488.2 will skip the addressing portion. For example (using a pseudocode type of syntax):
ibwrt (dev2, "*cls", 4); -> Across the bus you will see ATN^, UNL, MTA0, MLA2, ATNv, *CLS
ibwrt (dev2, "*idn?", 5); -> Across the bus you will see *IDN?
ibrd (dev2, 100); -> Across the bus you will see ATN^, UNL, MTA2, MLA0, ATNv, [Response from Instrument]


As you can see, the second ibwrt did not have the addressing bytes because of the address caching. If you enable readdressing, NI-488.2 skips the address caching and always sends out the command bytes. With readdressing enabled, the same calls would look like:
ibwrt (dev2, "*cls", 4); -> Across the bus you will see ATN^, UNL, MTA0, MLA2, ATNv, *CLS
ibwrt (dev2, "*idn?", 5); -> Across the bus you will see ATN^, UNL, MTA0, MLA2, ATNv, *IDN?
ibrd (dev2, 100); -> Across the bus you will see ATN^, UNL, MTA2, MLA0, ATNv, [Response from Instrument]


I believe the previous reply indicated how to enable/disable readdressing, but I wanted to answer your "what is it" so that you can understand the implication on the bus.
0 Kudos
Message 3 of 4
(4,185 Views)

Thank you both!

When I was working at Motorola I took a GPIB class from an ex-HP support engineer. That explanation of "what it is" is now triggering - no pun intended - some vague memories of what he told us.  🙂

0 Kudos
Message 4 of 4
(4,180 Views)