| View previous topic :: View next topic |
| Author |
Message |
sinantasdoken
Joined: 31 Oct 2010 Posts: 4
|
Posted: Sun Oct 31, 2010 7:04 pm Post subject: DR Data Acquisition |
|
|
Hi there,
I need an acquisition program that sequentially samples a switched input,i.e. I have a switch that changes the source signal at the input of the DR card. After each switching state I need to acquire N samples. I have several questions about this:
1) I don't want to restart the stream at each switching instant so is it ok if i simply use module.trigger calls prior to and after i receive N samples from the input,
2) If I simply call return at the the data available handle before calling the
->recv method, is the packet totally ignored or do i need to call the ->recv method and store it in a buffer before return to get rid of the samples I'm not interested in?
Simply put it this way. Say I have a timer and want to read N samples from the DR card at the timer instant and throwing away others without restarting the stream. What is the best way to do so?
Best regards,
Sinan, |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 2250 Location: So. Cal. USA
|
Posted: Mon Nov 01, 2010 9:19 am Post subject: |
|
|
The best way to accomplish this is to use Framed-mode triggering. In this mode, each trigger event will acquire a pre-specified number of samples, then acquisition will be suspended until the next trigger.
Streaming is enabled throughout this process, but data notifications occur only on packet boundaries. So, if you set the packet size equal to the frame size, you're notified each time a triggered frame has been acquired. |
|
| Back to top |
|
 |
sinantasdoken
Joined: 31 Oct 2010 Posts: 4
|
Posted: Mon Nov 01, 2010 12:18 pm Post subject: |
|
|
| Thanks for the quick reply. |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 2250 Location: So. Cal. USA
|
Posted: Mon Nov 01, 2010 1:03 pm Post subject: |
|
|
| Issue closed. |
|
| Back to top |
|
 |
|