Get NI Daq device using C++ name

Hi, I'm having some problems by using nisysconfig to programaticaly API to retrieve the name of the device of data acquisition. What I mean is the following:

When you open MAX and get the list of devices, they will have names such as 'Dev1', "Dev2", etc. I'm trying to retrieve this same information in C++. I use NISysCfgGetResourceProperty but I can't seem to get this property to return. I was able to retrieve the serial number, the name of the product, etc, but not this device name. Any ideas?

Here is a snippet of my code:

NISysCfgSessionHandle sessionHandle;
NISysCfgInitializeSession("localhost", NULL, NULL, (NISysCfgLocale)0, (NISysCfgBool)false, 100000, NULL, &sessionHandle);
std::cout << "Initialized session" << std::endl;
NISysCfgEnumResourceHandle resourceEnumHandle;
NISysCfgFindHardware(sessionHandle, NISysCfgFilterModeMatchValuesAny, NULL, NULL, &resourceEnumHandle);
std::cout << "Find hardware" << std::endl;
NISysCfgResourceHandle resourceHandle;

char productName[NISYSCFG_SIMPLE_STRING_LENGTH];
NISysCfgGetResourceProperty(resourceHandle, NISysCfgResourcePropertyProductName, &productName);

You want the "Alias" not the name of the product

Tags: NI Hardware

