LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS 232 read

Hello,
I suppose you just tried some serial port example from the example finder, but you see that this doesn't exactly match your needs. I guessed a bit what you want to do and altered the VI you sent, so that it maybe comes closer to the things you want to do. Execute it in highlighted mode that you can see all data.

Greets, Dave


Message Edited by daveTW on 01-22-2007 02:30 PM

Greets, Dave
Download All
Message 11 of 29
(1,814 Views)

Hello Dave,

I worked my application. Thank you very much. but I read an arbitrary data from the test menu that I said. I think I should add the delay time read and write vi and I check the bytes on port during read operation. I will try the code from you and I will report you.

Thank you...

Message 12 of 29
(1,805 Views)
Hello Dave,
 
I'm sorry. I'm using the lab view 6.1. Could you save the application that you sent as 6.1 version and send me?
Message 13 of 29
(1,805 Views)
Hello behluls,
I'm sorry, but I have only LV 8.2 on my Computer. You have to wire it from the picture. In 6.1 you don't have the express VI, but you can simply put a "wait" into a single case structure and wire the error trough.
Greets, Dave
Greets, Dave
Message 14 of 29
(1,799 Views)

OK. I will inform you operate or not.

 

Thanks...

0 Kudos
Message 15 of 29
(1,798 Views)

Hello friends,

when I closed the RS 232 port help with "close" vi, I read nothing. But when I didn't close the comm port I read arbitrary data from my application is test menu. I think these arbitrary data is in the queue and these data is losting when I close the comm. port. The result is my problem is still the same problem

And I did not find the time delay. Can it be in new version (you are using) of lab view?

0 Kudos
Message 16 of 29
(1,806 Views)
The serial port has a buffer. If you only read a few bytes, the remaining data available at the port won't be lost. So next time you read from the port, you'll read these bytes. To prevent that, I guess you can use the VISA flush command or you can check the number of bytes at port and read them before starting a new write/read.
P.S.: to create a delay use the "Wait (ms)" function. This should be available in your LabVIEW version. Remember that this function takes a number in milliseconds.
Message 17 of 29
(1,800 Views)
Yes, I forgot that first we have to open the session for closing it. I updated the block diagram and included the classic wait function.
Greets, Dave


Message Edited by daveTW on 01-22-2007 04:22 PM

Greets, Dave
Message 18 of 29
(1,800 Views)
The VISA Open is optional and when it's used, it would go before the VISA Configure Serial Port.
Message 19 of 29
(1,795 Views)
Hi Dennis,
with some kind of serial ports (usb to serial converter) I experienced a similar behaviour. I used the "Basic Serial Write and Read.vi" from the example finder to start with this VISA topic. I had to write one byte to the COM to kind of awake the interface and in the second VI execution the serial device received my control-byte correctly. But this only happened after a break of about one minute. I fixed it with the VISA Open.
Greets, Dave
Greets, Dave
Message 20 of 29
(1,784 Views)