Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 5 out of 5     Rate this Document

VISA Cannot Read the Wire Mode Property as Set in Device Manager

Hardware: Serial>>RS-485

Problem:
I am using a 485 Serial port in Two-Wire (half-duplex) mode. When I read the property node for wire mode in VISAIC or LabVIEW it returns a -1 (Unknown) even though I have set the wire mode for the port externally. Why does this happen?

Solution:
This is expected behavior. VISA is not able to return this property value. For example, if you put down a Property Node in LabVIEW set to Read and you pick the Wire Mode property, it will return a -1, Unknown. The same thing will happen if you try reading this property in VISAIC. This is because this is not a property that VISA can directly read.

If you have set the wire mode externally (in Device Manager), your VISA session will run accordingly. For example, if you have set the wire mode to two-wire mode auto and you open a VISA session, it will open the port in two-wire mode auto. **Your wire mode works the way you have set it up in Device Manager, the value just cannot be returned**.
In order to be sure you are running your port in the correct mode, it never hurts to manually set your wire mode in your program. Do this in LabVIEW by inserting the "VISA Property Node" VI after the "VISA Configure Serial Port" VI. Set the Property Node to Write and choose Wire Mode. Enter the following values:

0 for Four-Wire Mode
1 for Two-Wire Mode: DTR with Echo
2 for Two-Wire Mode: DTR Controlled
3 for Two-Wire Mode: Auto Control.


Related Links:
Product Reference: Serial Hardware and Software for Windows User Manual
KnowledgeBase 17M6L0TI: What are the Different Transceiver Modes on the NI RS-485 Serial Cards?
KnowledgeBase 1SQ9TJUE: PCI-485 Serial Board Passes Diagnostics, but Unable to Communicate in 2-Wire Mode

Attachments:





Report Date: 10/24/2003
Last Updated: 11/11/2005
Document ID: 32NG6BFQ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit