Analog Triggering and Interrupt generation on the PCIe-6320 under Linux

We would like to use the analog triggering functions of the PCIe-6320 under Linux to time tag external events.
I have no experience with the MH DDK but have been told this is what we would need to implement the functions we want. We plan on using Fedora Linux and we are targetting kernel 2.6.31 with the PREEMPT_RT patch applied. We may consider slightly more recent kernel versions. The PREEMPT_RT patch is used to greatly improve determinism in the system and get real-time responses to some external events.
Here is what we wish to do in more details:
We wish to route at least two analog inputs to the comparator, then route the output of the comparator to a digital input which in turn would create a PCIe interrupt. The interrupt software handler would than time tag that event for our application purposes. We need the comparator threshold to be software programmable in level and slope. We are also interested in using the Watchdog Timer feature of the board.
Our application is written in C/C++.
Would the above be feasible? Please provide comments and instructions how we should address our requirement.
Thanks!

Patof wrote:
I am not familiar with the MHDDK. I would like to have an idea of the effort required to implement the functions I have described using MHDDK on Linux. Like I mentionned, we plan on using Linux kernel 2.6.31 with the PREEMPT_RT patch. Could you provide comments on that matter? I need to evaluate the amount of time I will need to spend to deploy and use MHDDK for the PCIe-6320.
There are two factors to consider when writing a driver for your specific application:
Using the deterministic kernel API calls
Writing to the device registers to
Control the watchdog timer
Configure the analog comparator
Manage the analog subsystem state as trigger events occur
Handle device interrupts
The MHDDK for X Series offers the following behavior out-of-the-tarball:
A Linux kernel module using the standanrd kernel and PCI subsystem calls
Mapping device registers to user-mode for access
Demonstrating/documenting how to
Control the watchdog timer (dioex6.cpp)
Manage the analog subsystem state as trigger events occur (aiex2.cpp, aiex4.cpp)
Handle device interrupts (reference manual only)
There are two notably missing pieces and one item to consider:
Missing: deterministic kernel API calls. If you decide to use the nirlpk module, you would need to change it from the standard interfaces to the deterministic variants.
Missing: configuring the analog comparator. You will need to implement this with additional insight from this discussion board.
Consider: if your application requires device access from kernel-mode only, you would not be able to use the MHDDK's C++ classes that perform device programming but would need to implement register programming in C.
To estimate the time for these three, here are my recommendations:
Review the nirlpk.c source file to understand how device access and DMA buffers are implemented and mapped to the user-mode application.
Beware that operation-specific programming help (as you would need for analog triggering) typically requires two weeks for a complete response.
Review the ChipObjects in the MHDDK distribution to understand how register addresses, widths, and bit fields affect device programming.
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)

