LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determine serial interface type, 485 or 232

Solved!
Go to solution

Hi,

 

How can I determine the wiring mode of a serial interface? In another way, if it is a 232 or 485.

The approach to trying to connect with different wire mode doesn't the problem, the COM 232 get jammed if we try to use a 485 mode. Solution, resetting the computer.

 

Regards.

António

 

 

0 Kudos
Message 1 of 15
(5,473 Views)
Can you explain a bit more?, how does the com port get "jammed".  VISA doesn't care whether it is an RS-232 or RS-485 port.  As long as you have the correct drivers for you serial port installed, it should show up in Windows and in MAX as a serial port that VISA can call by name.
0 Kudos
Message 2 of 15
(5,471 Views)
Are you using an actual RS285 card, or are you trying to use the serial port on your computer? The serial port on your computer is most likely (99% probability) an RS232 port, not an RS485 port. If you're trying to talk to a device that has an RS485 interface then you need to have an RS485 port.
0 Kudos
Message 3 of 15
(5,461 Views)

If you a COM 232 with the wire mode RS485/Wire2-Auto you the get the error -1073807330. After change to the mode RS232/AUTO you'll continuous getting this error until you reboot the computer

 

António

0 Kudos
Message 4 of 15
(5,448 Views)

Or if you are just trying to determine what type of interface you have been pointed too, TRY

 

VISA Property node >>> Serial Settings >>> Wire Mode.

 

I wrote TRY because I am not sure if that will lock up when invoked against the wrong type of port.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 15
(5,447 Views)

That was my solution, but it doesn't work. I was expecting to receive an error, and in this way control the type of interface, but...........

 

AC

0 Kudos
Message 6 of 15
(5,446 Views)

I still don't understand what you are trying to do.

 

What do you mean by "control the type of interface"?  It is either an RS-232 or it is an RS-485, you can't control that from software.

 

Even if you are just trying to figure out which it is, why would you even do that in software?  You should already know which type it is.

 

Can you step back and give us a bigger picture of what it truly is you are trying to do and why?

Message Edited by Ravens Fan on 10-30-2009 03:01 PM
0 Kudos
Message 7 of 15
(5,428 Views)

I want, programmaticly, to determine if a serial interface is a 232 or a 485.

My 1st thought was,  by controlling the error of a property node set to the "Wire mode" when the value was wrong, I could see that was the other type.

 

My problem with this strategy is, after a bad attempt, VISA always report a error on the next attempt, whatever the value at "Wire mode" is a correct one to the interface 232, or not.

 

AC

0 Kudos
Message 8 of 15
(5,406 Views)
What happens when you do a read of the property? Don't understand at all why you would be doing a write if you want to know the type.
0 Kudos
Message 9 of 15
(5,401 Views)

acardoso wrote:

I want, programmaticly, to determine if a serial interface is a 232 or a 485.


I'm still unclear as to why you need to do this in the first place. What problem are you trying to solve? What are you trying to prevent?

0 Kudos
Message 10 of 15
(5,400 Views)