09-29-2005 06:21 AM
09-29-2005 06:36 AM
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
09-29-2005 07:22 AM
09-29-2005 07:32 AM
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
09-29-2005 07:44 AM
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
09-29-2005 07:45 AM
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
09-29-2005 07:56 AM
Hi srt
Could you attach the vi as LV7.0 (Menu File >> Save with options >> Save for previous)?
Thomas
09-29-2005 10:43 AM
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
09-29-2005 11:06 AM - edited 09-29-2005 11:06 AM
Hi srt,
The "Framing Error occured during the transfer" typically occurs when the baud rate is not set correctly in the program.
Message Edited by JoeLabView on 09-29-2005 12:08 PM
09-30-2005 10:08 AM
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