11-17-2008 04:29 AM
I am using M Series 6221 DAQ and unable to find the Register Level Programmer Manual for it. The E series manual is quite a detailed one (http://www.ni.com/pdf/manuals/341079b.pdf) , Can you please point me to a similar document for M series ..
11-18-2008 12:53 AM
Sir,
Sorry but we do not have any manual for the M series register based programming as of yet.
Anuj Bhansali
AE
NI INDIA
11-18-2008 01:18 AM
Hi Anuj ,
I am developing a device driver for nonstandard OS (Real Time Operating System) for PCI 6221 Card,
So the kind of document i am seeking is very much required .
Atleast can you point me to the details of Programming PCI Bus .. viz configuring the Command and Status Registers ..
Thanks,
Irfan
11-18-2008 09:23 PM
11-22-2008 08:15 AM
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
11-24-2008 11:48 AM
Hi Irfan-
1. Can you please describe how the values you read are incorrect? What values do you read? Are they at all close to the value you expect, or are they completely wrong? How do you have your signals connected to the hardware (which pins)? All of your configuration seems correct.
2. There is no way to selectively remove channels from the scanlist. You must either read from all channels and then disregard the unwanted readings, or call aiClearConfigurationMemory() and reprogram the scanlist with aiConfigureChannel().
3. The FIFO data will always be in the order in which the channels were added to the scanlist (that is, the order in which the channels were programming with aiConfigureChannel()).
4. No, there is no way to read data directly from the ADC. Internal signals (aiConvert) are used to control the operation of the AI channel multiplexor and to clock the ADC conversion. The data must be retrieved from the FIFO, or through DMA (as shown in other examples in the MHDDK).
5. No, there is no way to generate interrupts based on the inputs to port0. You could use one of the general-purpose counters on the device to create interrupts based on gate or terminal count conditions, but this would require you to use some of the PFI lines (aka port1 or port2).
6. The easiest way to enable interrupt generation for an AI process would be to use one of the interrupts for AI timing signals (for example AI_Start aka aiSampleClock). You would need to enable its group (
writeInterrupt_Group_A_Enable() ) and then the specific interrupt ( writeAI_START_Interrupt_Enable() ) and then observe/acknowledge any interrupts in your ISR ( readAI_START_St() to make sure the AI_Start occurred, then writeAI_START_Interrupt_Ack() )
Hopefully this helps-