Hello ,
I was directed to the same websites by the Application
Engineer earlier too.
I have been using the C++ code. The code is highly complex
and without any comments. Its very difficult to reverse
engineer it. Its a practice that code is written by refering
the manual , instead of understanding the working from code.
Its unbelivable that NI is selling this product without proper
docuemntation.
Anyways, My problem right now is :
Info
1. Using a x86 SBC based PC with ThreadX as operating system
2. I want to use Port1 and Port2 as DI. Able to read from Port1 and Port2 by following the program.
3. Channel 0 and Channel 1 as On Demand AI (RSE) for sensing 2 different parameters
in the range of 0V to 10V.
4. Want to read a single sample from both the channels.
5. Unable to read from Channel 0 and Channel 1 correctly yet.
Questions:
1. I am using aiex1.c program to acquire Analog signal .
- numberOfChannels = 2 and numberOfSamples = 1
- not using adcReset(board)
- aiPersonalize (board, tMSeries::tAI_Output_Control::kAI_CONVERT_Output_SelectActive_High);
- aiConfigureChannel (board,
Channel number 0 and 1 one after the other
0 gain
tMSeries::tAI_Config_FIFO_Data::kAI_Config_PolarityBipolar,
tMSeries::tAI_Config_FIFO_Data::kAI_Config_Channel_TypeRSE,
Channel 1 is last channel )
- As Is aiConvert (board,
280, // convert period divisor
280, // convert delay divisor
kFalse);
Any idea if i am not conguring or missing something ???
As the acquired value i read is incorrect
2. Suppose i configure Channel 0 and Channel 1, And want to acquire only from
Channel 0 , What to do for it ?
3. If acquisations happens from both the Channels , How do i know which data is acquired
from the Channel 0 and Channel 1 in the FIFO ?
4. Is there a method to read data directly from ADC instead of reading it from FIFO ?
5. If there is input signal at Port0 (configured as DI), Can a interrupt be triggered ?
6. How to make AI interrput based ?
Thanks,
Irfan