Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Unknown system error (VISA error code 1073807360) From .NET Library

$
0
0

Hello,

 

I am running into a  very difficult issue using the VisaNS library in C# .NET. I have created a class called FactoryInterface with the following constructor:

 

 

public class FactoryInterface : ICommonControl
    {
        protected MessageBasedSession _mbSession;

        public FactoryInterface(string com_port)
        {
            SerialSession ss;

            _mbSession = new SerialSession("COM14");
            ss = (SerialSession)_mbSession;

            ss.BaudRate = 57600;
            ss.DataBits = 8;
            ss.StopBits = StopBitType.One;
            ss.Parity = Parity.None;
            ss.Timeout = 1000;
            ss.TerminationCharacter = 0x0d;
        }
}

I then create an object of Factory interface and call the following function, SendCommand with the parameters "get netconfig\r" and false:

 

 

public void SendCommand(string cmd, bool getError)
{ _mbSession.Write(cmd + "\r"); }

Which returns the following exception:

Unknown system error (miscellaneous error).  VISA error code -1073807360 (0xBFFF0000), ErrorSystemError

In order to test the device I open VISA Test Panel. I configure the device with the same parameters as above and send the same string. The write completes without error.

 

When I capture both communications using NI I/O Trace, I see the following descriptions for the successful and unsuccessful communications, respectively:

2.  viWrite (ASRL14::INSTR (0x00C7DA10), "get netconfig.", 14 (0xE), 14 (0xE))
Process ID: 0x00005530         Thread ID: 0x000052C0
Start Time: 10:11:58.1070      Call Duration 00:00:00.0002
Status: 0 (VI_SUCCESS)
> 27.  viWrite (ASRL14::INSTR (0x00000001), "get netconfig.", 14 (0xE), 0 (0x0))> Process ID: 0x00005404         Thread ID: 0x0000569C> Start Time: 10:12:32.8867      Call Duration 00:00:00.0000> Status: 0xBFFF0000 (VI_ERROR_SYSTEM_ERROR)

 

Any insight or lines of investigation would be greatly appreciated.

Thank you for your time.

 

 


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>