10-09-2013 03:41 PM
10-09-2013 05:54 PM
sorry,im not clear on how to use the termination character instead of the byte at serial port. About the flush,even without the flush,the junk data are still there. i Just add it because i think the leftovers in the buffer are the one that is causing the junk data
10-09-2013 06:54 PM
If there is "junk data", then flushing the buffer isn't going to help. If the device isn't sending those bytes, then how is it getting in there? One possibly is that you have a bad communication cable, or picking up intereference and bits are getting flipped and bytes that are meaningless.
115,200 baud rate is a bit on the high side. Higher baud rates are more susceptible to noise. Also, it looks like you are using the serial configuration default of no parity. So you don't get the benefit of possibly detecting corruped bytes.
Check your cable and try another one. Is there anything enviromental that could be causing a problem such as a noisy motor running nearby? What if you try running at a lower baud rate? Put an oscilloscope on the serial port line and see if you ever detect anything noisy or spiky on top of what should like a clean bit stream.
10-09-2013 07:08 PM
i dont think noise is the one that is causing the junk data because there is another software provided by the vendor,set with no parity and at the same bitrate and it works just fine. Even in teraterm,those junk data doesnt appear.
About the property node on the second sequence,its for the autoscrolling function of the string indicator. It will stop the autoscroll function once the user click inside the text indicator.
10-09-2013 08:37 PM
Well there is no reason that LabVIEW or the VISA drivers would generate bad bytes if the other things aren't.
You are overlooking something somewhere with either settings or the cable.
10-09-2013 09:29 PM
Is it possible that the "junk" strings include part of one string, some junk, and the end of a later string? With all the things you were doing in the image of your code, that may not be due to a few corrupted characters. Your screenshot of the front panel appears to show the termination character set to hex 0. I think I recall some problems with Bytes at Port and that character. (A quick search showed a problem with FF on the Mac, but not anything with 0).
Please post your code. You have made some changes and we are not sure what you have now.
Lynn
10-09-2013 10:06 PM
i already got the fix for the 'junk' characters. Its due to opening the port inside the while loop.
well thanks guys,now im on track to meet my schedule for this project
10-09-2013 10:58 PM
That was stated in message 4.
What took so long to try that out and prove that was the problem?
10-09-2013 11:04 PM
ugh..its posted yesterday.. i dont think its that ''long''..
Plus im working.I have other responsibilities too apart from this, and i cant install labview in my company PC.
I only got the chance to try it out during the night,and test the software on the next day. I cant bring the device home.
Hope this clear things out.
Thanks guys
10-09-2013 11:08 PM
Just that when you get a tip, then you go back and forth with another dozen messages claiming it still doesn't work, it wastes everyone's time try to figure out what is so "special" about your problem, when you had the solution there all along if you had taken the time to try it without claiming things still weren't working.