Get Product Number using NI-XNET

I'm trying to get the product number and name of the National
Instruments card installed on my computer. According to the manual when
I get the property for nxPropDev_Name I should get NI PCI-8512 (2 ports)
for an NI PCI-8512 device. Instead I get an empty Cstring. For
nxPropDev_ProductNum I should get 8512 for an NI PCI-8512 device, but
instead I get this number: 3435973836.
Below is a snippet of the code I'm using. Is there something I am doing
incorrectly?
Thanks
int propSize;
int cpropSize;
u32 propName;
CString cpropName;
char *l_pSelectedInterface = "CAN2";
char *l_pFrameArray = NULL;
char *l_pSelectedDatabase = ":memory:";
char *l_pSelectedCluster = "";
g_nxStatus = (*m_pNxCreateSession)(l_pSelectedDatabase,
l_pSelectedCluster,
l_pFrameArray,l_pSelectedInterface,
nxMode_FrameInStream, &SessionRef);
g_nxStatus = (*m_pNxGetPropertySize)(SessionRef, nxPropDev_ProductNum,
(u32)(&propSize));
g_nxStatus = (*m_pNxGetProperty)(SessionRef, nxPropDev_ProductNum,
(u32)(propSize),
&propName);
g_nxStatus = (*m_pNxGetPropertySize)(SessionRef, nxPropDev_Name,
(u32)(&cpropSize));  g_nxStatus = (*m_pNxGetProperty)(SessionRef, nxPropDev_Name, (u32)(&cpropSize)); 

