92 Keysight InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide4 Sequential (Blocking) vs. Overlapped CommandsPausing ProgramsUntil Sequential(Blocking)Commands areCompleteSequential (blocking) commands do not prevent additional commands from beingsent to the queue or cause the remote program to wait. For example, if yourprogram does something like:myScope.WriteString ":DIGitize"Debug.Print "Signal acquired."The "Signal acquired" message will be written immediately after the :DIGitize issent, not after the acquisition and processing is complete.To pause the program until a sequential (blocking) command is complete, youmust wait for a query result after the sequential (blocking) command. For example,in this case:Public strQueryResult As StringmyScope.WriteString ":DIGitize;*OPC?"strQueryResult = myScope.ReadStringDebug.Print "Signal acquired."The "Signal acquired" message will be written after the acquisition and processingis complete. The *OPC? query is appended to :DIGitize with a semi-colon (;), whichessentially ties it to the same thread in the parser. It is immediately dealt with once:DIGitize finishes and gives a "1" back to the program (whether the program uses itor not), allowing the program to move on.When using a query to wait until a sequential (blocking) command is complete, itis possible for the sequential (blocking) command execution to take longer thanthe I/O timeout, in which case, there will be a timeout error while waiting for thequery results. You can increase the I/O timeout or have your program poll theStatus Byte Register using the IO libraries' unblocked ReadSTB function to wait forexecution completion.Using Device Clearto Abort aSequential(Blocking)CommandWhen sequential (blocking) commands take too long or fail to complete for somereason, you can send a Device Clear over the bus to clear the input buffer andoutput queue, reset the parser, and clear any pending commands.See Also • "*OPC (Operation Complete)" on page 240• "*ESR (Standard Event Status Register)" on page 236• Chapter 42, “Synchronizing Acquisitions,” starting on page 1589