05-29-2008 03:22 AM
Hi,
I have to say that I am relatively new to the rs-232 business.
My application is supposed to receive and process data from an instrument
via rs-232.
The instrument transmits an ASCII data set when a button is pressed on the instrument.
I want my application to wait at runtime until data is received and then
process it.
What I am doing is installing a ComCallback -
InstallComCallback (comport, LWRS_RXCHAR, 0, (int)gEventChar[0],
EventCharDetectFuncCB, &g_MeasurementBuf);
The ComCallback is invoked on any character received.
I now want my application to wait with the processing of the data until the
entire measurement is received,
I've tried stuff like:
do
{
Delay (1);
inQLenLast = inQLen;
inQLen = GetInQLen (comport);
} while (inQLen != inQLenLast);
inside the CallBack to prevent it from being invoked more than once for each
data set, without success. The CallBack is executed more than once each time a
measurement is sent from the instrument. Is there a standard way for those sort
of problems?
Any help would be greatly appreciated!
Thanks
05-29-2008 07:51 AM - edited 05-29-2008 07:55 AM
05-29-2008 03:49 PM
05-29-2008 10:28 PM
04-22-2013 11:07 AM
Hello
me too I have a problem with that kind of application. I use multithreading communication between my evalboard (stm32F4) and NIcvi (my PC equipped with corei3 processors ) I am not using a high baud rate (9600) but the communication is always faster than the cvi code execution. I wonder, if there is someone who can help me in improving execution time and thinks in advance. (the code is not complicated I have just to verify a checksum of every received packet ).
04-22-2013 12:11 PM
hadjrami,