Jump to content
  • 0

Data aquisition with DT9836 and 1808X


Matt80

Question

Hi,

in the digilent shop, the 1808X is recommended as successor of the DT9836. DT9836 provides the option to define individual software buffers to write in and read them out by event-handling (buffer_done_event). What possibilities are there with the 1808X to combine e.g. counter and encoder values with analog input values and read them out simultaneously and seamless, as it appears, there is no buffer-solution anymore.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @Matt80.

For the USB-1808X, use the DAQ Input functions to simultaneously capture capture combined data from different subsystems.  Also, for MCC USB devices like the USB-1808X, only one large buffer is used.  The code ping pongs between the lower half and upper half of the buffer.  Take a look at the attached VB.NET and C#.NET examples.  The attached examples demonstrate how to read a buffer that is being filled continuously with live data.

The functionality is as follows, the acquisition puts data into a continuously looping buffer and the program retrieves it one half buffer at a time. The continuous mode is set using the Scan Options enumeration Background and Continuous. Data is collected by ping-pongs between the lower half then the upper, looping fast enough to keep up. Care should be taken that data doesn't come in so fast that the program fails to keep up. When this happens a buffer overrun occurs which is the condition where unread data gets overwritten. 

Universal Library for Windows Help 

image.png

 

Regards,

Fausto

AinScanBackgroundContinuousScan.zip

VBNET_2013_Cont_Background_Scaled_Data.zip

Link to comment
Share on other sites

  • 0

The recommended C# Example helps a lot. Thanks.

But we also need to gather encoder values simultaneously with the data.

The measurement card will be placed in a measuring vehicle. A distance pulse counter will be connected to the encoder input. The distance pulse counter is calibrated, so we know the ticks per millimeter.

For every collected value of the analog input signal we need to know the exact encoder value (that means the driven distance of the vehicle).

In the previous measurement card DT9836 these encoder values were comfortably accessible with the data in the buffer when the "buffer done" event occurs.

What would be the recommended way to achieve this?

 

I found in the example CInScan03 an example for how to read out the encoder for the CTRQUAD.

Is this the only way to do it: read out alternatively the analog input values (for example 50 values) and then the encoder values (also 50 values)?

 

 

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