LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga

hi im using spartan6 board, using labwindows version 8.5, i receive data via rs 232 port from the board, my problem is i am receiveing set of data 3 times.. example.. 8 bit data (23,ac,5d,5c) transmitter sends only once but receiver receives thrice and waits for the next set of data to receive, again receives thrice the received data, i have used FlushInQ() but no use. My requirement is it should receive only once and should wait for next set of data to receive.

sample of my program is given below, 

 

InstallComCallback (1, LWRS_RXFLAG, 1, 0x7E, Event_AutoDetect, autobuf);

 

void Event_AutoDetect()

{
ComRd (1,autobuf,6000);

FlushInQ(1);

 

for (i2=rx; i2 <= (2803); i2++)

{
rec[z] = (autobuf[i2]);

xxxxxx

xxxxxx

xxxxx

}

fclose(rfp);

// CloseCom (1);
// printf("\n");
}

0 Kudos
Message 1 of 1
(3,624 Views)