Setting trigger point

Post your C and C++ discussions here
Post Reply
Mantau
Newbie
Posts: 0
Joined: Thu Feb 27, 2014 4:26 pm

Setting trigger point

Post by Mantau »

I received the PicoScope 5444B yesterday, and everything in the code is working, but I have one issue:

I can set a trigger point, but it will always be at the 0 sample count.

How can I set the trigger point to be at sample 100 for example, so that I have a few samples before the trigger ( I need to have some samples before the trigger).

The code I am using to set the trigger up:

Code: Select all

status = ps5000aSetSimpleTrigger(unit.handle, 1, PS5000A_CHANNEL_B, SHRT_MAX/2, PS5000A_RISING, 0, 0);
SHRT_MAX is coming from limits.h, and is the same as 0x7FFF

Any help would be appreciated, I have not been able to figure out which function comes even close to what I want. I know it exists, since I can set the trigger point freely in the sample program.

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Setting trigger point

Post by Martyn »

You need to set Pre trigger samples to 100 in the Run Block function call. Pre trigger samples + post trigger samples to give the total number of samples to collect.
Martyn
Technical Support Manager

Mantau
Newbie
Posts: 0
Joined: Thu Feb 27, 2014 4:26 pm

Re: Setting trigger point

Post by Mantau »

Thanks, that did it. I totally overread that part, and searched for trigger related functions only.

Post Reply