Test and Measurement Forum

Picoscope 4227 ExternalTrigger in Block Mode not working

Post your .Net discussions here

Picoscope 4227 ExternalTrigger in Block Mode not working

Postby abhishekv » Fri Aug 30, 2013 10:17 am


I am trying to use external triggering in block mode, but I doesn't seem to work. It works perfectly with streaming mode though.
I am using block mode, when the total time of capture is provided by user. The sample interval is then calculated as

SampleInterval = CaptureDuration / BUFFER_SIZE;

I am facing problems only when using block mode this way but not streaming mode.
When trying to use EXT channel in this situation, the trigger conditions do not seem to be met and scope does not capture data that I expect, even though RunBlock() returns OK. I am using the scope with rising edge triggering and 2V trigger voltage. The trigger pulse generated is 0-5V pulse.
As per the programming guide in TriggerChannelProperties() and TriggerConditions(), EXT & AUX are not used.
Are there any settings that may need to be added in TriggerChannelProperties() or TriggerConditions() or any other api that I am unaware of? Is there a need to "enable" the EXT channel? If yes, how?

Posts: 0
Joined: Fri Aug 30, 2013 9:42 am

Re: Picoscope 4227 ExternalTrigger in Block Mode not working

Postby Hitesh » Tue Sep 10, 2013 3:17 pm

Hi Abhishek,

It should be possible to use the External trigger with the PicoScope 4227 as it works in PicoScope 6.

You can use the ps4000SetSimpleTrigger function e.g.:

Code: Select all
status = ps4000SetSimpleTrigger(unit->handle, 1, PS4000_EXTERNAL, 3276, RISING, 0, 0);

or the advanced trigger functions ps4000SetTriggerChannelProperties, ps4000SetTriggerChannelConditions and ps4000SetTriggerChannelDirections. Below are example of the trigger threshold and structures defined in the C console program:

Code: Select all
short   triggerVoltage = mv_to_adc(2000,   PS4000_20V); // ChannelInfo stores ADC counts

struct tTriggerChannelProperties sourceDetails = {triggerVoltage, 256, triggerVoltage, 256, PS4000_EXTERNAL, LEVEL };


struct tTriggerDirections directions = { NONE, NONE, NONE, NONE, RISING, NONE };

Note that the external input range is +/-20V and the maximum ADC count is 32767. Please ensure that you are using the latest dll (you can also use the ps4000.dll from the PicoScope 6 directory) - a new SDK build should be available soon.

I hope this helps.

Technical Specialist
Pico Technology
Site Admin
Site Admin
Posts: 2025
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Return to .Net Languages (C#, VB.Net, .)

Who is online

Users browsing this forum: No registered users and 1 guest