Is the C API of DAQmx compatible cross-platform?

Given the same material of NOR and the last DAQmx software is installed. Would the same DAQmx associated with C source compiles and work on Windows, Linux and Mac OS X?

I ask this, because I already produced an application of special measures using the API C DAQmx to treat the PCI hardware OR in a Windows XP box, and I think now on porting my app for Linux and Mac OS X.

Do I need to reprogram the associated DAQmx part of my application for all platforms, or might it be likely that it simply works for all the supported platforms as it is (maybe with small changes).

Best regards

Rolf

Rolf-

You don't mention what PCI M series that you use, but most of the M line series is supported by NEITHER-DAQmx for Linux.  From July 2009, the latest version is NEITHER-DAQmx 8.0.1.  The Readme file lists the supported devices.  If your device and the Linux distribution are supported, I strongly suggest using NOR-DAQmx on Linux.  Your 'C' for NOR-DAQmx for Windows programs should port directly to NOR-DAQmx for Linux with little or no programming changes.

You should note that NEITHER-DAQmx Base is only available for Mac OS x driver package.  Note also that there is no support for USB DAQ of NOR-DAQmx for Linux devices, so if you find yourself using any DAQ USB under Linux, you will need to use NOR-DAQmx Base to program these devices.

I hope this helps.

Tags: NI Hardware