Similar Questions

  • How to get the offset by using the name-capture-group in Java 7?

    Hi all

    Java 7 provides the capturing group named in the Regex Matcher class, but it lacks several methods that returns the offset associated with the named capturing group. At least, the following two methods:

    (1) int end (String name);
    Returns the offset after the last character in the subsequence captured by the named capturing group during the previous match operation.
    (2) int start (String name);
    Returns the starting index of the subsequence captured by the named capturing group during the previous match operation.

    Given that these two methods do not exist in the Java 7 courses, the second line of printing in the following example does not work. Someone suggested to make it work?

    String matching = "aaabbbaaa";
    String pattern = "(?) (< AString > a +) b * a * "; "AString" is a named capturing group
    Patten pattern = Pattern.compile (pattern);
    Matcher Matcher = patten.matcher (match);
    int groupID = 1; In this example, we know that the "AString" a group ID = 1, but most of the time, we do not know the ID of Group of the named capture group.

    If (matcher.matches ()) {}

    When you know the ID of the group, it is easy to use.
    System.out.println ("found the text-" "+ matcher.group (groupID) +" \"nerd index" +)
    Matcher.Start (GroupId) + "and end at index" + matcher.end (groupID));

    The following line does not work
    System.out.println ("found the text-" "+ matcher.group ("AString") +" \"nerd index" +)
    Matcher.Start("aString") + "and end at index" + matcher.end ("AString"));

    }

    Thank you very much.

    Tao

    taoqian wrote: anyone got the suggestion to make it work?

    I'm at a loss as to what you expect members of this forum to do. The Matcher class does not have the two methods you want and you already have a workaround that you can use the id of group digital. Now you could trigger a bug report, suggesting a change, but at best, this is likely to take years to implement.

    Although I don't really see no advantage and seems to go against the spirit of the use of group names, if you absolutely need to use the name of a group, then you might create a mapping between a group and its index name.

  • Can I have the Profile Manager uses the name of the device used when the placement of placeholders?

    Can I have the Profile Manager uses the name of the device used when the placement of placeholders? Currently, all get renamed 'iPad' when the device through DEP configuration.

    No, but

    I was putting new devices in groups of temporary devices and renaming in bulk, once they are configured for the user, by using user variables / unit...

    The other annoying problem would be the user modifies the device name when they connect it iTunes...

    • the %destinataire% email - address email (the EMailAddress attribute)
    • first_name % - first name (FirstName attribute)
    • full_name % - full name (attribute RealName)
    • % of guid guid (GeneratedID attribute)
    • last_name % - last name (the LastName attribute)
    • the title of the post (the JobTitle attribute) %

    -% mobile_phone % the number of mobile (laptop attribute)

    • short_name % name run (the RecordName, generally the name of the account attribute)

    The variables of the unit are:

    • % BuildVersion % - full OS version on the device
    • ICCID % - ICCID (from the SIM card)
    • IMEI % - IMEI (International Mobile Equipment Identity)
    • OSVersion % - common version number of the operating system of the device
    • ProductName % - name of the product
    • SerialNumber % - serial number
    • % WIFIMAC %-MAC address of the WiFi interface
  • I have an iPhone 6 and get this message. Continue coarse iCloud on this iPhone approve him to one of your other devices using iCloud or enter your iCloud security code.  I don't know my security code and only have my book of power with me.

    I get this message on my iPhone 6.  To continue using Icloud on this iPhone, do agree with your other devices using iCloud or either your iCloud security code.  I don't know my security code.  I have my book of power with me how check my iPhone 6.

    Mike.

    Hello

    For checking your apple iphone should send you a massage to your other device

    With a code.

    See you soon

    Brian

  • How can I get Mozilla to use the name of the page for the name of the real instead of the URL bookmark when I bookmark a page

    I just noticed that (in comparison to Internet Explorer): in IE, when you preferred a Web page, it uses the actual name of the Web page (for example, for this page, it would be "Ask a Question Firefox Help" as the name of the bookmark), but in Mozilla, it uses the URL as the name of the bookmark. I was wondering if it was possible to change my Mozilla settings so that it uses the name of the Web page as the bookmark name instead of the URL? I hope that everyone understands what I am getting? If anyone can help me, I would really appreciate it. Thank you.

    Firefox uses the tag title for the name of the newly saved bookmark.

    When I bookmark on this forum page I get this for the 'name' of the bookmark.

    How can I get Mozilla to use the name of the page for the name of the real instead of the URL bookmark when I bookmark a page | Firefox Support Forum | Firefox help

  • When I try to copy a file to an external device using Windows Explorer I get the following error message: "cannot copy. The directory or file cannot be created. »

    original title: could not copy files

    When I try to copy a file to an external device using Windows Explorer I get the following error message: "cannot copy.  The directory or file cannot be created. "I understand that I may have the physical limit of USB keys for the root directory.  How can I fix it?

    Hi GloriaZF,

    What is the size of your external hard drive and what is the available free space? Open my computer-> right click on the external hard drive-> properties. You will not be able to copy more data if the disk is full, or who have less space compared to the size of the file you are trying to copy.

    You need to remove the order data to make the space more. Deleted data from the device USB will be permanently deleted and will not be stored in your Inbox, so take care while eliminating unnecessary data.

    I hope this helps.

  • How to get the name of the bluetooth device and the name of the bluetooth device address device class?

    Hi all

    Can I know how to get the bluetooth device name and the name of the bluetooth device address device class?

    Example:-if my bluetooth device address is :-98:EB:CD:01:1F::90 then how do I get my bluetooth device name?

    I hope you understand my problem. Let me know as soon as possible.

    :

    Thanks for the reply.

  • I've been using Lightroom 5.2 for about a year on a laptop Windows 7, general catalogue on a drive hard usb removable.  I now have a Surface Pro Windows 3 I want to edit photos on it too.  What should I do to get both devices using LR 5.2.  Not

    I've been using Lightroom 5.2 for about a year on a laptop Windows 7, general catalogue on a drive hard usb removable.  I now have a Surface Pro Windows 3 I want to edit photos on it too.  What should I do to get both devices using LR 5.2.  Note the tablet doesn't have a CD player.

    Also if you wish, you can also download a version update 5 LR:

    Install Photoshop Lightroom

    5.7.1, same serial key.

  • Determine the number of traditional DAQ hardware using Labview.

    Hello

    Anyone can answer the question:

    Regarding materials traditional DAQ, for example the DMM OR-4060, how

    can I programmatically determine the number of device which can be seen in MAX?

    With the help of Labview 8.5, I looked into the following function libraries:

    NOR-DMM

    VISA

    NOR-ModInst

    None of the libraries above seem to provide access the number of traditional DAQ hardware

    property, which is automatically assigned.

    Background:

    I have a 18 PXI chassis containing 2 DMM, in housing 3 and 14.

    The DMM may be a mixture of type OR-4060 or NOR-4070.

    The system is controlled by a Teststand sequence employing IVI - DMM

    steps.

    When you set the IVI logical name step, I am referring to IVI device defined Sessions

    Max - rutime determined.

    Labview VISA functions using I can determine the model, i.e. 4060 or 4070.

    Because the DMM just locate into the slots 3 or 14, then the devices NOR-4070

    are accessible using the following descriptors of resources: PXI1Slot3 or

    PXISlot14.

    (The 4070 is compatible DAQmX.)

    So for devices OR-4070, I can predefine 2 Sessions of IVI device, knowing

    It will be sufficient for all occasions, when I run my Teststand sequence, which will be

    determine what device session to use at run time.

    But I'm stuck for the NOR-4060.

    At the Session of the device, I have to give a descriptor of resource the following

    format: DAQ::x (where x is the device number)

    I could create device 18 sessions each reference to a different DAQ::x, but to select

    the good pair during execution, I would need to programmatically determine the device

    number, i.e. the value of x.

    Where my question.

    The closest I came to a solution was an entry of the Knowledge Base that said that the

    Assigned device number would be the same as the slot number, providing the

    Number of the device had not previously configured manually.

    Unfortunately, our device numbers have been changed manually and maybe in the future.

    All popular solutions.

    Gary.

    Hi Gary,.

    Good afternoon and I hope that your well today.

    Thanks for your post and I want to help you solve your problems.

    I don't think there is just a function that you can use to identify and collect information on all cards with your. For traditional DAQ devices in particular I suggest using the Information.vi of DAQ devices get.

    If you look at this link,

    SAL posted an example VI entitled, find dev trad.vi.

    You can get information such as serial number, Dev name and the Base address.

    The assistance of the respective drivers to collect information you could generate an array of strings with the information that you need all the slots.

    Please let me know if this is useful at all,

  • Different value of USB DAQ device on different computers?

    Hello

    I have not found an answer to this one, so I open a new question. Here's the problem:

    I have a card OR USB 6003 and I read some analog signal of a sensor with a framerate of 1000 Hz (I use actually 4 analog inputs for 4 sensors). I created a VI and everything works fine on my computer. Then, I created a standalone application (.exe) and the installer that includes the drivers for the hardware DAQ and LabView Runtime Environment. When I install everything on computer target, the program works, but the sensor readings are weird! For example: I get a reading of 1 bar with a deviation of 0.02 bar on my original computer. When I plug the device on the host computer, I get an average reading of 1 bar with a gap of 0.5 bar, which is a lot! This gap could be considered some disturbances high frequency - like noise. What could be the problem? Is this even linked with LabView or is it hardware problem?

    OS information:

    Win 7, 64-bit (my computer)

    Win 7 32-bit (host)

    News of LabView:

    LabVIew 2013, version 13.0f2 (32 bit)

    OR MAX version 14.0.0f0

    Setup includes:

    NI LabView Run - Time Engine 2013 f2

    NOR-DAQmx run 14.0

    Thanks in advance on this one!

    Best regards

    Geraldine

    If you run the Test NI MAX Panel on each computer, you get the same result? Way that you specify which device to use in your code (for example MAX tasks? Project tasks? DAQmx configuration screw?) and the devices have the same configuration? Are you using the exact same device USB 6003 or use a different one on each PC?

    A computer is a desktop computer and another laptop? Economic DAQ devices are not isolated, so you could get the sound of your PC power.

  • How do DAQmx tasks work on several DAQ devices

    I created tasks of temperature on cDAQ1 on my development PC.  I moved this DAQ system to the laboratory as well as an executable file.  I connected cDAQ2 to my development PC and none of the tasks that I created will work on this system since all channels of reference on cDAQ1.  Also the executable will not work with cDAQ2 also.  Note that cDAQ1 and cDAQ2 have the same hardware configuration.

    How to create these tasks so that they will work with system or additional identical systems in the future?

    Ok.  I see the problem.  It's because your devices have different names.  You told your tasks to make reference to a hardware device that has a specific name: "cDAQ1."  This is why your program will always search for a hardware device with this name.  Here are your options:

    1. replace the name of the device "cDAQ2" "cDAQ1" on your target computer.  You will need to do this for each computer target on which you load your executable file.

    or...

    2. After installing your DAQ card and your program to your target computer, go to your tasks in MAX and re - direct to appropriate material (cDAQ2) by selecting "Change the physical channels" for each task and designating the appropriate on cDAQ2 channels.

    Alternatively, you can use the vi to "Create jobs" instead and add a control that allows the user to select the channels of material on which runs your acquisition.

  • Error 0 x 00000643 error when you try to install a Kodak wireless printer. When tried to install the wireless printer is located and ready to install, I get a PnPx device then error

    Error 0 x 00000643 error when you try to install a Kodak wireless printer. When tried to install the wireless printer, wireless printer is ready to install I get a PnPx device Microsoft authorization. Runs like it is installing then error is presented. I tried fixit did not work... Frustrated

    You could settle on a previous installation. Try this:

    Go to your device manager and see if you have an old installation of the printer and right click Uninstall. You can also check if there is an old facility of the printer in Control Panel, printers, right click and delete it. Install the printer using the Add Printer Wizard. If it fails again with the same error, go to Device Manager right click on the name of your computer, click on "Scan for harware changes". He must find the printer and install it. Now you can check your printer if its work. If this does not work, please indicate your model of printer on your next reply.

    Open the Device Manager
    http://Windows.Microsoft.com/en-us/Windows-Vista/open-Device-Manager

  • Problem setting Legacy DAQ board using NOR-DAQ 6.1 for Labview

    I know that the Board of Directors is an old legacy product not supported by NEITHER, however for a low-budget project, I have 3 of these AT-MIO-16 x cards and the need to use them.

    I know I got this job in the past not distant os, however, for the life of me can't get things sorted and work.

    You use a NT box, in which this configuration used to work... uninstalled and started fees for other reasons, and I can not get the NOR-DAQ 6.1 to support LAbview 6.1 or 7.1.

    Of course, I understand the OR-DAQ 6.1 should be used for Labview 5 and older, but also know this has been successfully done in the past.

    I downloaded all knowledge base articles dozed or both support and remember to use successfully the last time that I set up so I know not somehow it works.

    My configuration is: AT-MIO-16 X to the bus combo board (called work)

    NT PC

    LabVIEW 6.1 or 7.1

    NOR-DAQ 6.1 is the most recent to support this card.

    However, it will not install its support to its latest versions of Labview and I get errors, crashing, or missing files, when I followed various circumvention of knowledge base solutions.

    I was hoping that someone has a documentation somewhere how to handle this, because it really is a matrix of spaghetti.

    I can get NOR-DAQ support files installed, and Configuration Manager works well, finds the map and allows its parameters to be defined.

    But when I load the DAQ vi of any type, Labview accidents and the wizard of data acquisition channel does not work at all (no error).

    Thank you

    Yes, the installation program from the folder of disks for NOR-DAQ 6.1 on the ftp site has worked well.

    Workaround. Thank you

  • A program to choose which audio device uses

    I saw the same question asked and asked and on many different forums with many different responses, most of which don't really know what was the real problem.

    Is there a way to get the Application use Audio Device 1 and get B asks to use Audio Device 2?

    Before people will tell me how to tell what Audio device to use Windows Media Player or VLC, I KNOW!  It does not help a bit.

    I want to be able to do if the two Application A AND B of the application don't have the ability to select which sound device they use.

    I am running Win 7 64 bit. I have a 5.1 speakers connected to my onboard sound and I have my TV connected to the HDMI connector on my graphics card.

    What I want to achieve is to have the sound of the game I play to get out of my speakers, and the sound for the film I'm streaming come on my TV.
     
    I have not yet found an option in IE, Firefox, every night (64 bit Firefox) or Chrome that allows me to use what audio device they use. Not one that would be important they use other applications like Flash Player or Silverlight to stream the video, or which have an option to choose which audio device they use, although oddly enough I found an option to select what mic was used on a single program...

    The programmers of these two Star Wars: The Old Republic and The Secret World, (the two games I play right now) have neglected to include the ability to choose which Audio device they use in the games options.

    I came across a post suggesting IndieVolume, I thought "Great, the answer to my prayers!", I downloaded the trial version to see if it would work. Installed, open it, looked at GUI, set up... Nothing has changed, did not work.

    There must be a way to do it built-in to Windows or that you would not get the option to select which audio device WMP can use.

    I would have liked to be able to do this easily in Windows 7, because after all was not Windows 7 supposed to be all about doing things you want to do with your PC, so much easier to do? I wish more programmers to understand that it is really necessary for the choice of the audio playback device in their games.

    Until these times there at - it anyone out there that can suggest a program or something that will help reach my goal? Or a way to do within Windows?

    IE and Silverlight are the two Microsoft but they don't give you the option.

    There must be programming in Windows to do can you supposed to have a reading of default communication as a standard device. Surely, that works on the same principle, with various programs that will be run, get recognized by windows as a program of communication and see their directed audio output in an appropriate manner.

    Is there a way to access which programs windows recognizes as a communications program and adding to the list manually?

    Force windows to think that request is a communication program and get the result of requests, the value 1 of Audio device which is defined as the "default communication device".

    Leave the Application B crossing 2 Audio device which is defined as the "Default Device".

  • Try to access some Government Web site, but get message that it uses a protocol not supported.

    Original title: compatibility

    I'm doing something online with a governing body, but whenever I try to go ahead he said he uses a protocol not supported... can you help me please

    Hi Marystack,

    Thanks for posting your query on the Microsoft Community.

    According to the description of the problem you are trying to access some government site but get message that it uses a protocol not supported. This question might be if you are connected to a network domain, or there is no restrictions applied to surf these sites.

    If you use Internet Explorer and cannot open certain websites then, there may be a chance that the site is not compatible with Internet Explorer. So, I suggest to open these websites in compatibility view and see if it helps.

    • Open Internet Explorer.

    • Open Web site which is getting blocked.

    • To open the toolbar, press the alt key pressed .

    • Now, click on Tools.

    • Then click on compatibility view settings.

    • You will see the name of the Web site under Add this Web site, to do this, click Add to add this Web site.

    • Close the window and restart your computer.

    Try it out below mentioned methods and see if it helps you to solve the problem.

    Method 1

    If the problem persists, try to trust these websites by following the steps mentioned below.

    Step 1: Open the trusted sites

    1. Open Internet Explorer.
    2. Press the Alt key to display the Tools menu.
    3. In the menu, click Tools.
    4. Now, click on Internet Options.
    5. Click on Security tab.
    6. Select Trusted sites.
    7. Click the Sites.

    Step 2:

    Add the trust Web site

    1. Enter the address of the site you want to add.
    2. Click on Add.
    3. Close the open windows of Trusted Sites and Internet Options .

    Hope it would help. If problem persists always post back with the current state of your computer and the result of the proposed suggestion, we will be happy to help you.

    Kind regards

Maybe you are looking for