X Series DDK: Configure Interrupt on DMA Channel's total transfer count

Hello,
In the DAQ-STC3 X Series DDK Reference Manual, Chapter 1: Theroy of Operation, Section Interrupts, Subsection Special Considerations: Maximizing Throughput in Low-Latency Situations (p41), it is said:
"for X Series devices, the CHInCh can interrupt on the DMA channel’s total transfer count, which occurs once the data has been completely transferred to the host memory. The order of programming for this situation (and output operations) is as follows:
1. Program the DMA channel’s Total_Transfer_Count_Compare_Register (CHTTCCR) with the number of Bytes in a single input/output sample.
2. Set the DMA channel’s Notify on Total Count flag in the CHCR.
3. Set the DMA channel’s Arm Total Count Interrupt flag in the CHOR.
4. Start data transfer (through the DMA controller and the subsystem’s Stream Circuit).
5. Receive total transfer count interrupt.
6. Increase the CHTTCCR by the number of Bytes in a single input/output sample.
7. Re-arm the total transfer count interrupt in the CHOR.
Using the X Series DDK, I don't manage to perform such a configuration.
Can you please provide me code sample to do so ?
Thanks in advance for your support.
Sincerely
Bertrand

Hello Steve,
Weeks ago, we developed a Linux application that configure NI acquisition board (serie X) to send an interrupt when FIFO count reach a given number. At this stage we manage to prove that our board configuration was good and that the problem was due to INtime. TenAsys (INtime developers) fix this issue few weeks ago.
We just come back from holidays, apply the modifications created by TenAsys and manage to get interrupt inside INtime.
We still have two problems.
Reading DMA
===========
From the interrupt handler, when we access to the DMA to get samples stored in the FIFO, we manage to get the samples inside the first interrupt handler. With the following interrupts, when accessing DMA with the tCHInChDMAChannel structure, it said that there is no available bytes. But when we read the Channel_Total_Transfer_Count_Status_Register from the DMA channel, we see that we have the desired numbers of samples.
In the interrupt handler, during the interrupt aknowledgement, instead of only reading the Volatile_Interrupt_Status_Register to ackowledge the interrupt, if I increase the Channel_Total_Transfer_Count_Compare_Register_LSW by a given number (X) then I got X samples to read in the following interrupt. Problem with this solution is that the delay between two interrupts is not constant.
It seems that we mis-configured the DMA channel. But don't manage to find the error.
Two interrupts generated
====================
Moreover, we always get 2 FIFO_Count interrupts. Even configuring conversion, sampling and interrupt frequencies at very low value (conversion 1KHz, sampling 1Hz, interrupt generation: 1Hz). The delay between the two interrupts is about few nano seconds.
Source code
============
I attach to this post the source code we use to play/test this configuration. There is a Visual Studio workspace that we used to play with INtime and a CMake configuration file that we used to manage our Linux tests. You can find all the informations you need to build the binary in the README file.
Thanks in advance for your help with these issues.
Sincerely
Bertrand Cachet
Attachments:
IOMonitoring.zip ‏355 KB

