LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview visa couldn't read and write in wireless port

Hi I have a problem using wireless serial port in Labview. I couldn't read the data from the serial port.  the Max could find the port com10 and com 11 and also find the software NI-visa 5.2 has been successfully installed.

 

Could anyone helps me with that? thanks!

 

 

my computer is win7 64 bits and my labview is 2012 32bits and visa is visa 5.2. Therefore is it have some problem with operating system with labivew? 

 

 

and here is my program:pic.jpg

 

0 Kudos
Message 1 of 12
(4,823 Views)

Hello kunkunkun,

 

Without more specific information on what your problem is, it is difficult to offer advice.  Are you getting an error from one of the VISA functions?  Is it that the data you expect to receive is not returned?  Have you attempted to send similar commands via a VISA test panel (MAX) or another application such as PuTTY or Hyperterminal?  What sort of instrument are you trying to communicate with?

 

I'd recommend taking a look at the basic VISA read/write examples that ship with LabVIEW (Help>>Find Examples...) 

 

Regards,

Tom L.
0 Kudos
Message 2 of 12
(4,820 Views)
Why are you using the VISA Bytes at Serial Port? Your code should also be in an event structure instead of constantly hammering the divice with the while loop.
0 Kudos
Message 3 of 12
(4,813 Views)

Hi

 

there is no error occur when i use visa function. I plan to use two wireless serial port to commuicate. One is on microcontroller one is on laptop. For the testing whether they could work. I use two wireless ports to plug into USB on the laptop.  One port is to write the string another is to read the string. The instrument is called "Silicon Labs CP210x USB to UART Bridge" in the hardware manager.

 

This is my program running like this:

pic3.jpg

 

 

also I try the basic VISA read/write examples to test. But it is still not work and report error. This is example runing basic visa read/write:

pic2.jpg

 

By the way.Could you tell me what do you mean the " send similar commands via a VISA test panel (MAX)"? 

 

thanks

 

Kun L

0 Kudos
Message 4 of 12
(4,803 Views)

Hi

  I am not familar with the event structure could you tell me more details?  I just wrote the program quite same as the example in the labview. which is basic visa write/read .

the example provided from the labview is like this

pic4.jpg

 

 

Here is the my  vi .could you help me to check that?

 

thanks a lot

 

kun L

 

0 Kudos
Message 5 of 12
(4,792 Views)

Hello Kun,

 

NI MAX has an integrated tool for testing serial communication- right-click on one of the COM ports you're trying to use and select "Open VISA Test Panel".

 

As for the hardware configuration- it looks like you're attempting to send data via one of these devices and read it on the other, is that correct?  Are they paired in some way, or do they need to be configured?  How does serial adapter "A" know that it is broadcasting to serial adapter "B"?

 

Regards,

Tom L.
0 Kudos
Message 6 of 12
(4,784 Views)

In your screenshot of the block diagram, there is nothing there that will show whether you have an error.  Put some probes on the error wire, or put indicators.  Now you might have an error, but it just gets passed all the way to the tunnel, and there is nothing there to show it.

 

In your second screenshot of the last post, you do have an error.  A timeout error, which means you didn't get a response back in time.

 

As for testing in MAX, it will give you more direct access to the VISA driver without have the layer of LabVIEW code in between.  If you go to the serial port shown in MAX, you can try reading and writing to the serial port from there.

0 Kudos
Message 7 of 12
(4,780 Views)
I don't understand. You only need one port to communicate.

What is shown in. windows device manager is not really relevant. It is what is shown in MAX that is important.

Test with a terminal emulation program such as hyperterminal or in MAX. It's a right click option when you select the port.

Event structures are a basic LabVIEW element. See the shopping examples and the free tutorials.
0 Kudos
Message 8 of 12
(4,776 Views)

Hi

 

 I have found that Open VISA Test Panel so how do we use that? or where we could check it is working right now.

pic5.jpg

 

For the question you asked. you are right that I attempt to send data via one of these devices and read it on the other. I think they are paired in some way cause I just set the baud rate data bits and stop bits. and they will have communcation between each other. There is a small software called ComTool. I could make two serial ports to communicate correctly. therefore I didn't think that it will be hardware problem.

pic6.jpg

 

 

thanks

 

kun L

0 Kudos
Message 9 of 12
(4,768 Views)

Hi

 

I am attempting to send data via one of these devices and read it on the other. So I need two port.

 

I will try the Max to test the communication between them. Alough I didn't know how to use it.

 

thanks

0 Kudos
Message 10 of 12
(4,765 Views)