This is probably making the impossible difficult, but you cannot get from the session back to the device directly. It is actually a separate API (right now - ideally we can improve this to make it easier in the future) called the system API to get system->device->interface type of properties.Using the system API, I am doing the following:
1) Open System
2) Get all interfaces in the system
3) Loop on the interfaces until I find one that has a name that matches the desired one
4) Once I get the interface, I can get the device that the interface is a part of
5) Once I get the device, I can then query the device for the required information (Name, Number)
6) Close System
Note: This doesn't do any error checking for simplicity, but it does get the status so you could easily apply error checking to prevent any type of ugly unexpected failures.
int l_NumInterfaces;
int l_PropSize;
u32 l_PropProductNum;
char l_PropProductName[1024];
char l_PropInterfaceName[1024];
nxSessionRef_t l_PropInterfaceRefs[32];
nxSessionRef_t l_SystemRef;
nxSessionRef_t l_SelectedDeviceRef;
char *l_pSelectedInterface = "CAN2";
char *l_pFrameArray = NULL;
char *l_pSelectedDatabase = ":memory:";
char *l_pSelectedCluster = "";
int i;
g_Status = nxSystemOpen(&l_SystemRef);
g_Status = nxGetPropertySize(
l_SystemRef,
nxPropSys_IntfRefs,
&l_PropSize
g_Status = nxGetProperty(
l_SystemRef,
nxPropSys_IntfRefs,
l_PropSize,
l_PropInterfaceRefs
l_NumInterfaces = l_PropSize/sizeof(nxSessionRef_t);
for (i = 0; i < l_NumInterfaces; i++)
g_Status = nxGetPropertySize(
l_PropInterfaceRefs[i],
nxPropIntf_Name,
&l_PropSize
g_Status = nxGetProperty(
l_PropInterfaceRefs[i],
nxPropIntf_Name,
l_PropSize,
l_PropInterfaceName
if (!strcmp(l_PropInterfaceName, l_pSelectedInterface))
g_Status = nxGetProperty(
l_PropInterfaceRefs[i],
nxPropIntf_DevRef,
sizeof(nxSessionRef_t),
&l_SelectedDeviceRef
g_Status = nxGetProperty(
l_SelectedDeviceRef,
nxPropDev_ProductNum,
sizeof(u32),
&l_PropProductNum
g_Status = nxGetPropertySize(
l_SelectedDeviceRef,
nxPropDev_Name,
&l_PropSize
g_Status = nxGetProperty(
l_SelectedDeviceRef,
nxPropDev_Name,
l_PropSize,
l_PropProductName
break;
g_Status = nxSystemClose (l_SystemRef);

Similar Messages

  • How to get IDoc number using sdata records

    Hi Experts,
    I have executed a report program in background. Its generating few IDoc's. I can view those idoc's in WE05 also. But now i want to display those idoc number in the result output of the report. One of the segment having materrial number and plant details in the IDoc. Using this details i want to display the IDoc number in the output screen. Even i have tried with EDID4 table its taking huge time to get a single IDoc. Is there is any simplest way is there to get those idoc's .
    Otherwise how to achive this?
    Thanks and Regards,
    Mohana

    Hi,
    1.)If you want the ouput in the same report program which triggers the idoc, it is better to use the control record information.
    You will get IDoc Number from XEDIDC(check the below code) and you can store the idoc number into an internal table if more idoc is expecting to be triggered.
         call function 'MASTER_IDOC_DISTRIBUTE'
              exporting
                MASTER_IDOC_CONTROL        = EDIDC
              tables
                COMMUNICATION_IDOC_CONTROL = XEDIDC
                MASTER_IDOC_DATA           = XEDIDD
              exceptions
                others                     = 5.
       read table xedidc index 1.
      append xedidc-docno to it_docno.
    And finallly use this to display in the output.
    2.) if u want it in a seperate report, then select based on date, idoctype, messagetype
    Regards,
    Sajith

  • Getting Serial Number using BlackBerry PIn

    Hi guys
    does anyone know how to generate the device serial number using the PIN? My precious limited edition just got stolen at an accident a few minutes ago.
    BlackBerry Protect on location it's shaded out, likely won't be able to see it's location once wiped. Though I do hope to recover it.
    Please help. The box is more than 1000 miles away and can only access it probably once my mum is back there from her holiday this side in about a month.
    Twitter: @IAmBenGiey | Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.
    Try my apps:
    The Ultimate Currency Converter and T2G - BloGFeed

    Your carrier should have that on file so giving them a call would be an idea.
    It's a good idea to call them anyway to cancel the SIM card ASAP.
    Cheers.
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • How to get product number for motherboar​d

    Is there a way to retrieve the part number for a motherboard on a DV2000 series notebook other than stripping down the unit and pulling the motherboard? (IE - Enter the serial number somewhere on the HP website and it would retrieve this number, along with others associated with this computer)
    Thanks in advance

    Hi,
    Please try from this:
      http://h20141.www2.hp.com/hpparts/?cc=US&lang=EN&j​umpid=hpr_r1002_usen
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How to get Vendor number form Address number

    Hi all
    I need help in getting vendor number using address number. I need best performance in this process.
    I have tried
    select single lifnr
      from LFA1
    where adrnr = address
    put this is not good in performance.
    Do any one know better way?

    Hi Salam
      As your requirement is
    <b>address > ????? > LFA1</b>
    Dieter has provided ADRV to replace "?????" in the above.
    so it is address > ADRV > LFA1.
    Substitute <b>address number</b> for field ADDRNUMBER, <b>'LFA1'</b> for field APPL_TABLE in table ADRV to check the result in field APPL_KEY which is combination of key fields in table LFA1 i.e MANDT and LIFNR.
      Please award points to Dieter for this wonderful tip.
      Thanks for the tip Dieter.
    Kind Regards
    Eswar

  • Get Pack number (ESLL-PACKNO) from Activity no. (ESLL-SRVPOS)

    Hi all,
    I am creating a custom screen for External service items. The standard process to fetch the data for the task list external services is as below:
    1) Pass the Group(Task List) -PLNNR to PLPO and get the Package No's(PACKNO).
    2) Pass the Package(PACKNO) to ESLL table and fetch the Sub package No's(SUB_PACKNO).
    3) Pass this Sub Package No's as Pack nos to ESLL table again, fetch the Services(SRVPOS).
    I want to fetch the data from Activity Number (ESLL-SRVPOS) and get the Package no. (ESLL-PACKNO). in IA06, if user enter a service number (ESLL-SRVPOS) and then press save. A record will be save in PLPO-PACKNO for the related operation.
    I just want to know, how this Package no. get saved and which fields make this record as unique.
    Thanks,
    Sanket Sethi

    Hi ,
          You have AFKO-AUFNR ,
    You can get the pack number from table AFRU or AFVC .
    After getting Pack Number
    Use this BAPI to get other details .
    MS_READ_SERVICES_FOR_BAPI
    Input would be pack number

  • HT1349 My iPad is disabled. I have only just been able to find the serial number on the back of my product by using a magnifying glass but even now from "Support" I get an unknown serial number advice. How can I get into it?

    My iPad is disabled. I have only just been able to find the serial number on the back of my product by using a magnifying glass but even now from "Support" I get an unknown serial number advice. How can I get into it?

    Explain exactly what happended - disabled how - and why are you trying to read the serial number? So that you can use it on this site?
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • Use of vendor product number in shopping cart from personal template

    Hi all,
    I have the following scenario:
    We use ECC 6.0, SRM 5.0 MDM 5.5 sp6 catalog 2.0.
    In the inforecord master data in ECC we use the vendor product number (vpn). When a inforecord is created or changed, the inforecords (or changed data in the inforecord) get's replicated to SRM-MDM, just like all of the other masterdata (product, vendor and conditions).
    The vpn is included in the details of a catalog product.
    When a personal template is generated from a product in the catalog, it's saved with the vpn included.
    When the vpn changes in ECC, this number is replicated to the SRM-MDM catalog.
    So if you choose the product from the catalog after the canged vpn, the new, right vpn is used in hte shopping cart. But when you use the template that was created before the time the vpn was changed, the old vpn is used in the shopping cart and subsequently the pr and po.
    This leads to wrong delivery's.
    I've logged an oss call for this, because in my opinion this is a product default. But SAP points me on "standard design". This seems always to be the case when something difficult is asked.
    They said it can be solved with a BADI implementation. To be more specific a validation in SRM-MDM with the doc-change Badi.
    Is there some one who has experience with this kind of development and knows if this is the whight Badi of has an alternative?
    Thanks in advance!
    Best regards,
    JvE

    Hi,
    When a personal template is generated from a product in the catalog, it's saved with the vpn included.
    When the vpn changes in ECC, this number is replicated to the SRM-MDM catalog.
    So if you choose the product from the catalog after the canged vpn, the new, right vpn is used in hte shopping cart. But when *you use the template that was created before the time the vpn was changed, the old vpn is used in the shopping cart and subsequently the pr and po.
    *Solution:
    you have told that in MDM -VPN is updated from ECC
    Say for Eg : VPN  is 12345  in MDM
    you have created a shopping cart template with thie VPN : 12345 .
    you have ordered the shopping cart the VPN number will be 12345.
    After a week this VPN is updated from ECC by 12345ABC
    now you have to Delete the old shopping cart template what you have created 12345.
    You have to create a new template with VPN :12345ABC and create a  shopping cart
    How will the VPN change in the Old Template? It  is not possbile.
    It is not A product bug.
    Please try this method what I  have suggested
    Regards
    G.Ganesh Kumar

  • I bought Photoshop Elements 12 (box - CD) and threw away the box. I thought the serial number would be on the disc sleeve, but it was not. Now I can´t register the product. Is there something I can do to get the number/code to activate Photoshop Elements?

    I bought Photoshop Elements 12 (box - CD) and threw away the box. I thought the serial number would be on the disc sleeve, but it was not. Now I can´t register the product. Is there something I can do to get the number/code to activate Photoshop Elements? Thank you.

    My guess is that you won't be able to do much if you threw away the serial number before using it.  The serial number will not have been externally visible on the box though... doing that would make it available for use by anyone who sees the box in any store.
    To locate the serial number:
    http://helpx.adobe.com/x-productkb/global/find-serial-number.html
    If you remain unable to locate the serial number you might need to head back to wherever you purchased the product to confirm whether or not you might have thrown out the serial number or if it could even possibly have never been provided.
    Beyond that you need to resolve serial number issues with ASdobe Support directly.  Here is a link for chat:
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • Creative Cloud Student and Teacher Edition .I use the Macbook.I got the mail that said my order was checked,but I don't get the number.So I still use trial.Hoe can I change my character into member?

    Creative Cloud Student and Teacher Edition .I use the Macbook.I got the mail that said my order was checked,but I don't get the number.So I still use trial.Hoe can I change my character into member?

    This is an open forum, not Adobe support... you need Adobe support to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • Goods reciept through MB31 against production order using serial number

    Dear ALL,
    We are using MB31 for goods receipt against production order using serial number.
    First we do confrmation by tcode co11 and then recieve the material by mb31 against the order.
    I want that sysstem should not allow good reciept by mb31 more than the confirmation done in co11.
    Please suggest.
    regards,
    Pradeep

    Hi,
    There are two ways to control this problem; 1) User Exit    2) BADI
    1) User-Exit
    Enhancement: MBCF0002
    Function module: EXIT_SAPMM07M_001
    Code for your copy pasting in the source code of ZXMBCU02.
    Remember to activate the program. In SMOD enter the enhancement, press F8 and then click on activate button.
    *& Include ZXMBCU02
    data it_afvv like afvv occurs 0 with header line.
    tables: afvv, afko, afpo.
    data tot_gr like mseg-menge.
    If i_mseg-bwart = '101' and i_mseg-aufnr is not initial.
    select single * from afko where aufnr = i_mseg-aufnr.
    select * from afvv into table it_afvv where aufpl = afko-aufnr.
    sort it_afvv by aplzl descending.
    read table it_afvv index 1.
    select single lmnga from afvv into afvv-lmnga where aufpl = afko-aufnr and aplzl = it_afvv-aplzl.
    select single * from afpo where aufnr = i_mseg-aufnr.
    tot_gr = afpo-wemng + i_mseg-menge.
    if tot_gr > afvv-lmnga.
           MESSAGE 'GR Qty greater than Confirmation Qty of the last operation' TYPE 'E'.
    Endif.
    endif.
    2) BADI
    Implement the BADI for WORKORDER_GOODSMVT in this there is method
    MANUAL_GOODS_RECEIPT under that
    write you code here
    if_ex_workorder_goodsmvt~manual_goods_receipt.
    endmethod.
    Technical Logic
    Check the confirmation qty in AFVV table with production order get the last operation confirmation qty and subtract the Delivered qty. If this is Greater than or equal to the GR Qty entered in the screen allow the posting or through Error.
    Tables: S022, AFPO, AFKO, AFRU, AFVV
    Regards,
    Sankaran

  • Where can I get serial number for Lightroom to start using it?

    Hello. I have just created Adobe CC account and purchased a Photography membership plan for Individuals. The price is 9,99 per month and this sum has already been taken from my card. On this page (https://accounts.adobe.com/plans) I can see the confirmation that I have obtained this plan.
    Now I want to use Lightroom but it asks me for serial number. After reading some help I found that I should get serial number from here - https://www.adobe.com/account.html. But on this page it says that "You have no registered products.". So I see no serial number.
    So there's a simple question - where can I get serial number for Lightroom to start using it?

    Jeff, thanks for your answer but it doesn't help. I've successfully passed all checks on page Sign in, activation, or connection errors | CS5.5 and later . My internet connection is ok, hosts file ok, certificates ok, etc. It's not a source of the problem.
    I've found that on page Adobe ID it says that I have free membership. Somehow it turns that my purchased Photography membership plan is not there at all. in order to proof that I really purchased it please see screen from my internet-banking page below:
    Why it is displayed only free membership in my account page and not Photography subscription which was already paid?

  • How to get IMEI number of ME using proactive command

    Can anyone send me a sample code to get IMEI number of mobile equipment using proactive commands....

    Hi,
    I hope its can help you.
    private static final byte TAG_IMEI = (byte) 0x14;
    byte result=0;
    short IMEI_LEN;
    byte[] imei_buf;
    ProactiveHandler ProHdlr;
    ProactiveResponseHandler ProRespHdlr;
    ProHdlr = ProactiveHandler.getTheHandler();
    ProHdlr.init(PRO_CMD_PROVIDE_LOCAL_INFORMATION, (byte) 0x01, DEV_ID_ME);
    result = ProHdlr.send();
    if (result < RES_CMD_PERF_SESSION_TERM_USER) {
    ProRespHdlr = ProactiveResponseHandler.getTheHandler();
    IMEI_LEN = ProRespHdlr.findAndCopyValue((byte) TAG_IMEI, imei_buf, (short) 0);
    Cheers,
    Asep

  • When I check my boot SSD drive using Disk Utility under Mavericks, I often get "Incorrect number of extended attributes" errors.  But if I boot off an external drive and check the same SSD, no errors are reported.  Is this a bug in Mavericks?

    When I check my boot SSD drive using Disk Utility under Mavericks, I often get "Incorrect number of extended attributes" errors.  But if I boot off an external drive and check the same SSD, no errors are reported. 
    This happens not just with the SSD in my Mac Mini, but with another SSD in my MacBook (both now running Mavericks).  So far as I know, all of the kit I am using is in good order (despite the file corruption reports).  So I am beginning to wonder if it could be due to a bug in Mavericks?  Both SSD drives have been formatted to MacOS Extended (journaled) format.  Should I have used a different format, I wonder?
    Has anyone else encountered this issue?
    Does anyone have a solution?
    Or an explanation that might help my investigation of the issue?
    Thanks guys,

    I understand that the Corsair Force 3 is not one of the SSD drives that are supported on Apple Macs. 
    I did try downloading and using Trim Enabler, but the error message came up both when it was off and when it was on.
    I understand that not everyone thinks Trim Enabler is a good program, though there is a new version out now, so I may give it another try.

  • Use SQL function to get the original order number using the invoice number

    Hi All,
    wondering is someone can help me with this challenge I am having?  Often I need to return the original order numbers that created the resulting invoce.  This is a relatively simple seriese of joins in a query but I am wanting to simplify it using a SQL function that can be referenced each time easily from with in the SELECT statement.  the code i currently have is:
    Use SQL function to get the original order number using the invoice number
    CREATE FUNCTION dbo.fnOrdersThatMakeInvoice(@InvNum int)
    RETURNS nvarchar(200)
    AS
    BEGIN
    DECLARE @OrderList nvarchar(200)
    SET @OrderList = ''
    SELECT @OrderList = @OrderList + (cast(T6.DocNum AS nvarchar(10)) + ' ')
    FROM  OINV AS T1 INNER JOIN
          INV1 AS T2 ON T1.DocEntry = T2.DocEntry INNER JOIN
          DLN1 AS T4 ON T2.BaseEntry = T4.DocEntry AND T2.BaseLine = T4.LineNum INNER JOIN
          RDR1 AS T5 ON T4.BaseEntry = T5.DocEntry AND T4.BaseLine = T5.LineNum INNER JOIN
          ORDR AS T6 ON T5.DocEntry = T6.DocEntry
    WHERE T1.DocNum = @InvNum
    RETURN @OrderList 
    END
    it is run by the following query:
    Select T1.DocNum, dbo.fnOrdersThatMakeInvoice(T1.DocNum)
    From OINV T1
    Where T1.DocNum = 'your invoice number here'
    The issue is that this returns the order number for all of the lines in the invoice.  Only want to see the summary of the order numbers.  ie if 3 orders were used to make a 20 line inovice I only want to see the 3 order numbers retuned in the field.
    If this was a simple reporting SELECT query I would use SELECT DISTINCT.  But I can't do that.
    Any ideas?
    Thanks,
    Mike

    Thanks Gordon,
    I am trying to get away from the massive table access list everytime I write a query where I need to access the original order number of the invoice.  However, I have managed to solve my own problem with a GROUP BY statement!
    Others may be interested so, the code is this:
    CREATE FUNCTION dbo.fnOrdersThatMakeInvoice(@InvNum int)
    RETURNS nvarchar(200)
    AS
    BEGIN
    DECLARE @OrderList nvarchar(200)
    SET @OrderList = ''
    SELECT @OrderList = @OrderList + (cast(T6.DocNum AS nvarchar(10)) + ' ')
    FROM  OINV AS T1 INNER JOIN
          INV1 AS T2 ON T1.DocEntry = T2.DocEntry INNER JOIN
          DLN1 AS T4 ON T2.BaseEntry = T4.DocEntry AND T2.BaseLine = T4.LineNum INNER JOIN
          RDR1 AS T5 ON T4.BaseEntry = T5.DocEntry AND T4.BaseLine = T5.LineNum INNER JOIN
          ORDR AS T6 ON T5.DocEntry = T6.DocEntry
    WHERE T1.DocNum = @InvNum
    GROUP BY T6.DocNum
    RETURN @OrderList 
    END
    and to call it use this:
    Select T1.DocNum, dbo.fnOrdersThatMakeInvoice(T1.DocNum)
    From OINV T1
    Where T1.DocNum = 'your invoice number'

Maybe you are looking for

  • I deleted my up to date projects... How can I retrieve them.

    I did a dumb thing... I have had to swap between Motion 3 at work and Motion 4 at home... I Updated my folder one day and of course it was from the least updated to the most. So I lost the most recent project files... They are now longer in Auto Save

  • Plan Task functionality in 11.5.10.2

    Hi all! I would like to ask how the Task Status, as it appears on the Warehouse Control Board, is controlled. Initially, in 11.5.9, the Tasks used to appear with the status of 'Pending'. After a recent upgrade to 11.5.10.2 the Tasks appear with the s

  • General QUestion about error handling

    Hello,    I am writing my own VI's to communicate with my hardware. Each one of the VI's incorporate numerous error checking routines to detect if the desired operation completed correctly. If error(s) are detected with a VI, the "Bundle by Name" VI

  • HT3529 iMessage not receiving pictures

    I have not been able to receive pictures I can send them but not receive, I have been trying different ideas such as, resetting network settings and resetting all settings. I hope you can help me because it is disappointing as I love iMessage and thi

  • Movies to ipod 3rd generation

    hey all, thanks for taking a look at my message. well, ok heres my problem. i got a new ipod nano 3rd generation for my bday. i have numerous movies on my computer, but they are .avi, and they wont go into itunes or the ipod. so i tryed to download s