Triggering difference for sine and square waves

Post your .Net discussions here
Post Reply
Stevo
Newbie
Posts: 0
Joined: Mon Mar 26, 2012 6:12 pm

Triggering difference for sine and square waves

Post by Stevo »

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

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

Re: Triggering difference for sine and square waves

Post by Martyn »

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 Support Manager

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

Re: Triggering difference for sine and square waves

Post by Stevo »

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

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

Re: Triggering difference for sine and square waves

Post by Martyn »

Is this what you mean
Trigger on EXT
Trigger on EXT
Trigger on B
Trigger on B

Swapping in the dll file is fine, and exactly what we would recommend.
Martyn
Technical Support Manager

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

Re: Triggering difference for sine and square waves

Post by Stevo »

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!

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

Re: Triggering difference for sine and square waves

Post by Martyn »

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 Support Manager

Post Reply