Similar Messages

  • New M Series DDK Example: High Frequency Measurement with 2 Counters

    This example demonstrates how to configure two counters on an M Series device to measure a high digital frequency. One counter generates a continuous pulse train of a set frequency while the other counts the external signal using the pulse train to latch values. Data is transferred via DMA.
    Use this example to add high digital frequency measurements or DMA data transfer for counter input to your driver.
    Please let me know if you have questions or problems. Thanks :-)
    Joe Friedchicken
    NI VirtualBench Application Software
    Get with your fellow hardware users :: [ NI's VirtualBench User Group ]
    Get with your fellow OS users :: [ NI's Linux User Group ] [ NI's OS X User Group ]
    Get with your fellow developers :: [ NI's DAQmx Base User Group ] [ NI's DDK User Group ]
    Senior Software Engineer :: Multifunction Instruments Applications Group
    Software Engineer :: Measurements RLP Group (until Mar 2014)
    Applications Engineer :: High Speed Product Group (until Sep 2008)
    Attachments:
    gpctex5.cpp.gz ‏4 KB

    You should connect the signal (whose frequency needs to be measured) to Ctr-1, and there gonna be an internal connection between the output of the first counter and the gate of the second counter (as described here).
    You may want to check this link as well.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • How many DMA Channels does my device have?

    I would like to know how I can find out (progammatically) how many DMA channels my device has. I am using the DAQmx driver. Other than with the traditional DAQ I can't find out anything about my device but the "type" and the "serial number". Where can I get some more details about the device (not in the MAX - I want to know it in my program) with DAQmx?
    My intention is to find out how many DMA Channels the device has and depending on how many Channels I need - I am using "interrupts" instead of DMA.
    Somewhere in the KB of Ni was written that the NI-DAQ 6.9.... realizes automatically how many DMA Channels are available and how many I would need - and so he takes "interrupts" for the rest.
    It seems that they did a "step bac
    kwards" because with the NI-DAQ 7.2 it doesn't work automatically if I need DAQmx VI's.
    Does somebody know anything that would help me to solve this problem?
    Thanks.

    Sorry! I posted my first revision of the answer.
    Here is what I meant to say:
    Hello,
    According to this KnowledgeBase, DAQmx and Traditional DAQ behave the same. Are you seeing something different?
    As far as a workaround goes, all you have to do is trap the No DMA error. This error should be -200251. So in software, if you receive error -200251, then you need to configure the board to use interrupts, and then start the task again.
    How to configure the board for interrupts differs from the four different DAQmx API�s (C, C++, DotNET, and LabVIEW). If you are unclear about how to do this in your environment, please let us know, and we can find
    out.
    Best regards,
    Justin T.
    National Instruments

  • Dma channel problems

    Hello,
    I really need help on this one. Using PCI-6035E I am trying to output an analog signal (actually 2 waverforms interleaved together) on 2 channels while simultaneously using the two GPCTRs to measure two separate signals' pulse widths. The VI runs perfectly on some occasions, while on others I get "no DMA channel available for use". Whenever this message appears and I try to exit labview, the nipalk.sys driver messes up and I get a blue screen crash that says "process_has_locked_pages" (I traced the locked pages to this driver). I've tested this many times and it appears to me to be totally random. I've used the Set DAQ device information VI to set the two counters to use interrupts, but I need to use the one DMA channel for
    the analog output. My best guess is that there is some kind of resource conflict with something else in the PC, but I can't figure out how to change DMA assignments(I'm using Windows XP). The NI-DAQ Measurement and Automation Explorer tells me that the card is using DMA 0, IRQ 17. I've tried uninstalling all the NI-DAQ drivers, reinstalling and updating. Any help anybody could give me would be greatly appreciated.
    Thanks,
    Nick
    Attachments:
    aug7.vi ‏374 KB

    Hello;
    The PCI bus has 3 DMA channels that are share in between all devices that do DMA data transfers.There is nothing you can do to change that, since that is a PCI bus feature.
    The best way to go about that is to remove other devices that use DMA, such as network cards, for instance. That might free up more DMA access time for your DAQ device to execute its data trasnfers.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • X Series vs. M Series DDK

    In 2009 I completed a project involving the M Series DAQ board NI PCI-6251. I developed a kernel module for PureDarwin. I developed a user space measurement controller based on the MHDDK nimseries/nimhddk_other. Worth to mention is a very involved work on self callibrating the NI PCI-6251, and I posted some questions and results in this forum.
    Now I am going to start another project on FreeBSD. The kernel module is ready, and for prooving the concept, I testet the setup with an old NI PCI-6251, and everything is working so far. Anyway, I need to buy a new board for the new project, I am in doubt whether I should stay with the M Series technology or whether I should start the new project directly with a new X Series board.
    So my questions are:
    Is the X Series DDK quite similar to the M Series DDK...?
    ... could I use most of my old M Series code with X Series, perhaps with some tweaks,
    or would I need to start from scratch?
    What would be the major benefits of X Series over M Series?
    With  PCI-6251 I achieve in 2 AI channel multiplexing 500 kS/s. It would be good to achieve 1 MS/s for 2 AI channels.
    I would also love to have more flexibility of AO full scale, the PCI-6251 got 5 V and 10 V. For one mode of operation I would need 100 mV.
    Can I get this with a X Series board at more or less the same price tag as the PCI-6251 (let's say perhaps 50 % more)?
    Many thanks for any advises
    Best regards
    Rolf 
    Solved!
    Go to Solution.

    Hello Rolf,
    The X Series and M Series DDKs are alike in concept, but very different when it comes to details. There are many differences between the M Series register map and the X Series register map. These differences at the lowest level mean that pretty much all of the register logic that you implemented for M Series will need to be changed for X Series boards.
    You can find benefits and general information here:
    http://www.ni.com/xseries
    Here is a listing of X series devices as well as their capabilities.
    http://sine.ni.com/np/app/main/p/bot/no/ap/daq/lang/en/pg/1/sn/n21:41,n17:daq,n23:11502/sb/+nigenso7...
    I would also recommend contacting a technical sales representative with your specifications. They will be able to recommend the right board.
    I hope this helps,
    Steven T.

  • Number of DMA Channel on System

    I need to log 16 (my be 32 later) simultaneous channel at the same time.
    Is the limit of DMA chanels a windows system problem or just a card problem?
    I understand that there is a limited number depending on the operating system.
    So I cannot use 4 6601E cards (4 chanels each)at the same time on a PC.
    I am told my NI that I could us PXI rack with a number of 6115 cards and an embeded controller running Window but I can not see that this would resolve the DMA problem unless it was a modified window system.
    The other problem I see is that if Window 2000 or XP configers the cards to use he same chanel, Window will not let you change anything youself as all seeting are allway grayed out.
    Judging my the large number of post on DMA perha
    ps NI should write a white paper detaiing all the problems.
    Thanks in advance fr your help.
    Colin

    Hello Colin,
    Back with the ISA boards the limit of DMA channels was due to the computer itself. Now with PCI, DMA is handled by the PCI board itself. There has to be separate DMA controller hardware for each DMA channel. Our controller chip suppports up to 3 DMA channels. So I wouldn't say that this is a problem really. It's simply what the card offers, similar to the number of counters that is on the board.
    There are fewer DMA channels than counters because 1) more DMA controllers would be more expensive, 2) Most applications probably would not require DMA channels for every counter. Interrupts may be sufficient for slower acquisitions or the the counters may be used for pulse generation which also wouldn't require DMA.
    I guess I don't know enough abo
    ut your application to comment on the 6115 suggestion. The 6115 is an analog simultaneous sampling board, but they only have 2 counters each. Perhaps it was suggested that you acquire this data with analog sampling. The advantage to this is that you can use the same DMA channel for all analog channels being scanned which would probably be a good alternative for your application.
    Russell
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • I have a DAQ Assistant configured to read multiple channels at the same time. When I wire a graph indicator to the output, I see all of my signals jumbled together. How do I split them up into seperate signals?

    I have a DAQ Assistant configured to read 2 channels at the same
    time. When I wire a graph indicator to the output, I see the 2
    signals jumbled together. How do I split them up into seperate signals?
    When I wire any type of indicator it is showing just one output of a single channel.
    I want 2 indicators showing 2 different signals as expected from the 2 channels configured. How to do this?
    I have tried using split signal but it end up showing only 1 output from 1 signal in both the indicators.
    thanks in advance.
    Solved!
    Go to Solution.

    Yes you are right. I tried that but I did not get the result.
    I just found the way. When we launch split signal, we should expand it (split signal icon) from above and not from below. It took me a while to figure out this. 
    thanks 

  • Dynamic configuration of receiver communicaton channel?

    I have files, Header line tells which server it should go.(Like ip address and port). How can dinamically configure the receiver communication channel.
    Thank You
    Ganges Leaves

    Hi,
    I have very similar requirement, In my scenario I need to pick up files from 4 static locations and based on the file name and pick up type(file/ftp) I can find out the destination's connectivity information from a Cross-Referencing table(Based on MS-SQL Database table- I can get this using look API) in this table we maintaining more than 100 destinations(host/user_name/password etc).
    Now I need to set the connectivity information dynamically at runtime. I know this is not possible with Standard XI but does anyone thinks this is possible by any technical way using with XI.. Adapter Modules or Java Proxies?
    This is very Critical to win the war with other middleware tools. Please let me know your thoughts and comments...
    thanks,
    Laxman Molugu

  • Freeing DMA channels

    I am using pattern gen. single buf. input on a 6533 with Win2k and Borland C++ v5. When the program using the board (via NI-DAQ, the latest version) dies badly, it does not seem to free the DMA channel that the board is using. I get the "No DMA channel available for use" error when I run my program again. This means that I have to reboot.
    How can I free the DMA channel used by the 6533 without rebooting? I have tried to use DIG_Block_Clear at the start of my program, but it complains that no transfer is in progress.

    DAQ_Clear is for DAQ devices, not DIO devices. I get an error -10403 "Device does not support the requested action" when I try this function.
    BTW: I mistankenly said I had a 6533; I actually have a PCI-DIO-32HS (they are pretty much the same thing, the 32HS uses PCI instead of PXI).

  • Finite Measure with 2 boards 6602 and 6 DMA Channel Counter Buffered - error 200141

    Hi all,
    First .. I'm a beginner with LabView and I hope to explane myself in good way cause I'm italian..
    I red all the post about the error 200141 and check the suggested solutions (also the way to ignore the error), but I want try to ask for a differet one..
    What i'm trying to do is to aquire 6 encoder, 3 on the first board PCI 6602 and 3 encoder on the second board on DMA channels.
    The encoder generate 90000  X4 = 360000 pulses x revolution and the max speed rotaion is 4 RPs.
    Cause I need to store in a bin file all the pulses from the encoders, i generate a trigger of 1.5 MHz to get all the samples at the max system speed (360000 * 4 = 1440000 pulses  x sec).
    I think to have reached the limit, and maybe is not possible do better.. actually the 2 PCI 6602 works with 1,0 MHz of trigger and the system store in 6 files 4000000 of samples during
    the finite measure of the angular position on 6 channels.
    The trigger is not yet sync between the 2 PCI cause I'm waiting for a RTSI cable to put in the PC...
    In Your opinion is possible to find a alternative way to acquire these encoders ?..
    Thanks

    I also doubt if you need to capture every single increment from each encoder.  I'll discuss this more below.
    Further, many earlier discussions suggest that counter tasks can sustain data transfers merely in the 100's of kHz, with *maybe* a possibility under special circumstances to slightly exceed 1 MHz.  Your boards have very small hardware buffers (either 1 or 2 samples worth), causing the PCI bus usage to be very frequent and therefore less efficient.
    Now, let's go back to your sample rate.   You've got encoders which suggests that you're dealing with a physical system.  Physical systems have inertia, which limits their useful bandwidth.  In my experience, it's quite unusual to care about motion artifacts beyond the 10's of kHz.  The inertia just doesn't allow anything significant to happen at that rate.
    So, if the physical bandwidth of your motion system is, say, 5 kHz, there's a rule of thumb suggesting to measure at 10x when possible.  So that'd mean 50 kHz sampling.  50 kHz x 6 channels on the PCI bus may be possible.  Multi-MHz sampling won't be.
    Can you describe the physical system a bit?
    -Kevin P.

  • Number of DMA channels

    如題,
    我手邊有9636/9633兩張卡,
    手冊上都是寫Number of DMA channels=5
    請問這個數量跟FIFO Target to host DMA是一樣的意思嗎?
    因為我設超過3個FIFO Target to host DMA,就會出現錯誤。
    還有FPGA的FIFO最大個數是多少?
    因為設3個FIFO Target to host DMA+2個FIFO Target scoped
    有時候可以過,有時不行,有時程式還會閃退,真是OOXX
    附件:
    2013-05-30_151309.jpg ‏45 KB

    http://www.ni.com/pdf/manuals/372596b.pdf
    Number of DMA channels
    http://digital.ni.com/public.nsf/allkb/22E2CE79F77​B27508625794C00188265
    http://digital.ni.com/public.nsf/allkb/470FF5EE8FD​677F58625760A007562B9
    您的應用為何?

  • X series DDK digital output

    I have been working on the X series DDK digital output example dioex1.cpp. It seems working but not exactly what I expected. I have set it up for digital output and sent out the value on specific bit (pin) in dioex1.cpp and I did see the pin turned ON. However, it didn't hold ON all the time instead of toggling the bit On/Off all the time.
    Any ideas why ?  Thanks.
    Larry

    Hello,
    Exactly what behavior are you seeing?
    The expected behavior of the example is that it resets the dio subsystem, briefly outputs the expected state, and then resets the dio subsystem back to the default state as the application exits.  If you want the outputs to remain set after running the example, you can set the tristateOnExit to kFalse instead of kTrue.  However, when the example is run again, it will briefly reset the dio subsystem before outputting the next state that you want.
    I would recommend creating a loop in the example so that it doesn't exit until it receives input to exit (and resetting the dio subsystem of the board).  This would make the output stay on the port as long as you need it there.
    I hope this helps,
    Steven T.

  • Using ni-daq 7.1 traditiona​l for AT-AI-16XE​-10 first DMA channel doesn't respond

    when using ni-daq 6.9.3 with AT-AI-16XE-10 it works OK!.using ni-daq 7.1 traditional first DMA channel does not respond.help please!

    "polyplay26" wrote in message
    news:50650000000800000056C30000-1077587809000@exch​ange.ni.com...
    > when using ni-daq 6.9.3 with AT-AI-16XE-10 it works OK!.using ni-daq
    > 7.1 traditional first DMA channel does not respond.help please!
    What OS? Do you have a sound card?
    Mohan Pawar

  • HT204089 I have a samsung smart TV and record free to air TV shows on my TVO I would like to purchase from iTunes a TV series called outlander but do not know how to transfer and save the episodes on my TIVO I will be using my iPad to purchase and downloa

    I Have a  samsung smart TV  and use TVO to record  free to air programmes .
    i would like to purchase from iTunes using my iPad , a TV series called outlander but do not know how to transfer and save the episodes to my TIVO
    please help

    Many videos in the iTunes store are protected so that they can only be viewed on Apple Devices signed into your iTunes account.  If that is the case then your TiVo will not be able to read the files.  If you know how to get a video file onto your TiVo from a flash drive, then just plug a flash drive into your Mac and drag one of the videos from inside the iTunes window onto the icon for the flash drive on your Desktop or in the left sidebar of a Finder window.  That will copy the actual file onto the flash drive. 

  • M-Series DO Configuration under DDK

    The M-Series User Manual, Chapter 6, Digital I/O,  talks about Programmable Power-up States and sending TTL level outputs.  What functions in the DDK are used to configure these settings?  Is there any sample code?
    The spec sheets for the 6225 and 6259 describe Output High Current and Output Low Current.  Is there anything to configure here or are these intended to be operating limits?
    Thanks,
    Gord

    Hi Gord-
    Programmable Power-up States are controlled by software, so you could implement similar functionality in your driver by simply writing known values to the lines whenever your application is initialized.  There is no sample code because the implementation is essentially left up to the user.
    The current ratings quoted in the spec sheets for those devices are the operating limits of the digital control ASIC on the board and are not configurable through software.  It's best to regard these as operational limits.
    Hopefully this helps-
    Tom W
    National Instruments

Maybe you are looking for