-
Notifications
You must be signed in to change notification settings - Fork 343
Add Tektronix AWG70000A enhancements #7837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bennthomsen
wants to merge
2
commits into
microsoft:main
Choose a base branch
from
bennthomsen:feature/tektronix-awg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+40
−1
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add hold parameter, force_jump parameter, and set_event_jump method to the Tektronix AWG70000A driver for improved sequence control. |
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -199,7 +199,21 @@ def __init__( | |||||
| vals=vals.Ints(0, 1), | ||||||
| get_parser=int, | ||||||
| ) | ||||||
| """Parameter state""" | ||||||
| """Channel State: (OFF: 0, ON: 1)""" | ||||||
|
|
||||||
| self.hold: Parameter = self.add_parameter( | ||||||
| "hold", | ||||||
| label=f"Channel {channel} hold value", | ||||||
| get_cmd=f"OUTPut{channel}:WVALUE:ANALOG:STATE?", | ||||||
| set_cmd=f"OUTPut{channel}:WVALUE:ANALOG:STATE {{}}", | ||||||
| val_mapping={ | ||||||
| "FIRST": "FIRST", | ||||||
| "ZERO": "ZERO", | ||||||
| }, | ||||||
| ) | ||||||
| """ the output condition of a waveform of the specified | ||||||
| channel to hold while the instrument is in the waiting-for-trigger state. | ||||||
| ZERO = 0V, FIRST = first value of next sequence""" | ||||||
|
|
||||||
| ################################################## | ||||||
| # FGEN PARAMETERS | ||||||
|
|
@@ -587,6 +601,14 @@ def __init__( | |||||
| ) | ||||||
| """Parameter all_output_off""" | ||||||
|
|
||||||
| self.force_jump: Parameter = self.add_parameter( | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have just landed a pr to make parameters generic so I would like to make use of that.
Suggested change
This means the parameter data type is integer and the instrument the parameter is bound to is this class. Similar for the other parameter |
||||||
| "force_jump", | ||||||
| label="Force Jump", | ||||||
| set_cmd="SOURCE1:JUMP:FORCE {}", | ||||||
| vals=vals.Ints(1, 16383), | ||||||
| ) | ||||||
| """Parameter force_jump""" | ||||||
|
|
||||||
| add_channel_list = self.num_channels > 2 | ||||||
| # We deem 2 channels too few for a channel list | ||||||
| if add_channel_list: | ||||||
|
|
@@ -619,6 +641,22 @@ def __init__( | |||||
|
|
||||||
| self.connect_message() | ||||||
|
|
||||||
| def set_event_jump( | ||||||
| self, sequence_name: str, current_step: int, next_step: int | ||||||
| ) -> None: | ||||||
| """ | ||||||
| Set event jump for a given step in the sequence | ||||||
|
|
||||||
| Args: | ||||||
| sequence_name: The name of the sequence | ||||||
| current_step: The step number in the sequence (1-indexed) | ||||||
| next_step: The step number to jump to (1-indexed) | ||||||
| """ | ||||||
|
|
||||||
| self.write( | ||||||
| f"SLISt:SEQuence:STEP{current_step}:EJUMp {sequence_name}, {next_step}" | ||||||
| ) | ||||||
|
|
||||||
| def force_triggerA(self) -> None: | ||||||
| """ | ||||||
| Force a trigger A event | ||||||
|
|
||||||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this mapping needed? It seems the keys and values are the same