HP 6623A Programming Power Supply Registers, Present Status, Print OUTPUT1 is in CV Mode END if

Page 99

10 ASSIGN @Ps TO 705

20 OUTPUT @Ps;"VSET?1''

30 ENTER @Ps;Vsl

40 OUTPUT @Ps;''ISET?1"

50 ENTER @Ps;Isl

60 PRINT ''VOLTAGE SETTING OF OUTPUT #1 = '';Vsl

70 PRINT ''CURRENT LIMIT SETTING OF OUTPUT #1 = ";Is1

80 END

Line 10: Assigns the I/O pathname to the power supply.

Line 20,30: Queries the supply for output 1's voltage setting. You cannot string multiple queries together in a single device command because the power supply can only return the most recently queried data.

Line 40,50: Queries the supply for output 1's current limit.

Line 60,70: Prints the results of the queries on the screen.

Programming Power Supply Registers

Present Status

The power supply makes available several forms of status information. Chapter 5 discusses the different registers and their functions. The present status register contains continuously updated information. The following example shows how to query bit position 0 of output 1's status register to see if output 1 is in CV mode. In this example, the program references the function as a variable in a conditional execution statement. Note that instead of printing a message, line 30 could be used to branch to another part of the program in the event that the supply is in CV mode.

10 ASSIGN @Ps TO 705

20 COM /Ps/ @Ps

30 IF FNCv_mode THEN

40 PRINT "OUTPUT1 IS IN CV MODE"

50 END IF

60END

70!

80!

90DEF FNCv_mode

100COM /Ps/ @Ps

110OUTPUT @Ps;"STS?1"

120ENTER @Ps;Sts

130RETURN BIT(Sts,0)

140FNEND

Line 10: Assigns the I/O path name to the power supply.

Line 20: Declare a common block for the I/O path name. The COM statement must be used for the @Ps variable to preserve its value in the function subprogram.

Line 30,40,50: If FNCv_mode is true, print the message.

Line 90: Defines the Cv_mode function.

Line 100: Brings in the common block for the I/O pathname.

Line 110,120: Reads the present status of output 1 into the variable Sts.

Line 130: Returns the value of bit position 0 of Sts.

Service Request and Serial Poll

The fault and mask registers, when used in conjunction with the service request and serial poll functions, allow you to select which conditions can cause computer interrupts. The fault and mask registers can also be used independently of the serial poll or service request if so desired. The following example shows how to enable an interrupt to the computer in the case of an overvoltage condition. After the interrupt has occurred, this example includes an interrupt routine that conducts

Programming with a Series 200/300 Computer99

