Help Icon
Search Results for

    Show / Hide Table of Contents

    *OPC?

    Description

    This command waits for all pending operations to finish and afterwards returns a 1.

    Note

    The Operation pending bit in the @registersOperation is NOT set by this command. *OPC? should NOT be used for long waiting periods. Use Operation Complete Command instead!

    • Query
    Syntax Response
    *OPC? 1

    Sample usage

    • C#
    var visaSession = new TcpipSocket(VISA_RESOURCENAME);
    // trigger some action
    visaSession.RawIO.Write("*TRIG\n");
    // wait for the action to finish
    visaSession.RawIO.Write("*OPC?\n");
    Console.WriteLine(visaSession.RawIO.ReadString());
    

    Output:

    1

    • Python
    # trigger some action
    visaSession.write('*TRIG\n')
    # wait for the action to finish
    response = visaSession.query('*OPC?\n')
    print(response)
    

    Output:

    1

    Related commands

    *OPC

    In this article
    Back to top Generated by DocFX