Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQ M-seried 6230 Analog Output, AI_FIFO, AI_FIFO always returns 0x07FF , please help

Hello

I have a couple of questions on DAQ-6230 converstion timing.

We have measured the conversion for AI and AO and seems like on average it is taking 20 mili seconds for converstion. We need to get this down below 1 Mili seconds. How do I cut down on the conversion timing with the hmddk driver code.

Here is some questions:

1- Can I use eeprom calibration data from one board for other identical boards? we have multiple board in the system. Or do I need to read the eeprom for calibration data every time. Can I read it only once?

2- There are a lot of function calls in ai and ao. Do I need to call all of these functions every time I do a conversion or can I call some of them only once during initialization? As an example, aiEnvironmentalize, aiPersonalize ???

3- What is your idea or recommendation on execution time of the hmddk code? Any idea to make things run faster for conversion? Any feed back or suggestion would be appreciated.

Thanks

Lee Khadivi

Curtiss Wright

0 Kudos
Message 21 of 30
(7,455 Views)

To answer your questions:

1) Each board has unique calibration coefficients stored in the EEPROM to accomodate for slight variances in the individual components used.  As a result, you will want to read the EEPROM of each board to get maximum accuracy.  However, you do only need to read the calibration information from each device once because that information does not change (unless you calibrate the board).

2) You only need to configure and start the acquisition once.  Once the operation is underway, you can just read data from the FIFO.  The mechanism for doing so is different depending upon whether you are performing a software timed acquisition or a hardware timed acquisition.  aiex1 illustrates how to perform a software timed operation where each scan is started by a software command (aiStartOnDemand), while aiex2 illustrates how to perform a hardware timed acquisition.  In both examples, notice that all initialization is done up front with any reading performed in a tight loop. 

