12-21-2009 03:19 AM
Hello,
I'm developing software for NI 6110 with DDK and QNX Momentics 6.4.1.
I tried Example 2 (aiex2.cpp) but it didn't stop the Acquisition after 5 Scans, and the Sample Interval
isn't 1 ms (Fifo filled after 1us -> Fifo Size is 8192).
Does the example code work like it should? Has it already been tested?
I got this card as a loan to test it for our requirements.
Therefore I hope to get response soon before I have to return it.
Thank you,
Best Regards,
Martin
12-21-2009 02:25 PM
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)
12-22-2009 09:37 AM
Hi Joe,
thank you for your instant reply. I have to return the card 30th December. But I try to the get the card a bit longer.
I used the standard makefile of QNX Momentics and defined in ositypes.h: kLittleEndian as default (x86) and kGNU =1 to get it compiled.
I didn't change the example code at first.
The example finishes without exceptions . But after the acquisition (5 values) is finished, uStatus is 0x64a2 (fifo full) and not 0x10a2 (empty).
Moreover samples are not added every 1 ms (but much faster-> after AI_Start_The_Acquisition I call Status twice in a short time: 0x10a2->0x64a2!!).
Maybe there is something wrong with the Convert_Signal (AI_SI2_Load_A.writeRegister(1)).
Therefore I won't get the right timing properties to achieve my requirements.
My Requirements:
I just want to record analog inputs ( 2 Channels, 2MHz sample rate per channel, finite acquisition (at first)) and to read from the card very fast-> DMA.
Is it possible to manage DMA by using tDMAChannel and tDMABuffer because there is already allocDMA() and initMITE(bus) implemented?
Which methods do I need?
Thank you for your efforts,
Best Regards,
Martin01-07-2010 04:24 PM
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)
01-10-2010 08:48 AM
Hi Joe,
I hope you had a pleasant new year so far as well.
The loan has been extended. So I would appreciate your support.
I tried a lot, but didn't find a solution yet.
I checked the register values, changed the ConvertSignal to get values at a certain rate.
The aim is still the same:
A stable record with qnx 6.4.1 with no buffer overflow and dma.
Is it possible for you to test the card with qnx 6.4.1?
I hope you continue helping me to configure my setup.
Best regards,
Martin
01-11-2010 09:34 AM
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)
01-12-2010 10:20 AM
Hi Joe,
This sounds great.
Would you please try Example 2 (aiex2.cpp) and read uStatus after all 5 values are read (board->AIFifoData.readRegister()). What Status do you get: 0x10a2 or 0x64a2? What status do you receive 2ms later( usleep(2000);)?
Could you please give me a hint how I can use dma. Do I have to use allocDMA or should I use the dma objects like in the m series examples(tDMAChannel,tLinearBuffer,.....)?
Best Regards,
Martin
01-14-2010 04:58 PM
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)
01-15-2010 10:33 AM
patch -Np1 ./aiex2.cpp ./add-time-measurements.patch
Anyway, I've been able to confirm that the timing engine on the STC is not correctly driving the 6110's ADCs. The operation indeed finishes too quickly: see the output from the modfied example below. At this point, there are a two things we can do: continue troubleshooting this example to get it working and move forward from there, or discuss your application needs and try to solve the problem more directly.
I think the second option would be better since you also want DMA incorporated into your program. So, I know you want 2 channels sampled at 2 MHz, starting with finite acquisitions. Does this mean you want some kind of retriggerable operation or a continuous read later? What are you trying to do with the 6110?
I should also note now that this board was the first S Series board, so it is quite old, and has been with NI longer than me 😉 I'm not as familiar with the 6110 as I am with M Series (or TIO Series) devices, so I will be asking colleagues for their experience as we go deeper into the application. I want to be able to explain to you how to modify the examples or provide specific register information and programming logic so that you can make the changes that you need.
$ ./aiex2
loop: 0 has status 10a0
loop: 1 has status 00a2
loop: 2 has status 00a2
loop: 3 has status 00a2
loop: 4 has status 00a2
loop: 5 has status 00a2
loop: 6 has status 00a2
loop: 7 has status 64a2
start: 76506 s, 751025868 ns
end: 76506 s, 751037194 ns
span: 0 s, 11326 ns (0.000011 s)
Value 0 equals 65
Value 1 equals 1005
Value 2 equals 65
Value 3 equals 1005
Value 4 equals 65
Value 5 equals 1005
Value 6 equals 65
Value 7 equals 1005
Value 8 equals 65
Value 9 equals 1005
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)
01-15-2010 11:44 AM
Hi Joe,
thank you very much for your effort.
Glad to hear I'm not stupid and the behaviour of your card is the same as mine.
I think a retriggerable operation could be the answer.
2MHz Data Acquisition and Processing for a realtime application is the main aim.
Could we just start to get DMA working because this will be the bottleneck for our purpose.
Polled read like in example 2 lacks performance.
Do you know another (newer) board which is capable of 2 MHz Data Acquisition and QNX Support?
Maybe with a fpga unit for data processing?
Best Regards,
Martin