Is there any way to find out when the E4407B spectrum analyzer is finished saving a file to disk (such as a screen image .gif or trace data .csv)?
For example after writing "MMEM:STOR:TRACE TRACE1, \"c:\\mytrace.csv\"" (C++ string literal) to the GPIB bus, I'd like to transfer the file to the local computer's drive. However, I need to know when it is finished saving the file (which can take a while, depending on number of data points). Otherwise the program would try to copy a file that isn't there.
Polling method and service request method examples would be helpful. At the very least if someone could point me in the right direction that would be great.
Andreas
For example after writing "MMEM:STOR:TRACE TRACE1, \"c:\\mytrace.csv\"" (C++ string literal) to the GPIB bus, I'd like to transfer the file to the local computer's drive. However, I need to know when it is finished saving the file (which can take a while, depending on number of data points). Otherwise the program would try to copy a file that isn't there.
Polling method and service request method examples would be helpful. At the very least if someone could point me in the right direction that would be great.
Andreas
Did you try just sending the next command? I am pretty sure the MMEM:STOR commands on the E4407B are not overlapped SCPI commands. This means the E4407B will not process the next SCPI command until it has finished saving the data to disk. So, you should be able to send the MMEM:STOR command and then immediately send the MMEM:DATA? query to read the file. The MMEM:DATA? query will not be processed until the MMEM:STOR command has finished. Of course, you need to make sure any bus timeouts are long enough to last the time it takes to store the file. You either need to set the timeout to a large enough value or don't read the response from the MMEM:DATA? command immediately and instead monitor the MAV bit to see when the data becomes available on the bus for you to read.