2 making sure the previous command is complete, Caution, String or – KEPCO BOP 1KW-MG Operator Manual, Firmware Ver.4.12 and higher User Manual
Page 110: Making sure the previous command is complete -44

3-44
BOP HIPWR 031014
1. Minimize programmed mode (voltage or current) changes. Unless absolutely required by the
test parameters, allow the power supply to automatically switch modes as determined by the
load. This will improve response time and reduce undesirable transients.
2. Once the mode (voltage or current) is programmed, program the active parameter to zero
and the complementary limit parameter to the maximum anticipated for application. Then
program only the active parameter. The active parameter is the parameter that controls the
output, e.g., voltage controls the output in voltage mode.
3. Never program both the active and complementary limit parameter to zero. This can result in
long response times. Set the active parameter to zero and the complementary limit parame-
ter to a minimum, e.g., 10% of maximum, to ensure that the active mode is defined.
3.5.2.2
MAKING SURE THE PREVIOUS COMMAND IS COMPLETE
Some SCPI commands require a flash memory update and can take an indeterminate amount
of time to complete. These commands are:
•
*SAV
•
MEM:PACK
(**)
•
MEM:UPD
(**)
•
CAL:COPY
•
CAL:SAVE
•
SYST:PASS:NEW
•
SYST:SEC:IMM
(**)
•
SYST:SEC:OVER
(**)
When sent via the GPIB, these commands require a query to be added to the command string
to verify the previous command is complete. When the command is complete, the unit updates
the status byte and indicates MAV (Message Available, bit 4 - see Table A-3) is true. MAV indi-
cates that there is a response to be received by the computer, so when it becomes set, the unit
is ready for its next command after reading back the data from the query that was added to the
command string. Although it is possible to wait for the response without sending a query, the
time out period can be 1 minute or longer depending on the internal state of the non-volatile
memory, up to 2 minutes for the syst:sec:imm and syst:sec:over commands.
When sending the above commands via the RS 232 bus, data flow control must be enabled
(XON) for the unit to properly update flash memory.
The *OPC? query is ideal to check if the previous command is complete since it returns either a
1 or 0. It is important that it be sent as a part of the same string as the command that causes a
flash update. As an example, sending CAL:SAVE 12/31/2005;:*opc? or *opc?;:CAL:SAVE
12/31/2005 are valid command strings. Sending the commands separately will not verify that
the previous command is complete. Figure 3-16 is a program written in C, incorporating these
techniques.
CAUTION: The commands listed above with (**) will generate a “-420, Missing Query” error if
a query does not precede the command in the same command string or
;*OPC?
does not follow the command. Although commands not marked with (**) will not
generate an error, all commands listed above require verification to insure absolute
success. Failure to follow these rules can result in the loss of all stored con-
stants and render the unit inoperative.