Circular buffer GetNumberOfBytes - doesn't return correct value.
Demonstrates (in simulation or on hardware) - the circular buffer size (in my demo) is 128 bytes - but the maximum size returned by GetNumberOfBytes is 127.
I think the error is in GetNumberofBytes:
Code: Select all
if (FCV_01211_CircularBuffer1__DATAEND > FCV_01211_CircularBuffer1__DATASTART)
{
// .Return = DataEnd - DataStart
FCR_RETVAL = FCV_01211_CircularBuffer1__DATAEND - FCV_01211_CircularBuffer1__DATASTART;
PutBytes - looks correct (FCL_TEMP >=128) so reading data from the buffer will possibly lose a byte????
Martin