The first thing I must ask is: Have you configured and opened the port
before using this statement. I am using this function in my program,
all-be-it in CVI 5.0.1
Just in case you didn't, here is the procedure I used,
First open the port:
OpenComConfig (PORTNUM, "", 9600, 0, 8, 1, 512, 512);
Next Flush the port, just in case there is something there,
FlushInQ (PORTNUM);
FlushOutQ (PORTNUM);
Next install the callback,
InstallComCallback (PORTNUM, LWRS_RXFLAG, 0, 0x04, ComEvent, 0);
The header of the callback should look something like this.
void CVICALLBACK ComEvent(int portNo, int eventMask, void *callbackData)
Try this procedure and see how you go.
Richard
Dimitri Ghinis wrote in message
news:mm1mfsgi9jndqonpjl8t1jkhh39s92vd2b@4ax.com...
> Hi
all!
>
> This thing is causing me a terrible headache.
>
> I have an application that read terminated buffers from a COM port.
> The function waits for the 0xBB char (ComRDTerm).
>
> The problem is : with CVI 5.5 it does not work!
> My call is : iRet = ComRdTerm (COMM_CP, sBuf, 10, 0xBB);
>
> but in CVI 5.5 the fuction ALWAYS read 10 chars without looking for
> the end char.
>
> After some time spent trying to find the bug (but I did not make any
> changes in this part) I compiled the project back in CVI 5.01.
> Result : it works!!!!!!
>
> I had a look in the New/Changes section of the manuals but I found
> nothing regarding this stuff.
>
> What can I do to make CVI 5.5 read terminated buffer?
> Or is a bug?
>
> Ciao
> Dimitri