Hello,
I've created a VISA C# message-based session application that retrieves screen captures and trace data from an E4405B SpecA.
I'm having trouble synchronizing the completion of the ":MMEM:STOR:SCR " command which saves the current screen capture as a .gif file. and since timing related, difficult to troubleshoot and very intermittent. On average, seems to be successful only 80% of the time.
I looked at another post that showed sending the *OPC? right after you send the command. ie:
csa.WriteString(":MMEM:STOR:SCR 'E:brent.png'", true);
csa.WriteString("*OPC?", true);
s = csa.ReadString();
So I set mine up the same after finding *WAI was not helping, but I seem to be getting an intermittent read timeout from the "ReadString" after the *OPC?.
To add to my frustration/confusion, the programming manual states this:
"*OPC and *OPC? are currently effective only when immediately preceded by either
the :INITiate:IMMediate" or a :CALibration command."
If *OPC? and *OPC have no effect on the command i'm interested in, and *WAI is no help, what other options do I have?
SRQ? I was hoping to avoid that....
I've created a VISA C# message-based session application that retrieves screen captures and trace data from an E4405B SpecA.
I'm having trouble synchronizing the completion of the ":MMEM:STOR:SCR " command which saves the current screen capture as a .gif file. and since timing related, difficult to troubleshoot and very intermittent. On average, seems to be successful only 80% of the time.
I looked at another post that showed sending the *OPC? right after you send the command. ie:
csa.WriteString(":MMEM:STOR:SCR 'E:brent.png'", true);
csa.WriteString("*OPC?", true);
s = csa.ReadString();
So I set mine up the same after finding *WAI was not helping, but I seem to be getting an intermittent read timeout from the "ReadString" after the *OPC?.
To add to my frustration/confusion, the programming manual states this:
"*OPC and *OPC? are currently effective only when immediately preceded by either
the :INITiate:IMMediate" or a :CALibration command."
If *OPC? and *OPC have no effect on the command i'm interested in, and *WAI is no help, what other options do I have?
SRQ? I was hoping to avoid that....
:MMEM:STOR:SCR 'R:myscreen.gif'
The ability to save files to RAM is not documented in the manuals but it is how we save files in different software that we produce. This can greatly decrease the amount of time to save the files, especially once the C: drive starts to become fragmented as time goes on.
Of course, you would only want to save files to the R: drive if you are planing to immediately transfer them remotely to your controller and not save them on the instrument for later use, as there is no way to access these files from the front panel and once you turn the instrument off they will be LOST since the RAM is NOT battery backed up.
Just another note: You can perform most all other file operations with the R: drive as you would with the C: drive (:MMEM:CAT?, :MMEM:COPY, :MMEM:DATA?, etc...) with the only main difference being that you will lose it all when you cycle the power...
Give it a try,
Mike
Best thing I've heard all week.
Thank you so much!
Keep in mind you should also send *ESR? and check for '0' to make sure the command you sent is actually being executed correctly.