How to input data from labview to executable application and export the results back to labview

I have a simple function written in m file under Matlab enviornment,
function [c]=myadd2(a,b)
c=a+b;
I built it into a executable file (.exe), then I want to call it in labview and get the results.
I followed this tutorial and some other information on line:
http://digital.ni.com/public.nsf/allkb/5CF9526FF069EA8E862564C400579DBA
But I didn't see any telling me how to get the Labview array data input to the EXE file and return the results data back to another indicator in labview.
Any one have some idea?
I appreciate the help very much.
Arnold

You probably need to include some command line arguments on your executable that would be the name of a file to get the data from. You could also include a command line argument telling that exe where to store the results.
I am not familiar with Matllab to give you advice on how specifically to do that with your exe though.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Similar Messages

  • How to extract data from an arbitrary xml file and export in a nice csv file?

    Hallo,
    I'm facing big problems in the use of XML files. I have an
    application which generates XML files with clusters containing arrays
    and scalars like in the example pasted below. My task is to
    read it and export the data in a human-friendly CSV document.
    Since I don't know the actual content of the cluster, I need some kind
    of intelligent vi which goes through the XML file looking for arrays
    and other data structures in order to export them properly in the CSV
    format (columns with headers).
    Thank you
    <Cluster>
    <Name></Name>
    <NumElts>3</NumElts>
    <Array>
    <Name></Name>
    <Dimsize>6</Dimsize>
    <I32>
    <Name></Name>
    <Val>0</Val>
    </I32>
    <I32>
    <Name></Name>
    <Val>1</Val>
    </I32>
    <I32>
    <Name></Name>
    <Val>2</Val>
    </I32>
    <I32>
    <Name></Name>
    <Val>3</Val>
    </I32>
    <I32>
    <Name></Name>
    <Val>4</Val>
    </I32>
    <I32>
    <Name></Name>
    <Val>5</Val>
    </I32>
    </Array>
    <DBL>
    <Name></Name>
    <Val>3.14159265358979</Val>
    </DBL>
    <String>
    <Name></Name>
    <Val>ciao</Val>
    </String>
    </Cluster>
    Solved!
    Go to Solution.

    Thank you again,
    I'm forwarding my vi draft with many comments and an xml file sample.
    Data in cluster is stored according to the LabVIEW schema, infact it is generated by LabVIEW.
    What I'm trying to do is to access the element of the cluster and read their content using the Invoke node and Property node functions. Could you give it a look, there may be something wrong, I'm not able to access cluster children.
    Which funcions should I use? Could you give me an example? You may use the draft I enclosed...
    Then write these data in a csv file
    should be the easier part.
    BODY{font:x-small 'Verdana';margin-right:1.5em}
    .c{cursor:hand}
    .b{color:red;font-family:'Courier New';font-weight:bold;text-decoration:none}
    .e{margin-left:1em;text-indent:-1em;margin-right:1em}
    .k{margin-left:1em;text-indent:-1em;margin-right:1em}
    .t{color:#990000}
    .xt{color:#990099}
    .ns{color:red}
    .dt{color:green}
    .m{color:blue}
    .tx{font-weight:bold}
    .db{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;border-left:1px solid #CCCCCC;font:small Courier}
    .di{font:small Courier}
    .d{color:blue}
    .pi{color:blue}
    .cb{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;font:small Courier;color:#888888}
    .ci{font:small Courier;color:#888888}
    PRE{margin:0px;display:inline}
      <?xml
    version="1.0" encoding="iso-8859-1" ?>
     <Contents type="Data"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="XMLSection.xsd">
     <section name="beta"
    date="7/31/2009" time="3:43:03 PM" version="1.0">
     <Cluster>
      <Name />
      <NumElts>1</NumElts>
     <Array>
      <Name />
      <Dimsize>4</Dimsize>
     <DBL>
      <Name>number: 0 to 1</Name>
      <Val>0.93317638164326</Val>
      </DBL>
     <DBL>
      <Name>number: 0 to 1</Name>
      <Val>0.79233924020314</Val>
      </DBL>
     <DBL>
      <Name>number: 0 to 1</Name>
      <Val>0.39199947274518</Val>
      </DBL>
     <DBL>
      <Name>number: 0 to 1</Name>
      <Val>0.74817197429441</Val>
      </DBL>
      </Array>
      </Cluster>
      </section>
      </Contents>
    Attachments:
    read_array.vi ‏12 KB

  • I have a huge amount of my memory used by 'other' than photos and music - to my knowledge, there is nothing there apart from a few songs and photos and 5 podcasts. What could it be? How could I get rid of this 'other' stuff and get the memory back?

    I have a huge amount of my memory used by 'other' than photos and music - to my knowledge, there is nothing there apart from a few songs and photos and 5 podcasts. What could it be? How could I get rid of this 'other' stuff and get the memory back?

    See -> What is "Other" and what can I do about it? by Kappy.
    Clinton

  • How to pull data from a c/c++ Application

    I am working on a project to instrument a product which runs on java as well as c/c++.
    Is there a way to pull data from a c/c++ application to a MBean?
    I am able to push the data through a custom TCP Adapter, But I could not get much help on a pull model.
    Also I would like to get some pointers on instrumentation techniques / patterns.
    Regards
    Chandramohan

    I'm not aware of any JMX out-of-the-box support for managing C++ applications with JMX or MBeans, but you can find some ideas on how this might be done in [this thread|http://forum.java.sun.com/thread.jspa?threadID=5240363] from [this very forum|http://forum.java.sun.com/forum.jspa?forumID=537&start=0].

  • How to send data from a web dypro application using workflow

    Hi All,
    I am working on a web dynpro application where the user will enter the header and item details for a FI document to be posted. Once the user enters the data the workflow should initiate and should also send the data across to the approver to approve. To initiate the workflow I am using the function module 'SAP_WAPI_START_WORKFLOW' and it's working fine and generating a uniquw workflow item id. Now my main concern is how to send the data across from web dynpro application through the workflow. I have my data in three internal tables: 1. header table. 2. G/L table and 3. Currency table, I am capturing all this data from the web dypro screen entered by the user. Right now I have the following code in my web dypro application.
    METHOD execute_bapi_acc_document_post .
      DATA: return TYPE TABLE OF bapiret2.
      DATA: wa_return LIKE LINE OF return.
      DATA lo_bapi_acc_document_po TYPE REF TO if_wd_context_node.
      DATA lo_changing TYPE REF TO if_wd_context_node.
      DATA lo_accountgl TYPE REF TO if_wd_context_node.
      DATA lo_currencyamount TYPE REF TO if_wd_context_node.
      DATA lo_importing TYPE REF TO if_wd_context_node.
      DATA lo_documentheader TYPE REF TO if_wd_context_node.
      DATA lo_element TYPE REF TO if_wd_context_element.
      DATA lt_elements TYPE wdr_context_element_set.
      DATA ls_c_documentheader TYPE if_componentcontroller=>element_documentheader.
      DATA lt_c_accountgl TYPE if_componentcontroller=>elements_accountgl.
      DATA ls_c_accountgl LIKE LINE OF lt_c_accountgl.
      DATA lt_c_accountgl_cp TYPE if_componentcontroller=>elements_accountgl.
      DATA lt_c_currencyamount TYPE if_componentcontroller=>elements_currencyamount.
      DATA ls_c_currencyamount LIKE LINE OF lt_c_currencyamount.
      DATA lt_c_currencyamount_cp TYPE if_componentcontroller=>elements_currencyamount.
      DATA wa_c_currencyamount type bapiaccr09.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
      EXPORTING
        TASK                      = 'TSXXXXXXXXXX'            
       USER                      = sy-uname
    IMPORTING
       RETURN_CODE               = L_RETURN_CODE
       WORKITEM_ID               = LV_WIID
    TABLES
    *   INPUT_CONTAINER           = lt_input_container
       MESSAGE_LINES             = lt_message_lines
       AGENTS                    = ls_agents
      lo_bapi_acc_document_po = wd_context->get_child_node( wd_this->wdctx_bapi_acc_document_po ).
      lo_changing = lo_bapi_acc_document_po->get_child_node( wd_this->wdctx_changing ).
      lo_accountgl = lo_changing->get_child_node( wd_this->wdctx_accountgl ).
      lo_currencyamount = lo_changing->get_child_node( wd_this->wdctx_currencyamount ).
      lo_importing = lo_bapi_acc_document_po->get_child_node( wd_this->wdctx_importing ).
      lo_documentheader = lo_importing->get_child_node( wd_this->wdctx_documentheader ).
      lo_element = lo_documentheader->get_element( ).
      lo_element->get_static_attributes(
        IMPORTING static_attributes = ls_c_documentheader ).
      lt_elements = lo_accountgl->get_elements( ).
      LOOP AT lt_elements[] INTO lo_element.
        lo_element->get_static_attributes( IMPORTING static_attributes = ls_c_accountgl ).
        INSERT ls_c_accountgl INTO TABLE lt_c_accountgl[].
      ENDLOOP.
      lt_c_accountgl_cp = lt_c_accountgl[].
      lt_elements = lo_currencyamount->get_elements( ).
      LOOP AT lt_elements[] INTO lo_element.
        lo_element->get_static_attributes( IMPORTING static_attributes = ls_c_currencyamount ).
        INSERT ls_c_currencyamount INTO TABLE lt_c_currencyamount[].
      ENDLOOP.
      lt_c_currencyamount_cp = lt_c_currencyamount[].
      READ TABLE lt_c_currencyamount INTO ls_c_currencyamount INDEX 2.
      ls_c_currencyamount-amt_doccur = ls_c_currencyamount-amt_doccur * '-1.0000'.
      MODIFY lt_c_currencyamount FROM ls_c_currencyamount INDEX 2.
      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
        EXPORTING
          documentheader = ls_c_documentheader
        TABLES
          accountgl      = lt_c_accountgl
          currencyamount = lt_c_currencyamount
          return         = return.
    ENDMETHOD.
    Please suggest.
    Thanks,
    Rajat
    I am not sure if this falls in webdynpro or workflow threads.. so I am posting it here also
    Edited by: rajatg on Jun 23, 2010 9:28 PM

    Dear Colleague,
    You have different method to send parameters to Workflow.
    1. Method
    Container Set Element
    DEFINE SWC_SET_ELEMENT.
      CALL FUNCTION 'SWC_ELEMENT_SET'
        EXPORTING
          ELEMENT   = &2
          FIELD     = &3
        TABLES
          CONTAINER = &1
        EXCEPTIONS
          OTHERS    = 1.
    END-OF-DEFINITION.
    Set the data into Workflow container
        SWC_SET_ELEMENT IT_CONTAINER 'parameter1' lv_parameter1.
    Start the Workflow
        CALL FUNCTION 'EWW_WORKFLOW_START'
          EXPORTING
            X_TASK          = 'WS90000001'   " your wf
          IMPORTING
            Y_WORKFLOW_ID   = WF_ID " your workitem id
          TABLES
            X_CONTAINER     = IT_CONTAINER
          EXCEPTIONS
            INVALID_TASK    = 1
            NO_ACTIVE_PLVAR = 2
            START_FAILED    = 3
            GENERAL_ERROR   = 4
            OTHERS          = 5.
    2. Method,
    You can also add your parameters direly to a container,
      DATA: lt_simple_container TYPE TABLE OF swr_cont,
            ls_simple_container TYPE swr_cont.
      ls_simple_container-element = 'parameter1'.
      ls_simple_container-value = lv_parameter1.
      APPEND ls_simple_container TO lt_simple_container.
      CALL FUNCTION 'SAP_WAPI_WRITE_CONTAINER'
        EXPORTING
          workitem_id      = WF_ID " your workitem id
          do_commit        = 'X'
        TABLES
          simple_container = lt_simple_container.
    Bulent.

  • How to edit data from an IDOC with errors and reprocess it

    Hi,
    We are working with SAP XI for communicate with an external systems by files (external) to IDOCS (SAP R/3).
    Sometimes we need to edit the data from an inbound IDOC, because the external system generates wrong information and that can't be processed directly.
    We had seen posts like:
    But we wanna to do it with no ABAP editor.
    ¿Can we change the data from the IDOC in other way (transaction) and reprocess it?
    We tried with /WE05, pushing EDIT button, but can't edit the data from the IDOC.
    Thanks in advance for your help
    Regards,
    Federico Martin

    Keep Looking at forums i founded:
    change idoc data
    To change the Inbound IDoc,
    1)Go to WE05/WE02, enter the Inbound IDoc number and Execute.
    2)Double Click on the segment (Page Icon) where you want to change the Data.
    3)In the Screen 'Display data record for IDoc' , Go to menu 'Data record' and click on 'Display - > Change'. Then it display a popup information 'Changes to the IDoc are written to the database' , then press enter .
    To Process the Edited Inbound Idoc , execute the program 'RBDAGAIE' in SE38 and enter the IDoc number.
    Thanks
    Sekhar
    AND
    /people/raja.thangamani/blog/2007/07/19/troubleshooting-of-ale-process
    Also if you have something to say about it will be appreciated
    thanks

  • How to extract data from an interactive adobe form and update SAP database

    Hi ,
    I want to create an Interactive Adobe Form with two text fields and a submit button.On click of submit data entered in the text fields should be stored in a ZTable.
    Please let me know the procedure for doing this in ABAP.
    Thanks,
    Prasuna.

    Hi ,
    pls have a look at the link below...
    [http://www.adobe.com/devnet/livecycle/articles/lc_designer_schema_tip.pdf]
    if u r using abap web dynpro application for calling the adobe form than on the CLICK Action of the button give the code :
    zdept is the interface name ..
    method ONACTIONCLICK .
      data:
        Node_Adobe       type ref to If_Wd_Context_Node,
        Node_Zdept       type ref to If_Wd_Context_Node,
        Elem_Zdept       type ref to If_Wd_Context_Element,
        Stru_Zdept       type If_Main_View=>Element_Zdept .
      data wa_zdept type zdept.
    * navigate from <CONTEXT> to <ADOBE> via lead selection
      Node_Adobe = wd_Context->get_Child_Node( Name = IF_MAIN_VIEW=>wdctx_Adobe ).
    * navigate from <ADOBE> to <ZDEPT> via lead selection
      Node_Zdept = Node_Adobe->get_Child_Node( Name = IF_MAIN_VIEW=>wdctx_Zdept ).
    * get element via lead selection
      Elem_Zdept = Node_Zdept->get_Element(  ).
    * get all declared attributes
      Elem_Zdept->get_Static_Attributes(
        importing
          Static_Attributes = Stru_Zdept ).
      wa_zdept-DEPTNO = Stru_Zdept-deptno.
      wa_zdept-DNAME = Stru_Zdept-dname.
      wa_zdept-LOC   = Stru_Zdept-loc.
      insert into zdept values wa_zdept.
    endmethod.
    Hope this helps  !!!
    best of luck !!
    Regards
    Ravi

  • How to extract data from ORCL GL in "full" and not "delta " with FDM ERPI?

    Hi
    I am using FDM ERPI 11.1.2.1 to extrct data from Oracle eBS 11.
    I can see that FDM ERPI extracts data in "delta mode" using the GL_TRACK_BALANCES_DELTA (FDM adds a row in this table after the 1st load of the period").
    Is it possible to force the "full mode" in order to reload all the data from Oracle GL for each FDM data load?
    Because I don't know why, but I have each month rows which are not imported into FDM.
    thanks in advance for your help
    Fanny

    Hi
    I had see that I have to install the FDM 11.1.2.1.502 patch in order to see this option in my ERPI adapter options.
    I have passed this patch.
    So I have the ERPI-FIN-C1 adaptor.
    I can see a new option (Time Out Value) but no "Load Data" or "Execution mode" option :-(
    Any idea of where the problem come from?
    Fanny

  • HOw to create a Batch file for java application and whats the use of this ?

    HI,
    How to create a Batch file for java application ?
    And whats the use of creating batch file ?
    Thanks in advance

    First of all, you're OT.
    Second, you can find this everywhere in the net.
    If you got a manifest declaring main class (an classpath if needed), just create a file named whatever.bat, within same directory of jar file, containing:
    javaw -jar ./WhateverTheNameOfYourJarIs.jar %*By the way, assuming a Windows OS, you can just double click the jar file (no batch is needed).
    Otherwise use:
    javaw -cp listOfJarsAndDirectoriesSeparedBySemiColon country/company/application/package/className %*Where 'country/company/application/package/' just stands for a package path using '/' as separator instead of '.'
    Don't specify the .class extension.
    Javaw only works on Windows (you asked for batch, I assumed .BAT, no .sh), in Linux please use java.exe (path may be needed, Windows doesn't need it 'cause java's executables are copied to system32 folder in order to be always available, see PATH environment variable if you don't know what I'm talking about) and use ':' as classpath (cp) separator.
    The '%***' tail is there in order to pass all parameters, it only works on Windows, refer to your shell docs for other OSs (something like $* may work).
    This way you have a command you can call to launch your code (instead of opening NetBeans just to see your app working). You could schedule tasks on it or just call it in any command prompt (hope you know what it is 'cause there have been people in this very same forum with no clue about it, if not just hold the 'Windows button' and press 'R', then type 'cmd' and run it).
    Finally add dukes and give 'hem away.
    Bye.

  • How to extract data from a dummy email address and insert them into APEX db

    Hi All,
    I am developing a project management system on APEX 4.1.0.00.21.
    A very important function for the system will be - one sends an email in certain format to a dummy email address, then some data will be extracted from the email based on the pre-defined format and inserted into the database my APEX application is using.
    Any idea on how I can make it happen please?
    Thanks,
    Christine

    A very important function for the system will be - one sends an email in certain format to a dummy email address, then some data will be extracted from the email based on the pre-defined format and inserted into the database my APEX application is using.
    Any idea on how I can make it happen please? I agree that this is not really an Apex question, but a more general PL/SQL question.
    There are many approaches, all boiling down to one of these two:
    1) Push: Some process in the mail server sends/forwards information to your database when new mail arrives.
    The language/tools used to do this, and the way it would connect to your database, depends on your environment (what is your operating system? mail server? existing middleware/tools? security protocols used? etc.).
    2) Pull: Some process in the database contacts the mail server and polls for new information.
    Ie. some PL/SQL code would communicate with the mail server. Again, it depends on your environment (what is your operating system? mail server? existing middleware/tools? security protocols used? etc.).
    For example, if you are using Exchange 2007 or newer, it has a web services API:
    http://msdn.microsoft.com/en-us/library/dd877045.aspx
    The challenge here will be to build the correct SOAP requests from PL/SQL, and to handle the security protocols used.
    - Morten
    http://ora-00001.blogspot.com

  • How to access old files after wiping your computer and putting the files back on via time machine

    I had recently wiped my computer because it was running to slow. After doing so i put my backup of my computer back on via time machine. However when i try to acces those files i cant find it in the finder. However it still takes up space on my computer and lists it as other now i cant deete any files to free up space on my computer please help!

    Try using disk utility on the hard drive to repair the permissions.

  • How to read data from writable PDF Form?

    Hi,
    I need some help for the web site that I am working on.
    This is asp.net website. Client is requesting to provide writeable PDF forms on this website for download.
    These forms will be downloaded by customers, they will fill in the required data on these forms save it and upload the forms back on the website.
    Once uploaded we need to read whtever client has written in these forms and update in the database (SQL server).
    I have been going through adobe web site and lot of other web sites to understand this concept (as i have never done this).
    What I understood is, with Adobe LiveCycle designer and forms we can create writeable forms.
    However I have not got any idea or seen any documentation on how do I read the data that user has typed on these forms.
    This reading the data from pdf and saving into sql server, I have to do it in asp.net app.
    Could anyone please help me understand how to achieve this.
    Thanks a lot for you time.

    How do we do that?
    Just to clarify myself, I am not putting any button on PDF to invoking submit action from PDF. I am allowing user to upload the pdf and they click submit button on my aspx page.
    Are you saying that when user submits the aspx page there is a wasy to retrieve the data in the form of XML or name/value pair on this aspx submit? if so please send me some pointers/examples or let me know how to do this? Is there any additonal tools/software that we will need to buy from adobe for this?
    thanks for you time!
    Praxo

  • ABAP program to take input parameter from variant, execute KSB1 and export

    Hi Friends,
    My client asking  change request in CO
    The Change request is "ABAP program to take input parameter from variant, execute KSB1 and export the output into an excel sheet and park the document in a designated location"
    Pls let me know  actually i am a FICO consultant what i can do in this change request
    Thanks,
    Santi

    Hi
    First I dont you would need to create a ABAP to generate the report in Excel.
    You can look at this option. Execute the report Go to->Change Layout, Click on the view option, On the Preferred View Select Microsoft Excel, Save the layout, provide a layout name with /XYZ.
    Now when you want to execute KSB1 with excel, just execute KSB1 with /XYZ layout, it would open in Excel, export to which ever location you want.
    Or just simply save the report as Excel using the Excel button on the tool bar.
    Regards,
    Suraj

  • How to retrieve data from MDM using java API

    hi experts
    Please explain me the step by step procedure
    how to retrieve data from MDM using java API
    and please tell me what are the
    important classes and packages in MDM Java API
    thanks
    ramu

    Hi Ramchandra,
    You can refer to following links
    MDM Java API-pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49
    webinr of java API
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/89243c32-0601-0010-559d-80d5b0884d67
    Following Fourm Threads will also help.
    Java API
    Java API
    Re: usage of  java API ,
    Matching Record
    Need Java API for Matching Record
    Thanks and Regards,
    Shruti.
    Edited by: Shruti Shah on Jul 16, 2008 12:35 PM

  • How to extract data from Hyperion essbase and load into essbase application

    Hi Guru,
    I want to extract data from hyperion essbase 1 application and then load to another application of hyperion essbase.
    Can any one know,how to do this.
    Please,suggest LKM and IKM that should be used for this.

    Thank you very much John,
    I am using Report script method not your least like method(Calc script as you mentioned in your blog)...:)
    I don't know how to check logs of essbase.
    what is load rule and how to use that?
    My ODI version is:10.1.3.6.2
    One more think i want to ask you is i don't have hyperion planning as Technology in topology maneger in my ODI.
    Though, in my oracledi\lib\scripts\xml directory, i have TECH_HyperionPlanning.xml
    So,how to import technology to have this OR I need something else for this....
    Edited by: Maulik Vadodariya on 16 Mar, 2011 3:51 PM
    Edited by: Maulik Vadodariya on 16 Mar, 2011 4:11 PM
    Edited by: Maulik Vadodariya on 16 Mar, 2011 4:14 PM
    Edited by: Maulik Vadodariya on 16 Mar, 2011 4:14 PM
    Edited by: Maulik Vadodariya on 16 Mar, 2011 4:15 PM

Maybe you are looking for