Timeouts or Crashes When Reading from VXI-11 Instruments Using NI-VISA 2026.x

Updated Sep 4, 2026

Environment

Driver

  • NI-VISA 2026 Q1
  • NI-VISA 2026 Q2
  • NI-VISA 2026 Q3
  • NI-VISA 2026 Q4

When performing a bounded read using viRead() on a VXI-11 TCP/IP resource (TCPIP0::<IP>::inst0::INSTR), the operation reads the entire message from the instrument buffer instead of capping the transfer to the requested count parameter.

This causes the following symptoms:

  • viRead() returns VI_SUCCESS instead of VI_SUCCESS_MAX_CNT.
  • Subsequent calls to viRead() fail with error code 0xBFFF0015 (VI_ERROR_TMO) because the device output buffer was emptied during the initial call.
  • In some applications, repeated oversized reads may result in memory access violations or crashes within the NI-VISA backend (NiViEnet.dll / nivisa64.dll).
  • The behavior occurs when the requested byte count is set around or above 1024 bytes (or above ~1022 bytes).
  • The issue does not occur in NI-VISA 2024.5 or when using GPIB or raw SOCKET connections

Environment

  • Software: NI-VISA 2026.x (e.g., 2026 Q2 / 2026.5)
  • Hardware / Interface: Ethernet / LAN Instrument Control
  • Resource Type: VXI-11 Instrument (TCPIP0::<IP>::inst0::INSTR)

This behavior is caused by a regression in the NI-VISA Ethernet Passport (NiViEnet.dll) in NI-VISA 2026.x when handling END / End-of-Message (EOM) indicators during partial or bounded buffer transfers on VXI-11 sessions. The passport processes the full payload and END indicator from the network layer, returning VI_SUCCESS and clearing the device buffer even though the calling application requested fewer bytes via count.

To resolve or work around this issue, use one of the following methods:

  1. Reduce the Read Chunk Size:
    Set the count parameter in viRead() to 1000 bytes or fewer per call. Reading in smaller chunks avoids triggering the pre-buffering condition and allows viRead() to return VI_SUCCESS_MAX_CNT until the entire response is retrieved

  2. Switch to Raw TCP Socket Resource:
    Change the VISA resource string from VXI-11 to Raw Socket format:
    TCPIP0::<IP_Address>::<Port>::SOCKET (e.g., port 5025).
    Note: Raw SOCKET sessions do not use VXI-11 protocol framing. If status byte polling is required on a SOCKET resource, issue the SCPI query *STB?\n or set the VISA session attribute VI_ATTR_IO_PROT to VI_PROT_4882_STRS before calling viReadSTB()

  3. Suppress the END Indicator:
    Set the VISA attribute VI_ATTR_SUPPRESS_END_EN to VI_TRUE on the session prior to executing viRead(). This prevents the END signal from forcing a VI_SUCCESS status prematurely during partial reads.

  4. Roll Back NI-VISA:
    Downgrade the NI-VISA driver installation on the system to NI-VISA 2024.5