Repository navigation
fix(afg): explicitly disable burst state when generating continuous waveforms - #630
Open
harshitj183 wants to merge 1 commit into
Open
harshitj183 wants to merge 1 commit into
harshitj183 wants to merge 1 commit into
Conversation
…aveforms When generate_function() is called on an AFG instrument, it configures channel properties via set_function_properties(burst_count=0). Previously, set_function_properties() only handled burst_count > 0 by invoking setup_burst_waveform(), leaving BURST:STATE enabled if the instrument had previously been placed in burst mode (e.g., via setup_burst()). This commit explicitly sets BURST:STATE to 0 prior to configuring waveform frequency/offset/function/amplitude when burst_count == 0. Disabling burst state before updating frequency parameters also prevents data-out-of-range validation errors that can occur when frequency values are validated against active burst constraints on physical instruments. Regression tests added in test_generate_waveform.py: - Verifies generate_function() disables burst state on all channels and initiates phase sync - Verifies BURST:STATE is explicitly 0 after calling setup_burst() followed by generate_function() Closes tektronix#440 Signed-off-by: Harshit Jaiswal <[email protected]>
harshitj183
requested review from
SaiDeepikaKuchibhotla,
amccann-Tek,
ldantek,
michaelwagoner,
nfelt14,
pradhansk,
tekperson and
v12ganesh
September 11, 2026 04:38
Collaborator
|
@michaelwagoner, can you take a look at this? |
harshitj183
temporarily deployed
to
package-build
September 11, 2026 22:08 — with
GitHub Actions
Inactive
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #630 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 166 166
Lines 4866 4868 +2
Branches 437 438 +1
=========================================
+ Hits 4866 4868 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Test Results (ubuntu)
|
Test Results (windows)
|
Test Results (macos)
|
| # if termination is MAXIMUM or MINIMUM or INFINITY | ||
| self._afg.set_if_needed(f"OUTPUT{self.num}:IMPEDANCE", termination) | ||
| if burst_count == 0: | ||
| self.set_burst_state(0) |
Contributor
There was a problem hiding this comment.
It would be nice to keep the burst handling in one spot and move the "if burst count > 0..." from the bottom of the function to an elif under this.
Also looking at the AFG manual, I believe the only thing burst mode constrains is the available functions (DC/Noise are unavailable in burst mode) but where it's being set here is fine.
Collaborator
|
@harshitj183, are you going to make the changes necessary to get this ready for merge? |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
When
generate_function()is called on an AFG instrument, it configures channel properties viaset_function_properties(burst_count=0). Previously,set_function_properties()only handledburst_count > 0by invokingsetup_burst_waveform(), leavingBURST:STATEenabled if the instrument had previously been placed in burst mode (e.g., viasetup_burst()).This change explicitly sets
BURST:STATEto0prior to configuring waveform frequency/offset/function/amplitude whenburst_count == 0. In addition to disabling residual burst state, callingset_burst_state(0)before updating frequency parameters prevents data-out-of-range validation errors that can occur when frequency values are validated against active burst constraints on physical instruments.Addresses #440
Types of changes
Checklist
Addresses #440