Determine the Serial Configuration of Port in MAX and LabVIEW

Updated Apr 17, 2018

Reported In


  • LabVIEW
  • Measurement & Automation Explorer (MAX)



Issue Details

  • I am using a device that has a built in serial port capable of using multiple serial protocols (RS232, 422, 485). How can I tell what protocol how this port is currently configured?
  • I have a serial port that can use multiple wire modes (4-Wire, 2-Wire, 2-Wire Auto). How can I determine what wire mode this port is configured to use?


You can find this information in NI Measurement and Automation Explorer (NI MAX) or in LabVIEW using the Wire Mode attribute.


Access the Wire Mode attribute using a property node for a VISA reference.
  1. Add a property node to the block diagram and wire in a VISA Resource into the Reference node.
  2. Access the Wire Mode attribute by left-clicking on the property name and navigating to Serial Setting >> Wire Mode
    • You can write to or read from the property by right-clicking on the property name and selecting Change to Write or Change to Read
  3. To determine which protocol this port is using, set the property to Read, right-click on the node on the right of the property name, and select Create >> Indicator to display the Wire Mode on the front panel.

Figure 1: Wire Mode Property Node in LabVIEW. Note that you can write to or read from this property


Access the Wire Mode in the Attributes tab of the VISA Test Panel.
  1. In NI MAX, select the serial port, found under Devices and Interfaces.
    • You should see the serial port of remote device under Remote Systems >> [Your Device] >> Device and Interfaces
    • If you are unable to see the serial port on your device, ensure that NI-VISA is installed on the device. 
  2. In the right panel, select the Open a VISA Test Panel button.
  3. In the Test Panel, select the Configuration button and open the View Attributes tab. 
  4. In the left column, search for the Wire Mode attribute. The Current Value listed in the right column is the devices current protocol and wire configuration.

Figure 2: Wire Mode Attribute in VISA Test Panel

Additional Information

If you want to want to change the protocol or wiring configuration that the device is using, use the VISA Property Node Wire Mode in the Write access mode. Right-click on the node to the left of the property name and select Create >> Constant (for access on the block diagram) or Control (for user access on the front panel). An enum with different configuration modes should appear. 

Note: Check the user manual of the device you are using to determine what protocol and wiring modes are supported for this port. This property node may present more options than are applicable for your port.


Not Helpful