Agilent Technologies 6628A, 6626A, 6625A Programming Power Supply Registers, Present Status, Fnend

Models: 6629A 6625A 6626A 6628A

1 123
Download 123 pages 32.12 Kb
Page 105
Image 105

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 = ";Isl 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 "OUTPUT 1 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: Declares 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.

Programming with a Series 200/300 Computer 105

Page 105
Image 105
Agilent Technologies 6628A Programming Power Supply Registers, Present Status, Print Output 1 is in CV Mode END if, Fnend