Similar Messages

  • How to use analog Triggering and External clock scan

    Hi, there. I want to measure the engine cylinder pressure with an PXI6070-E card and BEI encoder. I have tried using Cont Acq&Graph ExtScanClk D-Trig.vi and Cont Acq&Graph ExtScanClk Soft A-Trig.vi , but they don't work. What I did was to connect a 50HZ pulse to PFI0 (analog triggering, I changed the code from digital triggering to analog triggering), and a 100K pulse to PFI7 (startscan), and an 50 HZ analog signal to ACH0. But the code always says: timeout. If I use internal clock, it works fine. Could you please give me some help? THANKS A LOT!

    Hey Wyuan,
    I tested the Cont Acq&Graph ExtScanClk Soft A-Trig.vi and it worked fine. However, the Cont Acq&Graph ExtScanClk D-Trig.vi has a small error in its logic that will prevent the data from ever being displayed to the graph. In order to run the examples you need to connect a trigger to pin 11 and a scan clock to pin 38. A 10kHz square wave would be fine for the clock signal and just a single pulse would work for the digital trigger.
    One additional think to keep in mind is the grounding. You might need to connect you ground from your signals to a DGND pin. I am including the two programs that I used for the test.
    I hope this helps,
    Joshua
    Attachments:
    Cont_Acq&Graph_ExtScanClk_D-Trig.vi ‏121 KB
    Cont_Acq&Graph_ExtScanClk_Soft_A-Trig.vi ‏153 KB

  • What is the difference between 1st and 2nd generation of the Itouch?

    Can someone tell me the difference between the 1st and 2nd generation of the itouch? I'm looking to upgrade from my nano to a 32gb Itouch.

    The speaker is a big plus. Who wants to dig up their headphones just to play a quick game of Lux Touch or play with your light sabre without anyone else hearing the sound effects :)? The lack of a volume control is also a major complaint of IPT 1G users. The only thing that should swing you back to the 1G is the iPod accessories you already have that may be rendered obsolete.

  • Hi, I need help and advice. Basically me and my ex partner both had iphones and synced it with the same computer under the same ID. We split i have a new laptop and now it keeps asking for the old ID or it'll erase my apps bought on theold account.

    Hi, I need help and advice. Basically me and my ex partner both had iphones and synced it with the same computer under the same ID. We split up and now im trying to get all my apps and info onto my new laptop with a new account but it keeps asking me for the old apple ID which she is still using and she changed the password. i tried backing it up but still nohing. When i try to back up purchased items being apps etc its keeps asking for the old one. help

    See Recover your iTunes library from your iPod or iOS device. But you'll still need the password.
    Once you have the computer authorized to use the account she could change the password again to stop you buying apps on her card (assuming it's not on yours!). It would lock you out of upgrading them too but they should work unless she uses the deathorize all feature.
    It depends on how amicable the split is...
    tt2

  • Create the raw devices under Linux

    Hi,
    Hoe can I create the raw devices under Linux?

    Hi,
    I just have created two raw devices,
    1, /etc/sysconfig/rawdevices
    /dev/raw/raw1 /dev/hda2
    /dev/raw/raw2 /dev/hda3
    2, chown oracle:dba /dev/raw/rawN and chmod 660 /dev/raw/rawN
    3, after restart the machine, start I runInstaller again.
    But Oracle can still not find the candidate disks, even after give the path /dev/raw
    Why?

  • Using Notes and Oracle Client in the same application on Linux crashes

    This thread is copied from a thread of the same name under Database - General, since I cannot get any replies there.
    Could someone from Oracle PLEASE comment on this.
    Our application on Linux loads the Notes client libraries and then the Oracle client libraries. The application will crashes when connectimg to an Oracle server. This is because the T_* symbols in libnnz11.so get fixed up into libnotes.so rather than locally into libnnz11.so where the functions are defined.
    #10 0xb4779ea6 in T_malloc () from /opt/ibm/lotus/notes/libnotes.so
    #11 0xae7ca050 in CMP_reallocNoCopy ()
    from /opt/oracle/product/10.2/db_1/lib/libnnz11.so
    #12 0xae7ccf7b in CMP_OctetStringToCMPInt ()
    from /opt/oracle/product/10.2/db_1/lib/libnnz11.so
    #13 0xae7c91fd in A_X931RandomInit ()
    from /opt/oracle/product/10.2/db_1/lib/libnnz11.so
    #14 0xaec09e0d in ztcriv ()
    from /opt/oracle/product/10.2/db_1/lib/libclntsh.so.10.1
    #15 0xaec09cef in ztcrbp ()
    from /opt/oracle/product/10.2/db_1/lib/libclntsh.so.10.1
    #16 0xaec09ca4 in ztcr2seed ()
    from /opt/oracle/product/10.2/db_1/lib/libclntsh.so.10.1
    #17 0xaec09c54 in ztcrseed3 ()
    from /opt/oracle/product/10.2/db_1/lib/libclntsh.so.10.1
    #18 0xaeb40683 in ztcsh ()
    from /opt/oracle/product/10.2/db_1/lib/libclntsh.so.10.1
    #19 0xaea631c4 in kpusattr ()
    from /opt/oracle/product/10.2/db_1/lib/libclntsh.so.10.1
    #20 0xaea7847e in OCIAttrSet ()
    from /opt/oracle/product/10.2/db_1/lib/libclntsh.so.10.1
    #21 0xb081cb9f in COCIObject::Connect ()
    from /opt/criticalpath/common/bin/libor9i.so
    We have circumvented the problem for the time being by making sure that we load the Oracle libraries before Notes, but we cannot go with that as a long term solution.
    In my opinion the Oracle library is wrongly linked since all the T_* functions are defined in libnnz11.so. When we load Oracle first, the loader debug trace shows the correct fixups. When we load Notes first, the loader trace shows the incorrect fixups. We are using dlopen(libor9i.so, RTLD_LOCAL) for Oracle and dlopen(libnotes.so, RTLD_LOCAL) for Notes. libor9i.so has a dependency on libclntsh.so.10.1.
    An opinion would really be appreciated.
    Thanks,
    John Unsworth

    Thanks again.
    We don't have an Oracle support contract because we do not use Oracle ourselves. We supply an application that synchronises data between multiple data servers and server types, of which Oracle is one and Notes is another, as well as LDAP servers and many other types.
    Producing a full resolved binary is therefore not an option since the types of data server are configured when the apploication is installed, and then the client software for each server is loaded as required.
    The end user of the application supplies the client libraries and has a support contract for the servers, in particular Oracle and Notes in this case. So the other option is for the end user to raise a ticket using his support contract, but he is reluctant to do that since he considers that this is our problem as we supply the application that is having the problem. So we are in a dead water area. We do not want to take out a support contract just to get what is an Oracle product problem resolved. I imagine that this problem is something that has not been encountered before, because our use of the client library in conjunction with other client libraries is probably unusual.
    So that is why I am hoping, without any success so far, that someone from Oracle will pick this up.

  • TS2776 iPhone 5, Outlook 2013, Windows 7.0 64-bit.  Every time I connect my phone to my computer via USB, iTunes opens with the "accept our terms and service" then deselects the boxes checked under the INFO tab to sync my calendars, contacts...help?

    I am connecting my iPhone 5 to my Windows computer via USB.  This should open iTunes and start the sync process.  Instead of iTunes opening, I get the iTunes service agreement to which I must agree.  Then iTunes opens and begins to back up my phone.  It is syncing my photos and music (although the music thing is another nightmare), but under the "info" tab in iTunes, the boxes of which functions I want to sync are no longer selected.  Hence the computer and the phone are not sharing information.  When I select the functions I want to sync, I must either replace or merge.  If I replace, I lose the information I recently put into my phone.  If I choose to merge, then I have duplicates of everything.
    How can I resolve this problem? Why is iTunes acting like it doesn't know my phone?
    I'm using an iPhone 5 iOS 6.1.4, Windows 7 64-bit, Outlook 13, and the must current version of iTunes (because I've removed and reinstalled it twice already).
    Thanks for any help!
    Christine

    After you'd run the Configure Classic instance did you run in the statement as stated in 'Oracle® Fusion Middleware Installation Guide for Oracle Portal, Forms, Reports and Discoverer 11g Release 1 (11.1.1) Part Number E10421-05'?
    java -classpath ORACLE_HOME_DIR\discoverer\lib\disco-config.jar;ORACLE_HOME_DIR\oui\jlib\OraInstaller.jar;ORACLE_HOME_DIR\opmn\lib\iasprovision.jar -Djava.library.path=ORACLE_HOME_DIR\oui\lib\win32 oracle.disco.install.config.DiscoUtil -oraclehome ORACLE_HOME_DIR -tnsadmin TNS_ADMIN_DIR
    I've completed an installation with the same steps (although I ran the config.bat file in as_1/bin rather than from the program files list and also I've the jrockit jdk installed)
    I've found that this fails with the error;
    INFO: This tool works only on Windows Platform. Exiting the program
    Which is strange considering this is Windows Server 2008 R2 64-bit
    DISCO is running in the EM console but the URLs (as defined in the installation summary report) do not resolve properly. I was just interested to hear if you're installation was the same, this isn't the first installation I've done, they've all had a similar issue

  • HT6058 During the installation of the ios 7.0.4 update my screen froze with the iTunes icon and arrow under that and a picture of the usb plug under that.  Thanks for messing up my perfectly well functioning IPad 2 with your lousy update!  What now?

    During the ios 7.0.4 update, my IPad 2 froze.  The picture on the screen is an iTunes icon, and arrow inder that and a picture of the apple usb cord.  It will not go away.  I have tried hard and soft turn offs.  Please help!

    Philly:
      When there is an iOS update available, iTunes asks if you want to install it. I chose to only download the iOS 7.0.6 update, but not to install it until I had done a backup of everything on my iPad. When that iOS 7.0.6 update failed, I had NO iOS at all, just a bricked iPad.
    When my son did a "clean restore" that was the same thing you'd do to wipe an iPad - just install iOS 7.0.6 and install basic iPad apps.  When you turn the iPad on after that, it indicates it wants to be connected to iTunes. At that point, my son yanked the cord so nothing else was installed.  Then, with iOS 7.0.6 already installed, iTunes on my PC didn't say it wanted to update iOS, and allowed me to choose my previous backup to be restored. All was straightforward after that.
    Again, there are places on he web where you can download various versions of iOS, along with a PC utility that will do the iOS update. I think these utilities are for when you want to hack your device, so I'm not crazy about this approach.

  • I have set up iphone4s with pc and ticked only required songs to transfer to Iphone and clicked apply all the iphone displays under each genre is loading. This has been going on for 12 hours. How long does it take. It only shows 6.3gb used out of 13.6eyi

    I have set up Iphone4s with my pc and ticked only required songs to sync. I clicked apply and it has been going for over 12 hours on my Iphone just displayimg loading. The capacity on my iphone shows a capacity of 6.3gb used out of 13.6 Am i doing something wrong ?

    Thanks for the replies. It took a while not hearing anything so thought I was alone. I have done many of the suggestions already. The key here is that it occurs on both phones with apps, and phones still packaged in a box.
    A Genius Bar supervisor also checked his Verizon data usage log and found the same 6 hour incremental use. Suprisingly, he did not express much intrigue over that. Maybe he did, but did not show it.
    I think the 6 hour incremental usage is the main issue here. I spoke with Verizon (again) and they confirmed that all they do is log exactly when the phone connected to the tower and used data. The time it records is when the usage started. I also found out that the time recorded is GMT.
    What is using data, unsolicited, every 6 hours?
    Why does it change?
    Why does it only happen on the iPhone 5 series and not the 4?
    Since no one from Apple seems to be chiming in on this, and I have not received the promised calls from Apple tech support that the Genius Bar staff said I was suppose to receive, it is starting to feel like something is being swept under the rug.
    I woke up the other day with another thought ... What application would use such large amounts of data? Well ... music, video, sound and pictures of course. Well ... what would someone set automatically that is of any use to them? hmmm ... video, pictures, sound. Is the iPhone 5 succeptible to snooping? Can an app be buried in the IOS that automatically turns on video and sound recording, and send it somewhere ... every 6 hours? Chilling. I noted that the smallest data usage is during the night when nothing is going on, then it peaks during the day. The Genius Bar tech and I looked at each other when I drew this sine wave graph on the log print outs during an appointment ...

  • PCI 6110E under linux

    Hi All,
    I have a PCI-6110E multi-functional I/O Board and would like to use it
    in my Linux box (SLACKWARE 7). Does the 'National Intruments E-series
    BETA
    DAQ Driver' support my card or should I go to Comedi?
    Many thanks for your advice.
    Alain GREGORI
    e-mail : [email protected]

    I would try the comedi driver, since NI is no longer working on edaq http://www.ni.com/linux/daq_comedi.htm
    "A. GREGORI" wrote:
    >Hi All,> I have a PCI-6110E multi-functional I/O Board and would like to
    use it>in my Linux box (SLACKWARE 7). Does the 'National Intruments E-series>BETA>DAQ
    Driver' support my card or should I go to Comedi?>> Many thanks for your
    advice.>>>Alain GREGORI>>>e-mail : [email protected]>

  • Data acquisition and frequency generation togather with PCI-6251 and LV8.2

    Hi friends,
    I am a new user of Labview. I am using LB8.2 with PCI-6251 .
    I have to generate frequency and then measure the data and then for next frequency and so on.
    i know that for this i have to use looping and that is not a problem. The real problem for measurement is to identify whether the frequency is been generated. if yes then measurements starts otherwise it should wait until it started. then after finishing the measurements send a signal to generator for changing the frequency and amplitude.
    Now these two things {generation and measurement} togather are not working correctly for me. so i make 2 diff file, one for generation and other for measurements <by modifying the examples>. I can run both file togather and it works. But it need lots off effort and time. I have to measure from 10Hz to 1000Hz in 2Hz frequency step and i cannt leave in between .
    can anyone help me how to syncronize these two togather .
    Trying to attatch. both the files here ..
    main_v1.1.vi --> for Measuring
    Oscilloscope.vi --> for waveform generation
    Attachments:
    main_v1.1.vi ‏150 KB
    Oscilloscope.vi ‏37 KB

    Hay thnx dude..
    I found the example and now it works
    once again thanks a lot

  • Vxi triggers and interrupts with CVI

    I could use help on developing code to use the "trig in" pin on the front
    of a vxi controller.
    once a trigger is received, I want to call a routine,
    to tell a vxi-dio128
    digital card to read
    the data from 2 ports. I'm sure this involves interrupts,
    of which I have
    limited
    experience. But any help would be greatly appreciated..

    There is a page on our website written as an introduction and description of triggers in NI-VXI. It includes information about mapping trigger lines to the TrigIn pin so that you can synchronize your data acquisition function.
    This page can be accessed by searching http://www.zone.ni.com/ for "Triggering with NI-VXI" or by going to this URL:
    http://zone.ni.com/devzone/devzoneweb. nsf/opendoc?openagent& 0DED2E0927C332418625688600611AE7& cat=3B9A19E3932BF7678625681F006D511B
    If you are using VISA 2.5, you will want to open a session to the Backplane resource. You can then use Visa Map Trigger to map the TrigIn pin (27) to one of the TTL lines (0-7). The DIO128 can then be configured to use this TTL line as a trigger to begin acquisition.
    Trey Hamilton
    Appl
    ications Engineer
    National Instruments
    http://www.ni.com/ask

  • Is analog audio and optical audio on the same path

    My audio out- mini jacks have stopped working, front and back.
    NO audio comes out of either of them.
    Audio does come out of the small internal speaker.
    I am an editor and NEED sound.
    SO if audio is gone on the mini jacks, does that mean the audio will be gone on the optical side?
    System preferences don't have any settings to change for optical out (snow leopard)
    Anyone think it could be software and reinstall of operating system might help?
    already did PRAM reset and the unplug for 15 seconds(SMC) thing, NO effect.
    This just happened one day to the next.

    One experiment -- In your /Library/Prefererences (global Library, not the one in your home directory) is a folder called Audio.  Within there are two plists:
    com.apple.audio.SystemSettings.plist
    com.apple.audio.DeviceSettings.plist
    Temporarily remove these, i.e., drag them on to your desktop.  Then reboot and  set you Sound system preferences.  I am not sure this is going to work and I believe these two plists will be recreated in the Audio folder.  If not, put the two original plists back into the Audio folder that you moved to your desktop.

  • Unable to open PNG, save for web, and missing half of the format options under save as.

    Using Windows 7 Professional 64-Bit with SP1.
    When using Photoshop CC 64-Bit, i am unable to save for web, open PNG, or save as for about half the format options. I don't have any additional plugins installed, nor have I messed with the plugins folder.
    When trying to open PNG files it says: Could not complete your request because it is not the right kind of document.
    Photoshop CC 32-Bit works without any of these issues. I'll be switching to 32-Bit until this is resolved. Hoping I don't have to uninstall/reinstall (Install files are huge and take forever to download and I don't know how to save them to the hard drive with CC, thanks).
    Chris

    Sounds like you are missing some of the required plugins - possibly an updater failed, or someone moved/deleted the wrong directory.
    Yes, you'll need to reinstall to restore the missing plugins.

  • I have the 5th Gen ipod and I went to the triple click under accessability and now it will not let me go back. Is there anyway I can fix this?

    my ipod will not function very well with this

    Triple click the home button and try going to Settings>General>Accessibility and turn it off off. You may have to use three fingers to scroll the screen to get there. If problems see:
    iPhone: Configuring accessibility features (including VoiceOver and Zoom)
    Next restore from backup if you have not backed up after turning it initially on.
    Last, restore to factory settings/new iPod

Maybe you are looking for