GPIBInstrument
public final class GPIBInstrument : MessageBasedInstrument, InstrumentProtocol
Undocumented
-
Declaration
Swift
public var bufferSize: Int -
Declaration
Swift
public var buffer: UnsafeMutableRawBufferPointer -
Declaration
Swift
public var session: Session -
Declaration
Swift
public var identifier: String -
Declaration
Swift
public var timeout: TimeInterval -
Declaration
Swift
public var delegate: InstrumentDelegate? -
Declaration
Swift
public var dispatchQueue: DispatchQueue -
Undocumented
Declaration
Swift
public init(session: Session, identifier: String) -
Sends GPIB command bytes to the device.
- Return: Amount of written bytes
Declaration
Swift
public func sendCommand(data: ViPByte, length: UInt32) throws -> UInt32Parameters
dataA buffer of UInt8s specifying GPIB commands
lengththe length of the data buffer
-
Specifies the state of the ATN line and the local active controller state.
Throws
<#throws value description#>Declaration
Swift
public func controlAtn(mode: AtnMode) throwsParameters
modeSpecifies the state of the ATN line and optionally the local active controller state.
-
Controls the state of the GPIB Remote Enable (REN) interface line, and optionally the remote/local state of the device.
Throws
<#throws value description#>Declaration
Swift
public func controlRen(mode: RenMode) throwsParameters
modeSpecifies the state of the REN line and optionally the device remote/local state.
-
Tell the GPIB device at the specified address to become the controller in charge
Throws
One of the followingVISAError
errors:- .invalidSession
- .unsupportedOperation
- .resourceLocked
- .timeout
- .notControllerInCharge
- .noListeners
- .ioError
Declaration
Swift
public func passControl(primaryAddress: UInt16, secondaryAddress: UInt16) throwsParameters
primaryAddressPrimary address of the device you want to pass control to
secondaryAddressSecondary address of the targeted GPIB device. If the targeted device does not have a secondary address, this parameter should contain the value VI_NO_SEC_ADDR.
-
Pulses the interface clear line for at least 100 microseconds
Throws
One of the followingVISAError
errors:- .invalidSession
- .unsupportedOperation
- .resourceLocked
- .notSystemController
Declaration
Swift
public func sendIfc() throws -
Waits for a serial request coming from the instrument doesn’t end when another instrument signals for an SRQ Keep in mind that this is a BLOCKING operation Waits for a serial request coming from the instrument Doesn’t end when another instrument signals for an SRQ Keep in mind this is a BLOCKING operation
Throws
<#throws value description#>Declaration
Swift
public func waitForSrq(timeout: UInt? = 25000) throwsParameters
timeoutTimeout (in milliseconds) for the wait
GPIBInstrument Class Reference