Posted Thu, 01 Feb 2024 15:04:57 GMT by RU, Rmj
Hi,
I have following C# code to fetch Holdup time from the Oscilloscope.
                string visaRsrcAddr = "TCPIP::" + IP.ToString() + "::inst0::INSTR";
                var scope = GlobalResourceManager.Open(visaRsrcAddr) as IMessageBasedSession;
                using (scope)
                {
                    scope.TimeoutMilliseconds = 60000;

                    scope.FormattedIO.WriteLine("MEASUrement:IMMed:TYPe DELay");
                    scope.FormattedIO.WriteLine("MEASUrement:IMMed:DELay EDGE1 FALL");
                    scope.FormattedIO.WriteLine("MEASUrement:IMMed:DELay EDGE2 FALL");
                    scope.FormattedIO.WriteLine("MEASUrement:IMMed:SOUrce1 CH4");
                    scope.FormattedIO.WriteLine("MEASUrement:IMMed:SOUrce2 CH2");

                    scope.FormattedIO.WriteLine("MEASUrement:IMMed:VALue?");

                    string val = scope.RawIO.ReadString();
                    if (float.TryParse(val, out holdup))
                    {
                        return true;
                    }
                    return false;
                }
I see that most of the time val contains junk value or this throws Timeout exception. Occassionally (rarely) it does return the expected holduptime value.
Please suggest what is the issue and what can be done?

Thanks,
Reena

Posted Fri, 02 Feb 2024 05:38:18 GMT by RU, Rmj
I noticed that when I connect to scope via Putty and give a *IDN? command, it does not return anything!

You must be signed in to post in this forum.