• RE: Unstable communication with MSO58 by NI-VISA

    I saw effect of VISA timeout.  When acquisition stopping, I get response of query if timeout is 500 ms.  But when same, I do not get response if timeout is 10 s.  When it is 500 ms, the response of query is received by the timing of nearly timeout.  I felt to read the response by timeout event.

  • RE: Unstable communication with MSO58 by NI-VISA

    I tried new C# code. I succeed to get hard copy. But it occurred failure if I repeated. This phenomenon is I know.  And if it was stopped data acquisition by c# code, it occurred failure anytime.

    Code is below,
    MessageBasedSession instrument;
    bool running = false;
    instrument = (MessageBasedSession)new ResourceManager().Open(VISA Address);
    instrument.TimeoutMilliseconds = 500;
    instrument.TerminationCharacterEnabled = true;
    instrument.TerminationCharacter = 0x0A;
    instrument.RawIO.Write("ACQ:STATE?\n");
    if (instrument.RawIO.ReadString().Trim() == "1")
    {
        running = true;
        instrument.RawIO.Write("ACQ:STATE STOP\n");
    }
    instrument.RawIO.Write("SAVEON:IMAG:FILEF PNG\n");
    instrument.RawIO.Write("SAV:IMAG:COMP NORM\n");
    instrument.RawIO.Write("SAV:IMAG \"C:/temp.png\"";*OPC?\n");
    instrument.RawIO.ReadString();
    osc.RawIO.Write("FILES:READF \"C:/temp.png\"\n");
    Thread.Sleep(100);
    instrument.TerminationCharacterEnabled = false;
    File.WriteAllBytes("temp.png", instrument.RawIO.Read(2000000));
    instrument.TerminationCharacterEnabled = true;
    instrument.RawIO.Write("FILES:DELE \"C:/temp.png\"\n");
    if (running) instrument.RawIO.Write("ACQ:STATE RUN\n");
    instrument.Dispose();

  • RE: Unstable communication with MSO58 by NI-VISA

    Thank you for a response.

    I have memory to try nearly that way.
    But I will try it with new C# program when I get my turn to use MSO58.
    I will report that result.
  • Unstable communication with MSO58 by NI-VISA

    I hope to get hard copy of MSO58 by NI-VISA and MS VC# (WPF) without TekVISA.  When I tried it, I saw query is very late or no response.  If no response, I must restart MSO58.  MSO44 was same.  I confirmed it via USB 2.0 and LAN.
    I found Tekscope Utility can communicate with MSO58 by NI-VISA without TekVISA.  But I do not understand how to communicate with MSO58.

    Code of query is below,
    MessageBasedSession instrument;
    instrument = (MessageBasedSession)new ResourceManager().Open(VISA Address);
    instrument.TimeoutMilliseconds = 20000;
    instrument.RawIO.Write("*IDN?");
    string result = instrument.RawIO.ReadString().Trim();
    instrument.Dispose();