VB.net. NI VISA. RawIO.Write not working

You should be able to suppress the reset. In below C# snippet, sp is a serial port object and cbXXX are two check boxes.

            sp.DtrEnable = cbDTR.Checked;
            sp.RtsEnable = cbRTS.Checked;

            sp.ReadTimeout = Constants.rxTimeout * 1000;

            try
            {
                sp.Open();
                btnConnect.Enabled = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Serial port error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

This should also work in VB.net; might need a small modification to adapt to the language.

Check the documentation of the NationalInstruments.Visa library to see if a similar feature is supported.

Notes:

  1. You can also place your VB code in code tags :wink:
  2. You can let others know that your problem has a solution by clicking the solution checkbox of the most useful reply (post #2).
1 Like