Test and Measurement Forum

BM_STREAM and trigger

Post any questions you may have about our current range of USB data loggers

BM_STREAM and trigger

Postby fred » Mon Dec 04, 2017 2:19 pm

Is it possible to use a trigger in combination with BM_STREAM ?
I tried it an pl1000Ready returns immediately ready = true

It works with BM_SINGLE, so a workaround would be to use first BM_SINGLE and wait for the trigger and then continue with BM_STREAM
fred
Newbie
 
Posts: 0
Joined: Mon Nov 20, 2017 2:45 pm

Re: BM_STREAM and trigger

Postby Hitesh » Wed Dec 06, 2017 12:03 pm

Hi fred,

What trigger settings are you using?

It might be useful to see your code to see how the API calls are made.

Thanks,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2748
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: BM_STREAM and trigger

Postby fred » Wed Dec 06, 2017 12:54 pm

Hallo,

Take pl1000Con.c from the sdk examples.

In function collect_block_triggered just replace BM_SINGLE by BM_STREAM.

With BM_SINGLE, pl1000Ready keeps return false until voltage > 1.
With BM_STREAM, it returns after some loops true.
fred
Newbie
 
Posts: 0
Joined: Mon Nov 20, 2017 2:45 pm

Re: BM_STREAM and trigger

Postby Hitesh » Thu Dec 07, 2017 2:36 pm

Hi fred,

In streaming mode, the data will begin to collect data immediately which is why the call to pl1000Ready() will indicate that data is available after a short while.

You will need to monitor the triggerIndex parameter from the call to pl1000GetValues() as you collect data. When the value is not 0xFFFFFFFF, this will indicate that there is a valid trigger index.

Hope this helps,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2748
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: BM_STREAM and trigger

Postby fred » Fri Dec 08, 2017 1:27 pm

Indeed, it works.

It would be a good idea to add a collect_streaming_triggered function in the SDK example

Thanks for the help
fred
Newbie
 
Posts: 0
Joined: Mon Nov 20, 2017 2:45 pm

Re: BM_STREAM and trigger

Postby Hitesh » Tue Dec 12, 2017 9:42 am

Hi Fred,

Good to hear it is working.

I have added the request to our list of SDK tasks :)

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2748
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to USB PC Data Loggers

Who is online

Users browsing this forum: No registered users and 0 guests