-
Notifications
You must be signed in to change notification settings - Fork 2
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
triggering source on the analog channels #52
Comments
Hi Andy, sorry for the slow reply. I've had a quick look at the docs and I think you can do this manually: from spectrum_gmbh.py_header.regs import SPC_TMASK0_CH0, SPC_TM_POS, SPC_TRIG_CH0_MODE, SPC_TRIG_CH_ORMASK0
from spectrumdevice import SpectrumDigitiserCard
from spectrumdevice.settings import ExternalTriggerMode, TriggerSettings, TriggerSource
card = SpectrumDigitiserCard(device_number=0)
# Disable the "external" trigger
trigger_settings = TriggerSettings(
trigger_sources=[TriggerSource.SPC_TMASK_NONE],
external_trigger_mode=ExternalTriggerMode.SPC_TM_NONE,
external_trigger_level_in_mv=1000,
)
card.configure_trigger(trigger_settings)
# Enable channel 0 in the trigger OR mask and set the mode
card.write_to_spectrum_device_register(SPC_TRIG_CH_ORMASK0, SPC_TMASK0_CH0)
card.write_to_spectrum_device_register(SPC_TRIG_CH0_MODE, SPC_TM_POS) Thanks for raising this, I'll try to get it implemented properly as soon as I can! Hopefully the above will work for you in the meantime. And thanks for using the library! |
Hi Christian, Thank you very much, I tested this solution and it worked on card M2p.5946-x4. However I needed to make a few small modification. See below the code I use to set-up the digitiser using channel 1 for triggering: import spectrum_gmbh.regs as registry def Set_digitizer(): acquisition_settings = AcquisitionSettings( card = SpectrumDigitiserCard(device_number=0) Enable channel 1 in the trigger OR mask and set the modecard.write_to_spectrum_device_register(registry.SPC_TRIG_CH_ORMASK0, registry.SPC_TMASK0_CH1)
|
That's great, thanks for the example. I'll leave the issue open as I'd still like to make it easier to do this in spectrumdevice. |
Hi Christian,
First of all, I like to thanks you for this great contribution, I recently started to use M2p.5946-x4 cards and found your code extremely useful.
For my application I would like to use as external trigger the main analog channel of the card. So I can display the channel I am triggering on.
In the manual p'103, they give some examples. I would like to do something like that:
trigger_settings = TriggerSettings(
trigger_sources=[TriggerSource.SPC_TMASK_CH0],
external_trigger_mode=ExternalTriggerMode.SPC_TM_POS,
external_trigger_level_in_mv=1000,
)
Is this option implemented in your code?
Thank you very much for your support.
Cheers,
Andy
The text was updated successfully, but these errors were encountered: