Skip to content

Commit

Permalink
hotfix: mock pulse generator example num pulses was too high for samp…
Browse files Browse the repository at this point in the history
…le rate
  • Loading branch information
crnbaker committed Jun 25, 2024
1 parent 5d9584f commit b269f97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/example_scripts/pulse_generator_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def pulse_generator_example(mock_mode: bool) -> None:

# Set the card's sample rate. This affects the precision with which pulse timings can be chosen, and the min and max
# allowed pulse periods
card.set_sample_rate_in_hz(100000)
card.set_sample_rate_in_hz(8000000)
# Enable a single channel of the card. Although not used in this example, the number of enabled channels affects
# the precision with which pulse timings can be chosen and the min and max allowed pulse periods
card.set_enabled_analog_channels([0])
Expand Down Expand Up @@ -62,7 +62,7 @@ def pulse_generator_example(mock_mode: bool) -> None:
# The period is the length of the whole pulse (high-voltage length + 0V length)
# The duty cycle is the high-voltage length divided by the period
pulse_output_settings = PulseGeneratorOutputSettings(
period_in_seconds=1e-3, duty_cycle=0.5, num_pulses=2, delay_in_seconds=0.0, output_inversion=False
period_in_seconds=1e-3, duty_cycle=0.01, num_pulses=1000, delay_in_seconds=0.0, output_inversion=False
)
pulse_gen.configure_output(pulse_output_settings, coerce=False)

Expand Down

0 comments on commit b269f97

Please sign in to comment.