04-04-2012 12:13 AM
Hello sir,
I am getting a problem to access hyperterminal data directly through LabVIEW. Each time i have to go to hyperterminal and and use capture text option to select data and save it to another file. My application requires automatic access of hyperterminal instead of doing it manually each and evary time.Is it possible? I am attaching a VI that i have tried. Please give me a suggestion regarding this.
Solved! Go to Solution.
04-04-2012 01:10 AM
04-04-2012 05:41 AM
Thank you sir,
your suggestion was so helpful. At a time only one line of string is read. However, i have multiline strings to read in my application. I am using 2 or 3 READ.vi in sequence to get final line. Is there any other way to get last line directly??? I am attaching my VI.
04-04-2012 10:06 AM
The VISA Configure Serial Port has an input called 'Enable Termination Char'. The default is True so when a termination character (linefeed) is detected, the read will automatically terminate. Set the input to False and use the VISA Bytes at Serial Port to determine how many bytes to read.
04-04-2012 11:52 PM
Thank you Dennis,
But actually i don't know the exact number of bytes which should be read. The content that should be read is a multi line string. So there is no chance of knowing the exact number of bytes in each line. To get final line the byte count is unknown to me. So what should i do to stop read when i reach last line?
04-04-2012 11:57 PM
On hyperterminal we get the data line by line. If VISA Read is used directly, it can read only one line at a time based on its sequence. For two lines i used two READ VIs to get the second line. What to do if the number of lines are more or unknown?
04-05-2012 02:01 AM - edited 04-05-2012 02:01 AM
Hi kim,
ever heard about the programming concept of using loops?
Especially while loops are used when the iteration count is unknown at loop start...
Have you ever looked at the examples coming with your LabVIEW installation? There are ready-to-use examples for reading the serial port!