LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communication via NIMAX okay but not through LabView

Solved!
Go to solution

I am trying to communicate with a device via the serial port.  In MAX, I configured the port (28800, 8, N, 2, RTS/CTS).  In the test panel I can send an identification query (ID? \r) and get a response.  If I try this through a LabView VI, where I open a VISA session, set the COM port parameters and then try the ID query, I don't get a response. 

 

I also noticed that if I try the ID query in MAX, but use a USB-serial adapter, I don't get any response. 

 

I'm sure I'm missing some simple nuace of serial communications.  Any thoughts?

 

Thanks.

0 Kudos
Message 1 of 6
(2,997 Views)
Solution
Accepted by topic author CoreyNE

In LabVIEW, my guess is that you are not correctly sending the \r. In order to do this, you need to have the string control/constant set for '\' Codes Display. If you had posted your code, it would have helped to see if that or something else is wrong. Did you try one of the example programs before trying to write your own?

 

I've never had a problem using a USB-RS232 adapter. Is the new port actually listed in MAX and can you use Hyperterminal with it?

Message 2 of 6
(2,993 Views)
if you want to send \r codes you have to set your control or constant to what modus. Else you will send \r as ascii. Se picture. Just right click on the control with your mouse


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 3 of 6
(2,989 Views)
Good points about configuring the control for the backslash code - I forgot about that.  The USB-serial port is listed in MAX, and I know I have used this type of port with Hyperterminal before.  I can't use Hyperterminal to communicate with this device because Hyperterminal doesn't support a baud rate of 28800.
0 Kudos
Message 4 of 6
(2,979 Views)
Good points about configuring the control for the backslash code - I forgot about that.  The USB-serial port is listed in MAX, and I know I have used this type of port with Hyperterminal before.  I can't use Hyperterminal to communicate with this device because Hyperterminal doesn't support a baud rate of 28800.
0 Kudos
Message 5 of 6
(2,978 Views)
Thanks again.  I changed the backslash code setting and it worked.  I like it when simple problems have a simple solution.  I will have to retry the USB-serial cable again to see if I was making a similar simple mistake there.
0 Kudos
Message 6 of 6
(2,928 Views)