ibconfig

Name

ibconfig -- change configuration (board or device)

Synopsis

#include <gpib/ib.h>

int ibconfig(int ud, int option, int setting);

Description

Changes various configuration settings associated with the board or device descriptor ud. The option argument specifies the particular setting you wish to modify. The setting argument specifies the option's new configuration. To query the descriptor's configuration, see ibask().

Table 1. ibconfig options

optionvalue (hexadecimal)effectused for board/device
IbcPAD0x1Sets GPIB primary address. Same as ibpad() board or device
IbcSAD0x2Sets GPIB secondary address. Same as ibsad() board or device
IbcTMO0x3Sets timeout for io operations. Same as ibmto(). board or device
IbcEOT0x4If setting is nonzero, EOI is asserted with last byte on writes. Same as ibeot().  
IbcPPC0x5Sets parallel poll configuration. Same as ibppc(). board
IbcREADDR0x6Useless, included for compatibility only.device
IbcAUTOPOLL0x7If setting is nonzero then automatic serial polling is enabled.board
IbcCICPROT0x8Useless, included for compatibility only.board
IbcSC0xaIf setting is nonzero, board becomes system controller. Same as ibrsc(). board
IbcSRE0xbIf setting is nonzero then board asserts REN line. Otherwise REN is unasserted. Same as ibsre(). board
IbcEOSrd0xcIf setting is nonzero then reads are terminated on reception of the end-of-string character. See ibeos(), in particular the REOS bit. board or device
IbcEOSwrt0xdIf setting is nonzero then EOI is asserted whenever the end-of-string character is sent. See ibeos(), in particular the XEOS bit.board or device
IbcEOScmp0xeIf setting is nonzero then all 8 bits are used to match the end-of-string character. Otherwise only the least significant 7 bits are used. See ibeos(), in particular the BIN bit.board or device
IbcEOSchar0xfSets the end-of-string byte. See ibeos(). board or device
IbcPP20x10If setting is nonzero then the board is put into local parallel poll configure mode (IEEE 488.1 PP2 subset), and will not change its parallel poll configuration in response to receiving 'parallel poll enable' command bytes from the controller-in-charge. Instead, the parallel poll configuration is set locally by doing a board-level call of ibppc(). A zero value puts the board in remote parallel poll configure mode (IEEE 488.1 PP1 subset). IEEE 488.2 requires devices to support the remote PP1 subset and not the local PP2 subset. Some older hardware does not support local parallel poll configure mode. board
IbcTIMING0x11Sets the T1 delay. Use setting of 1 for 2 microseconds, 2 for 500 nanoseconds, or 3 for 350 nanoseconds. These values are declared in the header files as the constants T1_DELAY_2000ns, T1_DELAY_500ns, and T1_DELAY_350ns. A 2 microsecond T1 delay is safest, but will limit maximum transfer speeds to a few hundred kilobytes per second. board
IbcReadAdjust0x13If setting is nonzero then byte pairs are automatically swapped during reads. Presently, this feature is unimplemented. board or device
IbcWriteAdjust0x14If setting is nonzero then byte pairs are automatically swapped during writes. Presently, this feature is unimplemented. board or device
IbcEventQueue0x15If setting is nonzero then the event queue is enabled. The event queue is disabled by default.board
IbcSPollBit0x16If the setting is nonzero then the use of the SPOLL bit in ibsta is enabled. board
IbcSendLLO0x17If the setting is nonzero then devices connected to this board are automatically put into local lockout mode when brought online with ibfind() or ibdev().board
IbcSPollTime0x18Sets timeout for serial polls. The setting must be between 0 and 17, which correspond to the same time periods as in ibtmo(). device
IbcPPollTime0x19Sets timeout for parallel polls. The setting must be between 0 and 17, which correspond to the same time periods as in ibtmo(). board
IbcEndBitIsNormal0x1aIf setting is nonzero then the END bit of ibsta is set on reception of the end-of-string character or EOI (default). Otherwise END bit is only set on EOI.board or device
IbcUnAddr0x1bIf setting is nonzero then UNT (untalk) and UNL (unlisten) commands are automatically sent after a completed io operation using this descriptor. This option is off by default.device
IbcHSCableLength0x1fConfigures the total cable length in meters for your system, by sending the command bytes CFE and CFGn. This is required to enable high speed noninterlocked handshaking (a.k.a. HS488) and set associated handshake timings. Valid setting values are 0 through 15. A value of zero disables noninterlocked handshaking, otherwise the value is the total number of meters of cable.board
IbcIst0x20Sets the individual status bit, a.k.a. 'ist'. Same as ibist(). board
IbcRsv0x21Sets the current status byte this board will use to respond to serial polls. Same as ibrsv(). board
IbcBNA0x200Changes the GPIB interface board used to access a device. The setting specifies the board index of the new access board. This configuration option is similar to ibbna() except the new board is specified by its board index instead of a name. device

Return value

The value of ibsta is returned.