LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hyperterminal serial writing

I want to describe detail for result difference between Labview and Hyperterminal.
Baud: 2400
Parity: Even
Flow: XON/XOFF
Data bit :7
Stop bit: 1
Termination Character: carriage return and line feed.
The parameters can be changed in my instrument.
 
In hyperterminal, the data transfer is absolute, no loss.
Despite of the continuous return keys, the reply was not missing.
 
But Labview, frequently, there are data loss.
(for example, sometimes, the reply for any commands were  "syntax error" or "empty string" as well as the normal data.)
Of course, I give a delay time for before or after Writing and Reading VISA function.
 
What should I check for the equality between two methods?
 
Thank you in advanced.
Message 1 of 4
(3,562 Views)
One more problem is,
 
Using some constant byte number (around 15 bytes), I can take the data and syntax error.
When I use byte number at serial port property, the number of byte is zero (empty string) in many times.
Message 2 of 4
(3,556 Views)

One difference between LabVIEW and hyperterminal is the interbyte delay time!!

There is a big difference in typing manual in hyperterminal and sending a string with VISA (LabVIEW) if your other side can't read fast enough!!

You can test this in LabVIEW by sending your string byte by byte with a delay of 1-20 ms.... 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 4
(3,539 Views)

Is this the same problem as the message thread you started here.  You really should keep the conversation to the same thread.

2400 baud is a rather slow rate.  So a 15 byte message would take 62.5 ms.  That may sound quick, but it really isn't much data.  Look at the comments I put in that other message.  I think you are losing data because you are running your serial port initialization each time your run that VI.  Hyperterminal isn't doing this reinitialization.  Thus the difference.

I don't think the issue is interbyte delay.  If the device is can be set to communicate at 2400 baud, it should be able to handle a string of bytes coming through at 2400 baud.  The issue would be how big is the buffer on the other device.  If it is a very tiny buffer (like only a couple bytes) then you could overwrite its buffer before it would read out.  In which case you would need handshaking like you are discussing in the other message.  But in that case, you should be using hardware handshaking, and not XON/XOFF, or that HS ? stuff you talk about in the message.  (Which doesn't look like it is a true handshaking protocol.)

0 Kudos
Message 4 of 4
(3,533 Views)