Dieser Inhalt liegt nicht in Ihrer bevorzugten Sprache vor.

Der Inhalt wird Ihnen in einer anderen verfügbaren Sprache angezeigt. Ihr Browser bietet ggf. Funktionen, die Sie bei der Übersetzung des Textes unterstützen.

Receiving VISA Error -1073807302 When Reading Status Byte

Updated Apr 19, 2024

Reported In

Driver

  • NI-VISA

Issue Details

I am communicating with an Ethernet serial instrument. When I request for the instrument's status byte, the VISA Read STB function throws Error -1073807302: Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state).

How do I resolve this error? 

Solution

First, confirm that your Ethernet instrument can recognize 488.2 commands by consulting its user manual.

If it does, you need to change the VI_ATTR_IO_PROT attribute to VI_PROT_4882_STRS to recognize the status byte command. You can do this programmatically in LabVIEW by configuring the VISA property node.
  1. Drop a VISA property node on the block diagram.
  2. Right click on the property node and navigate to Select Class >> VISA >> I/O Session >> TCP/IP Socket. The attributes specific to the TCP/IP Socket are now accessible.
  3. Click on the default property and navigate to Message Based Settings >> I/O Protocol.
  4. Change the property to write. Configure it for Serial-TCPIP-USB/488 Strings.

Ethernet serial instruments classify as VISA Ethernet Socket (SOCKET) resources. Because the SOCKET resource class does not support the LAN instrument protocol, only the read and write operations are valid. If your device recognizes 488.2 commands such as *STB?\n to request for the status byte, then you will need to change the VI_ATTR_IO_PROT attribute to allow for 488.2-defined strings. The attribute is set to VI_PROT_NORMAL by default. For more comprehensive information about the VISA functions, please reference the NI-VISA User Manual.