Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting Completion of a Serial Tx operation.

We have a problem that has been driving us crazy for some time.
We need to know when the serial port on a PC has completed transmission of all the characters in its buffer. We are using LabVIEW 6.0.2 and Windows 9x & 2000.
In the past we have solved this by actually looking at the correct register bits in the UART but this is not really a good solution and its quite difficult in an NT/2k environment.
So is the any VI out there that can tell us this info or does anyone know of a Windows SDK call that we can use to interrogate the driver ?

Regards

Tim
0 Kudos
Message 1 of 4
(3,531 Views)
Tim,
Have you looked at the "Bytes at Serial Port.VI"? LV 6: [Functions > Instrument I/O > I/O Compatibility > Serial Compatibility]
It provides you the number of bytes currently queued in the serial port buffer. If this VI fits your need, you could, for example, use its output so that when bytes equals 0, you know your complete.
Good Luck with it, Doug
0 Kudos
Message 2 of 4
(3,531 Views)
Doug

Thanks for your suggestion. Unfortunately this function only reads the Rx buffer to tell you how many characters are waiting to be read. It would be nice if NI modified this to read back both buffers but until then I am stuck & waiting for a different solution.

Regards

Tim
0 Kudos
Message 3 of 4
(3,531 Views)
have you solved this problem? Please share your solution with me!!

Regards!
0 Kudos
Message 4 of 4
(3,531 Views)