ATEasy 14.0 Driver ================================================================================ Summary ================================================================================ File = KeysightN6900N7900.drt DefaultName = PS Company = "Marvin Test Solutions, Inc." Programmers = "Claude Elwood Shannon" HelpFile = "" HelpTopic = "" ATEasyVersion = "14.0.165.0" AutoSaveVersion = False PromptVersionOnSave = False Versions = { Version1 = Create,user,Tue Apr 21 26 12:00:00 Version2 = LastSaved,ronniey,Wed Apr 22 26 13:45:40 } Manufacturer = Keysight Technologies Models = { "N6950A", "N6951A", "N6952A", "N6953A", "N6954A", "N6970A", "N6971A", "N6972A", "N6973A", "N6974A", "N6976A", "N6977A", "N7950A", "N7951A", "N7952A", "N7953A", "N7954A", "N7970A", "N7971A", "N7972A", "N7973A", "N7974A", "N7976A", "N7977A" } Parameters = {SkipOnInit, Number} Description = ! Models :N6950A/N6951A/N6952A/N6953A/N6954A ! N6970A/N6971A/N6972A/N6973A/N6974A/N6976A/N6977A ! N7950A/N7951A/N7952A/N7953A/N7954A ! N7970A/N7971A/N7972A/N7973A/N7974A/N7976A/N7977A ! Manufacturer :Keysight Technologies ! Description :N6900/N7900 Series Advanced Power System (APS) 1kW and 2kW Models ! Interface :GPIB/USB/LAN ! Manual :Keysight N6900/N7900 Series Operating and Service Guide (9018-03911) ! ! Initialization ! ========================================================================================= ! 1. Select the Interface type to GPIB / USB /LAN from the Driver Shortcut ! Interface page. ! 2. Set the current name and address of the instrument in the Interface page. ! 3. Set the parameter "SkipOnInit" to 1 to not Initialize the driver in the OnInit ! event. By default, if this variable is left blank (or set to 0) then the driver will ! initialize the instrument in the OnInit event when you start your application. ! ! Changes ! ========================================================================================= ! April 22, 2026 ! > Initialize release. Interfaces ================================================================================ Interface { Type = Gpib InputTerminator = "\n" OutputTerminator = "\n" Send Timeout = 1000 Receive Timeout = 5000 TrigTimeout = 5000 Delay = 250 ReceiveBufferSize = 512 InputEOI = True OutputEOI = True } Interface { Type = Usb InputTerminator = "\n" OutputTerminator = "\n" Send Timeout = 1000 Receive Timeout = 1000 TrigTimeout = 1000 Delay = 250 ReceiveBufferSize = 256 USBTMC = True } Interface { Type = WinSock InputTerminator = "\r\n" OutputTerminator = "\r\n" Send Timeout = 1000 Receive Timeout = 1000 TrigTimeout = 1000 Delay = 250 ReceiveBufferSize = 256 Protocol = 1 Server = False ConnectTimeout = 1000 OpenOnAccess = False } Libraries ================================================================================ Types ================================================================================ enumOutputState: Enum Public { aOutputStateOff: Long Const = 0! Output is disabled. aOutputStateOn: Long Const = 1 ! Output is enabled. } enumFunction: Enum Public { aFunctionVoltage: Long Const = 1 ! Voltage priority (CV) mode. aFunctionCurrent: Long Const = 2 ! Current priority (CC) mode. } enumTransientMode: Enum Public { aTransientModeFixed: Long Const = 1 ! Fixed output level, no transient. aTransientModeStep: Long Const = 2 ! Step transient mode. aTransientModeList: Long Const = 3 ! List transient mode. aTransientModeArb: Long Const = 4 ! Arbitrary waveform transient mode. } enumTriggerSource: Enum Public { aTriggerSourceBus: Long Const = 1 ! Trigger source is BUS (*TRG command). aTriggerSourceExternal: Long Const = 2 ! Trigger source is External (rear BNC input). aTriggerSourceImmediate: Long Const = 3 ! Trigger source is Immediate (free-running). } enumProtectionMode: Enum Public { aProtectionModeCCTrip: Long Const = 1 ! Output turns off when CC protection trips. aProtectionModeCVTrip: Long Const = 2 ! Output turns off when CV protection trips. aProtectionModeOff: Long Const = 3 ! Protection mode is disabled. } enumInhibitMode: Enum Public { aInhibitModeLatching: Long Const = 1 ! Inhibit signal latches the output off until cleared. aInhibitModeLive: Long Const = 2 ! Inhibit signal follows the input pin in real time. aInhibitModeOff: Long Const = 3! Remote inhibit function is disabled. } enumDisplayView: Enum Public { aDisplayViewVI: Long Const = 1 ! Display shows voltage and current. aDisplayViewVP: Long Const = 2 ! Display shows voltage and power. aDisplayViewVIP: Long Const = 3! Display shows voltage, current, and power. } enumSenseWindow: Enum Public { aSenseWindowHanning: Long Const = 1 ! Hanning measurement window (reduces spectral leakage). aSenseWindowRectangular: Long Const = 2 ! Rectangular measurement window. } enumListStep: Enum Public { aListStepOnce: Long Const = 1 ! List advances one step per trigger. aListStepAuto: Long Const = 2 ! List advances automatically through all steps. } enumArbFunctionType: Enum Public { aArbFunctionTypeVoltage: Long Const = 1 ! ARB waveform programs voltage. aArbFunctionTypeCurrent: Long Const = 2 ! ARB waveform programs current. } enumSystemState: Enum Public { aSystemStateRemote: Long Const = 1 ! Instrument is in remote control mode. aSystemStateLocal: Long Const = 2 ! Instrument is in local (front panel) mode. aSystemStateRWLock: Long Const = 3 ! Remote mode with local lockout (front panel locked). } enumPowerOnState: Enum Public { aPowerOnStateReset: Long Const = 1 ! Power-on restores factory reset state (*RST). aPowerOnStateRecall: Long Const = 2 ! Power-on recalls saved state 0 (RCL0). } Forms ================================================================================ Commands ================================================================================ Set { Output { Current: SetOutputCurrent() ! Sets the output current level. { Limit { Pos: SetOutputCurrentLimitPos() ! Sets the positive current limit in voltage priority mode. Neg: SetOutputCurrentLimitNeg() ! Sets the negative current limit in voltage priority mode. } Slew { Level: SetOutputCurrentSlewLevel() ! Sets the output current slew rate (A/s). Use 0 for INFinity. State { On: SetOutputCurrentSlewState(aOutputStateOn) ! Enables maximum current slew rate override. Off: SetOutputCurrentSlewState(aOutputStateOff) ! Disables maximum current slew rate override. } } TransientMode: SetOutputCurrentTransientMode() ! Sets current transient mode: Fixed, Step, List, or Arb. Triggered: SetOutputCurrentTriggered() ! Sets the triggered output current level. } Delay { Rise: SetOutputDelayRise() ! Sets the output turn-on sequence delay (s). Fall: SetOutputDelayFall() ! Sets the output turn-off sequence delay (s). } Function { Voltage: SetOutputFunction(aFunctionVoltage) ! Sets output regulation to voltage priority (CV) mode. Current: SetOutputFunction(aFunctionCurrent) ! Sets output regulation to current priority (CC) mode. } PowerOnState { Reset: SetOutputPowerOnState(aPowerOnStateReset) ! Sets power-on state to RST (factory defaults). RecallState0: SetOutputPowerOnState(aPowerOnStateRecall) ! Sets power-on state to RCL0 (recall saved state 0). } Protection { OVP: SetOutputProtectionOVP() ! Sets the over-voltage protection level (V). OCP { On: SetOutputProtectionOCPState(aOutputStateOn) ! Enables over-current protection. Off: SetOutputProtectionOCPState(aOutputStateOff) ! Disables over-current protection. Delay: SetOutputProtectionOCPDelay() ! Sets the over-current protection delay time (s). } Clear: SetOutputProtectionClear() ! Clears any latched protection fault condition. Mode: SetOutputProtectionMode() ! Sets turn-off behavior for protection conditions. UserDefined { On: SetOutputProtectionUserDefinedState(aOutputStateOn) ! Enables user-defined protection. Off: SetOutputProtectionUserDefinedState(aOutputStateOff) ! Disables user-defined protection. } Watchdog { On: SetOutputProtectionWatchdogState(aOutputStateOn) ! Enables the I/O watchdog timer. Off: SetOutputProtectionWatchdogState(aOutputStateOff) ! Disables the I/O watchdog timer. Delay: SetOutputProtectionWatchdogDelay() ! Sets the watchdog delay time (s). } } Relay { Lock { On: SetOutputRelayLock(aOutputStateOn) ! Enables locked-closed state of the output relays. Off: SetOutputRelayLock(aOutputStateOff) ! Disables locked-closed state of the output relays. } } State { On: SetOutputState(aOutputStateOn) ! Enables the power supply output. Off: SetOutputState(aOutputStateOff) ! Disables the power supply output. } Voltage: SetOutputVoltage() ! Sets the output voltage level. { Limit: SetOutputVoltageLimit() ! Sets the voltage limit when in current priority mode. Slew { Level: SetOutputVoltageSlewLevel() ! Sets the output voltage slew rate (V/s). Use 0 for INFinity. State { On: SetOutputVoltageSlewState(aOutputStateOn) ! Enables maximum voltage slew rate override. Off: SetOutputVoltageSlewState(aOutputStateOff) ! Disables maximum voltage slew rate override. } } TransientMode: SetOutputVoltageTransientMode() ! Sets voltage transient mode: Fixed, Step, List, or Arb. Triggered: SetOutputVoltageTriggered() ! Sets the triggered output voltage level. } } Sense { CurrentRange: SetSenseCurrentRange() ! Sets the DC current measurement range (A). { Auto { On: SetSenseCurrentRangeAuto(aOutputStateOn) ! Enables seamless current measurement auto-ranging. Off: SetSenseCurrentRangeAuto(aOutputStateOff) ! Disables seamless current measurement auto-ranging. } } Sweep { NPLC: SetSenseSweepNPLC() ! Sets measurement integration time in power line cycles. Points: SetSenseSweepPoints()! Sets the number of data points in a measurement sweep. TimeInterval: SetSenseSweepTimeInterval() ! Sets the time interval between measurement samples (s). OffsetPoints: SetSenseSweepOffsetPoints() ! Sets the data sweep offset points for triggered measurements. } Window: SetSenseWindow() ! Sets measurement window: Hanning or Rectangular. { Hanning: SetSenseWindow(aSenseWindowHanning) ! Selects Hanning measurement window. Rectangular: SetSenseWindow(aSenseWindowRectangular) ! Selects Rectangular measurement window. } RemoteSenseFault { On: SetSenseRemoteSenseFault(aOutputStateOn) ! Enables remote sense fault detection. Off: SetSenseRemoteSenseFault(aOutputStateOff) ! Disables remote sense fault detection. } AmpHourReset: SetSenseAmpHourReset() ! Resets the amp-hour accumulator to zero. WattHourReset: SetSenseWattHourReset() ! Resets the watt-hour accumulator to zero. } Trigger { Source { Transient: SetTriggerSourceTransient() ! Sets the transient trigger source: Bus, External, or Immediate. Acquire: SetTriggerSourceAcquire() ! Sets the acquisition trigger source: Bus, External, or Immediate. Elog: SetTriggerSourceElog() ! Sets the Elog trigger source: Bus, External, or Immediate. Arb: SetTriggerSourceArb() ! Sets the ARB trigger source: Bus, External, or Immediate. } TransientContinuous { On: SetTriggerTransientContinuous(aOutputStateOn) ! Enables continuous initiation of the transient trigger system. Off: SetTriggerTransientContinuous(aOutputStateOff) ! Disables continuous initiation of the transient trigger system. } } List { Voltage: SetListVoltage() ! Sets voltage level for each list step (comma-separated values in V). Current: SetListCurrent() ! Sets current level for each list step (comma-separated values in A). Dwell: SetListDwell() ! Sets dwell time for each list step (comma-separated values in s). Count: SetListCount() ! Sets the list repeat count. Use 0 for INFinity. Step: SetListStep() ! Sets list step mode: Once (per trigger) or Auto. { Once: SetListStep(aListStepOnce) ! List advances one step per trigger. Auto: SetListStep(aListStepAuto) ! List advances automatically through all steps. } Terminate { Last { On: SetListTerminateLast(aOutputStateOn) ! Output holds at last list value when list ends. Off: SetListTerminateLast(aOutputStateOff) ! Output returns to programmed value when list ends. } } } Arb { Voltage { Level: SetArbVoltageLevel() ! Sets voltage level for each ARB point (comma-separated values in V). Dwell: SetArbVoltageDwell() ! Sets dwell time for each ARB voltage point (comma-separated values in s). } Current { Level: SetArbCurrentLevel() ! Sets current level for each ARB point (comma-separated values in A). Dwell: SetArbCurrentDwell() ! Sets dwell time for each ARB current point (comma-separated values in s). } Count: SetArbCount() ! Sets the ARB repeat count. Use 0 for INFinity. FunctionType { Voltage: SetArbFunctionType(aArbFunctionTypeVoltage) ! Sets ARB to program voltage output. Current: SetArbFunctionType(aArbFunctionTypeCurrent) ! Sets ARB to program current output. } Terminate { Last { On: SetArbTerminateLast(aOutputStateOn) ! Output holds at last ARB value when ARB ends. Off: SetArbTerminateLast(aOutputStateOff) ! Output returns to programmed value when ARB ends. } } } Display { On: SetDisplayState(aOutputStateOn) ! Turns the front panel display on. Off: SetDisplayState(aOutputStateOff) ! Turns the front panel display off. View: SetDisplayView() ! Selects the front panel display view. { VoltageCurrent: SetDisplayView(aDisplayViewVI) ! Display shows voltage and current. VoltagePower: SetDisplayView(aDisplayViewVP) ! Display shows voltage and power. VoltageCurrentPower: SetDisplayView(aDisplayViewVIP) ! Display shows voltage, current, and power. } Saver { On: SetDisplaySaver(aOutputStateOn) ! Enables the front panel screen saver. Off: SetDisplaySaver(aOutputStateOff) ! Disables the front panel screen saver. } } SystemState: SetSystemState() ! Sets the remote/local control state of the instrument. { Remote: SetSystemState(aSystemStateRemote) ! Sets instrument to remote control mode. Local: SetSystemState(aSystemStateLocal) ! Sets instrument to local (front panel) mode. RWLock: SetSystemState(aSystemStateRWLock) ! Sets remote mode with front panel lockout. } } Get { Output { State: GetOutputState() ! Returns True if the output is enabled. Voltage: GetOutputVoltage() ! Returns the output voltage setting (V). { Limit: GetOutputVoltageLimit() ! Returns the voltage limit setting (V). Slew: GetOutputVoltageSlew() ! Returns the voltage slew rate setting (V/s). TransientMode: GetOutputVoltageTransientMode() ! Returns the voltage transient mode string. Triggered: GetOutputVoltageTriggered() ! Returns the triggered voltage setting (V). } Current: GetOutputCurrent() ! Returns the output current setting (A). { Limit { Pos: GetOutputCurrentLimitPos() ! Returns the positive current limit setting (A). Neg: GetOutputCurrentLimitNeg() ! Returns the negative current limit setting (A). } Slew: GetOutputCurrentSlew() ! Returns the current slew rate setting (A/s). TransientMode: GetOutputCurrentTransientMode() ! Returns the current transient mode string. Triggered: GetOutputCurrentTriggered() ! Returns the triggered current setting (A). } Function: GetOutputFunction() ! Returns the output regulation function string (VOLT or CURR). Protection { OverVoltage: GetOutputProtectionOverVoltage() ! Returns the over-voltage protection level (V). OverCurrent { State: GetOutputProtectionOverCurrentState() ! Returns True if over-current protection is enabled. Delay: GetOutputProtectionOverCurrentDelay() ! Returns the over-current protection delay time (s). } } PowerLimit: GetOutputPowerLimit() ! Returns the maximum output power limit of the instrument (W). } Sense { Current { Range: GetSenseCurrentRange()! Returns the current measurement range setting (A). { Auto: GetSenseCurrentRangeAuto() ! Returns True if current auto-ranging is enabled. } } Sweep { NPLC: GetSenseSweepNPLC() ! Returns measurement integration time in power line cycles. Points: GetSenseSweepPoints()! Returns the number of sweep data points. TimeInterval: GetSenseSweepTimeInterval() ! Returns the time interval between measurement samples (s). } } Trigger { TransientSource: GetTriggerTransientSource() ! Returns the transient trigger source string. AcquireSource: GetTriggerAcquireSource() ! Returns the acquisition trigger source string. } List { Count: GetListCount() ! Returns the list repeat count. Points { Voltage: GetListPointsVoltage() ! Returns the number of voltage points in the list. Current: GetListPointsCurrent() ! Returns the number of current points in the list. Dwell: GetListPointsDwell() ! Returns the number of dwell time points in the list. } } System { Identification: GetSystemIdentification() ! Returns the instrument identification string (*IDN?). Error: GetSystemError() ! Returns the next error string from the error queue. Version: GetSystemSCPIVersion() ! Returns the SCPI version the instrument complies with. Temperature: GetSystemTemperature() ! Returns the temperature at the air inlet (deg C). LineFrequency: GetSystemLineFrequency() ! Returns the power-line reference frequency (Hz). } } Fetch { Voltage { DC: FetchVoltageDC() ! Returns last averaged DC voltage from buffer (V). RMS: FetchVoltageRMS() ! Returns last RMS voltage (AC+DC) from buffer (V). Max: FetchVoltageMax() ! Returns last maximum voltage from buffer (V). Min: FetchVoltageMin() ! Returns last minimum voltage from buffer (V). } Current { DC: FetchCurrentDC() ! Returns last averaged DC current from buffer (A). RMS: FetchCurrentRMS() ! Returns last RMS current (AC+DC) from buffer (A). Max: FetchCurrentMax() ! Returns last maximum current from buffer (A). Min: FetchCurrentMin() ! Returns last minimum current from buffer (A). } Power { DC: FetchPowerDC() ! Returns last averaged DC power from buffer (W). Max: FetchPowerMax() ! Returns last maximum power from buffer (W). Min: FetchPowerMin() ! Returns last minimum power from buffer (W). } AmpHour: FetchAmpHour() ! Returns accumulated amp-hours. WattHour: FetchWattHour() ! Returns accumulated watt-hours. } Measure { Voltage { DC: MeasureVoltageDC() ! Takes a measurement; returns averaged DC voltage (V). RMS: MeasureVoltageRMS() ! Takes a measurement; returns RMS voltage AC+DC (V). High: MeasureVoltageHigh() ! Takes a measurement; returns High level of voltage pulse (V). Low: MeasureVoltageLow() ! Takes a measurement; returns Low level of voltage pulse (V). Max: MeasureVoltageMax() ! Takes a measurement; returns maximum voltage (V). Min: MeasureVoltageMin() ! Takes a measurement; returns minimum voltage (V). } Current { DC: MeasureCurrentDC() ! Takes a measurement; returns averaged DC current (A). RMS: MeasureCurrentRMS() ! Takes a measurement; returns RMS current AC+DC (A). High: MeasureCurrentHigh() ! Takes a measurement; returns High level of current pulse (A). Low: MeasureCurrentLow() ! Takes a measurement; returns Low level of current pulse (A). Max: MeasureCurrentMax() ! Takes a measurement; returns maximum current (A). Min: MeasureCurrentMin() ! Takes a measurement; returns minimum current (A). } Power { DC: MeasurePowerDC() ! Takes a measurement; returns averaged DC power (W). Max: MeasurePowerMax() ! Takes a measurement; returns maximum power (W). Min: MeasurePowerMin() ! Takes a measurement; returns minimum power (W). } } Initiate { Acquire: InitiateAcquire() ! Initiates the measurement trigger system. Transient: InitiateTransient() ! Initiates the transient trigger system. Elog: InitiateElog() ! Initiates external data logging. } Abort { Acquire: AbortAcquire() ! Cancels any triggered measurements in progress. Transient: AbortTransient() ! Cancels any triggered transient actions in progress. Elog: AbortElog() ! Stops external data logging. } Trigger: Trigger() ! Sends a software BUS trigger (*TRG). SelfTest: SelfTest() ! Runs self-test. Returns 0=pass, non-zero=fail. Initialize: Initialize() Reset: Reset() ! Resets instrument to factory defaults (*RST). { Error: ClearError() ! Clears the error queue and status registers (*CLS). } State { Save: StateSave() ! Saves instrument state to non-volatile memory location (0-9). Recall: StateRecall() ! Recalls instrument state from non-volatile memory location (0-9). } Events ================================================================================ Procedure OnInit(): Void Public! Occurs when the driver is started. -------------------------------------------------------------------------------- { if Driver.Parameters("SkipOnInit")<>0 Initialize() endif } Procedures ================================================================================ Procedure DisplayError(lErrorNumber, sErrorMsg): Void ! Displays an error message and halts execution. -------------------------------------------------------------------------------- lErrorNumber: Val Long sErrorMsg: Val String { error lErrorNumber, sErrorMsg } Procedure AbortAcquire(): Void ! Cancels any triggered measurements in progress. -------------------------------------------------------------------------------- { SendString("ABOR:ACQ") } Procedure AbortElog(): Void ! Stops external data logging. -------------------------------------------------------------------------------- { SendString("ABOR:ELOG") } Procedure AbortTransient(): Void ! Cancels any triggered transient actions in progress. -------------------------------------------------------------------------------- { SendString("ABOR:TRAN") } Procedure ClearError(): Void ! Clears the error queue and event status registers (*CLS). -------------------------------------------------------------------------------- { SendString("*CLS") } Procedure FetchAmpHour(pdValue): Void ! Returns accumulated amp-hours. -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:AHO?") ReceiveDouble(pdValue) } Procedure FetchCurrentDC(pdValue): Void ! Returns last averaged DC current from buffer (A). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:CURR?") ReceiveDouble(pdValue) } Procedure FetchCurrentMax(pdValue): Void ! Returns last maximum current from buffer (A). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:CURR:MAX?") ReceiveDouble(pdValue) } Procedure FetchCurrentMin(pdValue): Void ! Returns last minimum current from buffer (A). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:CURR:MIN?") ReceiveDouble(pdValue) } Procedure FetchCurrentRMS(pdValue): Void ! Returns last RMS current (AC+DC) from buffer (A). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:CURR:ACDC?") ReceiveDouble(pdValue) } Procedure FetchPowerDC(pdValue): Void ! Returns last averaged DC power from buffer (W). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:POW?") ReceiveDouble(pdValue) } Procedure FetchPowerMax(pdValue): Void ! Returns last maximum power from buffer (W). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:POW:MAX?") ReceiveDouble(pdValue) } Procedure FetchPowerMin(pdValue): Void ! Returns last minimum power from buffer (W). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:POW:MIN?") ReceiveDouble(pdValue) } Procedure FetchVoltageDC(pdValue): Void ! Returns last averaged DC voltage from buffer (V). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:VOLT?") ReceiveDouble(pdValue) } Procedure FetchVoltageMax(pdValue): Void ! Returns last maximum voltage from buffer (V). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:VOLT:MAX?") ReceiveDouble(pdValue) } Procedure FetchVoltageMin(pdValue): Void ! Returns last minimum voltage from buffer (V). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:VOLT:MIN?") ReceiveDouble(pdValue) } Procedure FetchVoltageRMS(pdValue): Void ! Returns last RMS voltage (AC+DC) from buffer (V). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:VOLT:ACDC?") ReceiveDouble(pdValue) } Procedure FetchWattHour(pdValue): Void ! Returns accumulated watt-hours. -------------------------------------------------------------------------------- pdValue: Var Double { SendString("FETC:WHO?") ReceiveDouble(pdValue) } Procedure GetListCount(plCount): Void ! Returns the current list repeat count. -------------------------------------------------------------------------------- plCount: Var Long { SendString("LIST:COUN?") ReceiveLong(plCount) } Procedure GetListPointsCurrent(plPoints): Void ! Returns the number of current points in the list. -------------------------------------------------------------------------------- plPoints: Var Long { SendString("LIST:CURR:POIN?") ReceiveLong(plPoints) } Procedure GetListPointsDwell(plPoints): Void ! Returns the number of dwell time points in the list. -------------------------------------------------------------------------------- plPoints: Var Long { SendString("LIST:DWEL:POIN?") ReceiveLong(plPoints) } Procedure GetListPointsVoltage(plPoints): Void ! Returns the number of voltage points in the list. -------------------------------------------------------------------------------- plPoints: Var Long { SendString("LIST:VOLT:POIN?") ReceiveLong(plPoints) } Procedure GetOutputCurrent(pdCurrent): Void ! Returns the output current setting (A). -------------------------------------------------------------------------------- pdCurrent: Var Double { SendString("CURR?") ReceiveDouble(pdCurrent) } Procedure GetOutputCurrentLimitNeg(pdLimit): Void ! Returns the negative current limit setting (A). -------------------------------------------------------------------------------- pdLimit: Var Double { SendString("CURR:LIM:NEG?") ReceiveDouble(pdLimit) } Procedure GetOutputCurrentLimitPos(pdLimit): Void ! Returns the positive current limit setting (A). -------------------------------------------------------------------------------- pdLimit: Var Double { SendString("CURR:LIM:POS?") ReceiveDouble(pdLimit) } Procedure GetOutputCurrentSlew(pdSlew): Void ! Returns the output current slew rate setting (A/s). -------------------------------------------------------------------------------- pdSlew: Var Double { SendString("CURR:SLEW?") ReceiveDouble(pdSlew) } Procedure GetOutputCurrentTransientMode(psMode): Void ! Returns the current transient mode string (FIXED, STEP, LIST, or ARB). -------------------------------------------------------------------------------- psMode: Var String { SendString("CURR:MODE?") ReceiveString(psMode) } Procedure GetOutputCurrentTriggered(pdCurrent): Void ! Returns the triggered output current level (A). -------------------------------------------------------------------------------- pdCurrent: Var Double { SendString("CURR:TRIG?") ReceiveDouble(pdCurrent) } Procedure GetOutputFunction(psFunction): Void ! Returns the output regulation function string (VOLT or CURR). -------------------------------------------------------------------------------- psFunction: Var String { SendString("FUNC?") ReceiveString(psFunction) } Procedure GetOutputPowerLimit(pdLimit): Void ! Returns the maximum output power limit of the instrument (W). -------------------------------------------------------------------------------- pdLimit: Var Double { SendString("POW:LIM?") ReceiveDouble(pdLimit) } Procedure GetOutputProtectionOverCurrentDelay(pdDelay): Void ! Returns the over-current protection delay time (s). -------------------------------------------------------------------------------- pdDelay: Var Double { SendString("CURR:PROT:DEL?") ReceiveDouble(pdDelay) } Procedure GetOutputProtectionOverCurrentState(pbState): Void ! Returns True if over-current protection is enabled. -------------------------------------------------------------------------------- pbState: Var Bool lVal: Long { SendString("CURR:PROT:STAT?") ReceiveLong(lVal) if lVal=1 pbState=True else pbState=False endif } Procedure GetOutputProtectionOverVoltage(pdOVP): Void ! Returns the over-voltage protection level (V). -------------------------------------------------------------------------------- pdOVP: Var Double { SendString("VOLT:PROT?") ReceiveDouble(pdOVP) } Procedure GetOutputState(pbState): Void ! Returns True if the output is enabled. -------------------------------------------------------------------------------- pbState: Var Bool lVal: Long { SendString("OUTP?") ReceiveLong(lVal) if lVal=1 pbState=True else pbState=False endif } Procedure GetOutputVoltage(pdVoltage): Void ! Returns the output voltage setting (V). -------------------------------------------------------------------------------- pdVoltage: Var Double { SendString("VOLT?") ReceiveDouble(pdVoltage) } Procedure GetOutputVoltageLimit(pdLimit): Void ! Returns the voltage limit setting in current priority mode (V). -------------------------------------------------------------------------------- pdLimit: Var Double { SendString("VOLT:LIM?") ReceiveDouble(pdLimit) } Procedure GetOutputVoltageSlew(pdSlew): Void ! Returns the output voltage slew rate setting (V/s). -------------------------------------------------------------------------------- pdSlew: Var Double { SendString("VOLT:SLEW?") ReceiveDouble(pdSlew) } Procedure GetOutputVoltageTransientMode(psMode): Void ! Returns the voltage transient mode string (FIXED, STEP, LIST, or ARB). -------------------------------------------------------------------------------- psMode: Var String { SendString("VOLT:MODE?") ReceiveString(psMode) } Procedure GetOutputVoltageTriggered(pdVoltage): Void ! Returns the triggered output voltage level (V). -------------------------------------------------------------------------------- pdVoltage: Var Double { SendString("VOLT:TRIG?") ReceiveDouble(pdVoltage) } Procedure GetSenseCurrentRange(pdRange): Void ! Returns the DC current measurement range (A). -------------------------------------------------------------------------------- pdRange: Var Double { SendString("SENS:CURR:RANG?") ReceiveDouble(pdRange) } Procedure GetSenseCurrentRangeAuto(pbAuto): Void ! Returns True if seamless current auto-ranging is enabled. -------------------------------------------------------------------------------- pbAuto: Var Bool lVal: Long { SendString("SENS:CURR:RANG:AUTO?") ReceiveLong(lVal) if lVal=1 pbAuto=True else pbAuto=False endif } Procedure GetSenseSweepNPLC(pdNPLC): Void ! Returns measurement integration time in power line cycles. -------------------------------------------------------------------------------- pdNPLC: Var Double { SendString("SENS:SWE:NPLC?") ReceiveDouble(pdNPLC) } Procedure GetSenseSweepPoints(plPoints): Void ! Returns the number of data points in a measurement sweep. -------------------------------------------------------------------------------- plPoints: Var Long { SendString("SENS:SWE:POIN?") ReceiveLong(plPoints) } Procedure GetSenseSweepTimeInterval(pdInterval): Void ! Returns the time interval between measurement samples (s). -------------------------------------------------------------------------------- pdInterval: Var Double { SendString("SENS:SWE:TINT?") ReceiveDouble(pdInterval) } Procedure GetSystemError(psError): Void ! Reads and clears one error from the error queue. -------------------------------------------------------------------------------- psError: Var String { SendString("SYST:ERR?") ReceiveString(psError) } Procedure GetSystemIdentification(psID): Void ! Returns the instrument identification string (*IDN?). -------------------------------------------------------------------------------- psID: Var String { SendString("*IDN?") ReceiveString(psID) } Procedure GetSystemLineFrequency(pdFreq): Void ! Returns the power-line reference frequency (Hz). -------------------------------------------------------------------------------- pdFreq: Var Double { SendString("SYST:LFR?") ReceiveDouble(pdFreq) } Procedure GetSystemSCPIVersion(psVersion): Void ! Returns the SCPI version string the instrument complies with. -------------------------------------------------------------------------------- psVersion: Var String { SendString("SYST:VERS?") ReceiveString(psVersion) } Procedure GetSystemTemperature(pdTemp): Void ! Returns the temperature at the air inlet (deg C). -------------------------------------------------------------------------------- pdTemp: Var Double { SendString("SYST:TEMP:AMB?") ReceiveDouble(pdTemp) } Procedure GetTriggerAcquireSource(psSource): Void ! Returns the acquisition trigger source string. -------------------------------------------------------------------------------- psSource: Var String { SendString("TRIG:ACQ:SOUR?") ReceiveString(psSource) } Procedure GetTriggerTransientSource(psSource): Void ! Returns the transient trigger source string. -------------------------------------------------------------------------------- psSource: Var String { SendString("TRIG:TRAN:SOUR?") ReceiveString(psSource) } Procedure Initialize(): Void -------------------------------------------------------------------------------- sID: String { if Driver.InterfaceType<>Driver.InterfaceType.aioGpib and Driver.InterfaceType<>Driver.InterfaceType.aioUsb and Driver.InterfaceType<>Driver.InterfaceType.aioWinSock DisplayError(-8, "Please configure this driver to use a GPIB, USB, or LAN interface in the driver shortcut properties.") endif Driver Get System Identification(sID) if Pos("N6950A", sID)<0 and Pos("N6951A", sID)<0 and Pos("N6952A", sID)<0 and Pos("N6953A", sID)<0 and Pos("N6954A", sID)<0 and Pos("N6970A", sID)<0 and Pos("N6971A", sID)<0 and Pos("N6972A", sID)<0 and Pos("N6973A", sID)<0 and Pos("N6974A", sID)<0 and Pos("N6976A", sID)<0 and Pos("N6977A", sID)<0 and Pos("N7950A", sID)<0 and Pos("N7951A", sID)<0 and Pos("N7952A", sID)<0 and Pos("N7953A", sID)<0 and Pos("N7954A", sID)<0 and Pos("N7970A", sID)<0 and Pos("N7971A", sID)<0 and Pos("N7972A", sID)<0 and Pos("N7973A", sID)<0 and Pos("N7974A", sID)<0 and Pos("N7976A", sID)<0 and Pos("N7977A", sID)<0 DisplayError(-9, "Unable to find a supported N6900/N7900 series instrument at address 0x"+Str(GetDriverAddress(), 16)) endif } Procedure InitiateAcquire(): Void ! Initiates the measurement trigger system. -------------------------------------------------------------------------------- { SendString("INIT:ACQ") } Procedure InitiateElog(): Void ! Initiates external data logging. -------------------------------------------------------------------------------- { SendString("INIT:ELOG") } Procedure InitiateTransient(): Void ! Initiates the transient trigger system. -------------------------------------------------------------------------------- { SendString("INIT:TRAN") } Procedure MeasureCurrentDC(pdValue): Void ! Takes a measurement; returns averaged DC current (A). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:CURR?") ReceiveDouble(pdValue) } Procedure MeasureCurrentHigh(pdValue): Void ! Takes a measurement; returns High level of current pulse (A). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:CURR:HIGH?") ReceiveDouble(pdValue) } Procedure MeasureCurrentLow(pdValue): Void ! Takes a measurement; returns Low level of current pulse (A). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:CURR:LOW?") ReceiveDouble(pdValue) } Procedure MeasureCurrentMax(pdValue): Void ! Takes a measurement; returns maximum current (A). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:CURR:MAX?") ReceiveDouble(pdValue) } Procedure MeasureCurrentMin(pdValue): Void ! Takes a measurement; returns minimum current (A). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:CURR:MIN?") ReceiveDouble(pdValue) } Procedure MeasureCurrentRMS(pdValue): Void ! Takes a measurement; returns RMS current AC+DC (A). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:CURR:ACDC?") ReceiveDouble(pdValue) } Procedure MeasurePowerDC(pdValue): Void ! Takes a measurement; returns averaged DC power (W). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:POW?") ReceiveDouble(pdValue) } Procedure MeasurePowerMax(pdValue): Void ! Takes a measurement; returns maximum power (W). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:POW:MAX?") ReceiveDouble(pdValue) } Procedure MeasurePowerMin(pdValue): Void ! Takes a measurement; returns minimum power (W). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:POW:MIN?") ReceiveDouble(pdValue) } Procedure MeasureVoltageDC(pdValue): Void ! Takes a measurement; returns averaged DC voltage (V). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:VOLT?") ReceiveDouble(pdValue) } Procedure MeasureVoltageHigh(pdValue): Void ! Takes a measurement; returns High level of voltage pulse (V). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:VOLT:HIGH?") ReceiveDouble(pdValue) } Procedure MeasureVoltageLow(pdValue): Void ! Takes a measurement; returns Low level of voltage pulse (V). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:VOLT:LOW?") ReceiveDouble(pdValue) } Procedure MeasureVoltageMax(pdValue): Void ! Takes a measurement; returns maximum voltage (V). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:VOLT:MAX?") ReceiveDouble(pdValue) } Procedure MeasureVoltageMin(pdValue): Void ! Takes a measurement; returns minimum voltage (V). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:VOLT:MIN?") ReceiveDouble(pdValue) } Procedure MeasureVoltageRMS(pdValue): Void ! Takes a measurement; returns RMS voltage AC+DC (V). -------------------------------------------------------------------------------- pdValue: Var Double { SendString("MEAS:VOLT:ACDC?") ReceiveDouble(pdValue) } Procedure Reset(): Void ! Resets the instrument to factory default values (*RST). -------------------------------------------------------------------------------- { SendString("*RST") } Procedure SelfTest(lResult): Void ! Runs instrument self-test (*TST?). Returns 0=pass, non-zero=fail. -------------------------------------------------------------------------------- lResult: Var Long { SendString("*TST?") ReceiveLong(lResult) } Procedure SetArbCount(nCount): Void ! Sets the ARB repeat count. Use 0 for INFinity. -------------------------------------------------------------------------------- nCount: Val Long { if nCount=0 SendString("ARB:COUN INF") else SendString("ARB:COUN "+Str(nCount)) endif } Procedure SetArbCurrentDwell(sDwell): Void ! Sets dwell time for each ARB current point. Comma-separated values in seconds. -------------------------------------------------------------------------------- sDwell: Val String { SendString("ARB:CURR:CDW:DWE "+sDwell) } Procedure SetArbCurrentLevel(sLevel): Void ! Sets current level for each ARB point. Comma-separated values in Amps. -------------------------------------------------------------------------------- sLevel: Val String { SendString("ARB:CURR:CDW "+sLevel) } Procedure SetArbFunctionType(nType): Void ! Sets ARB function type: Voltage or Current. -------------------------------------------------------------------------------- nType: Val enumArbFunctionType { select nType case aArbFunctionTypeVoltage SendString("ARB:FUNC:TYPE VOLT") case aArbFunctionTypeCurrent SendString("ARB:FUNC:TYPE CURR") endselect } Procedure SetArbTerminateLast(nOnOff): Void ! Sets ARB terminate behavior: On=hold last value, Off=return to programmed value. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("ARB:TERM:LAST ON") else SendString("ARB:TERM:LAST OFF") endif } Procedure SetArbVoltageDwell(sDwell): Void ! Sets dwell time for each ARB voltage point. Comma-separated values in seconds. -------------------------------------------------------------------------------- sDwell: Val String { SendString("ARB:VOLT:CDW:DWE "+sDwell) } Procedure SetArbVoltageLevel(sLevel): Void ! Sets voltage level for each ARB point. Comma-separated values in Volts. -------------------------------------------------------------------------------- sLevel: Val String { SendString("ARB:VOLT:CDW "+sLevel) } Procedure SetDisplaySaver(nOnOff): Void ! Enables or disables the front panel screen saver. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("DISP:SAV ON") else SendString("DISP:SAV OFF") endif } Procedure SetDisplayState(nOnOff): Void ! Turns the front panel display on or off. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("DISP ON") else SendString("DISP OFF") endif } Procedure SetDisplayView(nView): Void ! Sets front panel display view: VI, VP, or VIP. -------------------------------------------------------------------------------- nView: Val enumDisplayView { select nView case aDisplayViewVI SendString("DISP:VIEW METER_VI") case aDisplayViewVP SendString("DISP:VIEW METER_VP") case aDisplayViewVIP SendString("DISP:VIEW METER_VIP") endselect } Procedure SetListCount(nCount): Void ! Sets the list repeat count. Use 0 for INFinity. -------------------------------------------------------------------------------- nCount: Val Long { if nCount=0 SendString("LIST:COUN INF") else SendString("LIST:COUN "+Str(nCount)) endif } Procedure SetListCurrent(sValues): Void ! Sets current level for each list step. Comma-separated values in Amps. -------------------------------------------------------------------------------- sValues: Val String { SendString("LIST:CURR "+sValues) } Procedure SetListDwell(sValues): Void ! Sets dwell time for each list step. Comma-separated values in seconds. -------------------------------------------------------------------------------- sValues: Val String { SendString("LIST:DWEL "+sValues) } Procedure SetListStep(nMode): Void ! Sets list step mode: Once (one step per trigger) or Auto. -------------------------------------------------------------------------------- nMode: Val enumListStep { select nMode case aListStepOnce SendString("LIST:STEP ONCE") case aListStepAuto SendString("LIST:STEP AUTO") endselect } Procedure SetListTerminateLast(nOnOff): Void ! Sets list terminate behavior: On=hold last value, Off=return to programmed value. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("LIST:TERM:LAST ON") else SendString("LIST:TERM:LAST OFF") endif } Procedure SetListVoltage(sValues): Void ! Sets voltage level for each list step. Comma-separated values in Volts. -------------------------------------------------------------------------------- sValues: Val String { SendString("LIST:VOLT "+sValues) } Procedure SetOutputProtectionOCPDelay(dDelay): Void ! Sets the over-current protection delay time (s). -------------------------------------------------------------------------------- dDelay: Val Double { SendString("CURR:PROT:DEL "+Str(dDelay)) } Procedure SetOutputProtectionOCPState(nOnOff): Void ! Enables or disables over-current protection. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("CURR:PROT:STAT ON") else SendString("CURR:PROT:STAT OFF") endif } Procedure SetOutputProtectionOVP(dOVP): Void ! Sets the over-voltage protection level (V). -------------------------------------------------------------------------------- dOVP: Val Double { SendString("VOLT:PROT "+Str(dOVP)) } Procedure SetOutputCurrent(dCurrent): Void ! Sets the output current level (A). -------------------------------------------------------------------------------- dCurrent: Val Double { SendString("CURR "+Str(dCurrent)) } Procedure SetOutputCurrentLimitNeg(dLimit): Void ! Sets the negative current limit in voltage priority mode (A). -------------------------------------------------------------------------------- dLimit: Val Double { SendString("CURR:LIM:NEG "+Str(dLimit)) } Procedure SetOutputCurrentLimitPos(dLimit): Void ! Sets the positive current limit in voltage priority mode (A). -------------------------------------------------------------------------------- dLimit: Val Double { SendString("CURR:LIM:POS "+Str(dLimit)) } Procedure SetOutputCurrentSlewLevel(dSlew): Void ! Sets the output current slew rate (A/s). Use 0 for INFinity. -------------------------------------------------------------------------------- dSlew: Val Double { if dSlew=0 SendString("CURR:SLEW INF") else SendString("CURR:SLEW "+Str(dSlew)) endif } Procedure SetOutputCurrentSlewState(nOnOff): Void ! Enables or disables maximum current slew rate override. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("CURR:SLEW:MAX ON") else SendString("CURR:SLEW:MAX OFF") endif } Procedure SetOutputCurrentTransientMode(nMode): Void ! Sets current transient mode: Fixed, Step, List, or Arb. -------------------------------------------------------------------------------- nMode: Val enumTransientMode { select nMode case aTransientModeFixed SendString("CURR:MODE FIXED") case aTransientModeStep SendString("CURR:MODE STEP") case aTransientModeList SendString("CURR:MODE LIST") case aTransientModeArb SendString("CURR:MODE ARB") endselect } Procedure SetOutputCurrentTriggered(dCurrent): Void ! Sets the triggered output current level (A). -------------------------------------------------------------------------------- dCurrent: Val Double { SendString("CURR:TRIG "+Str(dCurrent)) } Procedure SetOutputDelayFall(dDelay): Void ! Sets the output turn-off sequence delay (s). -------------------------------------------------------------------------------- dDelay: Val Double { SendString("OUTP:DEL:FALL "+Str(dDelay)) } Procedure SetOutputDelayRise(dDelay): Void ! Sets the output turn-on sequence delay (s). -------------------------------------------------------------------------------- dDelay: Val Double { SendString("OUTP:DEL:RISE "+Str(dDelay)) } Procedure SetOutputFunction(nFunc): Void ! Sets output regulation: Voltage priority (CV) or Current priority (CC). -------------------------------------------------------------------------------- nFunc: Val enumFunction { select nFunc case aFunctionVoltage SendString("FUNC VOLT") case aFunctionCurrent SendString("FUNC CURR") endselect } Procedure SetOutputPowerOnState(nMode): Void ! Sets power-on state: Reset (factory defaults) or RecallState0. -------------------------------------------------------------------------------- nMode: Val enumPowerOnState { select nMode case aPowerOnStateReset SendString("OUTP:PON:STAT RST") case aPowerOnStateRecall SendString("OUTP:PON:STAT RCL0") endselect } Procedure SetOutputProtectionClear(): Void ! Clears any latched protection fault condition. -------------------------------------------------------------------------------- { SendString("OUTP:PROT:CLE") } Procedure SetOutputState(nOnOff): Void ! Enables or disables the power supply output. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("OUTP ON") else SendString("OUTP OFF") endif } Procedure SetOutputVoltage(dVoltage): Void ! Sets the output voltage level (V). -------------------------------------------------------------------------------- dVoltage: Val Double { SendString("VOLT "+Str(dVoltage)) } Procedure SetOutputVoltageLimit(dLimit): Void ! Sets the voltage limit in current priority mode (V). -------------------------------------------------------------------------------- dLimit: Val Double { SendString("VOLT:LIM "+Str(dLimit)) } Procedure SetOutputVoltageSlewLevel(dSlew): Void ! Sets the output voltage slew rate (V/s). Use 0 for INFinity. -------------------------------------------------------------------------------- dSlew: Val Double { if dSlew=0 SendString("VOLT:SLEW INF") else SendString("VOLT:SLEW "+Str(dSlew)) endif } Procedure SetOutputVoltageSlewState(nOnOff): Void ! Enables or disables maximum voltage slew rate override. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("VOLT:SLEW:MAX ON") else SendString("VOLT:SLEW:MAX OFF") endif } Procedure SetOutputVoltageTransientMode(nMode): Void ! Sets voltage transient mode: Fixed, Step, List, or Arb. -------------------------------------------------------------------------------- nMode: Val enumTransientMode { select nMode case aTransientModeFixed SendString("VOLT:MODE FIXED") case aTransientModeStep SendString("VOLT:MODE STEP") case aTransientModeList SendString("VOLT:MODE LIST") case aTransientModeArb SendString("VOLT:MODE ARB") endselect } Procedure SetOutputVoltageTriggered(dVoltage): Void ! Sets the triggered output voltage level (V). -------------------------------------------------------------------------------- dVoltage: Val Double { SendString("VOLT:TRIG "+Str(dVoltage)) } Procedure SetOutputProtectionMode(nMode): Void ! Sets turn-off behavior for all protection conditions. -------------------------------------------------------------------------------- nMode: Val enumProtectionMode { select nMode case aProtectionModeCCTrip SendString("OUTP:PROT:MODE CCTrip") case aProtectionModeCVTrip SendString("OUTP:PROT:MODE CVTrip") case aProtectionModeOff SendString("OUTP:PROT:MODE Off") endselect } Procedure SetOutputRelayLock(nOnOff): Void ! Enables or disables locked-closed state of output relays. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("OUTP:REL:LOCK ON") else SendString("OUTP:REL:LOCK OFF") endif } Procedure SetSenseAmpHourReset(): Void ! Resets the amp-hour accumulator to zero. -------------------------------------------------------------------------------- { SendString("SENS:AHO:RES") } Procedure SetSenseCurrentRange(dRange): Void ! Sets the DC current measurement range (A). -------------------------------------------------------------------------------- dRange: Val Double { SendString("SENS:CURR:RANG "+Str(dRange)) } Procedure SetSenseCurrentRangeAuto(nOnOff): Void ! Enables or disables seamless current measurement auto-ranging. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("SENS:CURR:RANG:AUTO ON") else SendString("SENS:CURR:RANG:AUTO OFF") endif } Procedure SetSenseRemoteSenseFault(nOnOff): Void ! Enables or disables remote sense fault detection. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("SENS:FAUL:STAT ON") else SendString("SENS:FAUL:STAT OFF") endif } Procedure SetSenseSweepNPLC(dNPLC): Void ! Sets measurement integration time in power line cycles. -------------------------------------------------------------------------------- dNPLC: Val Double { SendString("SENS:SWE:NPLC "+Str(dNPLC)) } Procedure SetSenseSweepOffsetPoints(nPoints): Void ! Sets the data sweep offset points for triggered measurements. -------------------------------------------------------------------------------- nPoints: Val Long { SendString("SENS:SWE:OFFS:POIN "+Str(nPoints)) } Procedure SetSenseSweepPoints(nPoints): Void ! Sets the number of data points in a measurement sweep. -------------------------------------------------------------------------------- nPoints: Val Long { SendString("SENS:SWE:POIN "+Str(nPoints)) } Procedure SetSenseSweepTimeInterval(dInterval): Void ! Sets the time interval between measurement samples (s). -------------------------------------------------------------------------------- dInterval: Val Double { SendString("SENS:SWE:TINT "+Str(dInterval)) } Procedure SetSenseWattHourReset(): Void ! Resets the watt-hour accumulator to zero. -------------------------------------------------------------------------------- { SendString("SENS:WHO:RES") } Procedure SetSenseWindow(nWindow): Void ! Sets measurement window: Hanning or Rectangular. -------------------------------------------------------------------------------- nWindow: Val enumSenseWindow { select nWindow case aSenseWindowHanning SendString("SENS:WIND HANN") case aSenseWindowRectangular SendString("SENS:WIND RECT") endselect } Procedure SetSystemState(nState): Void ! Sets the remote/local control state of the instrument. -------------------------------------------------------------------------------- nState: Val enumSystemState { select nState case aSystemStateRemote SendString("SYST:COMM:RLST REM") case aSystemStateLocal SendString("SYST:COMM:RLST LOC") case aSystemStateRWLock SendString("SYST:COMM:RLST RWL") endselect } Procedure SetTriggerSourceAcquire(enSource): Void ! Sets the acquisition trigger source: Bus, External, or Immediate. -------------------------------------------------------------------------------- enSource: Val enumTriggerSource { select enSource case aTriggerSourceBus SendString("TRIG:ACQ:SOUR BUS") case aTriggerSourceExternal SendString("TRIG:ACQ:SOUR EXT") case aTriggerSourceImmediate SendString("TRIG:ACQ:SOUR IMM") endselect } Procedure SetTriggerSourceArb(enSource): Void ! Sets the ARB waveform trigger source: Bus, External, or Immediate. -------------------------------------------------------------------------------- enSource: Val enumTriggerSource { select enSource case aTriggerSourceBus SendString("TRIG:ARB:SOUR BUS") case aTriggerSourceExternal SendString("TRIG:ARB:SOUR EXT") case aTriggerSourceImmediate SendString("TRIG:ARB:SOUR IMM") endselect } Procedure SetTriggerSourceElog(enSource): Void ! Sets the Elog trigger source: Bus, External, or Immediate. -------------------------------------------------------------------------------- enSource: Val enumTriggerSource { select enSource case aTriggerSourceBus SendString("TRIG:ELOG:SOUR BUS") case aTriggerSourceExternal SendString("TRIG:ELOG:SOUR EXT") case aTriggerSourceImmediate SendString("TRIG:ELOG:SOUR IMM") endselect } Procedure SetTriggerSourceTransient(enSource): Void ! Sets the transient trigger source: Bus, External, or Immediate. -------------------------------------------------------------------------------- enSource: Val enumTriggerSource { select enSource case aTriggerSourceBus SendString("TRIG:TRAN:SOUR BUS") case aTriggerSourceExternal SendString("TRIG:TRAN:SOUR EXT") case aTriggerSourceImmediate SendString("TRIG:TRAN:SOUR IMM") endselect } Procedure SetTriggerTransientContinuous(nOnOff): Void ! Enables or disables continuous initiation of the transient trigger system. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("INIT:CONT:TRAN ON") else SendString("INIT:CONT:TRAN OFF") endif } Procedure SetOutputProtectionUserDefinedState(nOnOff): Void ! Enables or disables user-defined protection. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("OUTP:PROT:USER ON") else SendString("OUTP:PROT:USER OFF") endif } Procedure SetOutputProtectionWatchdogDelay(dDelay): Void ! Sets the I/O watchdog timer delay (s). -------------------------------------------------------------------------------- dDelay: Val Double { SendString("OUTP:PROT:WDOG:DEL "+Str(dDelay)) } Procedure SetOutputProtectionWatchdogState(nOnOff): Void ! Enables or disables the I/O watchdog timer. -------------------------------------------------------------------------------- nOnOff: Val enumOutputState { if nOnOff=aOutputStateOn SendString("OUTP:PROT:WDOG ON") else SendString("OUTP:PROT:WDOG OFF") endif } Procedure StateRecall(nLocation): Void ! Recalls instrument state from non-volatile memory. Location: 0-9. -------------------------------------------------------------------------------- nLocation: Val Long { if nLocation<0 or nLocation>9 DisplayError(-12, "State location must be between 0 and 9.") endif SendString("*RCL "+Str(nLocation)) } Procedure StateSave(nLocation): Void ! Saves current instrument state to non-volatile memory. Location: 0-9. -------------------------------------------------------------------------------- nLocation: Val Long { if nLocation<0 or nLocation>9 DisplayError(-11, "State location must be between 0 and 9.") endif SendString("*SAV "+Str(nLocation)) } Procedure Trigger(): Void ! Sends a software BUS trigger (*TRG). -------------------------------------------------------------------------------- { SendString("*TRG") } IOTables ================================================================================ IoTable ReceiveDouble(pdValue): Void -------------------------------------------------------------------------------- IoOperation Receive { } IoOperation Input:Double { Mode = AsciiToParameter Argument = "pdValue" } IoTable ReceiveLong(plValue): Void -------------------------------------------------------------------------------- IoOperation Receive { } IoOperation Input:Long { Mode = AsciiToParameter Argument = "plValue" } IoTable ReceiveString(psValue): Void -------------------------------------------------------------------------------- IoOperation Receive { Timeout = 5000 Size = NoMoreThan 256 } IoOperation Input:String { Mode = AsciiToParameter Argument = "psValue" MaxSize = 0 } IoTable SendString(s): Void -------------------------------------------------------------------------------- IoOperation Output:String { Mode = ParameterToAscii Argument = "s" MaxSize = 0 } IoOperation Send { Timeout = 1000 } Variables ================================================================================ END