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

NI4882 Device Write Issue. Have to double write or I get a timeout.

$
0
0

Hi,

I'm trying to interface with a HP 3497A Option 110.

This is my code:

 

            try
            {
                _dev = new Device(boardIndex, 9);
                _dev.Clear();
                _dev.Reset();
                _dev.Write(ReplaceCommonEscapeSequences("DR3"));_dev.Write(ReplaceCommonEscapeSequences("DL3"));
                string resp = InsertCommonEscapeSequences(_dev.ReadString());
                _dev.GoToLocal();
            }
            catch (NationalInstruments.NI4882.GpibException ex)
            {
            }

Highlighted in red is my issue. In order for me to read the response from the device, I have to call _dev.Write(ReplaceCommonEscapeSequences("DR3")) twice or I get a read timeout error.

 

If I call it only once, I get a timeout error, but calling it twice works.

 

Can anyone explain this?

This happens for other options as well.

 

Thanks!

 

 


Viewing all articles
Browse latest Browse all 5694

Trending Articles



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