Similar Questions

  • Can I synchronize the counters on two different computers in the C API?

    I installed the M-series cards (6254) in several computers. I would like to synchronize the counters for each card.  The best way that I came with to do this was to have the counter on each counter entries read a common external clock signal running at 10 KHz I have would then feed a second signal to each card and trigger the task that runs each counter starts when the second line goes high.

    Following the examples provided with the C API, it was easy to get each card KHz signal and then to match the beginning of the counter that I tried to read

    DAQmxCfgDigEdgeStartTrig (taskHandle, inputLineStr, DAQmx_Val_Rising);

    However, this did not work and gave me the following error:

    DAQmx error: the specified property is not supported by the device or is not applicable to the task.
    Property: DAQmx_StartTrig_Type

    Task name: task

    State code:-200452
    End of the program, press the Enter key to exit

    I know it's very simple sync the cards within a computer using the RTSI interface, but it is not possible that my cards have to reside in different computers.

    It is even possible to synchronize the counters on computers, and if yes how can I do it with the C API?

    ------------------

    Here's what I've written so far:



    #define DAQmxErrChk (functionCall) if (DAQmxFailed (error = (functionCall))) goto error; on the other

    int main (void)
    {
    int error = 0;
    TaskHandle taskHandle = 0;
    uInt32 data = 0;
    tank errBuff [2048] = {'\0'};

    DAQmxErrChk (DAQmxCreateTask ("task", & taskHandle));
    DAQmxErrChk (DAQmxCreateCICountEdgesChan(taskHandle,"/Dev1/ctr0","",DAQmx_Val_Rising,0,DAQmx_Val_CountUp));
    DAQmxErrChk (DAQmxConnectTerms ("/ 10MhzRefClock/Dev1", "/ PFI8/Dev1", DAQmx_Val_DoNotInvertPolarity));
    DAQmxErrChk (DAQmxCfgDigEdgeStartTrig(taskHandle,"/Dev1/PFI14",DAQmx_Val_Rising));

    DAQmxErrChk (DAQmxStartTask (taskHandle));

    printf ("without interruption of the poll. Press Ctrl + C to interrupt\n");
    While {} (1)
    DAQmxErrChk (DAQmxReadCounterScalarU32(taskHandle,10.0,&data,));
    printf ("\rCount: %u", data);
    fflush (stdout);
    }
    Error:
    puts("");
    If (DAQmxFailed (error))
    DAQmxGetExtendedErrorInfo (errBuff, 2048);
    If (taskHandle! = 0) {}
    /*********************************************/
    Stop DAQmx code
    /*********************************************/
    DAQmxStopTask (taskHandle);
    DAQmxClearTask (taskHandle);
    }
    If (DAQmxFailed (error))
    printf ("error DAQmx: %s\n",errBuff); ")
    printf ("end of the program, press the Enter key to quit\n");
    GetChar ();
    return 0;
    }

    Hi neurostu,

    Arms start triggers are disabled by default, so they do not have a default PFI line.

    You will need to set some properties DAQmx to configure a trigger for start of arms. Try adding between DAQmxCreateCICountEdgesChan() and DAQmxStartTask():

    DAQmxSetArmStartTrigType (taskHandle, DAQmx_Val_DigEdge);

    DAQmxSetDigEdgeArmStartTrigSrc (taskHandle, "/ Dev1/PFI14" ');

    DAQmxSetDigEdgeArmStartTrigEdge (taskHandle, DAQmx_Val_Rising);

    You have the file "help NOR-DAQmx C reference"? It should contain descriptions of the trigger > more > arm Start properties.

    Brad

  • How to set the clock as a Digital Out Signal in the C API?

    My problem is simple, I'm looking for a way get the my device of the series E clock signal (6254) to a digital camera offline. Is it possible to do in the C API? If yes are there docs everywhere where show me how do?

    Hi neurostu,

    Yes, there is a way. The function is called DAQmxConnectTerms. "" "" "You can find the definition of the function in Start ' programs ' National Instruments ' NOR-DAQ' text Code support" using NOR-DAQmx C reference. "" "On the left, select OR DAQmx C functions" advanced"routing of the Signal'. DAQmxConnectTerms

  • Buddy API Cross-platform projector

    I am trying to create a cross-platform projector that contains the buddy api xtra. I looked in various forums on how to do this and followed the steps but with still some problems. I do it on a PC on Director MX 2004. Here's what I did so far, anyone see what I'm doing wrong?

    I downloaded the mac version of buddy api (Buddy API Xtra.data & Buddy API Xtra.rsrc) and placed them in Director MX 2004\Configuration\Cross platform Resources\Macintosh

    Modified the xtrainfo.txt and added the line at the bottom:
    [#namePPC: "Buddy API XTRA", #nameW32: "budapi.x32"]

    But when I try to create the Macintosh projector to the Manager I get the error message:
    ' Can not find the file xtra "BudFile.x32". Continue to create projector?

    What I have not donestand is the .x32 additional windows which I included in the projector thorugh modify > movie > Xtras...

    HEELLLLLLLPPPPPPPPPPPP

    > when I arrived to modify > movie > Xtras - both budapi.x32 and budfile.x32 are present

    You use functions of BudFile? Should it be included?
    You quoted the error message means that the inclusion of BudFile is
    failing, not Buddy API. If you need the Xtra of split and change your
    xtrainfo.txt file, etc. as you described in your first post - but for
    Buddy file too.

  • is - a mc at the beginning of 2008 pro compatible with sierra?

    is - a mc at the beginning of 2008 pro compatible with sierra?

    After no.

    https://www.Apple.com/MacOS/how-to-upgrade/

    "Mac Pro (mid-2010 or more recent).

  • The MacMini (late2009) is this compatible w/Sierra?

    The MacMini (late2009) is this compatible w/Sierra?

    It is difficult to say with certainty, see > get ready for macOS Sierra - official Apple Support

    If so, you'll probably want at least 4 GB of RAM as the previous OS Xs.

    https://eShop.MacSales.com/shop/Mac-mini/

  • Is the Airport Express optical fiber compatible? (Verizon Fios)

    Is the Airport Express optical fiber compatible? (Verizon Fios)

    Verizon wants me to have one of their routers. Is it necessary if I already have an AirPort Express?

    The airport is a router, not a cable modem. Verizon are likely to provide a cable modem that is also a router, and therefore has an entry for the cable and several outputs ethernet; It can also have wifi.

    You can probably turn off wifi if you prefer to use the airport; and there is nothing prevents to connect airport entrance to one of Verizon output using its wifi and ethernet ports. As long as it is reasonably recent, it should detect that it is connected to a router and configure properly.

  • How to fix Firefox 31, 0-1 crashing on the Audio-Api - for example on quizlet.

    Dear Firefox team,

    Since yesterday (after the updates), Firefox hangs when it tries to play a sound. I think because of the Audio Api? It crashes on Google-Mail and Quizlet.

    For quizlet, I found a site where they describe how their sound: http://quizlet.com/help/how-does-audio-work-on-quizlet

    When I opened the file audio-test firefox crashes instantly without an errormessage. Here you get the example file: http://a.s.quizlet.com/en.mp3?v=5 & b = SWYgeW91IGNhbiBoZWFyIHRoaXMsIGF1ZGlvIGlzIG5vdCBiZWluZyBibG9ja2VkLg & s = LAhrMA-0

    Can I do something about it? Its really hard for me to understand why it crashes.

    Hey again once, unfortunately I can't reproduce the problem on a windows pc and the console log is not very descriptive (at least for my level of knowledge).

    If you can reproduce the same breaks down while you use firefox in safe mode, I would recommend filing a bug to the bugzilla.mozilla.org of this regression, so that developers have a closer look.

  • Where is the Social API on Firefox 17?

    I install Firefox 17 on Ubuntu. Where can I find the social API on facebook?

    You can enable social features by setting the pref social.enabled true on the subject: config page.

    https://mozillalabs.com/en-us/Social-API/

  • HP 10 G2: is the HP 10 G2 LSH compatible

    The HP 10 g2 is compatible with mhl technology?

    Hello and welcome to the HP support community!

    The specifications of this model can be found here.

    They make no mention of the compatibility of the MHL.  The USB port is version 2.0.

    WyreNut

  • x 64 (64-bit) bug in the C API

    I try to get the C API of 64-bit running.  I have the 32-bit running API, and it is not working properly.  It seems that no API call in the 64-bit environment, which returns more than a single data type replaces a box of memory it does not.

    I work in VB.NET and enveloping with a marshaling calls.  The simplest example of a call that is not working properly is querying the active channels on the scope:

    C header:

    niVB_Status NIVB_DECL (niVB_MSO_QueryEnabledAnalogChannels)
    niVB_MSO_InstrumentHandle instrumentHandle,
    char * channels.
    size_t channelsSize,
    size_t * channelsSizeOut);

    There are several different ways to encode a managed, unmanaged for this translation.  First is to use an allocation to build a pointer on a buffer zone:

    Pointer = Marshal.AllocHGlobal (MAX_CSTRING_LENGTH)

    Then, the declaration looks like this:

    _
    Public Shared Function niVB_MSO_QueryEnabledAnalogChannels_64 (ByVal instrumentHandle As Integer, ByVal channel As Integer, ByVal channelsSize As UInteger, ByRef channelsSizeOut As UInteger) as niVB_Status
    End Function

    When the call is made, the call to channelsSizeOut returns 23 characters (which is correct).  Channels IntPtr is however cancelled (this should never happen, he suggests that the battery is getting damaged.)  If I put a very wide range locally around the pointer, sometimes it is not damaged.

    Or you can call the function by using a call to stringbuilder.  Basically, it replaces the IntPtr parameter with a string generator using marshaling for a pointer:

    Dim bufChannels As New StringBuilder (MAX_CSTRING_LENGTH)

    then the call looks like this:

    _
    Public Shared Function niVB_MSO_QueryEnabledAnalogChannels_64 (ByVal instrumentHandle As IntPtr, ByVal channel As StringBuilder, ByVal channelsSize As UInteger, ByRef channelsSizeOut As UInteger) as niVB_Status
    End Function

    Yet once, calling this function causes the stringbuilder class being together (Nothing), which is essentially showing that stack space where is the pointer to the StringBuilder is getting damaged.

    It is important to note that this code works perfectly with the 32-bit version of the DLL (with a programming construct).

    I don't think it's a bug in the C API; I can do the following for both x 86 and x 64 without triggering of MSVC stack Canaries. (Note that for brevity, it does no checking error in this code snippet.)

    #include
    #include
    #include ' nivirtualbench/nivirtualbench.h '.

    int main (int argc, char * argv)

    {

    niVB_LibraryHandle libHandle = NULL;

    niVB_MSO_InstrumentHandle msoHandle = NULL;

    size_t channelsSizeOut = 0;

    char * enabledChannels = NULL;

    niVB_Initialize (NIVB_LIBRARY_VERSION & libHandle);

    niVB_MSO_Initialize (libHandle, "brandonbench", false, & msoHandle);

    niVB_MSO_QueryEnabledAnalogChannels (msoHandle, NULL, 0, & channelsSizeOut);

    enabledChannels = (char *) calloc (channelsSizeOut, sizeof;

    niVB_MSO_QueryEnabledAnalogChannels (msoHandle, enabledChannels, channelsSizeOut, & channelsSizeOut);

    printf ("permit to channels: %s\n", enabledChannels);

    Free (enabledChannels);

    niVB_MSO_Close (msoHandle);

    niVB_Finalize (libHandle);

    }

    I suspect that the problem is in your marshaling. Size_t parameters are probably better represented using System.UIntPtr and not the type UInteger; size_t is 32-bit on 32-bit platform and 64 bits on 64-bit platforms, but UIntegers are 32-bit at a time. Try to write channelsSizeOut, it's probably what is triggering the corruption of the stack.

  • How to use the Teststand API DisplayEditNumericFormatDialog method

    Hello

    I have to create a report for Teststand coustom generator plugin using c#. In the Teststand API is a built-in method called 'DisplayEditNumericFormatDialog '.

    http://zone.NI.com/reference/en-XX/help/370052M-01/tsapiref/reftopics/propertyobject_displayeditnume...

    Is there a way to set the value of the sample of the window that appears if the method is called?

    I do the following things:

    private void button1_Click (object sender, EventArgs e)
    {
    mChanged = true;
    bool tempbool;

    PropertyObject tempobject = mEngine.NewPropertyObject (PropertyValueTypes.PropValType_Number, false, "", 0); creates a temporary PropertyOgject to view the EditNumericFormatWindow

    tempobject. NumericFormat = mConfig.GetValString (P_PluginSpecific_Options_NumericFormat, 0); read the digital format of the plugin options
    tempobject. DisplayEditNumericFormatDialog ("Digital Format", out (tempbool), 1); View the EditNimericFormatWindow

    If (tempobject. NumericFormat == "") mConfig.SetValString (P_PluginSpecific_Options_NumericFormat, 0, "%$.13g");
    else mConfig.SetValString (P_PluginSpecific_Options_NumericFormat, 0, tempobject.) NumericFormat);

    MessageBox.Show (tempobject. NumericFormat.ToString ());
    }

    Thanks in advance

    Hello f4bo,

    attached is a sequence that shows how this can be done.

    Locals.Local = RunState.Engine.NewPropertyObject (PropValType_Number, False, "", 0x1),.
    Locals.Local.AsPropertyObject.NumericFormat = "%b"
    Locals.Local.AsPropertyObject.SetValNumber ("", 0, 20),.
    Locals.Local.AsPropertyObject.DisplayEditNumericFormatDialog ("false title", False, 0)

  • W530 with Windows 7: the GetSystemMetrics API functions do not correct result

    Hello

    I recently updated my external monitor for Samsung S27A850D best resolution 2560 x 1440. After some effort, I finally managed to get this resolution, and, among other things, the section of the display of the control panel correctly shows the resolution. However, when I use the function API GetSystemMetrics with the SM_CXSCREEN and SM_CYSCREEN parameters get values in 1707 and 960, respectively. Does anyone have an explanation for it?

    Kind regards

    bostjanv

    Hello

    Thanks a lot for your comment. In fact, I have defined the size to 150%, but I was completely unaware of the mechanism behind it and really didn't know anything about scaling issues.

    Kind regards

    bostjanv

  • [Q] can Vision track multiple objects in the same area - objects that might cross?

    Hello

    Sorry for this long title, but this is my question.

    Can Vision track multiple objects in the same area - objects that could cross?

    Because I'm able to do, extraction of XY, but it seems that "IMAQ County objects ' don't follow framework after but framework opposed, but extract the coordinates XY always in the same way, as for example from top and whenever he sees an object, it retrieves the XY, but if the objects pass through (then it will extract XY without worrying that the objects was the earlier but just based on"scan from top to bottom").

    That's why I open this topic in the forum of Vision no part: http://forums.ni.com/t5/LabVIEW/Sort-XY-by-closest/td-p/2440428

    Thank you

    Sébastien

    Thank you for your response.

    My problem is that we work with very small insects and the shape/color is the same for all.

    Then the solution is: Let's wait for "IMAQ County objects 3 ' then .

    Thank you

    Sébastien

  • Research of interface software for FlexRIOs using API c do I need LabVIEW once I use the C API generator?

    Current versions of software:

    LabVIEW 2014 SP1

    LabVIEW FPGA 2014

    Xilinx Vivado

    Hi all

    I plan to interface my FlexRIOs to the software programmed in C, then the C API FlexRIO is excellent.

    My question is more economy of memory sake.

    I have a PC with Visual Studio, I want to add the minimum amount of software development.

    If I have a station (a separate Visual Studio PC PC) FPGA development with all LabVIEW software necessary to take the step of the use of the generator of the C API to create the necessary files of C and H, should what software I on the development PC Visual Studio in interface with the files in the generated C API?

    If all goes well, it's just (from the help)

    What you need to get started

    • Drivers for devices OR RIO August 2013 or later

    However... The help of the C API, it gives me the full list of the software including LabVIEW and LabVIEW FPGA... (below)

    What you need to get started

    In addition to a RIO device like a CompactRIO reconfigurable chassis, a Single-Board RIO device or RIO PCI or PXI hardware, you need the following software to use FPGA Interface C API.

    • LabVIEW 2009 SP1 or later (32-bit only)
    • LabVIEW FPGA Module 2009 SP1 or later (32-bit only)
    • Drivers for devices OR RIO August 2013 or later
    • Operating system supported development
      • Windows 8 or 8.1 (32-bit or 64-bit)
      • Windows 7 Professional (32-bit or 64-bit)
      • Windows Vista Business (32-bit or 64-bit version)
      • Windows XP Professional SP2
      • Windows Server 2008 R2 (64-bit version)
      • Windows Server 2003 (64-bit version)
    • Target supported OS
    • Supported C/C++ compiler

    So I have LabVIEW and LabVIEW FPGA on the development PC?

    (If all goes well no....)

    Thank you

    Hey Colonel1013,

    With the C API, you only need LabVIEW to build a bitfile and run the generator of C API tool, but LabVIEW is not required to run. That is, you need all the software listed, but it must not all be on the same machine. You can transfer the file lvbitx and the .c and .h files generated on another machine where you need only NOR-RIO and Visual Studio installed.

    Sebastian

Maybe you are looking for