LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI VISA issue

I am trying to develop and application that writes data to a board and then reads the response back from the board.  I am using VISA read write to do it.

It writes the data just fine.  However when I go to read that data out, I get zero bytes at the port (or no data).

 

Can some one help me with this??

 

Thanks

 

Message Edited by tendril programmer on 07-15-2009 04:28 PM
0 Kudos
Message 1 of 3
(2,696 Views)

How do you know that it is writing correctly? If you are using serial, you can send anything you want, have no cable there, have completely mismatched com settings, and you won't get an error. I don't see anything obviously incorrect in your VI except you don't need to configure the port each and every time you want to communicate.

 

Have you tried using Hyperterminal? Do you have a manual that you can attach or provide a link to?

Message 2 of 3
(2,692 Views)

How about putting a time delay after the VISA write?  It make take a little bit of time for the instrument to get the message and turn around with a response.  Since you are checking for bytes at port immediately after writing the message, it is very likely the bytes at port equals zero.

 

Look at the Basic Serial Write and Read example in the example finder.

Message 3 of 3
(2,676 Views)