From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set received time of A/D (AT-MIO-16E-1) that synchronize with interrupt time(0.5 msec)

I want to use A/D to received one data every 0.5 msec (interrupt time set by timer/counter). My program can received it but look like it doesn't correct. So if you don't mind ,can you please give me an advice (or if possible, please send me this A/D setting program in C lang.)

Thank you for your advice
0 Kudos
Message 1 of 3
(3,862 Views)
Hello,

From what I understand you are trying to setup an analog input acquisition using an external scan clock. Then use a counter to produce the external scan clock.

Here are two examples written in C. One sets up an E-series DAQ board to recieve an external scan clock on PFI7 and the other sets up Counter 0 to output a pulse train.
You would just need to mesh these two examples together and wire the OUT pin of counter 0 to PFI7 (SCAN_START pin).


If you are using Counter 0 you could also change the Select Signal call in the AI external scan clock example to ---Select_Signal(iDevice, ND_IN_SCAN_START, ND_GPCTR0_OUTPUT, ND_LOW_TO_HIGH);---, which would elminate the need for external wiring and would wire the OUT of counter 0 to the scan clock.

The
following examples ship with NI-DAQ and can be found by installing support for Visual C or LabWindows/CVI.
Download All
0 Kudos
Message 2 of 3
(3,862 Views)
How would I do it if I were to use digital input as the source for my input instead of analog input? The SCAN_XXX functions only seem to support analog inputs. How do I get around this?

Thanks.
0 Kudos
Message 3 of 3
(3,862 Views)