trigger on digital input via API

Post your LabVIEW discussions here
Post Reply
steffen_rpunkt
Newbie
Posts: 0
Joined: Fri Sep 10, 2021 7:45 pm

trigger on digital input via API

Post by steffen_rpunkt »

I have a 5000 series MSO picoscope and struggle to use a digital input for triggering. It works all fine with the picoscope 6 software but how to make the trigger use digital inputs in my (e.g. LabView) program?

steffen_rpunkt
Newbie
Posts: 0
Joined: Fri Sep 10, 2021 7:45 pm

Re: trigger on digital input via API

Post by steffen_rpunkt »

I succeeded in implementing the advanced trigger library functions from the wrapper dll which I upload here (LV2017).
My VI is based on the minimal example of forum thread viewtopic.php?t=13989 (which is the only example VI using advanced triggering that I found). I am handing over the structures also as arrays. It should work also using LabView clusters afaik.

My current attempt results in error 5016 at setTriggerChannelConditions when select Port0 (8) in the source enumerator for digital triggering. It all works fine for analog channels (enumerator 0, 1, 2, 3). Is there any advice here?


Other particular questions:

- Is it correct to use
- to trigger on an analog channel: ps5000aSetTriggerChannelConditionsV2, ps5000aSetTriggerChannelDirectionsV2, and ps5000aSetTriggerChannelPropertiesV2
- to trigger on a digital channel: ps5000aSetTriggerChannelConditionsV2, ps5000aSetTriggerDigitalPortProperties, and ps5000aSetTriggerChannelPropertiesV2

- Does the order of calling ps5000aSetTriggerChannelConditionsV2, ps5000aSetTriggerChannelDirectionsV2/ps5000aSetTriggerDigitalPortProperties, and ps5000aSetTriggerChannelPropertiesV2 matter?

- which thresholds to set for digital channels in ps5000aSetTriggerChannelPropertiesV2? Or is that ignored?

- the dll contains (and the example make use of functions that end with "-2" in the name. What does it mean, which one should I take?

- Trying to use the dll import wizard of LabView, the dll contains functions that are not found in any header file. See this forum thread viewtopic.php?t=34341 Is there an explanation and hint what to do? (Mentioned thread does not provide answers.)

- It seems unless in the documentation there is no auxOutputEnable parameter to the function ps5000aSetTriggerChannelPropertiesV2 (at least not in wrapper dll).


Thank you for any hints!
Attachments
PicoScope5000aSettings_digitaltrigger.vi
(64.82 KiB) Downloaded 200 times

Post Reply