Calling fortran subroutine from C in sunstudio

I am using Sun Studio 12 under Linux,
Could anyone give me an example project which shows how to use a fortran subroutine in C.
For example in the project "application_1" I have 2 source codes one with .c and the other one with .f90 extension. The main source is the C code but this one call a fortran subroutine "mysub". I am going to do it in a project in Sun Studio not via command line.
Thanks.

Refer to Chapter 11 "C-Fortran Interface" in the Fortran Programming Guide:
[http://docs.sun.com/app/docs/doc/819-5262/aeuku?a=view]

Similar Messages

  • How to call a subroutine from sap script

    hi friends,
    Can anybody tell me How to call a subroutine from sap script .
    thanks n regards .
    Mahesh

    hi..
    Calling ABAP Subroutines: PERFORM 
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    The system does not execute the PERFORM command within SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE. The replace modules can only replace symbol values or resolve include texts, but not interpret SAPscript control commands.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
    The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
    From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (‘First page’, ‘Next page’, ‘Last page’) is printed as local variable symbol.
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY ‘PAGE’.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY ‘BARCODE’.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = ‘|’. "First page
    ELSE.
    OUT_PAR-VALUE = ‘||’. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = ‘L’. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    regards,
    veeresh

  • Problem in calling ABAP Subroutine from SAPSCRIPT

    Hi,
    I need to get the reason for cancellation of a Business Even in Training & Event Management module, so I am passing Emp_id.
    But the reason(CAAATRT) is returned with blank by the code.
    please help.
    /:DEFINE &EMP_ID&= &PPVAR-TOBJD&
    /:PERFORM HR_REASON_PRINT IN PROGRAM ZHR_REASON_PRINT
    /:USING &EMP_ID&
    /:CHANGING &CAATRT&
    REPORT  ZHR_REASON_PRINT.
    DATA : BEGIN OF in_par OCCURS 10.
            INCLUDE STRUCTURE itcsy.
    DATA : END OF in_par.
    DATA : BEGIN OF out_par OCCURS 0.
            INCLUDE STRUCTURE itcsy.
    DATA : END OF out_par.
    DATA:   TOBJD TYPE PPVAR-TOBJD,
            ADATANR TYPE HRP1001-ADATANR,
            CAATR TYPE HRPAD25-CAATR,
            CAATRT TYPE T77CART-CAATRT,
            EMP_ID TYPE C.
    TABLES     : PPVAR,
             HRP1001,
             HRPAD25,
             T77CART.
    FORM HR_REASON_PRINT TABLES input output.
    in_par[] = input[].
    out_par[] = output[].
    READ TABLE in_par INDEX 1.
    CHECK sy-subrc = 0.
    TOBJD = in_par-value.
    MOVE in_par-value TO TOBJD.
    SELECT ADATANR
    into ADATANR
    FROM HRP1001
    WHERE OBJID EQ TOBJD.
    ENDSELECT.
    SELECT CAATR
    into CAATR
    FROM HRPAD25
    WHERE ADATANR EQ ADATANR.
    ENDSELECT.
    SELECT CAATRT
    INTO CAATRT
    FROM T77CART
    WHERE CAATR EQ CAATR.
    ENDSELECT.
    REFRESH out_par.
      out_par-name = 'DREASON'.
      move CAATRT To out_par-value.
      MODIFY out_par INDEX 1.
    APPEND out_par.
      output[] = out_par[].
    Thanks
    Ramakrishna

    Hi ramakrishna,
    1. while calling subroutines from sapscripts,
    there is a special technique,
    which has got its own limitations.
    2.
    FORM abc
    TABLES
    in_tab STRUCTURE itcsy
    out_tab STRUCTURE itcsy.
    ENDFORM.
    3. The perform in se38 program should be of the
    above format only.
    4. We cannot pass internal tables.
    5. Rather we need to pass
    VARIABLE NAME
    VARIABLE VALUE
    (see the structure of itcsy in se11)
    6. In this form, we have to read
    the internal table in_tab
    to capture the variable name and its value.
    7. Similary, to return the values,
    we have to put one record (for each variable)
    in out_tab.
    regards,
    amit m.

  • Calling a subroutine from BSP application

    Hi
    i want to know how to call a subroutine/form in another package in same R/3 system in my BSP application.
    Is there any way to implement this. ?
    What if the subroutine has furhter LOCAL forms called inside it. will they be used as well while calling from my BSP application.
    PLease help.

    you can do that.
    perform p1 IN PROGRAM ('Y_P_TEST') IF FOUND  .
    do you have problem in doing this? what issues are you facing.
    Regards
    Raja

  • Can I call c subroutines from xml

    I want to do XML to XML conversion by filtering the content based on a variable which is calculated in a C program. I want to know that wheather this variable of C can be taken on the fly to an XML file from where I can test it using XSL if condition.
    Please post your valuable sugessions.

    What is the problem with the Java Stored Procedures calling a URL ?
    Can you give me more details on this.
    For calling a C function from pl/sql you can use external procedures. please give me your email id so that ,I can send you more details on this.

  • Calling Fortran from Java

    Is it possible to call Fortran code from java??

    You can use Runtime.exec() to run an application written in Fortran.
    If you can write C/C++ code which interacts with something written in fortran then you can use JNI to connect it to java.
    Presumably the fortran app doesn't already have an interface that allows something to interact with it when it runs - like a socket interface.

  • Calling subroutines from SAPScript

    Hi all,
    I have added a piece of code in my MAIN window which calls a subroutine in another program. This works just fine. However, when I moved the code from one <b>window element</b> of MAIN to another, the code is no longer triggered.
    What causes this to happen? Is it related to the calling of function module WRITE_FORM in the application program? Any ideas?
    All helpful answers will be rewarded!
    Regards,
    M.V.

    Hi,
    In some case we need to do some mathematical operations in scripts !! Those things we cant do in Script Editor !! thats y the subroutines are there in scripts !!
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    Regards
    Rama.Pammi

  • Calling subroutine from scripts

    I am calling a subroutine form a standard text, the subroutine is getting called but the input table is comming empty.
    can any one please advise me what could be the problem.
    /:PERFORM GET_APP_DATA IN PROGRAM YHR_APP_DATA
    /:USING &P0001-PERNR&
    /:CHANGING &GRADE&
    /:ENDPERFORM

    Check this sample code...may be it will help u to identify the prob...
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY u2018PAGEu2019.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018NEXTPAGEu2019.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018BARCODEu2019.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = u2018|u2019. "First page
    ELSE.
    OUT_PAR-VALUE = u2018||u2019. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = u2018Lu2019. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Regards,
    JOy.

  • Query regerding Sapscript : Calling abap subroutines

    Hello everybody
    Hope everyone is doing fine.
    I've a small query. Whenever we require to call an abap subroutine from an abap sapscript we do the same using PERFORM statement. The syntax for the same is as below:
    PERFORM SUBROUTINE_NAME IN PROGRAM PROGRAM_NAME
    USING &VARAIABLE&
    CHANGING &VARAIABLE&
    ENDPERFORM
    Here we are passing the varaiables to the subroutine and getting back values in varaibles. In the actual program we then read values from in_tab and out_tab having structures similar to itcsy.
    The above mentioned is as per my understanding. My query is as follows:
    If in the above statement instead of passing varaibles abnd getting back variables can be pass/get back an internal table?
    I had read somewhere that it is possible using structures. If anyone is aware of how to do the same can you please give me the syntax. Actually how to get value from subroutine into an internal table. What will be the structure? Will it be same as itcsy?
    Thanks a lot to everybody in advance.
    Thanks & Regards
    Kabir Radhakrishnani

    hi check this program!!!
    REPORT Z_TEST_VBBE .
    types : begin of t_vbap ,
             VBELN like vbap-VBELN,
             posnr like vbap-posnr,
             concat(18),
            end of t_vbap.
    tables : vbap .
    select-options : s_vbeln for vbap-vbeln .
    data : it_vbap type table of t_vbap ,
           wa_vbap type t_vbap.
    select vbeln posnr from vbap into table it_vbap
    where vbeln in s_vbeln .
    " group by vbeln.
    loop at it_vbap into wa_vbap .
      perform select_data using wa_vbap-vbeln
                                wa_vbap-posnr
                       changing wa_vbap-concat      .
      modify it_vbap from wa_vbap .
    endloop .
    *&      Form  select_data
    *form select_data using vbeln type vbap-vbeln
                          posnr type vbap-posnr
                          concat.
    *endform.                    " select_data
    *&      Form  select_data
    form select_data using    p_wa_vbap_vbeln
                              p_wa_vbap_posnr
                     changing p_wa_vbap_concat.
             concatenate p_wa_vbap_vbeln
                         p_wa_vbap_posnr
                    into p_wa_vbap_concat
                    separated by '|' .
    endform.                    " select_data

  • Calling selection screen from another selecton screen.

    Hi guys,
    I want to call default selection screen of one program from default selection screen of another program.
    Is that possible . would appreciate some helpful answers.
    Thanks,
    Venkat.

    it is possiable.
    1.submit
    2. call transcation t_code.
    Syntax
    SUBMIT <prog>.
    For more information about the SUBMIT statement, see Calling Executable Programs (Reports)
    Assume the following simple report:
    REPORT ZDYN3.
    WRITE / 'Dynamic Program!'.
    The following executable program (report) starts, modifies, and restarts ZDYN3:
    REPORT ZMASTER1.
    DATA CODE(72) OCCURS 10.
    DATA LIN TYPE I.
    READ REPORT 'ZDYN3' INTO CODE.
    SUBMIT ZDYN3 AND RETURN.
    DESCRIBE TABLE CODE LINES LIN.
    MODIFY CODE INDEX LIN FROM
    'WRITE / ''Dynamic Program Changed!''.'.
    INSERT REPORT 'ZDYN3' FROM CODE.
    SUBMIT ZDYN3.
    The output of this program is displayed on two subsequent output screens. The first screen displays:
    Dynamic Program!
    The second screen displays:
    Dynamic Program Changed !
    When you use the SUBMIT statement, all modifications made to a program during runtime take immediate effect before they are submitted. In the above example, ZDYN3 is submitted from ZMASTER1 first in its original and then in its modified form, generating different results.
    This is not the case if you change the codes of include programs or subroutines dynamically.
    Assume the following include program:
    INCLUDE ZINCLUD1.
    WRITE / 'Original INCLUDE program!'.
    and an executable program (report) for modifying and including it:
    REPORT ZMASTER2.
    DATA CODE(72) OCCURS 10.
    DATA LIN TYPE I.
    READ REPORT 'ZINCLUD1' INTO CODE.
    DESCRIBE TABLE CODE LINES LIN.
    MODIFY CODE INDEX LIN FROM
                'WRITE / ''Changed INCLUDE program!''.'.
    INSERT REPORT 'ZINCLUD1' FROM CODE.
    INCLUDE ZINCLUD1.
    If you run ZMASTER2, the source code of include program ZINCLUD1 is changed and replaced in the system. However, the last line of ZMASTER2 executes the older version since the runtime object of ZMASTER2 is generated before ZINCLUD1 is modified. Only when ZMASTER2 is run a second time, does the system determine that ZINCLUD1 has been changed. Exactly the same is true if you dynamically modify the source code of a subroutine and call it from within the same program.
    One way to solve this problem is to use the INCLUDE statement within an external subroutine that is called by the program. This allows you to create or modify include programs or subroutines and use the updated versions directly in the same program.
    Assume the following include program:
    INCLUDE ZINCLUD1.
    WRITE / 'Original INCLUDE program!'.
    and an external subroutine:
    PROGRAM ZFORM1.
    FORM SUB1.
         INCLUDE ZINCLUD1.
    ENDFORM.
    The following program reads the include program, modifies it, enters it back into the system, and calls the subroutine.
    REPORT ZMASTER3.
    DATA CODE(72) OCCURS 10.
    READ REPORT 'ZINCLUD1' INTO CODE.
    APPEND 'WRITE / ''Extension of INCLUDE program!''.' TO CODE.
    INSERT REPORT 'ZINCLUD1' FROM CODE.
    PERFORM SUB1(ZFORM1).
    This produces the following output:
    Original INCLUDE program!
    Extension of INCLUDE program!
    In this case, the updated version of the include program is used in the subroutine because its time stamp is checked when the subroutine is called, and not when the calling program is generated.

  • Calling labview VIs from python in Linux

    Hello.
    I've spent some time searching for this but I haven't found exactly what I was hoping for.
    I'm involved in a project that we're starting now and it involves creating a complex software architecture in order to control a robot. This software will need to perform multiple tasks such as interfacing with hardware (which LabView is perfect for) as well as planning and high performance image processing (which LabView isn't as great for).
    I was hoping to be able to use a scripting language like python to manage high level stuff (planning, behavior, etc) by calling "subroutines" in other languages such as C++ for the high performance stuff and LabView VIs for the hardware interfacing. I would also like this to run on Linux.
    I've found a lot of suggestions on how to call Python scripts from within LabView but this is not what I want. I want exactly the opposite, invoke VIs from Python. I found some information on how to do this on Windows (http://zone.ni.com/devzone/cda/tut/p/id/5719) but this article seems to assume that Windows is being used.
    Does anybody have an idea on how to do this? 

    Unfortunately that's not an option. This is an interdisciplinary school project involving students from engineering (mechanical, electrical and more), computer science and more fields. Some of these students have gotten used to using Labview and this is the main reason I'm trying to accomplish this. I want to have the higher level architecture done in a scripting language such as python which will enable us to create modules in various different environments such as C++ for tasks requiring high performance (image processing for example), Labview for tasks that the people used to using that and even something running on the GPU if there's use for that. Python would make it easy to glue all these components together while maintaining an environment that would make it very easy to configure the whole software system in different ways.
    I'd also prefer that this all run on Linux.
    The more I look for this the more hopeless I get I'll find anything which is very frustrating. It's a bit hard to believe that Labview doesn't have "python bindings" for running the VIs from within python :-(

  • How to call a subroutine in a script ?

    Hi ,
      How to call a subroutine in a script ?
    bye,
    Satya.

    Hello,
    Syntax goes like this
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    Example:
    In script form
    /:   PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
    /:   USING &EKKO-EKORG&
    /:   USING &EKPO-WERKS&
    /:   USING &EKKO-EKGRP&
    /:   USING &EKKO-BSTYP&
    /:   CHANGING &COMPNAME&
    /:   CHANGING &SENDADR&
    /:   CHANGING &INVCADR&
    /:   CHANGING &COMPADR&
    /:   CHANGING &COVERLTR&
    /:   CHANGING &SHIPADR&
    /:   CHANGING &REMINDER&
    /:   CHANGING &REJECTION&
    /:   CHANGING &POSTADR&
    /:   CHANGING &LOGO&
    /:   ENDPERFORM
    In program
    FORM Read_texts - To extract the standard texts from the table      *
    FORM READ_TEXTS TABLES IN_PAR   STRUCTURE ITCSY
                           OUT_PAR  STRUCTURE ITCSY.
      DATA : L_EKORG TYPE EKORG,
             L_WERKS TYPE WERKS_D,
             L_BSTYP TYPE BSTYP,
             L_EKGRP TYPE BKGRP.
      READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
      CHECK SY-SUBRC = 0.
      L_EKORG = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
      CHECK SY-SUBRC = 0.
      L_WERKS = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
      CHECK SY-SUBRC = 0.
      L_EKGRP = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
      CHECK SY-SUBRC = 0.
      L_BSTYP = IN_PAR-VALUE.
      CLEAR Z08M1_ORG_TEXTS.
      SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
                                              AND WERKS = L_WERKS
                                              AND EKGRP = L_EKGRP
                                              AND BSTYP = L_BSTYP.
      IF SY-SUBRC NE 0.
        SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
                                               AND WERKS = L_WERKS
                                               AND EKGRP = L_EKGRP
                                               AND BSTYP = SPACE.
      ENDIF.
      READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'SENDADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'INVCADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'COMPADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'REMINDER'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'REJECTION'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'POSTADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'LOGO'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
      MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Hope this helps.
    Regards

  • Calling compiled subroutines

    I would like to programmatically call (load and unload)
    subroutines from a VI.  There must be a way to do it, but I haven't quite
    figured it out.
    First the scenario:
    ABSTRACT SCENARIO: I have a LabView VI that will end up being compiled into an
    EXE.  In this VI, I have a file list (Array) of which I will pick one file
    each pointing to a VI.  I plan on using a Menu Ring that selects one of
    the options from the file list and then runs the corresponding VI.  I
    would like to be able to add or remove VIs
    from the list.  Furthermore, I would like to be able to change this so
    each file in the list points to a compiled function (maybe a dll?). 
    SPECIFIC SCENARIO: I have a measurement program that controls (adjusts
    settings/returns readings) external equipment.  I would like to be able to
    change the piece of equipment and simply change a measurement subroutine so
    that I can "drop in" different modules for each power meter, using
    the same main program.  I would like to programmatically load and unload
    these depending on usage.  After compilation of the main program, I would
    like to be able to add/change/remove subroutines to accommodate different
    equipment.
    When I compile the main program, if I compile the supporting VIs, I am no
    longer calling VIs.  If I don't compile
    the supporting VIs,  then I am running
    uncompiled code from compiled code (not very efficient).  I believe the
    way to do this is to actively load and unload dlls but I can't seem to do this
    programmatically (i.e. define what dll to call based on a file string). 
    The only dll calls seem to be "Call Library Function Node" and
    "Code Interface Node" each which must be linked to a dll a priori.
    I thank anyone sincerely for their feedback.

    A few points of my own. If, when you say compile, you mean build an ".exe" that is really "building an application", which takes the vi's in your program, essentially builds them into a ".llb" type file, removing diagrams and front panels from all but those that display user interfaces at runtime. When you run the resulting .exe file it is loaded by LabVIEW, the runtime engine version if the development system isn't installed, and I believe compiled at that time. When you run a VI during development, the time delay before running the first time is LabVIEW compiling the code. If you stop the VI and rerun it you will see that it starts running much more quickly the next time.
    You can build a structure that dynamically loads called vi's. Depending on the complexity of the called "plugin" there may be a delay before it executes, but it should be pretty brief, partly time to read it from disk, partly to compile the vi's code. I'm pretty sure that subsequent calls to that vi will be essentially instantaneous. Attached is a snip from some of my code that preloads the names and filepathes of vi's that may be run into two arrays and then when a specific vi name is called indexes the filepath based on the name. The VI plugins have to meet the criteria of having identical connector panes in this application, so you would need to develope an architecture that allows that.
    P.M.
    Message Edited by LV_Pro on 09-09-2005 04:58 PM
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion
    Attachments:
    plugins.PNG ‏65 KB

  • Calling a Program from Quomo Feature

    From the featuer QUOMO i need to call a cust ABAP Program to make a decison and return the value for QUOMO.
    i'm confised that how i would imort the parameters from the efature QUOMO i.e., the personal number and after making the decision how the value of QUOMO could be exported back.
    through some other postings i found that the program i'd create should be of type "Subroutine pool".
    but i'm still not able to determine how the import and export of variables will take place.

    To call a program from feature Quomo you need to add a form named ext_call_f.  The form must use the following parameters:
    FORM EXT_CALL_F USING NAMEN BACK STATUS PME87 STRUCTURE PME87.
      IF PME87-PERNR = '1234'.
        BACK = '1'.
      ELSE.
      IF PME87-PERNR = '4567' .
        BACK = '2'.
      ENDIF.
      ENDIF.
      STATUS = 0.
    ENDFORM.
    Feature Quomo passes the structure to your program and reads the return value BACK.  Depending on the value of pernr you can set the value of BACK in the program. 
    You can call the program from the feature like this:
    &QUOMO(Z_MY_PROGRAM)

  • Calling ABAP Subroutines: PERFORM  example

    hi friends,
    Can any one give me an example on Calling ABAP Subroutines: PERFORM   or provide any links for that example already posted in sdn ...
    points will be awarded
    regards and thanks
    Vijaya

    hi
    With the PERFORM statement, you can call subroutines which are coded in the same ABAP program (internal calls), or subroutines which are coded in other ABAP programs (external calls).
    You can also specify the name of the subroutine dynamically at runtime, and call subroutines from a list.
    Internal Subroutine Calls
    To call a subroutine defined in the same program, you need only specify its name in the PERFORM statement:
    PERFORM <subr> http://USING ... <pi>...
    http://CHANGING... <pi>... .
    The internal subroutine can access all of the global data of the calling program.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db978335c111d1829f0000e829fbfe/content.htm
    reward point if helpful.
    thanks

Maybe you are looking for

  • Have I Bricked my N900?

    I have mistakenly flashed an older version of firmware onto my device, and now I don't know how to make it accept the correct version of firmware. --- What brought me to this situation ----------------- 1. My N900 had be randomly shutting itself off

  • Updated Instant Client 11.2 for Linux 64 bit is on OTN

    The 11.2 Instant Client for Linux 64bit has been updated on http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxx86_64soft.html It is now at the same patch level as 32 bit.

  • How do I create a carving onto a tree with photoshop?

    I am looking for a way to make a realistic looking heart on a old oak tree using photoshop, any ideas?  Any help will be appreciated.

  • Erroe APP 523

    Hola: Por favor que hago si me aparece un error APP 523, no puedo entrar al sistema, y como mi tel esta bloqueado con clave acceso no me deja pasar de la verificación del sistema.

  • More than 250000 images?

    Somewhere i read that iPhoto6 can handle up to 250,000 images. Now, i've got definitely more than that -- about 15 GB (mostly fine art). So far, i haven't used iphoto at all, i just organized all of them in different (Finder) folders. What would be t