-
Notifications
You must be signed in to change notification settings - Fork 41
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
adding a function to qdac2 driver #215
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,3 +97,21 @@ def load_voltage_list( | |
print( | ||
f"Set-up QDAC2 channel {channel} to step voltages from a list of {len(voltage_list)} items on trigger events from the {trigger_port} port with a {qdac.query(f'sour{channel}:dc:list:dwell?')} s dwell time." | ||
) | ||
|
||
|
||
# set the QDAC voltage to a specific value | ||
def set_QDAC_voltage( | ||
qdac, | ||
channel: int, | ||
voltage: float, | ||
): | ||
""" | ||
Configure a QDAC2 channel to play a specicif voltage, using pyvisa commands. | ||
|
||
:param qdac: the QDAC2 object. | ||
:param channel: the QDAC2 channel that will output the voltage from the voltage list. | ||
:param voltage: the desired voltage to output from the QDAC channel. | ||
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. Specify the unit as well |
||
:return: | ||
""" | ||
qdac.write(f"sour{channel}:dc:mode FIX") | ||
qdac.write(f"sour{channel}:volt {voltage}") |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,3 +97,21 @@ def load_voltage_list( | |
print( | ||
f"Set-up QDAC2 channel {channel} to step voltages from a list of {len(voltage_list)} items on trigger events from the {trigger_port} port with a {qdac.query(f'sour{channel}:dc:list:dwell?')} s dwell time." | ||
) | ||
|
||
|
||
# set the QDAC voltage to a specific value | ||
def set_QDAC_voltage( | ||
qdac, | ||
channel: int, | ||
voltage: float, | ||
): | ||
""" | ||
Configure a QDAC2 channel to play a specicif voltage, using pyvisa commands. | ||
|
||
:param qdac: the QDAC2 object. | ||
:param channel: the QDAC2 channel that will output the voltage from the voltage list. | ||
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. The voltage doesn't come from the voltage list here, but from the specified value |
||
:param voltage: the desired voltage to output from the QDAC channel. | ||
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. Specify the unit as well |
||
:return: | ||
""" | ||
qdac.write(f"sour{channel}:dc:mode FIX") | ||
qdac.write(f"sour{channel}:volt {voltage}") |
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.
The voltage doesn't come from the voltage list here, but from the specified value