colinoflynn / pico-python

PicoScope Python Interface
Other
97 stars 78 forks source link

[PS6000]_lowLevelSetTriggerChannelConditions #100

Closed PeterPablo closed 6 years ago

PeterPablo commented 6 years ago

Hi, did in the meanwhile anybody have a go at implementing the trigger channel conditions (function ps6000SetTriggerChannelConditions())? I'm interested setting up a trigger condition that triggers immediately and thought I might obtain the required behavior by setting PS6000_CONDITION_DONT_CARE on all channels. This MATLAB file from picotech helps with the definition of the different constants.

Background: I want to use the internal AWG and have a software trigger that starts the waveform acquisition at the same time. Up to now I did not find a solution.

Thank you!

hmaarrfk commented 6 years ago

I'm pretty sure I used that functionality in one of my experiments. I think I had set the AWG and the capture to trigger from the software trigger. and would issue a software trigger.

If you are proficient in C and Python, you should be able to dig through and add any functionality you are missing.

I always pull in requests that seem to make sense.

PeterPablo commented 6 years ago

Thank you for getting back to me so quickly. From reading the manual I got the impression it is not possible to use the software trigger for the acquisition /capturing. That would indeed be simplest and exactly what I want to achieve.

Yes, I already had a look at the scripts and probably will tackle this at some point, though wanted to check the state of affairs first.

Am 25.10.2017 18:56 schrieb "Mark Harfouche" notifications@github.com:

I'm pretty sure I used that functionality in one of my experiments. I think I had set the AWG and the capture to trigger from the software trigger. and would issue a software trigger.

If you are proficient in C and Python, you should be able to dig through and add any functionality you are missing.

I always pull in requests that seem to make sense.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/colinoflynn/pico-python/issues/100#issuecomment-339397598, or mute the thread https://github.com/notifications/unsubscribe-auth/AEI6K3V2SsBKmg_5ZgX0BW9zGrrD_MZAks5sv2g7gaJpZM4QF6u6 .

hmaarrfk commented 6 years ago

I'll have to check when my computer goes back online. Waiting for some hardware to arrive but I should be able to see my code and exactly how I implemented.

An alternative would be to put an arduino onto the AUX connection and make the arduino issue a trigger on that port.

I really think the AWG and acquisition can work on software trigger though.

PeterPablo commented 6 years ago

I had a look at the manual (again) and it states for ps6000SetSimpleTrigger():

source: the channel on which to trigger. This can be one of the four
input channels listed under ps6000SetChannel, or
PS6000_TRIGGER_AUX for the AUX input.

So I fear this won't work as hoped, except for introducing additional hardware that activates the trigger via AUX. Hopefully you or somebody else proves me wrong. 😃

hmaarrfk commented 6 years ago

Ok I guess I lied.

My memory seems to have come back. My AWG was broken on my scope so I eventually ended up giving up on using my PS6000. You should ask them on their forum if this feature is available. They are quite responsive. They might even give you a beta version of the software that enables it if it isn't already implemented.

PeterPablo commented 6 years ago

I wanted to post feedback that I got it to work using TriggerAux (PS6000_TRIGGER_AUX) as trigger source for the channel and ScopeTrig (PS6000_SIGGEN_SCOPE_TRIG) for the AWG. Interestingly I received the error PICO_WARNING_AUX_OUTPUT_CONFLICT -- AUX cannot be used as input and output at the same time on using AuxIn (PS6000_SIGGEN_AUX_IN) for the AWG, which would be the sensible choice for me. It seems that TriggerRaw (PS6000_SIGGEN_TRIGGER_RAW) can also be used though option isn't encouraged in the manual.

I posted to the PicoTech forum regarding software triggering the acquisition, though that post is not yet visible.

I am willing to close this issue as my need for the advanced triggers has now vanished. Opinions?

Thanks again for your input!

hmaarrfk commented 6 years ago

Lets leave it up for a few weeks. If you get feedback that indicates that we can add a hidden option then it might be good.

hmaarrfk commented 6 years ago

@PeterPablo, is this still an issue?

PeterPablo commented 6 years ago

Thanks for getting back to me. Yes, this is still an issue, but I have the impression this is (currently) a limitation of the PicoScope's firmware. The workaround of using the external trigger to trigger both signal excitation and acquisition works as expected.

hmaarrfk commented 6 years ago

Alright, I'm going to close this issue then.