16
Programming Example
UPS Transfer Time Measurement
The following programming example illustrates how to use the ac source with the Dual Power Analyzer
Option 020/022 to measure transfer time on a UPS. Transfer time is defined as the time it takes a UPS to
go from online-operation to battery-backup operation when the ac line fails.
This example starts with the ac source output voltage (UPS input voltage) at 120 Vac. The UPS output
voltage is connected to a load and to the Power Analyzer input. The ac source output turns on at 120 Vac,
then does a 50 ms dropout to 0 volts. Both the dropout and measurements are triggered at the same time.
The FETC:TVOLT:ABS? command is then used to return the transfer time, here defined as the time
between the start of the dropout and the time when the absolute value of the UPS output voltage exceeds
50 volts for at least 0.001 seconds.
100 ASSIGN @Ps TO 705 ! AC SOURCE IS AT ADDRESS 5, INTERFACE 700
110 !
120 !
130 OUTPUT @Ps;"*RST" ! BEGIN FROM A KNOWN STARTING POINT WITH RESET
140 OUTPUT @Ps;"VOLT 120" ! SET INITIAL INPUT VOLTAGE FOR UPS TO 120 VAC
150 OUTPUT @Ps;"OUTP ON" ! TURNS AC SOURCE OUTPUT ON AT 120 VAC
160 WAIT 2 ! MAKE SURE UPS OUTPUT HAS TIME TO SETTLE
170 !
180 !
190 OUTPUT @Ps;"VOLT:MODE PULS" ! SET UP PULSE MODE FOR AC SOURCE OUTPUT
200 OUTPUT @Ps;"PULS:WIDT 0.05" ! SET PULSE WIDTH TO 50 MILLISECONDS
210 OUTPUT @Ps;"VOLT:TRIG 0" ! SET PULSED (TRIGGERED) VALUE TO 0 VOLTS
220 !
230 !
240 OUTPUT @Ps;"TRIG:SYNC:SOUR PHAS" ! SETS DROPOUT SYNCHRONIZATION TO PHASE
250 OUTPUT @Ps;"TRIG:SYNC:PHAS 90" ! SETS DROPOUT START PHASE TO 90 DEGREES
260 OUTPUT @Ps;"TRIG:SOUR BUS" ! SETS DROPOUT TRIGGER AND MEASUREMENT
270 ! TRIGGER SOURCE TO BUS TRIGGER
280 !
290 !
300 OUTPUT @Ps;"OUTP:TTLT:SOUR BOT" ! SETS SIGNAL TRIGGER SOURCE TO BEGINNING
310 ! OF TRANSIENT (BOT)
320 OUTPUT @Ps;"OUTP:TTLT:STAT ON" ! ENABLES TRIGGER OUTPUT SIGNAL
330 OUTPUT @Ps;"TRIG:ACQ:SOUR TTLT" ! SETS MEASUREMENT TRIGGER SOURCE TO
340 ! TRIGGER OUTPUT SIGNAL
350 !
360 !
370 OUTPUT @Ps;"INIT:IMM:SEQ1" ! ARMS THE PULSED DROPOUT TO WAIT FOR TRIGGER
380 OUTPUT @Ps;"INIT:IMM:SEQ3" ! ARMS MEASUREMENT PROCESS TO WAIT FOR TRIGGER
390 OUTPUT @Ps;"TRIG:IMM" ! TRIGGERS PULSED VOLTAGE DROPOUT TO 0 VOLTS
400 ! AND STARTS THE MEASUREMENT PROCESS
410 OUTPUT @Ps;"SENS:NSEL 2" ! SELECTS POWER ANALYZER INPUT FOR MEASUREMENTS
420 OUTPUT @Ps;"FETC:TVOLT:ABS? 50, 0, .001" ! FETCHES TRANSFER TIME
430 ENTER @Ps;A ! RETURNS THE TRANSFER TIME MEASUREMENT
440 PRINT A ! PRINTS THE TRANSFER TIME MEASUREMENT
450 END