BM_STREAM and trigger

Post any questions you may have about our current range of USB data loggers
Post Reply
fred
Newbie
Posts: 0
Joined: Mon Nov 20, 2017 2:45 pm

BM_STREAM and trigger

Post by 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

Hitesh
Site Admin
Site Admin
Posts: 2810
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: BM_STREAM and trigger

Post by 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

fred
Newbie
Posts: 0
Joined: Mon Nov 20, 2017 2:45 pm

Re: BM_STREAM and trigger

Post by 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.

Hitesh
Site Admin
Site Admin
Posts: 2810
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: BM_STREAM and trigger

Post by 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

fred
Newbie
Posts: 0
Joined: Mon Nov 20, 2017 2:45 pm

Re: BM_STREAM and trigger

Post by 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

Hitesh
Site Admin
Site Admin
Posts: 2810
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: BM_STREAM and trigger

Post by 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

Post Reply