Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Knowledge Base Home
  • Contact Us
  • Home
  • Moku:Lab
  • Software integrations
  • Python

Python Waveform Generator : burst mode

Using Python to generate bursts or pulses in the Waveform Generator

Written by Paul Cracknell

Updated at March 3rd, 2021

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Moku:Go
    Moku:Go Arbitrary Waveform Generator Moku:Go Data Logger Moku:Go Frequency Response Analyzer Moku:Go Logic Analyzer & Pattern Generator Moku:Go Oscilloscope & Voltmeter Moku:Go PID Controller Moku:Go Spectrum Analyzer Moku:Go Waveform Generator Moku:Go Power Supplies Moku:Go Digital Filter Box Moku:Go FIR Filter Builder Moku:Go Lock-in Amplifier
  • Moku:Lab
    Windows Moku:Lab general Moku:Lab Instruments iPad app Software integrations
  • Moku:Pro
    Moku:Pro Instruments
+ More

The Python script below to setups the Waveform Generator in burst (or N-cycle) mode.  

It generates 20 cycles of a 10 MHz sine wave,  2 Vpp;  repeating every 200 us.


# pymoku example: Waveform generator n-cycle burst mode
#
# This example demonstrates how you can configure the waveform generator
# instrument to generate signals in burst mode for a set number of cycles
# using internal triggering
#
# (c) 2019 Liquid Instruments Pty. Ltd.
#
from pymoku import *
from pymoku.instruments import WaveformGenerator


# Connect to your Moku by its device name
# Alternatively, use Moku.get_by_serial('#####') or Moku('192.168.###.###')
m = Moku.get_by_name('Moku')

try:
i = m.deploy_instrument(WaveformGenerator)

# Set output 1 to generate sine wave, 2Vpp, 10 MHz
i.gen_sinewave(1, 2, 10e6)

# Activate trigger for output channel 1
i._sweep1.wait_for_trig = 1


# Setup n-cycle for 20 cycles, internally triggered every 200 us
i.set_trigger(1, mode='ncycle', ncycles=20, trigger_source ='internal', trigger_threshold=0.1, internal_trig_period=200e-6, internal_trig_high=5e-6)

finally:
# Close the connection to the Moku device
# This ensures network resources and released correctly
m.close()
moku:lab python burst pulse

Was this article helpful?

Yes
No

Related Articles

  • Getting started with pyMoku
  • pyMoku experiences deploy errors

Sitemap

  • Moku:Lab
  • Instruments
  • Software
  • Company
  • Support
  • Store
  • Terms & Conditions
  • Privacy Policy

Offices

United States
+1 (619) 332-6230
740 Lomas Santa Fe Dr
Suite 102
Solana Beach, CA 92075

Australia
+61 2 6171 9730
243 Northbourne Avenue
Suite 2
Lyneham, ACT 2602

Follow us

Youtube LinkedIn

官方微信

Contact us
© 2021 Liquid Instruments. All rights reserved.

Definition by Author

0
0
Expand