Test and Measurement Forum

Triggering difference for sine and square waves

Post your .Net discussions here

Triggering difference for sine and square waves

Postby Stevo » Mon Jul 16, 2012 8:46 pm

Hi there,

When I have a sine or ramp wave, I can easily trigger at a specified threshold, but I cannot do the same for a square wave. For example, if I set the threshold to 2V with a buffer length of 100 with a preTriggerPoints of 50, and postTriggerPoints of 50, I'd expect to find that the buffer(50) should contain the ADC count corresponding close to 2000mv. This is indeed the case for sine and ramp waves. I verify this by drawing a green dot at that location. The dot is centred close to 2V with little vertical movement. When I switch to a square wave, the dot moves vertically with both negative and positive values. The square wave seems to be triggering but the centre index of my buffer does not correspond to the threshold value that I set it to. Is there something I am missing?

On a different note, does anybody know if the "ps4000SetNoOfCaptures" function for rapid block mode was left out of ps4000.dll? It is not listed in the API table of contents section of the programmers manual but it is referred to and defined within the manual.. I get an error with no entry-point for this function.

Thanks in advance,
Stevo
Stevo
Newbie
 
Posts: 0
Joined: Mon Mar 26, 2012 6:12 pm

Re: Triggering difference for sine and square waves

Postby Martyn » Tue Jul 17, 2012 8:01 am

The point at which the signal will pass through the trigger value you have set will not necessarily match an exact sample taken by the scope. With sine and ramp waves the rate of change of the signal is not as great as with a square wave and so the value will be close to the threshold you set, with the square wave this will not necessarily be the case.

ps4000SetNoOfCaptures should be in the driver, I have used it on many occasions, the index list didn't get updated. Can you confirm the driver version in case there is one build where it was omitted.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2348
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Triggering difference for sine and square waves

Postby Stevo » Tue Jul 17, 2012 1:56 pm

Hi Martyn,

One problem that arises is that when I try to trigger off the EXT/B channel (it has a synchronized square wave), my signal (sine wave) on channel A is not stable. The back and forth movement observed on channel A seems to correspond with how the triggering moves up/down as it triggers off different voltage levels along the rising edge of the square wave. (ie. maybe it is ignoring my threshold value and only looking for a rising edge?).

I tried replacing the ps4000.dll file from 10.4.1.1SDK into my program files/.../picoscope6/ folder and it seems to have removed the error. The original ps4000.dll file came with my pico CD-ROM installation. It was labelled PicoScope R6.5.78 and the ps4000.dll file size was 841KB. For the purpose of "swapping in" a new ps4000.dll file, do I simply copy and replace the one from my SDK10.4.1.1 into my program files/../picoscope6/ directory?

Thanks again, your assistance is greatly appreciated

Stevo
Stevo
Newbie
 
Posts: 0
Joined: Mon Mar 26, 2012 6:12 pm

Re: Triggering difference for sine and square waves

Postby Martyn » Fri Jul 20, 2012 7:08 am

Is this what you mean
20120720-0001.gif
Trigger on EXT

20120720-0002.gif
Trigger on B



Swapping in the dll file is fine, and exactly what we would recommend.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2348
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Triggering difference for sine and square waves

Postby Stevo » Fri Jul 20, 2012 3:31 pm

Not exactly the behaviour. I have been able to resolve the problem but I am unsure if it is indeed the solution. I had my autoTrigger_ms set to 20ms. After I increased this to 200ms, it seemed to start triggering consistently. What I am confused about is that my signal period is only 10ms. Is there an unspecified limit that the autoTrigger_ms parameter has to adhere to? I will be doing some further testing in case other issues crop up. In the mean time, it seems to be operating correctly.

Thanks once again!
Stevo
Newbie
 
Posts: 0
Joined: Mon Mar 26, 2012 6:12 pm

Re: Triggering difference for sine and square waves

Postby Martyn » Mon Jul 23, 2012 7:48 am

We would need to see the complete configuration and signal characteristics to see if the settings for auto trigger values are correct, however as it is now working I would suggest to continue testing.

If you find any other issues just post back.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2348
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


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

Who is online

Users browsing this forum: No registered users and 0 guests