LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview output buffer

I have made a wireless modem.
I communicate with it via RS232.

The computer has to send to this modem package of data, which starts
with the address byte. Next byte is a number of data, which will be sent
to the modem. After that there is a data block.

What I have to do is to build a program (labview) which sends the data
through RS232 in this way.

Everythings works fine.
My problem is that when I finish the labview program, the transmission stops
in the middle of the package.
The modem waits for the data but they doesn't come.
Then when I start the program again it sends a address byte but the modem
expects the data so
everything is unsynchronised.

To resolve this problem I have to know when there is no data on output
buffer.
I know that for the input buffer there is a function which gives this
information (VISA Bytes at serial port).
Is there anything similar for the output buffer?

Thanks for help
Greatings


0 Kudos
Message 1 of 3
(2,877 Views)
Maybe you could use the VISA Flush I/O Buffer to empty the output buffer.
 
There is also a VISA Clear function.

Message Edited by unclebump on 05-20-2006 07:27 AM

0 Kudos
Message 2 of 3
(2,860 Views)
Hello Krzysztof,
I suppose, that on LabView- exit the Flush I/O Buffer -
function will be called anyway and this will cause the problem, because after call of this function the buffer has nothing to send anymore. I think you have to make sure, that all data is sent to the modem, before the program can exit. Perhaps there is a command to the modem, where it has to answer something (whatever), so before exting the program you send this special command to the modem and after receiving the answer you are sure, all data is sent correctly and program can be quit.
Greets, Dave
Greets, Dave
0 Kudos
Message 3 of 3
(2,842 Views)