Test and Measurement Forum

ps4224 - pulsewidth trigger

Post your .Net discussions here

ps4224 - pulsewidth trigger

Postby Patg » Mon Mar 29, 2010 1:54 pm

Hey, Iam using C# and the ps4000.dll to program some kind of data logger. However data sampling, and simple triggering works just fine. But whenever i try to setup/add an advanced trigger by using the "SetPulseWidthQualifier", the trigger never fires.

Has anyone a working code snippet for using this function together with a simple threshold or any ideas on how to link the trigger functions ?

The code snippet in the ps3000 series doesnt work either or at least wont help me.

kind regards and thanks in advance

********************
Debugging the code leaves me with Error Pico_Pulse_width_Qualifier (most likely range issues), if no error occurs trigger wont fire

Imports.PwqConditions[] conditions = new Imports.PwqConditions[]
{
new Imports.PwqConditions(Imports.TriggerState.True,
Imports.TriggerState.DontCare,
Imports.TriggerState.DontCare,
Imports.TriggerState.DontCare,
Imports.TriggerState.DontCare,
Imports.TriggerState.DontCare)
};

if (pwq == null)
{
pwq = new Pwq(conditions,
1,
Imports.ThresholdDirection.OUTSIDE,
10,
6000,
Imports.PulseWidthType.LessThan);

}
if ((status = Imports.SetPulseWidthQualifier(_handle, pwq.conditions,
pwq.nConditions, pwq.direction,
pwq.lower, pwq.upper, pwq.type)) != 0)
{
return status;
}
Patg
Newbie
 
Posts: 0
Joined: Mon Mar 29, 2010 1:41 pm

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

Who is online

Users browsing this forum: No registered users and 1 guest