Image 99
Contents HP Part No Operating ManualCertification Safety Summary Symbol Description Safety SummaryEMC Declaration of ConformityAppendix D--Error Messages Installation ProceduresAppendix A--Calibration Procedure Appendix C--Command SummaryTable Of Contents Local Operation Remote OperationProgramming With The Series 200/300 Computer Command SummaryError Messages CalibrationPage Instrument and Manual Identification Safety ConsiderationsGeneral Information IntroductionAccessories DescriptionOutput Combinations Available Model Basic Operation Output Low Range Values High Range ValuesHP-IB Board Output Boards Specifications Qualifying ConditionsDefinitions Output Response Characteristics Source Effect SpecificationsOutputs Low High Voltage Temperature Coefficient Supplemental CharacteristicsCommand Processing Time see Figure Outputs Low High Voltage Programming ResolutionReadback Resolution AC Input Power and CurrentLow Voltage High Voltage 80 W Low Voltage Safety Agency ComplianceDimensions all models Output ImpedanceGeneral Information General Information General Information General Information Installation Initial InspectionLocation and Cooling Line Fuse Input Power Requirements100/120 2110-0342 220/240 2110-0055 Line FusesLine Voltage Conversion Power CordHP-IB Interface Connector Page Front Panel Controls and Indicators Getting StartedTurning On Your Supply HP-IB Status Annunciators LCL keySystem Control Keys Power Supply StatusAnnunciators Alphanumeric LCDOutput Control Keys Line Switch Numeric Entry KeysNormal Self Test Indications Sample Self-Test Failure Display Checking Out Your Supply Using Local ControlVoltage Test Overvoltage TestCurrent Test Enter/Output Statements Introduction To Remote OperationIset Enter OCPAddr Sending a Remote CommandOutput Reading the HP-IB AddressOften Used Commands Getting Data From The SupplyDisp a Disp a Returning the Supply to Local Mode Output Ranges Output Connections and Operating InformationProtection Features Operating QuadrantsRange Selection Typical Output Range Characteristics Connecting the Load Page Wire Bundled 10 a 20 a FeetCross Section Meters Area in mm2 Remote Voltage Sensing Multiple LoadsPositive and Negative Voltages Remote Sense Connections Remote Voltage SensingOpen Sense Leads Output Type FormulaOutput Noise Considerations Programming Response Time with an Output CapacitorExternal Trigger Circuit Overvoltage Trigger ConnectionsEquivalent Internal OV Trigger Circuit Power Supply Protection Considerations Battery ChargingParallel Operation CV Operation Maximum Allowable Voltage SettingRemote Sensing CC Operation13. Series Connections with Local Sensing CV Operation Series Operation14. Series Connections with Remote Sensing Specifications for Series OperationPage Page Remote Operation HP-IB OperationInterface Function HP-IB Address Selection Power-On Service Request PON Programming SyntaxNumeric Data Sheet 1 of 2. Syntax Forms for Power Supply Commands Sheet 2 of 2. Syntax Forms for Power Supply Commands Ovset Fault ?Vset IsetPage Initial Conditions Power Supply CommandsCurrent Programming Voltage ProgrammingRange Switching Output On/Off Overvoltage OV ProtectionOVSET? Multiple Output Storage & Recall Overcurrent Protection OCPStatus Reporting Clear CommandASTS? UNR +CCBit Assignment of the Serial Poll Register FAULT?UNMASK? Unmask 2,XXXService Request Generation PON ? SRQ?Reprogramming Delay RQS BitDisplay On/Off Other Queries Front Panel ExplanationResponse Code Code Explanation TEST? ResponsesPage General Local ModeLocal Operation Local Control Of Output FunctionsSetting Current Setting VoltageDisplaying the Contents of the Fault Register Setting Overvoltage ProtectionResetting Overvoltage Protection Resetting Overcurrent ProtectionCondition Setting the Reprogramming DelaySetting the Supplys HP-IB Address Local Control Of System FunctionsRCL Enter Displaying Error MessagesAddr Enter STO EnterPage Test Equipment and Setup Required Calibration ProceduresFigure A-1. Calibration Setup General Calibration Procedure Are not stored. Exercise care when moving the leads Pause Calibration Program10 ! Calibration Example Clear Voltmeter Output BufferInput ANY More Outputs to CALIBRATE? Y or N,X$ Disp END of Calibration ProgramFnend Page Page Programming With a Series 200/300 Computer Path NamesVoltage and Current Programming Voltage and Current Readback Voltage and Current Programming With VariablesPresent Status Programming Power Supply RegistersPrint OUTPUT1 is in CV Mode END if Service Request and Serial PollPrint Overvoltage on Output #2 Enable IntrOFF Intr Print Overvoltage on Output #1Error Detection Stored Operating States Programming Outputs Connected In ParallelInput Enter Operating VOLTAGE,V1 Input Enter Voltage LIMIT,VInput Enter the Desired Current Limit POINT,I Programming Outputs Connected In SeriesCommand Summary Table C-1. Command SummaryCommand Description Table C-l. Command Summary ROM? PON?Previously Test Responses Error Codes and MessagesPower-On Self Test Messages Error Responses Table D-l. Power-On Self Test Error MessageError Code Message Explanation ERR? query ERR key Table D-2. Error ResponsesResponse Code Explanation TEST? query Table D-3. TEST? ResponsesPage Make Changes Manual Backdating6623A Generally Applicable AnnotationsII. CE92 Product Specific Annotations 6621ALatin America Or contactEurope Far East