Programming the DC Source - 3

Using the Inhibit/Fault Port as a Digital I/O

You can configure the inhibit/fault port to provide a digital input/output to be used with custom digital interface circuits or relay circuits. As shipped from the factory, the port is shipped for inhibit/fault operation. You can change the configuration of the port to operate as a general purpose digital input output port with the following command:

[SOURce:]DIGital:FUNCtion RIDFi DIGio

The following table shows the bin assignments of the mating plug when used in RI/DFImode as well as Digital I/O mode. Refer to Table 1-2 for the electrical characteristics of the port.

Pin

FAULT/INHIBIT

DIGITAL I/O

Bit Weight

1

FLT Output

OUT 0

0

2

FLT Output

OUT 1

1

3

INH Input

IN/OUT 2

2

4

INH Common

Common

not programmable

To program the digital I/O port use:

[SOURce:]DIGital:DATA <data>

where the data is an integer from 0 to 7 that sets pins 1 to 3 according to their binary weight. Refer to the DIGital:DATA command for more information.

DFI Programming Example

The following program illustrates how to program the DFI port so that it goes low when an OCP condition turns off the output of the unit. To clear an overcurrent condition, the cause of the condition must first be removed and then an OUTput:PROTection:CLEar command must be sent. Note that the status event register will not clear the DFI port until the register is read.

10

!Rev A.00.00

 

20

ASSIGN @Ps TO 705

 

30

OUTPUT @Ps;"*RST"

! Sets supply to default values

40

OUTPUT @Ps;"OUTP ON"

! Turn on power supply output

50OUTPUT @Ps;"VOLT 10;CURR .1" ! Program power supply voltage and current

60!

70

OUTPUT @Ld;"CURR:PROT:STAT ON"

! Turn on overcurrent protection

80

OUTPUT @Ld;"OUTP:DFI:STAT

ON"

! Turn on DFI port

90

OUTPUT @Ld;"OUTP:DFI:SOUR

QUES"

! Select DFI bit from Questionable status register

100OUTPUT @Ld;"STAT:QUES:ENAB 2;PTR 2" ! Unmask bit 2 (OCP) on positive transition

110!

120

OUTPUT @Ld;"OUTP:PROT:CLE"

! Clears

the protection circuit

130

OUTPUT @Ld;"STAT:QUES:EVENT?"

! Clears

the Event register and DFI

140

ENTER @Ld;EVENT

! Reads the event and clears the buffer

190

!

 

 

37