thls Posted January 4, 2012 Report Share Posted January 4, 2012 I want to read data from the serial port, but because I want to use it as terminal I don't know how many bytes are send. (I think I solved that issue with the attached code) My device sends several lines of data but I want to have it presented in a windows line by line and that does not work. Can anybody give me some advice how to change my VI? Regards Quote Link to comment
Tim_S Posted January 4, 2012 Report Share Posted January 4, 2012 You're missing the attachment. Quote Link to comment
asbo Posted January 4, 2012 Report Share Posted January 4, 2012 No attachment, but here's how I would do it: use a producer loop to read the serial port (the Bytes At Port property may come in handy) which will message a consumer/GUI loop when (an) EOL character(s) is detected. That way, the GUI doesn't know about any incoming data until you've qualified it as "ready" to display. The downside to this is that the application may appear unresponsive while it's waiting for a complete response from the device. Quote Link to comment
Saverio Posted January 5, 2012 Report Share Posted January 5, 2012 Producer Consumer Loop Example: COM Port Hyperterminal Application 1 Quote Link to comment
thls Posted January 5, 2012 Author Report Share Posted January 5, 2012 Again but now with attachemant reading rs232.vi Quote Link to comment
todd Posted January 5, 2012 Report Share Posted January 5, 2012 That vi does not do anything with the serial port - nor does it split a string into lines. Perhaps it is the wrong vi? Quote Link to comment
asbo Posted January 5, 2012 Report Share Posted January 5, 2012 Again but now with attachemant You should update your profile, which says you are using LabVIEW 7. You posted the VI in LV2011. Quote Link to comment
thls Posted January 13, 2012 Author Report Share Posted January 13, 2012 I figured it out. Probably there are more sollitions but attached my sollution. testscroll-1.vi Quote Link to comment
Prabhakant Patil Posted July 9, 2012 Report Share Posted July 9, 2012 You can try the following link. it woll also help you to Log the data comming on RS232 port. http://lavag.org/files/file/172-hyper-terminal/ http://lavag.org/files/file/172-hyper-terminal/ Regards Prabhakant Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.