LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read string

Hi, I just want to read string through rs232 from my test boards and it can work property in high execution status ( display the string in the front panel) but if i run the vi automatically , it didn't display the string in front panel.
 
how can i do and sort out.
 
thanks
0 Kudos
Message 1 of 11
(3,843 Views)

Hi

In order to get useful help, you have to provide the community with better information. There may be several reasons, why it did not work.

If possible, attach the vi which causes problems or at least a picture of it (please no *.bmp).

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 11
(3,838 Views)
thanks a lot!
 
pls see the vi.
 
hope get more information quickly
0 Kudos
Message 3 of 11
(3,818 Views)

I mean when i work in highligh execution, the string can be displayed properly in front panel. but i only run in normal status, the string can't display properly.  And I think it should be read from the original test equipment but it can't display in the windows. so how can I do?

 

many thanks

0 Kudos
Message 4 of 11
(3,812 Views)

Hi srt,

Since the info is displayed while you highlight the execution, it would indicate that maybe you are reading your serial port too quickly.

What you could do is place you read serial port within a loop which has a delay (wait = 50 ms) and you exit the loop when the serial buffer is empty.  How do you index the length of the buffer you are reading?  Maybe with a small timeout you don't actually ready the data from the port.  Placing the reading serial port in a loop with some delay (at least 10ms) and using "Bytes at Serial Port" to index the number of bytes to read and exit only if "Bytes at Serial Port" = 0 should solve this.

By the way, I used to work at a company whose name was SRT.  😉

JLV

Message 5 of 11
(3,807 Views)

Hi srt, I just noticed that you attached an example yof your code.

Since I do not have LV installed on this PC, I will have a look at it tonight.

Let me know if what I proposed in my previous post helped or worked.

Thanks,

JLV

Message 6 of 11
(3,807 Views)

Hi srt

Could you attach the vi as LV7.0 (Menu File >> Save with options >> Save for previous)?

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 11
(3,799 Views)

thanks . now, it can read string from buffer cos i set up the bytes to read. but always has another problem:

" A framing error occured during transfer".  message always display when visa read function used.

 

so, how can I solve it?

 

mant thanks

0 Kudos
Message 8 of 11
(3,787 Views)

Hi srt,

The "Framing Error occured during the transfer" typically occurs when the baud rate is not set correctly in the program.

Here is a link that provides more details:
 
 
If you are able to communicate manually with the device using a sw such as HyperTerminal, then you should configure the LV serial communication the same way. 
 
JLV

Message Edited by JoeLabView on 09-29-2005 12:08 PM

Message 9 of 11
(3,783 Views)

Hi srt,

Serial data is transferred one byte at a time. Each byte has a specific format with a start bit, data bits, parity, and stop bits. A framing error occurs when a byte of data is received, but it is not in the format expected.

Framing errors can be caused by a number of reasons. The most common reason is that your serial port and device are configured to use a different settings. To solve this problem verify that the Baud rate, Data bits, Parity, and Stop bits all match the settings of your device.

If your settings match your devices settings, and you are still receiving a framing error, you may be experiencing noise on your serial line.


Hope this helps!

Best wishes,

 

Mark

Applications Engineer

National Instruments

0 Kudos
Message 10 of 11
(3,754 Views)