BOP HIPWR 111315 3-453.5.2.2 MAKING SURE THE PREVIOUS COMMAND IS COMPLETESome SCPI commands require a flash memory update and can take an indeterminate amountof 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 stringto verify the previous command is complete. When the command is complete, the unit updatesthe 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 unitis ready for its next command after reading back the data from the query that was added to thecommand string. Although it is possible to wait for the response without sending a query, thetime out period can be 1 minute or longer depending on the internal state of the non-volatilememory, 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 a1 or 0. It is important that it be sent as a part of the same string as the command that causes aflash update. As an example, sending CAL:SAVE 12/31/2005;:*opc? or *opc?;:CAL:SAVE12/31/2005 are valid command strings. Sending the commands separately will not verify thatthe previous command is complete. Figure 3-16 is a program written in C, incorporating thesetechniques.CAUTION: The commands listed above with (**) will generate a “-440, Missing Query” error ifa query does not precede the command in the same command string or ;*OPC?does not follow the command. Although commands not marked with (**) will notgenerate an error, all commands listed above require verification to insure absolutesuccess. Failure to follow these rules can result in the loss of all stored con-stants and render the unit inoperative.For commands not marked with (**) failure to provide a delay of about 1 minute can result in:• Commands that are not processed,• The following command may be received in error, causing an error in the transmission,• Unit lock-up requiring power cycling of the unit. If working via the GPIB bus, sendingInterface Clear and Device Clear followed by *RST will unlock the unit.