Test and Measurement Forum

When is trigger armed?

Post general discussions on using our drivers to write your own software here

When is trigger armed?

Postby Peter Nyffeler » Fri Nov 30, 2012 4:46 pm

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?
Peter Nyffeler
Newbie
 
Posts: 0
Joined: Fri Nov 30, 2012 3:53 pm

Re: When is trigger armed?

Postby Martyn » Mon Dec 03, 2012 1:32 pm

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2287
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: When is trigger armed?

Postby Peter Nyffeler » Thu Dec 06, 2012 2:10 pm

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.
Peter Nyffeler
Newbie
 
Posts: 0
Joined: Fri Nov 30, 2012 3:53 pm

Re: When is trigger armed?

Postby Martyn » Thu Dec 06, 2012 2:39 pm

I can't see an attachment, which I will need so that I can comment on the trigger setup.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2287
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: When is trigger armed?

Postby Peter Nyffeler » Fri Dec 07, 2012 8:58 am

Sorry, I didn't notice that the my zip file containing the SDK was to large.
Attachments
BLP_Basics.zip
(84.07 KiB) Downloaded 84 times
Peter Nyffeler
Newbie
 
Posts: 0
Joined: Fri Nov 30, 2012 3:53 pm

Re: When is trigger armed?

Postby Peter Nyffeler » Mon Dec 10, 2012 3:48 pm

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.
Peter Nyffeler
Newbie
 
Posts: 0
Joined: Fri Nov 30, 2012 3:53 pm

Re: When is trigger armed?

Postby Martyn » Wed Dec 12, 2012 7:04 am

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2287
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 1 guest