Calling a vi in scilab script

Hello!
What I'm trying to do here is the following: I am developping a VI that uses a certain algorithm to function. I put the algorithm into a Scilab script structure, no problem here I already did that.
The problem is, during the execution of the script at many points I need to get additional data through a sub-VI. I want to avoid a structure that looks like Script=>sub-VI=>Script=>subVI=>etc...so my question is: how can I call a sub-VI from inside the Scilab script?
Thank you very much!

Hello, thanks for the quick answer.
I do not have a screen capture at hand, besides my VI a a bit too messy at the moment, but hopefully it can be explained quite clearly.
Basically, I am implementing a Nelder-Meads simplex method, where the input of the script is the coordinates of 3 points, and from it the coordinates of one or two other points are calculated. Problem is, from here the algorithm needs to go measure those new points physically, using another sub-VI. After which I need to input those measurements into another script so I can compare all the points and choose which ones are better.
Actually I decided to code it like I described, alternating scripts and sub-VIs (I kinda had a schedule to follow ), but I thought it would still be interesting to know if it is actually possible to do it with one big script.
During my search I found some interesting leads using matlab, namely using ActiveX (there) but I couldn't find corresponding commands in Scilab.
Any ideas about that? or any other ways to do it?
thanks!

Similar Messages

  • Scilab Script in Labview

    I am trying to invoke a Scilab (v4.1.2) script in an empty Labview (v8.5.1) VI, and am continually receiving an error simply telling me that an error occurred while running the script. The script works in scilab alone. I've commented out the 'd' input in the script to try and have labview control it just as my first attempt at an interface between these two programs.
    Can anyone see where I am going wrong, or possibly how I could figure errors like this out on my own? It just doesn't point me in any direction to find the error, so I'm stuck.
    Thanks
    Attachments:
    Scilab_labview.zip ‏7 KB

    Hello,
    I see some problems when running the script as well.  It seems there are some slight problems communicating with the Scilab software.
    First, when looking at the text in the Scilab script node, I see an extra character before the new line.  Upon closer investigation, the script contains both a carriage return and a line feed at the end of every line.  This currently causes a problem with the Scilab software.  I was able to eliminate the extra character (the CR) by loading the script from disk in a text editor and copying and pasting it into the script node.
    Second, getcwd may not return what you expect.  It is not the directory in which the VI resides (unless you happened to put the VI in Scilab's default working directory).  You can find out what it returns by simply calling that function and then creating a string output variable on the script node.  Another method to specify the location of your data file is to pass in a string that is the current VI's location on disk.  You can find this using the Programming >> File I/O >> File Constants >> Current VI's Path primitive.  Simply use the Strip Path primitive to get the directory name.  Wire that into the script node as a string input and then append the filename like you currently do.
    Third, comments in the script seem to cause some problems.  The script node doesn't actually return an error, but most of the script simply doesn't execute.  Try removing all your comments from the script.
    Last, the Scilab-LabVIEW Gateway currently does not support plotting from the Scilab software, so your plot commands will not work.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • Calling Functions From Import Integration Script

    I've got an import integration script that runs fine, however I also have several DataPump scripts that are used in FDM to change specific columns as they come in. I can take the code from the scripts and add to the Import Integration script, but I would rather just call those other functions from the VBScript. I don't see any docs on this, and I'm just wondering if anyone has done this or can describe how I can do it.
    Is it possible? Since the standard import scripts reference the strField and the strRecord, can these functions be called from the import integration script?

    strField and strRecord are arguments passed by the application to the import function. The represent the field as defined by the import format and the record that is being processed during the import.
    Given that, I'm not sure how to answer your question.

  • Can we call function module in sap script

    hi
    can we call function module in sap script
    i want to use function module HR_TMW_GET_EMPLOYEE_NAME in sapscript
    to get Empname by using personal no
    pernr no is coming from bseg-pernr table
    so how i can use it .
    please help me
    thanks in advanced.

    hi,
    You can use like this:
    PERFORM FUNCTION_MODULE IN PROGRAM SUBROUTINE_POOL
    USING &FIELD1&
    USING &FIELD2&
    CHANGING &FIELD3&
    ENDPERFORM.
    where function_module is the func. module name defined in program SUBROUTINE_POOL , field1 n field2 are the fields to be passed, and field3 is the value which you want to display...
    You have to read field1 & field2 in the pool, process them & get the value of field to be output.
    Reward helpful answers.
    Regards,
    SIddhesh Sanghvi.

  • 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

  • How to Call Multiple Sessions through Shell scripting

    Dear Members,
    I have a scenario where I load data into target table from 20 different source tables.
    For this I have written three procedures where there exists an bulk insert executed on a same table in every procedure. Now I have to call these procedures simultaneously so that
    all three bulk loads are executed at once in different sessions.
    For this I have to write a shell script which opens 3 different sessions and execute all these packages at once.
    Can you guide me through.

    When you call sqlplus in your shell script, put a & at the end so that it runs the SQL scripts in the background. For instance:
    #!/bin/bash
    ...oracle home stuff
    $ORACLE_HOME/bin/sqlplus user/pass @script.sql &
    $ORACLE_HOME/bin/sqlplus user/pass @script2.sql &
    $ORACLE_HOME/bin/sqlplus user/pass @script3.sql &

  • Problem creating inputs, outputs and text in Scilab Script Block

    I have recently installed the Labview to Scilab Gateway.  I am running Labview 11.0 and Scilab 5.3.3.  The example files run properly, However, when I try to define any inputs, or outputs, there is no option to add the ports.  The block also ignores any text I type in it or copy to it.  I have been trying this on a blank vi.
    Solved!
    Go to Solution.

    Hi Ronny,
    I have a few more questions to help us debug this issue.  You said you tried the same right-click procedure to create inputs and outputs on a normal script block and it worked as expected.  What specifically do you mean by a "normal script block"?
    How did you drop the empty Scilab script node on a blank VI?  Did you drop it from a palette or paste it from another VI?
    Can you post an image of your Help >> About LabVIEW screen (feel free to obscure your name, company, and license number)?  If not, can you provide the LabVIEW version number specified from that screen?  There have been a few patches to LabVIEW 2011 and it will help us to reproduce the issue if we know exactly which version you have.  Also on that screen, do you have LabVIEW Base, Full, or Professional (or maybe an Evaluation or Student edition)?  The Scilab script node will not work in LabVIEW Base and the right-click menu will look as you describe.  You can verify your LabVIEW activation in the NI License Manager.
    Do you have any other versions of LabVIEW installed on your computer?  Is LabVIEW 2011 the most recent LabVIEW you installed?  How about previous versions of Scilab?  Do any previous versions remain or did you remove a previous version of Scilab AFTER installing Scilab 5.3.3?
    Grant M.
    Senior Software Engineer | LabVIEW Tablets | National Instruments

  • Calling a SubVI in MatLab script?

    Can you call a subVI in MatLab script node, or does the SubVI 'node' always have to be used?
    If this can be done, how is it done - can 'load' be used followed by the subVI address on the computer? 
    Any help would be much appreciated!
    Thank you in advance,
    Dani

    Thanks, I don't really understand what 'redundant indexing' is, as I'm unsure how to change the code! I've attached the coefficient table and a picture of the script if you could take a look that'd be great! I've commented out most of the code to see if I can just get one value out first of all. I'm unsure where to go from here - I can't figure out how to attach the VI by itself, sorry!
    Thanks so much,
    Dani
    Attachments:
    low T coeffs.jpg ‏233 KB
    matlabscript.jpg ‏187 KB

  • Call List Management and Interactive Script Editor Examples

    Hello All,
    Can any one provide docus on Call list management and Interactive Script Editor Exercises or any examples how to implement them.
    kindly m a i l me: r a j . k a n d i AT y a h o o . c o m
    Cheers Raj.

    Muneeb,
    I have found what looks like a solution for marketing attributes.
    Marketing attribute in the text field, interactive script
    However, even though I followed this It is still NOT updating the marketing attributes for the given BP.
    Also, I am no further forward in knowing how to add BDC Field entries in the Answer so that we can update BP fields like the preferred communication method etc.
    I would like to hear from you if you have found a solution Muneeb.
    With regards
    Jason

  • 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

  • Personas: how to call Transaction code using a Script Button?

    Hi,
    I want to use a script button to run to certain UI based on the given transaction code. I am thinking there might be some ways to do so:
    Option 1:
        Somehow one can let the script button call the T-code in script, say, IW21, but how to write such script?
    Option 2:
        In the script of the script button, use "Push" or "Click" to cause an action on the launch button which contains the T-code, say /nIW21.
    But on my PC, this does not work. Why?
    pls help asap!
    Thx a lot!
    Br,
    Dong

    Knowledge sharing:
    Hi,
    I have found exact answer to this question: in the script of a script button, one can first set the T-code to the /okdc component, then call "press Enter" action. By this way, any script button can be used to triggle an action for a T-code. One can set teh /okdc as "hidden". Hope this will help other newers.
    Br,
    Dong

  • Calling HTML File in Shell Script.

    Hi
    I have a shell script and a HTML file.
    HTML file is to create a Table.
    the HTML Script is as follows
    <html>
    <body>
    <table border="1">
    <tr>
    <td>Requisition Number</td><td>$PARAM0</td>
    </tr>
    <tr>
    <td>Purcahse Order Number</td><td>$PARAM4</td>
    </tr>
    <tr>
    <td>Purchase Line Number</td><td>$PARAM5</td>
    </tr>
    <tr>
    <td>Hold Reason</td><td>$PARAM3</td>
    </tr>
    <tr>
    <td>Hold Date</td><td>$PARAM2</td>
    </tr>
    </table>
    </body>
    </html>
    The output of this HTML file is a table with 5 rows and 2 columns.
    I saved this file as mail.html and placed it in the server where i have placed the Shell Script.
    When i call this HTML in Shell Script ... as follow
    cat /FND_TOP/bin/mail.html
    the output is not the table but infact the html tags are displayed.
    I need the table when i run this shell script.
    It would be of great help if anyone has a good solution for this.
    Thanks in Advance

    First, you need to put the file where your httpd server (you will need apache running) can find it. This is usually some place like:
    /var/www/html/table.htmlThen use a text-mode browser as Frits suggested to render it so your script can read it:
    #!/bin/sh
    lynx -dump http://localhost/table.html | while read row; do
        echo "${row}"
    doneor how ever you want to process the data.
    Another approach is to use XML transformations. First write an XML stylesheet:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" version="1.0">
         <xsl:output indent="no" method="text" standalone="yes" version="1.0"/>
         <xsl:template match="*">
              <xsl:apply-templates/>
         </xsl:template>
         <xsl:template match="td">
              <xsl:text> </xsl:text>
              <xsl:value-of select="normalize-space()"/>
         </xsl:template>
    </xsl:stylesheet>and then run your HTML through the {font:Courier}xsltproc{font} processor:
    $ xsltproc table.xsl table.html
    Requisition Number $PARAM0
    Purcahse Order Number $PARAM4
    Purchase Line Number $PARAM5
    Hold Reason $PARAM3
    Hold Date $PARAM2To be neat, I have omitted the many blank lines that were also output.
    HTH

  • How we can call or execute a SHELL script through Oracle forms or Reports

    How we can call or execute a SHELL script through Oracle forms or Reports.Its urgent.......

    Use HOST command.

  • Can I call host file ( Unix Shell script ) from Oracle 10g trigger

    Hi,
    I am new to Oracle 10g. Can I call host file ( unix shell script ) from Oracle 10g trigger ?. I know it is possible. Pl explain me with small example
    thanks & regards
    parag

    user12009546 wrote:
    Hi,
    I am new to Oracle 10g. Can I call host file ( unix shell script ) from Oracle 10g trigger ?. I know it is possible. Pl explain me with small example
    thanks & regards
    paragIf you are in 10g, you can simple call shell script from DBMS_SCHEDULER:
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'TEST_SCRIPT',
    job_type => 'EXECUTABLE',
    job_action => 'PATH_OF_YOUR_SCRIPT',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=MINUTELY; INTERVAL=1',
    enabled => TRUE,
    comments => 'Shell script from Oracle'
    END;
    /

  • How to use "Set Enterprise Call Info" step in the script ?

    Hi all
    Can anyone please suggest how to use "Set Enterprise Call Info" step in the script.
    Does anyone has any example script with the same (a complete example script) ?

    Hi
    go to this guide
    http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx70edgs.pdf
    and see the chapter
    "Designing Scripts for use with the Cisco Application Gateway"

Maybe you are looking for

  • IOS 7.1 Battery Life Fix

    I updated my iPhone 4S to iOS 7.1 and after a couple of weeks decided that the battery was draining faster than it used to.  Not some of the super fast 50% in an hour kind of drain, but I was not getting a full day out of it. I did everything I could

  • Utl_file help!!!

    Hey people :) Below is my code it is produces a list of names address for a mail merge, an example of an outputted file: 32-36 GREAT VICTORIA STREET BELFAST BT2 7BA 08448920902 0026936 000001 MRS FRAME 51 HOUSE DRIVE HOUSETOWN COUNTY ANTRIM BT36 7JY

  • Search in binary content

    I want to search for word in a binary content. For example I have a type "News" which has the proprieties : title, description ( binary type - mime - text/html). I want to find all news containing in description a word given - example : "and"). I hav

  • How to edit email message suject line?

    I am wondering how to edit the incoming email's suject line with javamail api? and which api defines the subject line of an email? regards Gaz

  • Set error message in sale order

    Hi, I want to put set the error message for given fields in sale order.So that order can not be save without filling the given fields. Fields are - Shipping type Personnel Number Material freight grp Net value Pricing Harsh