The whole controller aspect of GPIB can be confusing! Here is a summary to help you understand.
GPIB has two different types of controllers:
1) Controller. A controller is responsible for toggling the ATN line to properly control the bus. When the controller asserts ATN and sends data bytes across the bus, these bytes are interpreted as command bytes to configure the bus for appropriate traffic. There are three different controller states: Idle, Standby, and Active. There can only be one entity on the GPIB bus that is not an idle controller.
- An idle controller is not currently the controller. Technically, the tranceivers connecting the interface chip to the bus have the ATN line as an input and the SRQ line as an output.
- A standby controller is currently the controller on the bus and is currently NOT asserting the ATN line. Technically, the tranceivers connecting the interface chip to the bus have the ATN line as an output and the SRQ line as an input.
- An active controller is currently the controller on the bus and is current asserting the ATN line. Tranceivers are the same as for a standby controller.
NI-488.2 adds the CIC bit to the ibsta for any board that is either in the Standby or Active controller state. Control can be passed from one controller to another controller by using the NI-488.2 command ibpct. When control is passed, the prior controller (the one invoking ibpct) becomes an idle controller and the other controller becomes an active controller.
1) System Controller. The system controller is responsible for toggling the IFC and REN lines. The IFC line (Interface Clear) unaddresses all devices and will cause any devices that have been passed control to become an idle controller. The system controller will then become an active controller. The REN line (Remote Enable) is used to place devices in remote mode to let them be controlled remotely instead of via the front panel of the instrument. Technically, the tranceivers connecting the interface chip to the bus of a system controller have the IFC and REN lines as output, whereas the the tranceivers for a non system controller have IFC and REN as an input. This is why you only want one system controller on the bus. If you have two system controllers on the bus, they both have their tranceivers as outputs and cannot detect the other device asserting the IFC line. Confusion reigns and you typically have communication problems.
That being said, what I said earlier was still correct. The following calls will configure the gpib board to be a non-system controller and will correctly modify the tranceiver so that you can have multiple gpib boards connected to the bus and behave correctly. However, if the GPIB board is not active (you do not have any handles open), it should not interefere with a separate controller on the bus. However, you need to make sure that you take all handles offline when you exit to make sure that the hardware is actually turned off on the bus by always making an ibonl (l_GpibHandle, 0) call at the end.
/ Open a handle to the GPIB board
l_GpibHandle = ibfind ("GPIB0");
// Configure the GPIB board to NOT be a system controller
ibrsc (l_GpibHandle, 0);