Test and Measurement Forum

Setting trigger point

Post your C and C++ discussions here

Setting trigger point

Postby Mantau » Thu Feb 27, 2014 4:41 pm

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.
Mantau
Newbie
 
Posts: 0
Joined: Thu Feb 27, 2014 4:26 pm

Re: Setting trigger point

Postby Martyn » Thu Feb 27, 2014 7:20 pm

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2348
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Setting trigger point

Postby Mantau » Fri Feb 28, 2014 10:32 am

Thanks, that did it. I totally overread that part, and searched for trigger related functions only.
Mantau
Newbie
 
Posts: 0
Joined: Thu Feb 27, 2014 4:26 pm


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests