Fixed output saturation and trigger-related bugs - #82
Conversation
hanklong99
commented
Jun 4, 2026
- Reset the accumulator after the completion of the current frame.
- Updated the boxcar counter logic to prevent false triggering when no trigger events are present.
- Fixed a minor output bug.
1. Reset the accumulator after the completion of the current frame. 2. Updated the boxcar counter logic to prevent false triggering when no trigger events are present. 3. Fixed a minor output bug.
|
The primary issue was that the output could saturate rapidly because the accumulator was not being reset after the completion of the current frame. This issue can be reproduced by setting Control3 to a value greater than 2, applying a DC signal to InA, and setting Control5 to 1. A second issue was that the boxcar could still be triggered after a boxcar reset and before the first valid trigger was received. Although this behavior was not particularly problematic, as it disappeared once valid triggers were present, it has now been corrected by modifying the counter reset logic. In addition, OutB is now explicitly reset to zero before being updated with new data. This prevents residual values from previous events from being retained in the output, ensuring that OutB no longer exhibits memory effects from earlier acquisitions. |
|
@hanklong99 Thanks for updating the scripts.
|
|
Thanks @jobintv95 For the 2nd point, disable all signals entering the Boxcar Averager, including both the trigger and pulse signals. Set all control registers to 0, except for Control2, which should be set to 2 or any value greater than 0. The Boxcar Averager OutputB signal should then show the erroneous gate signals. |
|
@hanklong99 yep that checks out. |