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.
- Drop a VISA property node on the block diagram.
- 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.
- Click on the default property and navigate to Message Based Settings >> I/O Protocol.
- 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.