Jump to content
  • 0

DT9837A c++ example visual studio 2022


Agostino

Question

6 answers to this question

Recommended Posts

  • 0
On 1/31/2024 at 9:18 PM, JRys said:

Please install the required software from the Omni CD. Then look for the C examples in C:\Program Files (x86)\Data Translation\Win32\SDK\Examples\. 

I have campiled examples and I can show a trigger signal. But I can't find any example for Tachometer input. Tachometer example is inside the SDK?

image.thumb.png.4d6c89b8044c484d39147600578e60d9.png

Edited by Agostino
Link to comment
Share on other sites

  • 0

The DT9837A tach input channel is input channel 4, whereas the four IEPE channels are 1 -3. I've modified the ContAdc example to read channel = 4. It bypasses the code that scales the measurement to volts and instead scales it to frequency. This is accomplished by taking the inverse of the reading multiplied by 83ns - 1 / (tachValue * 0.000000083). I have attached the code file for you to review.

 

 

CONTADC.C

Link to comment
Share on other sites

  • 0
On 2/2/2024 at 7:05 PM, JRys said:

The DT9837A tach input channel is input channel 4, whereas the four IEPE channels are 1 -3. I've modified the ContAdc example to read channel = 4. It bypasses the code that scales the measurement to volts and instead scales it to frequency. This is accomplished by taking the inverse of the reading multiplied by 83ns - 1 / (tachValue * 0.000000083). I have attached the code file for you to review.

 

 

CONTADC.C 11.7 kB · 2 downloads

Thank you!

Just a question. I had put a condition on freq value otherwise the "visible" value is 0.006 Hz. Why the get buffer returns so many time this value?

 

image.png.f62a6214de45da5494bb1aaf75cda67e.png

 

image.png.2bf6003a6d39eba0ef67850d601988bf.png

Link to comment
Share on other sites

  • 0

The ContADC example sets the sample rate to 1000 samples per second - One sample per millisecond. Your signal is only 29.5 Hz or 0.0339 seconds. Therefore, there will be (0.0339 / 0.001) 33-34 repeated values for every cycle of your signal. 

 

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