When is trigger armed?

Post general discussions on using our drivers to write your own software here
Post Reply
Peter Nyffeler
Newbie
Posts: 0
Joined: Fri Nov 30, 2012 3:53 pm

When is trigger armed?

Post by Peter Nyffeler »

I'm using LabView to control a PicoScope 4224 in block mode collecting 100 points before the trigger event and 1000 after it.

To start the measurement I have to send a command via RS232 to an other instrument. This instruments gives me a trigger pulse of 1ms, which is feed to channel B of the 4224 for triggering it.

When I send the start command to get the triggerpulse before or after the PicoScope4000GetBlock.vi it wont be recognized. So I had to divide the icoScope4000GetBlock.vi into a an InitBlock.vi containing the ps4000RunBlock function and a ReadBlock.vi containing all the rest of the original GetBlock.vi. Sending now the start command between this two vi's the 4224 recognize the tiggerpulse, BUT only if the timebase is set to less than 150. Neither increasing the triggerpulse length didn't help nor calling the ps4000SetSimpleTrigger function after the ps4000RunBlock, which doesn't work at all.

To cut a long story short: What can I do to get 4224 triggered independent of the timebase setting?

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

Re: When is trigger armed?

Post by Martyn »

The process for capturing data in block mode is

1.SetChannel
2.SetTrigger (if required)
3.RunBlock
4.IsReady
5.SetDataBuffer
6.GetValues

the RS232 trigger command will need to be issued between 3 and 4 which is what you have done by splitting the vi.

This process should work with any timebase so I believe your outstanding issue must be related to the setting of the trigger. What is the nature of your trigger pulse and what values are you using to set the scope trigger.

If possible post your vi so we can take a look.
Martyn
Technical Support Manager

Peter Nyffeler
Newbie
Posts: 0
Joined: Fri Nov 30, 2012 3:53 pm

Re: When is trigger armed?

Post by Peter Nyffeler »

Hi Martyn,
Thank you for your answer. The suggested sequence is exactly what I did without success.
As soon as the timebase value is longer than 7us the 1ms triggerpulse will not be recognized.
What could I have made wrong?

In the attachment you find my Labview program (BLP_Basics.vi) and the Arduino program to generate the triggerpulse.

The BLP is an apparatus to measure chemical kinetic reaction activated by a flash. We want to build 5 of them for our students.

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

Re: When is trigger armed?

Post by Martyn »

I can't see an attachment, which I will need so that I can comment on the trigger setup.
Martyn
Technical Support Manager

Peter Nyffeler
Newbie
Posts: 0
Joined: Fri Nov 30, 2012 3:53 pm

Re: When is trigger armed?

Post by Peter Nyffeler »

Sorry, I didn't notice that the my zip file containing the SDK was to large.
Attachments
BLP_Basics.zip
(84.07 KiB) Downloaded 380 times

Peter Nyffeler
Newbie
Posts: 0
Joined: Fri Nov 30, 2012 3:53 pm

Re: When is trigger armed?

Post by Peter Nyffeler »

Yep! I found the reason for my problem.
After calling the RunBlock function you have to wait for at least for "sampling-timeintervall times pretrigger-samples" before the trigger event may occur.

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

Re: When is trigger armed?

Post by Martyn »

Good to hear that you have sorted it out. That was one of the things I was going to check through in your code but I have been offline for a couple of days.
Martyn
Technical Support Manager

Post Reply