Hello,
We have developed a code in C++ with the LJM library in which we obtain the readings in stream mode. The registers we are reading are:
0 - CORE_TIMER
1 - STREAM_DATA_CAPTURE_16
2 - AIN0
3 - AIN1
...
15 - AIN13
We had to disable the auto recovery error detection, as CORE_TIMER is a register that is not firmware-protected from the 0xFFFF value, and we were getting the 1320 error code.
Therefore, in order to check that the device buffer is not full and we are not receiving dummy data, we check manually at each iteration that the value of AIN0 is not 0xFFFF.
We want to be sure that our code detects correctly the dummy values. Is there a way in which we can force a full device buffer situation and get dummy data on purpose? The data extraction from the device buffer is performed by the LJM library, and we have no control over it.
Thank you in advance.
I would recommend switching your code to read the AIN first and re-enable the autorecovery protection. This will prevent the initial error you were seeing. With your current setup, there is no guarantee LJM will be able to properly handle autorecovery and dummy data.
You can likely force autorecovery by decreasing the device buffer size, but we would not recommend doing this. You typically can and should avoid going into autorecovery. Please see the following section of docs:
http://labjack.com/support/datasheets/t-series/communication/stream-mode...