Receiving VISA Error -1073807302 When Reading Status Byte

Updated Jun 29, 2018

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.

Additional Information

http://www.ni.com/pdf/manuals/370423a.pdf
http://zone.ni.com/reference/en-XX/help/371361H-01/lvinstio/visa_read_stb/

WAS THIS ARTICLE HELPFUL?

Not Helpful