Any LabWindows/CVI examples for SPI communication using DAQmx?

I have a PXIe-6363 module in a PXI running as a real time target, and I'm trying to talk to an accelerometer that communicates with SPI.  I know the 6363 isn't one of the special modules built for SPI, but my understanding is it should be capable; the issue is just the programming.  I've seen examples of this for LabVIEW using DAQmx.  Are there any examples out there for doing it in LabWindows/CVI?
I'm looking to save time and avoid reinventing the wheel here.  SPI is easy on an Arduino, so it should be doable in LabWindows/CVI, right?  
Thanks,
Matt

Hey Matt,
I was unable to find any full examples of SPI communication with DAQmx in C. My best suggestion would be to use the LabVIEW examples and implement the same series of function calls to implement the LabVIEW code in C. The DAQmx C API is good about keeping a standard with naming conventions to map with the function names in LabVIEW.

Similar Messages

  • Book: LabWindows/CVI Programming for Beginners

    Has anyone read the followong book LabWindows/CVI Programming for Beginners LabWby Shahid F. Khalid ?
    This book in not in print anymore and  inpossible to find.
    Does anyone know of any similar source material?
    I have both LabWindows/CVI Basics I&II but the content is extremely limited and not enogh details.
    Does NI offer anything better than the embedded Help?
    A Programmers Reference would be nice.
    Thanks.

    Hello NI Nubie,
    I have that book, and also its "advanced" sequel by the same author.  They both went out of print a long time ago.  The books are OK, but they are only available on the secondary market for ridiculous prices now, and that is assuming that you can even find them.
    If I could pass on some advice that might be more helpful to you in learning CVI: pretend those books do not exist for now.  Instead, I think that for learning CVI, there is nothing better than looking at other people's CVI project-level code and really understanding it, inside and out, and then making your own modifications to it to enforce what you just learned from it.  There are several places to start looking for project-level CVI code, which I will list in (what I think) are the highest-to-lowest priority of your training.
    The first place I recommend is the examples that ship with CVI (located in the "samples" directory under the CVI installation directory).  I say this because these are supported by the NI developers and support crew.  In fact, back in 1995 when I was learning CVI 3.1, I dove into the "Icon Editor" application, for several reasons: it was a *complete* application (as opposed to the other, mostly point-solution "academic" examples under the samples directory), it showed how to segment your code into multiple source and header files, and it showed many advanced user interface features (menus, cut-and-paste).  There is now an "example finder" to help locate examples that "fit" to what you are currently trying to accomplish.  I also use the freeware "grep-like" tool called "Agent Ransack" (URL is below) to hunt down specific CVI functions and identifiers (such as certain EVENTS and how these examples use them).
    Agent Ransack on MythicSoft.com
    The second place I recommend is the other "support" locations on the NI web site.  There are knowledgebase articles, tutorials, submitted examples, community examples, and also extra "academic" examples from NI engineers that aren't the same as the ones that ship with CVI.  There are also whitepapers scattered in there as well, and a few that have hidden sample code that is embedded at the bottom of the article.  You really have to hunt for this stuff, and it would be great if the NI folks could try to index this a bit better somehow.  I sometimes even resort to using Google's search engine to find them on the NI web site, because the NI search engine may not find them.
    The third place I recommend are user-based web sites created by power-users of CVI who like to share their code.  Two that I found long ago that remain at the top of the list (in my opinion).  One is Guillaume Dargaud's site, where he has lots of CVI examples and freeware.  The other is Philippe Baucour's "Rebel" CVI site (but you will need to use an online translator if you don't speak French, though).
    Guillaume Dargaud's web site (drill down for CVI examples and freeware)
    Philippe Baucour's "Rebel" CVI web site
    Finally, you might find it interesting to know that there is a tremendous repository of C source code scattered all around the Internet, mostly as part of free and open-source software projects, many of which are supported on sites such as SourceForge.net, and many other locations.  Many of these places are filled with people (in forums or mailing list servers) who live in the C programming world on a full-time basis, and can help you through some of the advanced techniques.  Some of these projects might be targeted to Windows, some use cross-platform techniques, so they have a chance of being applied to your CVI efforts.  There is also an entire universe of programming "libraries" and capabilities that you can use to augment your CVI projects as well.  All of this because of the open-source revolution, riding on the back of GNU/Linux and the community and corporate entities that are backing it all.  Examples that come to mind are Cygwin and MinGW.  If you only have the time to just look up these two items on Wikipedia, you will see that this is just the tip of the iceberg of the possibilities that are available to you as a C and CVI programmer on Windows.
    I hope this was helpful to you.
    JB
    To whom it may concern: My alias is also my nickname, I've had it since I was a (very) skinny basketball-playing teen. OK, so I've got a 38 inch waist now, but my hometown friends haven't shaken that appellation for me. I trust that you will someday be OK with that alias, as I have been with that nickname.

  • Is there any way to search for a term using the Firefox search field, and have the results automatically open in a new tab?

    Is there any way to search for a term using the Firefox search field, and have the results automatically open in a new tab? When there was support for Google Toolbar, I was able to do this; now, whenever I want to search for something, I have to open a new tab to do it, and cut-and-paste my search into the search field in the new tab. I used to be able to highlight, drag, and drop something into the search field and have it automatically open in a new tab. This is enough for me to switch to Chrome . . .

    Set a preference to have searches from the Search Bar (upper right) automatically open all searches in a new tab
    #type '''about:config''' in the URL/Location/Address bar and press the Enter key
    #if you see a warning, accept it (promise to be careful)
    #Filter = '''browser.search.openintab'''
    #in the lower panel, double click the item (or right-click and choose "Toggle") to change the value to "true"
    #close the about:config tab and test
    #See:
    #*For help with opening/using about:config, also see: http://kb.mozillazine.org/About:config
    #*Also see: http://kb.mozillazine.org/About:config_entries (click on "Browser", scroll down to browser.search.openintab)
    '''Search Bar''': http://support.mozilla.com/en-US/kb/Search+bar
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    About Google toolbar............
    Google decided that they will no longer produce the Google Toolbar for Firefox 5 and newer version. It is best to move on to other alternatives than to try any "hacks" to the toolbar that may or may not perform in the future. Future versions of Google toolbar will only work with IE7-9. Google Toolbar is not available on any other browser, even Google's own browser.
    *http://googletoolbarhelp.blogspot.com/2011/07/update-on-google-toolbar-for-firefox.html
    *https://support.mozilla.com/en-US/kb/google-toolbar-not-compatible-firefox?s=google+toolbar&r=0&as=s
    *http://www.google.com/support/toolbar/bin/answer.py?answer=1342452&topic=15356%29
    *Google Toolbar 8 FAQ (IE only): https://www.google.com/support/toolbar/bin/answer.py?hl=en&answer=1111588
    '''''To access your Google Bookmarks visit''''' www.google.com/bookmarks.
    Alternatives:
    *http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
    *https://addons.mozilla.org/en-US/firefox/addon/googlebar-lite/
    *https://addons.mozilla.org/en-US/firefox/addon/gbookmarks-google-bookmarks-fo/

  • Example LabWindows/CVI code for NI4351

    Hi,
    I'm using an NI4351 PCI DAQ card with the Ni435x
    driver and LabWindows/CVI v5.5 (on Windows 98) to measure temperature
    and voltage levels. Are there any simple tested code examples that I
    could download, which use the NI435x driver function
    NI435X_Check_and_Read(), called from an asynchronous timer for
    continous scan? There are no problems when I use MAX (so hardware
    problem is ruled out), but my code yields
    occasional random temperature reading errors (looks like data
    corruption to me). The NI435x_ functions return no errors. Can I use
    lower level C driver functions instead of NI435X_Check(), NI435X_Read(), or NI435X_Check_and_Read()?
    What does MAX use behind the scene? Of course, the MAX setup only scans
    the one channel, so maybe this is why it works correctly. I have to
    scan one temperature channel and six voltage channels though.
    Many thanks,
    John.

    Humphreyy,
    thanks for the tip. I tried it but it did not work, the same errors were present. Are there any other suggestions. I have racked my brain to figure out why this is happening and have come up with nothing. I am also getting a "Warning" message concerning the "KsMedia.h" file that says "Warning: Excess characters in multibyte character literal ignored." The warnings trace back to the "typedef enum" section of that file. Could that be causing a ripple effect that produces the error I am seeing in the other header files I mentioned??
    I could really use your help and any more help that is available. I really don't want to use Visual C++, because this software is going to get more sophisticated and is to be used in NASA Langley's VISTAS simulator, an environment taylor made for National Instruments software.

  • Error: LabWindow CVI driver for Lab View 2011 (using hp4145a)

    What is the DLL for the Agilent hp4145a instrument driver?
    I am trying to convert the LabWindows/CVI Agilent hp4145 intrument driver for use in labview 2011, but keep getting errors related to an incorrect DLL.

    Hi Courtney L., 
    Your prompt response is much appreciated. Thank you. 
    I have attached the "hp4145 LabVIEW Wrapper Conversion Report" as a txt file
    - this report was automatically downloaded along with the"LabVIEW Instrument Driver Import Wizard (LabVIEW Interface Generator for LabWindows/CVI Instrument Drivers)" *(link listed below), and popped up at the end of the installation.
    If any specific details or a screenshot will also be of benefit to solving this problem, I will be able to post them by tomorrow night.
    *Link for Instrument Driver setup download:
    https://lumen.ni.com/nicif/us/infolvinstdriver/content.xhtml
    Attachments:
    LabVIEW_Wrapper_Conversion_Report.txt ‏6 KB

  • Are there any good code examples for displaying preview images in the storefront?

    I can gather other info using folio.xxx, but can not find any good examples to use for preview images.  Tried folio.getPreviewImage() with no success.  Oh, I should mention it is version 2.  Plenty of examples for version 1.
    Perhaps if I get a little more specific.
    I am calling up the folios via:
           adobeDPS.libraryService.folioMap.addedSignal.add(function(folios) {
                for (var i = 0; i < folios.length; i++) {
                    addFolio(folios[i]);
            }, this);
    This eventually works into a function where I am gathering and displaying folio data:
         var productId = folio.productId;
        var html  = "<div id='" + productId + "'>";
            html +=     "<a href='#'><img class='shadow' width='120' src='' border=0 /></a>";
            html +=     "<br /><span class='bold'>" + folio.title + "</span>";
            html += "</div>";
        this.$el = $(html);
    folio.title works fine to pull up the title, but I can no longer use folio.getPreviewURL in v2.  What code should I be using to set the src to the preview image?
    Thanks

    Have you looked at the default implementations of the library?
    In FolioItemView's render function, there is a function(follow the nested functions!):
    setTimeout(function(){ scope.loadPreviewImage() }, 100);
    It references this function (this doesn't copy well):
    loadPreviewImage: function() {
    if (this.el.parentElement) {
    var transaction = this.folio.getPreviewImage(135, 180, true);
    transaction.completedSignal.addOnce(this.getPreviewImageHandler, this);
    Going deeper, into the getPreviewImageHandler function is where you see the url value..
    if (transaction.state == adobeDPS.transactionManager.transactionStates.FINISHED && transaction.previewImageURL != null) {
                                  this.$el.find(".folio-thumb").attr("src", transaction.previewImageURL);
    Within the example is also code for supplying a preview when the Adobe API is not available:
    (Within the render function)
    var json = this.model.toJSON();
    $folioThumb.attr("src", json.libraryPreviewUrl);
    If you're making any changes to where the preview is displayed, you can just swap out the class ".folio-thumb" to whatever the class (or id) is of the element you're wanting to render the preview in.

  • Hi All,Can any provide an example for SAP MEMORY AND ABAP memory

    Hi All,
          Can any provide me an example for SAP MEMORY AND ABAP memory.
    thanks&regards.
    Bharat.

    HI Bharat
    A simple example of ABAP memory is using the EXPORT/IMPORT statements.
    Here in this program, I get the data, export it to memory,
    clear out the internal table in my progam, then reimport the data into it and write out the data.
    You probably wounldn't do this in a normal program,
    but this is how you can pass data from program a to program b when A Submits program B.
    report zxy_0002 .
    data: it001 type table of t001 with header line.
    select * into table it001 from t001.
    export it001 = it001 to memory id 'ZXY_TEST'.
    clear it001. refresh it001.
    import it001 = it001 from memory id 'ZXY_TEST'.
    loop at it001.
    write:/ it001-bukrs, it001-butxt.
    endloop.
    SAP Memory
    SAP memory is a memory area to which all main sessions within a SAPgui have access.
    You can use SAP memory either to pass data from one program to another within a session,
    or to pass data from one session to another.
    Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters).
    These parameters can be set either for a particular user
    or for a particular program using the SET PARAMETER statement.
    Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement.
    The most frequent use of SPA/GPA parameters is to fill input fields on screens
    ABAP/4 Memory
    ABAP memory is a memory area that all ABAP programs within the same internal session can access
    using the EXPORT and IMPORT statements.
    Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling,
    the data needs to be placed in ABAP memory before the call is made.
    The internal session of the called program then replaces that of the calling program.
    The program called can then read from the ABAP memory.
    If control is then returned to the program which made the initial call, the same process operates in reverse.
    SAP memory
    The SAP memory, otherwise known as the global memory,
    is available to a user during the entire duration of a terminal session.
    Its contents are retained across transaction boundaries as well as external and internal sessions.
    The SET PARAMETER and GET PARAMETER statements allow you to write to, or read from, the SAP memory.
    ABAP/4 memory
    The contents of the ABAP/4 memory are retained only during the lifetime of an external session
    (see also Organization of Modularization Units).
    You can retain or pass data across internal sessions.
    The EXPORT TO MEMORY and IMPORT FROM MEMORY statements allow you to write data to, or read data from, the ABAP memory.
    ABAP Memmory & SAP Memmory
    http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Set
    http://www.geocities.com/SiliconValley/Campus/6345/set_para.htm
    GET
    http://www.geocities.com/SiliconValley/Campus/6345/get_para.htm
    EXPORT
    http://www.geocities.com/SiliconValley/Campus/6345/export01.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bc4358411d1829f0000e829fbfe/frameset.htm
    Other Imp Help
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    Regards Rk

  • How to make a good UI for channel selection using DAQmx

    A lot of my Labview programming was with earlier verisons of labview (pre Labview 7), and there are a ton of new features that I'm trying to digest (currently using Labview 8.2).
    My question is (in general terms), how are people programming their UI for selecting channels and such when using DAQmx hardware?  What I have in mind is a compacDAQ system with a number of modules.  The user would be able to pick and choose which channels to monitor.  Using MAX as part of that process seems counter intuative, and somewhat static (yeah I know you can change it there, but it feels more like something you would use for something that really doesn't change much).  I'd like all the UI to be within the VI.
    Are programmers using the create task VIs for that or something else?
    Thanks in advance.
    Solved!
    Go to Solution.

    I wholeheartedly second the motion to keep MAX out of the picture as far as users are concerned.
    Setting up UI's for channel selection is a breeze in DAQmx when you create channels on the block diagram. The control you create off the Channels input will populate itself with the inputs that it knows are capable of performing the desired task...
    <<< My configuration knows that my Module 5 is capable of doing Analog Input.
    So... Just create a panel that waits for the user to select the proper channel. I also run a quick check of the user's selection before creating / starting the task. For example, if they choose ai30 or higher, and I know that the system isn't wired for those inputs, I'll not allow that selection. Also check for using two of the same input, etc.
    Richard

  • How to make rolling plan at any point of time for 12 months using SOP/LTP?

    Hi Gurus,
    I am configuring an MTS scenario where the client desires that at any point of time, when he does planning, system should do a rolling plan. For example, let us say that we first do the planning in Jan for Jan to Dec. When he does the planning again in Feb, it should become a plan for Feb to Jan and so on. Is this possible in SOP/LTP? Please advise. Thanks.
    Regards,
    SB

    Yes. This is normal for SOP, but what are looking to achieve using LTP? Is this rolling plan operative, or simulative?

  • Labview example for data capture using 5102 scope card

    How can I program a Labview Vi to control, and capture a waveform using the 5102 scope card. I need to be able to set it up to continually capture a waveform (Channel 1 and Channel 2) when triggered on a rising edge of channel 1 and then store the data on disk automatically, then wait for the next trigger.
    Any help or tips as to how I could do it would be helpful.
    Thanks
    Allan

    Allan,
    Please find the attached zip file that has some useful LabVIEW examples with scope 5102
    Zvezdana S.
    National Instruments
    Attachments:
    scope.zip ‏181 KB

  • Good NI Test Stand Examples For a Beginner (Using LabVIEW)

    Hi everyone, I am new to using NI Test Stand.  I have gone through the "Getting Started with NI Test Stand" and "Using LabVIEW with Test Stand" documents.
    I know in the NI Test Stand Example folder there are many examples.  Are there any examples that cater to new users to Test Stand?
    Where can I find good examples (demos) for developing test sequences, local variables, parameters, etc...in Test Stand?
    Thanks so much!

    If you have the SSP you could access online training an do the exercises on the training.
    but the examples is a good way to getting started. just play around with all the options you have.

  • Is there any way in Firefox for android to use native handlers?

    In Firefox for windows or Linux, I can register a URL handler (e.g. mailto:) but android takes this to a new level with intents which can register responders for individual URIs as well as for and mine types.
    Are there any plans to natively support android intents (e.g. to handle a transition from twitter.com to the native twitter app), or perhaps an add-on to support something similar? I have already found https://addons.mozilla.org/en-US/android/addon/open-native-app/ but it's a manual process, rather than an automatic one.

    http is a website, Firefox browses websites. We are not planning on kicking people to the native app for such things. We do support loading resources that list helper apps. For example if you load a Google Maps page there is an Android icon in the address bar that will take that page info and pass it to the Google Maps app.

  • I am getting the message error when trying to run the labwindowa/CVI adapters for debug

    See attachments for error message and teststand settings. I am running testand 4.0.1
    It was working before and suddenly it crash and then I am getting that error message every time
    Regards
    Attachments:
    ErrorLoadCallback.jpg ‏32 KB
    ErrorLoadCallback2.jpg ‏134 KB

    It seems that something might still be corrupted or not registered properly. Have you tried running the TestStand Version Selector to re-select your current version of TestStand as the active version?
    Also, you mentioned that it crashed and now things aren't working. What exactly occurred when it crashed? Was this just TestStand freezing, or did the entire system freeze or crash? Did you see an error message of any kind?
    If the version selector doesn't help things, I would suggest a reinstall of TestStand (and possibly CVI, but let's start with TestStand). To clarify, we want to do an uninstall/reinstall rather than a repair, because the repair will only replace missing files. If a file is corrupted, the uninstall/reinstall should replace it.
    Let us know how it goes!
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • Need an Example for Enterprise Services using PI

    Hi
      I have been trying to configure and execute the demo - Cancel Flight Booking, but have been facing some issues on the configuration front. So if any of you had done any simpler examples, i would like to go through them. I'm very new to SAP and I want to learn about looking up,invoking enterprise services using PI. So kindly help with providing any custom made simple example with the configuration steps.
    Thanks & Regards
    Vijay

    Hi,
    habve you see this demo:
    /people/jitender.chauhan/blog/2009/04/20/service-enabling-in-abap
    Regards,
    Michal Krawczyk

  • Any hint on searching for portal components using any certain LOV ?

    hi,
    does anyone know how to search for all of those portal components which use a certain other component?
    let's make it specific. how can i know which of the portal components (portal reports and forms, content folders, etc) are using any certain LOV?
    will really appreciate any hints.
    with kind regards,
    naqvi

    Thanks... I will am closing this but in case you have some material for me to review on the following, I will appreciate:
    You wrote
    1.
    "You can convert standard cube to real time even if it already has data without loss this data by using program SAP_CONVERT_NORMAL_TRANS (via SE38)."
    --on executing se38, and entering this program, it opened the code and I was stuck not knowing what to do.
    I can make simply ABAP modification but did not know how to copy data from one cube to the other using this program
    2.
    "Via copying data from any other cube using IP functionality (copy function or FOX formula)."
    The RSINPT was simple but I had no clue on this suggestion, any additional info specifically on this will be helpful.
    In general, in real environment with large amoun of data, which method do you use?
    Thanks

Maybe you are looking for

  • Query on Strings

    Hi Guys,              I have a Internal Table which is of type string. After filling My Internal Table has 2 records like below Details(This is Fieldname in my Internal Table) 1.xxx,yyy,zzz,abc,123,456,Etc............., 2.abd,134,Etc.............. Wh

  • Have an additional file

    Hi, In my scenario, I would like split a message with key fields.      -> File 1 File    -> File 2      -> File n but with each files, I would like attach a referential file:      -> File 1              (Ref) File    -> File 2 (Ref)          (Ref)   

  • [Partially Solved] ad-hoc network and wicd

    I am trying to connect my laptop to the internet through an ad-hoc network with wicd. It dies at obtaining an IP address. Is there a package that I am missing or something? Any pointers would be great. Last edited by zmbmartin (2010-08-01 21:33:30)

  • Since updating my OS, none of my apps will load back onto my phone. They all say "waiting." I've tried to syn it a few times, but no luck. Any ideas?

    Since updating my fiance's phone to iOS 5.0.1 all of his apps are sitting on his phone "waiting" to install fully. I have tried to sync it a few times, and no luck. When he upgraded, it was using his Itunes account on someone else's computer (he was

  • Removing Solaris 10 upgrade 1

    Hi All, Recently upgraded Solaris 10 03/05 vertion to Solaris 01/06. How to put the system back to 03/05. Robin