Trigger not enabling for 4000A

Post your LabVIEW discussions here
Post Reply
Kapton
Newbie
Posts: 0
Joined: Sun Oct 04, 2020 9:45 pm

Trigger not enabling for 4000A

Post by Kapton »

My custom trigger SubVI is not producing a trigger. I have no idea why it isn't. Both ps4000aSetTriggerChannelProperties and ps4000aSetTriggerChannelConditions have non-zero numbers passed into nChannelProperties meaning it should be on. I'm at a loss here. Any help would be appreciated.

I've attached my SubVI, it is placed in the ps4000settings SubVI if that helps.
Attachments
trigger (SubVI).vi
(55.72 KiB) Downloaded 66 times

AndrewA
PICO STAFF
PICO STAFF
Posts: 299
Joined: Tue Oct 21, 2014 3:07 pm

Re: Trigger not enabling for 4000A

Post by AndrewA »

Hi,

We have an advanced trigger vi for the 2000a API its-
PicoScope2000aAdvancedTriggerSettings.vi in- https://github.com/picotech/picosdk-ni- ... e2000a.llb
Note some of the functions variables are passed differently, like ps2000aSetTriggerChannelDirections.
But all the advanced trigger functions the C structures are passed as 2 arrays. And the 'Call Library Function' settings for these are-
channelProperties.png
ps2000aSetTriggerChannelConditions
(10.12 KiB) Not downloaded yet
So I would try changing your advanced trigger functions to use the 2 arrays as in the 2000a vi above.
One thing you could try is set a simple trigger using the vi PicoScope4000aSettings.vi, and run a capture to check the trigger is working.
Then changed your code to add just the ps4000aSetTriggerChannelConditions function just to clear all the triggers.
This should clear the simple trigger set in the PicoScope4000aSettings.vi.
Regards Andrew
Technical Specialist

Kapton
Newbie
Posts: 0
Joined: Sun Oct 04, 2020 9:45 pm

Re: Trigger not enabling for 4000A

Post by Kapton »

ya, that's what I was afraid I would have to do. I didn't think I would need to because the error handler flags errors like "Invalid channels" if I made them invalid within the array cluster.

I'll make those changes and post if it works or not. Thanks for your help.

Kapton
Newbie
Posts: 0
Joined: Sun Oct 04, 2020 9:45 pm

Re: Trigger not enabling for 4000A

Post by Kapton »

I made all 1D cluster arrays into 2D U8 arrays like the 2000a advanced trigger. The trigger is still not triggering.

I have ran the example with the simple trigger and that works fine, I don't quite understand what you mean by just adding the SetTriggerChannelConditions to clear the input of the simple. I clear the conditions before I set every logic trigger.

Does the order of which I call functions matter? I'm running in circles here :/

I've attached my updated trigger as well as the subv's I use for it.
Attachments
trigger subvis.zip
(107.91 KiB) Downloaded 59 times

Kapton
Newbie
Posts: 0
Joined: Sun Oct 04, 2020 9:45 pm

Re: Trigger not enabling for 4000A

Post by Kapton »

Literally after sending the last response I figured out my problem.

For SetTriggerChannelConditions I was using a 1 for info instead of 2 to add. Check your enums guys....

Post Reply