Description
I want to use the HMF2525/2550 to generate a single pulse by using my Keyboard as a trigger source.
I want to use the HMF2525/2550 to generate a single pulse by using my Keyboard as a trigger source.
In order to connect the HMF2550 with your computer over USB you need to download (link 1) and install the USB Virtual COM Port (VCP) driver.
Instructions on how to exactly install the drivers for the VCP is described in link 2 in the references.
After the VCP is properly installed the device should be available under the device manager. Here (Fig. 1) the device is assigned to COM Port 3.
According to which COM Port the device is assigned, the resource string 'ASRL3::INSTR' for the VISA connection has to be changed.
In the Python code the following settings were applied:
- Number of bursts
- Set voltage 3V
- Pulse width 10us
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
from RsInstrument.RsInstrument import RsInstrument
def main():
instr = RsInstrument('ASRL3::INSTR', True, False)# Device is assigned to COM Port 3
instr.clear_status()
instr.reset()
print(f'Instrument full name: {instr.full_instrument_model_name}')
# Define your pulse
num_of_burst_cycles = '1'
voltage = '3'
pulse_width = '0.00001'
instr.write_str('FUNC PULS')
# Set values for the pulse
instr.write_str('BURS:NCYC ' + num_of_burst_cycles)
instr.write_str('VOLT ' + voltage)
instr.write_str('FUNC:PULS:WIDT:HIGH ' + pulse_width)
instr.write_str('BURS:MODE TRIG')
instr.write_str('TRIGGER:SOURCE EXT')
instr.write_str('OUTP ON')
instr.write_str('BURS:STAT ON')
while True:
input("Please press the Enter key to trigger a pulse")
instr.write_str('TRIG')
if __name__=="__main__":
main()
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
By using a RTB2004 the burst of the signal
generator was measured and compared to what was applied by the python script to
perform a proof of concept.
The oscilloscope was set into a single acquisition
mode and records as soon as a burst is recognized.
In the screen shot in Fig. 2 from the oscilloscope an acquisition has been recorded.
As seen the settings are correctly applied over the Python script. The set voltage of the burst is 3V
and the burst width 10us.