You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use External Trigger Input Pin TI for initiating dual-channel analog capture in ADALM2000 using the python binding.
I am unable to find the exact ways of implementing the same from the document and have the following queries.
is this possible..?
if yes, is the below code correct
# Get Trigger Objecttrig=ain.getTrigger()
# Set Analog Trigger Mode as External on TI pintrig.setAnalogMode(0,libm2k.EXTERNAL)
trig.setAnalogMode(1,libm2k.EXTERNAL)
# set Analog Channel 1 External Trigger Condition as RISING_EDGE_DIGITAL on TI Pintrig.setAnalogExternalCondition(0,libm2k.RISING_EDGE_DIGITAL)
# set Analog Channel 2 External Trigger Condition as RISING_EDGE_DIGITAL on TI Pintrig.setAnalogExternalCondition(1,libm2k.RISING_EDGE_DIGITAL)
if not, is there an alternative way for doing the same?
Thanks in advance. 🤝
The text was updated successfully, but these errors were encountered:
You are missing trig.setAnalogSource(0).
This may be a little confusing, but the trigger interface basically works like this: you have two TRIGGER channels - which are different from the regular analog channels. The channel's data is always acquired synchronously, but you can select one of the two TRIGGER channels to synchronize on. Therefore the code should go like this:
trig=ain.getTrigger()
trig.setAnalogMode(0, libm2k.EXTERNAL) # this will set TRIGGER channel 0 to external
trig.setAnalogExternalCondition(0,libm2k.RISING_EDGE_DIGITAL) # this will set TRIGGER channel 0
trig.setAnalogSource(0) # set TRIGGER channel 0 as the source for the analog interface
ain.enableChannel(0, True)
ain.enableChannel(1, True)
ain.getSamples(1024) # the data should only be acquired when external trigger is present
Thanks, @adisuciu for the prompt response, to my surprise using the previously mentioned code (without setAnalogSource()) works as expected. wondering TRIGGER channel 0 is configured as default.
Adding examples and use-cases in the documentation would remove ambiguity with the configuring Triggers
-Aananth
adisuciu
changed the title
Dual channel analog capture using External Trigger in TI Pin
Update external trigger documentation/examples
Sep 17, 2021
I am trying to use External Trigger Input Pin TI for initiating dual-channel analog capture in ADALM2000 using the python binding.
I am unable to find the exact ways of implementing the same from the document and have the following queries.
is this possible..?
if yes, is the below code correct
if not, is there an alternative way for doing the same?
Thanks in advance. 🤝
The text was updated successfully, but these errors were encountered: