Driver Development Kit (DDK) Programmers

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous acquisitions with PCI 6025E card and QNX

Hello,

as I said in an other post I am trying to develop a driver to read data from the 6025E PCI's card on a QNX machine. The final goal is to include the code in a Matlab S-function so that I could use it in a simulink model and acquire the data while running it. I think I have succesfully read some of the card channels, however I can not find any example which acquires the data the way that I want and I wonder if it is even possible. What I want is to do a "continuous acquisition", in other words, I want to configure the card (channels, gains, polarities, etc..) and then start the acquisition without it ever ending until I specifically order that. The code I have been testing is based on the examples and always has a finite number of samples pre-defined before the acquisition is started so that the acquisition stops once the number of "scans" is reached... I would like for the card to go on scanning forever until I execute some specific function to tell it to stop, even if the acquisition fifo is full and that means loosing some data.

Does anybody know if this is even possible to do?? should I just performe finite scans and then re-start them when they finish?

Thanks a lot!

0 Kudos
Message 1 of 3
(12,371 Views)

HI people,

I solved my problem. I found out that there is a bit called "AI_Continuous" in the AI_Mode_1_Register (see http://www.ni.com/pdf/manuals/340934b.pdf page 2-49) which allows the STC to ignore the Scan Count signal.

I am having another issue however at the moment, I don't know why but I am getting the exact same results either with the unipolar mode or the bipolar mode. I am inputing a bipolar sin signal, so I expected to see positive and negative numbers when using the bipolar mode and only see positive ones when using unipolar (with the negative parts chopped off). However I am getting positive and negative numbers with either of them. I have been playing around with the data types and casts and I don't think that is the problem.... Correct me if I am wrong but all that should change from one method to the other is:

if (Polarity == 0) {

            board->ConfigFifoLow.setPolarity(board->ConfigFifoLow.kPolarityBipolar);

        } else {

            board->ConfigFifoLow.setPolarity(board->ConfigFifoLow.kPolarityUnipolar);

        }

According to http://www.ni.com/pdf/manuals/341079b.pdf page 3-18 the board->AIFifoData.readRegister() function should return the data in a signed short int (16 bits) right?

0 Kudos
Message 2 of 3
(6,812 Views)

Viterbi wrote:

I am having another issue however at the moment, I don't know why but I am getting the exact same results either with the unipolar mode or the bipolar mode. I am inputing a bipolar sin signal, so I expected to see positive and negative numbers when using the bipolar mode and only see positive ones when using unipolar (with the negative parts chopped off). However I am getting positive and negative numbers with either of them.

The 6025 does not support unipolar mode [1]. Each DAQ device has different abilities, and so the DAQ-STC ASIC was designed to interface to many different kinds ADCs and DACs. The resulting register set must accommodate the union of all the abilities for the different DAQ devices, but if a particular device is not capable of certain operations, it ignores the register fields with those extra settings.

[1] NI 6023E/6024E/6025E Family Specifications

http://www.ni.com/pdf/manuals/370719c.pdf

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 3 of 3
(6,812 Views)