3) Make sure you are not reconfiguring each time to read data (as described in #2 above).  This will certainly slow down your loop rates.  Once you are only reading in a loop. you can specify a convert clock rate (and scan clock rate if you are performing hardware timed acquisition).  Notice aiConvert passes two parameters specifying the convert rate and delay.  For the 6230, the minimum convert period divisor is 80 and the minimum convert delay divisor is 3.  Lowering these numbers reduces the amount of time available for the analog circuitry to settle but does allow for faster convert rates.

How fast are you wanting to acquire data?  Are you performing software or hardware timed operations?  How many channels are you acquiring from?  I hope these explanations help.

0 Kudos
Message 22 of 30
(7,444 Views)

Hi Jeremy

I will try your suggestions

By the way, is there really 8 channels or 4 channels on the 6230 board. The document says 8 channels but seems like 8 channels are available only under certain conditions?

Thanks

Lee

Here is answer to your question:

How fast are you wanting to acquire data? 

about 5 MicroSecond per conversion

Are you performing software or hardware timed operations? 

Software and using On Demand aquisition

How many channels are you acquiring from? 

4 Channels

 

0 Kudos
Message 23 of 30
(7,440 Views)
There are 8 singled ended channels or 4 differential channels.  The 6230 has a max conversion rate of 250kS/s, so theoretically you should be able to achieve your 5micro second conversion, meaning a scan of 4 channels will take approx 20 microseconds.  Now, if you are doing on demand (software timed) single point, you are not going to be able to initiate a new scan every 20 microseconds.  In fact, your "scan rate" with a software timed acquisition will be in the milliseconds rather than microseconds, since you have to wait for each software command to execute before the scan begins.  If you need a scan rate in the microseconds, you should look at performing a hardware timed acquisition.  I hope this helps.
0 Kudos
Message 24 of 30
(7,432 Views)
Hi Diego,

thanks for the information about the inverted AI_CONVERT_Output_Select. That got my 6229 working in AI-mode.

However, I still have problems with AI in DMA mode (Linux 2.6.18). With example aiex3 I get erratic readings. With the version from the HDDK-website (with the modifications that you suggested) I get readings increasing from 2.458187 to 2.473105 during the 100000 samples. In the same setup aiex1 yields 3.499226, which is the voltage I apply to the input (3.5 V from the same board's AO).

The values read by aiex3 depend on the number of channels. Reading 3 or 8 channels gives particularly poor results. Since this looks like an error in the memory mapping, I tried to apply the off-by-one-modifications suggested by MathiasB
with no improvement.

Any idea?

Urs

BTW: In order to compile the driver, I had to delete VM_SHM in line 407 of nirlpk.c, because VM_SHM is not defined anymore in the kernel sources.
0 Kudos
Message 25 of 30
(7,401 Views)
Hello
 
I would like to know if the scaling coefficient for 6230 boards are the same for all boards or are different.
This is important for us since we want to run the software as fast as possible and would like to call the
 

aoLinearScaler

and

aiLinearScaler

only once for all boards if the scaling is the same for all boards.

I do understand that the calibration data is different for each board but what about the scaling coefficient?

Thanks very much for a quick response as I am waiting for this answer to release the software.

Regards

Lee Khadivi

Curtiss Wright

0 Kudos
Message 26 of 30
(7,374 Views)

Lee,

If you look at the scaling functions, you'll notice that the calibration information is used when scaling the data.  So, the answer to your question is the scaling coefficients are different for each board.  I hope this helps.

0 Kudos
Message 27 of 30
(7,354 Views)

Urs,

We will look into the DMA behavior and let you know what we find out.

0 Kudos
Message 28 of 30
(7,355 Views)
To Whom it may concern,

I am trying to write drivers for the NI-6509 using Ardence RTX for Windows. And I have thoroughly examined all Hardware DDK examples available.
I am having issues selecting the direction of a single or multiple ports on the 6509.  When I produce an output on an output configured port ,i see an interupt and data.
But when I input data (on an input cofigured port) after setting up the registers on the board as seen below I get in interupt but no data. My observations as far as the hardware
goes are that I expect to see a small current being drawn from my power supply when I apply 5VDC on a given (input configured) port as seen
when using NI Labview Drivers, but it seems that all ports are continually in an output/low impendence state when I am running my code.
I am clueless as to why I'm only able to cofigure the 6509 board for outputs even when the IOSelect Registers contain the appropriate data as seen below.
what am I doing wrong ?



Board= 1
 ID= 9 Status= 0 Revision= 3102716 TimerExpire= 0 MasterInterruptControl= 1f FilterInterval= 8f8 RTSIInput= 0 RTSIEdgeDetected= 0 RTSIWatchdog= 0 RTSITrigger= 0 ClockSelection= 2 TimeoutEnable= 0 RTSIConfiguration= 0 TimeoutInterval= 0
0 Data= 0 IOSelect= 0 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
1 Data= e0 IOSelect= 1 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
2 Data= 0 IOSelect= 0 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
3 Data= 0 IOSelect= 0 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
4 Data= 0 IOSelect= 0 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
5 Data= 0 IOSelect= 0 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
6 Data= 0 IOSelect= 0 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
7 Data= 0 IOSelect= 0 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
8 Data= 0 IOSelect= 1 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
9 Data= 0 IOSelect= 0 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
a Data= 0 IOSelect= 0 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0
b Data= 0 IOSelect= 0 RisingEdgeEnable= ff FallingEdgeEnable= ff FilterEnable= ff HighImpedance= 0 WatchDogEnable= 0 TimerHighLow= 0 RTSIEnable= 0

0 Kudos
Message 29 of 30
(6,525 Views)

Hi Julian-

It's not clear from the prints you posted which values you are actually writing to the board and at which register offsets.  Are you using the MHDDK ChipObjects and/or examples?  Can you please start a new thread in the DDK Forum and post some of the code which shows board configuration and register writes/reads?

Thanks-

Tom W
National Instruments
0 Kudos
Message 30 of 30
(6,508 Views)