Jump to content
  • 0

A Question About USB-1608GX


Hiromi Shio

Question

I'm experimenting with the USB-1608GX.
I have a question for data acqusition by using an external trigger.
I want to get data by receiving a trigger every 0.05sec.
Acquired data is as follows.
- 5ch analog data
- 100kHz-1000samples for each channel

When I implemented it, it was acquired at an interval of about 0.5 sec.
The trigger seems fine, but is there a problem with the code?
Or are there any device restrictions?

(I use Windows / C++ language)

sample.cpp

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

your source looks good to me.

Though I would make the following changes:

long Options = BACKGROUND + CONTINUOUS + RETRIGMODE + EXTTRIGGER;

Add BURSTMODE.   Scans from LowChan to HighChan are clocked at the maximum A/D rate in order to minimize channel to channel skew. Scans are initiated at the rate specified by the Rate argument. So you get the same amount of data in less time.

long Options = BACKGROUND + CONTINUOUS + RETRIGMODE + EXTTRIGGER + BURSTMODE;

Also, 

Sleep(100);  //means you are looking for a trigger event 10 times per second, but you are expecting new data (retrigger) at 20 times per second, so this is too long a delay.

I would set it to:

Sleep(25);  every 25 mS, so you won't miss a trigger.

Link to comment
Share on other sites

  • 0

Thank you for your response.

I change to 
>long Options = BACKGROUND + CONTINUOUS + RETRIGMODE + EXTTRIGGER + BURSTMODE; 

>Sleep(100);  //means you are looking for a trigger event 10 times per second, but you are expecting new data (retrigger) at 20 times per second, so this is too long a delay.
I used "Sleep(100)" to get started.
I used "Sleep(1)" in the loop.

I tried, but still no change.

But, when I tried changing the number of data from 1000 to 50, I was able to get it every 50mS.
 Can I do what I want with a higher performance model? For example, a model with faster sampling rate...

Edited by Hiromi Shio
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...