Call Code Module which uses Dll

I have a CVI .c file that has a function using a DLL. When run from CVI, it works perfectlly
Then I use TestStand to call the same function. When I comment out the DLL call ---> it works fine!
However, when I use the DLL, the error show up (as the attachment) when I tried to execute a single pass.
I did verify the module call by Edit the Source Code and I had include the dll.h & dll.lib in the Tscivrun!
I do not what else to do, please help!

The error was not attached (previewing strips it out for some reason).  As for the error itself, I am not sure what to look at yet; it will depend on the error.
Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
DISTek Integration, Inc. - NI Alliance Member
mailto:[email protected]

Similar Messages

  • Function module which uses both BAPI's for sales order create and change

    Please name the function module which uses both BAPI's for sales order create and change.
    BAPI_SALESORDER_CREATEFORMDAT2
    BAPI_SALESORDERCHANGE

    Yup.
    you must write a piece of code for this.
    with if else condition.first check if SO is exsist than use second FM to change it else create new SO from first FM.
    logic somethig like this.
    Amit.

  • I am trying to debug HTBasic code modules while using Test Stand, how do I refresh the subs that have been loaded in memory?

    I am writing an application for Test Stand, we are using modules previously written in HTBasic. Whenever I make a change to the code and try to re-run the program, it just runs the old version of the code. The only way to refresh the code is to close Test Stand down and restart it. Is there a way to flush the memory of modules?

    Hi,
    I haven't used HTBasic with TestStand 2.0.x, but I'm assuming that you have the steps in the sequence set to unload when sequence file is closed (look under the step properties -> run options tab).
    If you're still prototypeing, use the File->Unload all modules option. Have a look at page 4-3 in the user manual - it refers to .DLLs, but I'm assuming the HTBasic falls into the same methodology.
    Altering the run options from it's default will affect the memory useage and speed of execution of the test sequence. Have a look at page 5-22 (page 158 in the .pdf) in the TestStand user manual - basically, if a code module is loaded into memory already, when the step gets to execute, the loading overhead is already done. If it stays in memory after this, then it's avail
    able for next time (quicker second run 'cos it doesn't need to load again. However, the balanceing factor is the sequence is useing more memory at a time, by haveing the module ready.
    My usual setting is to use Load dynamically, and Unload after sequence executes. I use this is only during development however, as this is not the most speed friendly, but a compromise so that if I don't call a step I don't load it, but if I do use a step, I'm sure it's free again when I need to modify the .dll modules I create. If you have a look on page 5-7 (143) of the user manual you can set the sequence file to effectively over-ride each step's load and unload settings - useful if you want to revert back again later. If you use this, you'll see that the top two run options for the step are greyed out, but if you set it back with the sequence file options, they do revert back to their original settings.
    Hope that helps (and works!!)
    S.
    // it takes almost no time to rate an answer

  • "Wrong process return code" Error which using OS Command

    Hi,
    I want to execute a shell script in unix which calls a sed script and input to the script is an xml file. I am using OS Command tool to call the script which fails with "Wrong process return code" error. I ran the command directly on UNIX box and works fine but fails when executed through a package in ODI.
    The command I am passing in OS Command window is as follows:
    /test/callSed.sh emp.xml
    I also tried ODIOSCommand but getting the same error. The shell script has execute privileges for all users. Is there any other property to be set up for running shell scipts through ODI?
    Appreciate you response.
    Thanks!

    Hi,
    Thanks for a quick response.
    I tried both the commands you sent. "sh ./test/callSed.sh emp.xml" threw Wrong process return code error and "./test/callSed.sh emp.xml" threw the following error:
    java.io.IOException: Cannot run program "./test/callSed.sh": java.io.IOException: error=2, No such file or directory
         at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
         at java.lang.Runtime.exec(Runtime.java:593)
         at java.lang.Runtime.exec(Runtime.java:431)
         at java.lang.Runtime.exec(Runtime.java:328)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execOsOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execOsOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.G(g.java)
         at com.sunopsis.dwg.dbobj.SnpScen.a(SnpScen.java)
         at com.sunopsis.dwg.dbobj.SnpScen.localExecuteSync(SnpScen.java)
         at com.sunopsis.dwg.tools.StartScen.actionExecute(StartScen.java)
         at com.sunopsis.dwg.function.SnpsFunctionBaseRepositoryConnected.execute(SnpsFunctionBaseRepositoryConnected.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrdersIntegratedFunction(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
         at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
         at java.lang.ProcessImpl.start(ProcessImpl.java:65)
         at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
         ... 31 more
    Regards,
    Aks

  • Calling a VI which uses "system exec.vi" with LabVIEW run-time engine as adapter

    Hi,
    My TestStand sequence calls a VI which includes a call to "system exec.vi". When I try to load it in TestStand and if LabVIEW adapter is set to run-time engine, I get an error message "Unable to load Vi...". If I switch the adapter to "Development system", then it works fine.
    Is there any way to use "system exec.vi" in a VI which is called in TestStand with LabVIEW run-time ?
    Thanks,
    Alex
    Solved!
    Go to Solution.

    Hi Alex,
    In you case, you are getting a -18002 error.
    The reason is explained in the following link:
    -18002 Errors in TestStand
    http://digital.ni.com/public.nsf/allkb/D82FEAF0B4BA293A862575710053E252?OpenDocument
    Please have a look at the 2nd reason. This is your case.
    Hope it helps,
    Regrads
    Julien De Freitas / Applications Engineer / Certified LabVIEW Developer (CLD)
    National Instruments Switzerland

  • Ant fails to compile modules which use interfaces

    Hi, I am having a major problem compiling flex modules with ANT.
    I will try to give ALL necessary information so we can avoid days of useless novice questions.
    I have an application that uses many modules.  They DO compile perfectly in flash builder.
    First question.  How can I get flashbuilder 4.7 to show me the command line which it uses for mxmlc?  If I could see this, I could do everything myself.
    Second question:  What is wrong with my work below?
    I have a module which looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    implements="com.hof.lobby.modules.IVolatileAssets"
    width="400" height="300"
    creationComplete="onDummy(event)"
    >
    I have inside this module various other properties which are themselves instances typed as various other interfaces.
    when I build the main applicaiton, everything is fine.
    I created a macrodef in ANT to build all my modules efficiently.
        <macrodef name="buildModule">
            <attribute name="module-name" default="none" />
            <attribute name="module-package" default="none" />
                  <attribute name="out-path" default="." />
            <sequential>
                      <echo message="building @{module-name} to @{out-path}/@{module-name}.swf" />
                      <mxmlc file="${APP_ROOT}/src/@{module-package}/@{module-name}.mxml"
                                   output="${DEPLOY_DIR}/@{out-path}/@{module-name}.swf"
                                   keep-generated-actionscript="false"
                                   incremental="false"
                                   debug="true"
                                   fork="true"
                                   load-externs="${ANT_ROOT}/link-report.xml"
                                   optimize="false"
                                   >
                                <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                    <source-path path-element="${FLEX_HOME}/frameworks"/>
                                <compiler.library-path dir="${HOF_COMMON_ROOT}" append="true">
                                          <include name="bin"/>
                                </compiler.library-path>
                                <compiler.library-path dir="${APP_ROOT}" append="true">
                                          <include name="libs"/>
                                </compiler.library-path>
                    <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                        <include name="libs" />
                        <include name="../bundles/{locale}" />
                    </compiler.library-path>
                                <source-path path-element="${APP_ROOT}/src/locale/{locale}"/>
                </mxmlc>
            </sequential>
        </macrodef>
        <target name="modulesDebug" depends="lobbyDependencies" description="Build the lobby modules for debug">
                  <!--<buildModule module-name="InboxDlg" module-package="com/hof/lobby/modules/dlgs" out-path="modules3/dlgs"/>-->
                  <buildModule module-name="VolatileAssets" module-package="com/hof/lobby/modules" out-path="modules3"/>
              </target>
    So then when i run this target, i get the following output:
    modulesDebug:
         [echo] building VolatileAssets to modules3/VolatileAssets.swf
        [mxmlc] Loading configuration file F:\var\sdk\flex_sdk_4.5.1.21328A\frameworks\flex-config.xml
        [mxmlc] F:\var\projects\hof\svn2.-----.com\lobby\branches\3.1.39.0\src\com\hof\lobby\modules\Vola tileAssets.mxml(-1):  Error: Interface IVolatileAssets was not found.
        [mxmlc] <?xml version="1.0" encoding="utf-8"?>
    BUILD FAILED
    F:\var\projects\hof\svn2.-----.com\lobby\branches\3.1.39.0\build.xml:98: The following error occurred while executing this line:
    F:\var\projects\hof\svn2.-----.com\lobby\branches\3.1.39.0\build.xml:51: mxmlc task failed.
    Total time: 7 seconds
    If i remove the implements attribute in the module component definition then i get a cascading failure for EVERY SINGLE interface in the module.
    Basically something is causing ANT to fail to load the class def for ANY interface in the module.
    What on earth am I doing wrong?
    Please help.
    Thank you.

    I am replying to my own thread because I absolutely HATE IT when i see a post with the exact problem that I have and no answer.
    here is the answer to the problem:
    I had to create an external config file and load it with
    <load-config filename="${basedir}/config/ModuleConfig.xml"/>
    the contents of ModuleConfig.xml re-define nearly every framework configuration.  none of them seem non standard to me...
    Basically I just defined everything to be what it SHOULD be and loaded this config file after I apply the default flex-config.xml from the sdk.
    do what I posted below and it will work.
    so now, my macrodef is:
        <macrodef name="buildModule">
            <attribute name="module-name" default="none" />
            <attribute name="module-package" default="none" />
                  <attribute name="out-path" default="." />
                  <attribute name="debug" default="true" />
            <sequential>
                      <echo message="building @{module-name} to @{out-path}/@{module-name}.swf" />
                      <mxmlc file="${APP_ROOT}/src/@{module-package}/@{module-name}.mxml"
                                   output="${DEPLOY_DIR}/@{out-path}/@{module-name}.swf"
                                   keep-generated-actionscript="false"
                                   incremental="true"
                                   debug="@{debug}"
                                   fork="true"
                                   optimize="false"
                                   size-report="${basedir}/reports/@{module-name}-size_report.xml"
                                   >
                                <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                                <load-config filename="${basedir}/config/ModuleConfig.xml"/>
                </mxmlc>
            </sequential>
        </macrodef>
    and my ModuleConfig file is:
    <flex-config xmlns="http://www.adobe.com/2006/flex-config">
      <compiler>
        <warn-no-constructor>false</warn-no-constructor>
        <accessible>true</accessible>
        <fonts>
          <managers>
            <manager-class>flash.fonts.JREFontManager</manager-class>
            <manager-class>flash.fonts.BatikFontManager</manager-class>
            <manager-class>flash.fonts.AFEFontManager</manager-class>
            <manager-class>flash.fonts.CFFFontManager</manager-class>
          </managers>
        </fonts>
        <source-path>
          <path-element>${basedir}/src/locale/{locale}</path-element>
          <path-element>${basedir}/src</path-element>
        </source-path>
        <debug>true</debug>
        <theme>
          <filename>${FLEX_HOME}frameworks/themes/Spark/spark.css</filename>
        </theme>
        <namespaces>
          <namespace>
            <uri>http://ns.adobe.com/mxml/2009</uri>
            <manifest>${FLEX_HOME}frameworks/mxml-2009-manifest.xml</manifest>
          </namespace>
          <namespace>
            <uri>library://ns.adobe.com/flex/spark</uri>
            <manifest>${FLEX_HOME}frameworks/spark-manifest.xml</manifest>
          </namespace>
          <namespace>
            <uri>library://ns.adobe.com/flex/mx</uri>
            <manifest>${FLEX_HOME}frameworks/mx-manifest.xml</manifest>
          </namespace>
          <namespace>
            <uri>http://www.adobe.com/2006/mxml</uri>
            <manifest>${FLEX_HOME}frameworks/mxml-manifest.xml</manifest>
          </namespace>
        </namespaces>
        <library-path>
          <path-element>${FLEX_HOME}frameworks/locale/{locale}</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/rpc.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/osmf.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/spark.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/charts.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/framework.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/spark_dmv.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/sparkskins.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/textLayout.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/advancedgrids.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/authoringsupport.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/flash-integration.swc</path-element>
          <path-element>${FLEX_HOME}frameworks/libs/mx/mx.swc</path-element>
          <path-element>  ---- proprietary libs - redacted ----  </path-element>
        </library-path>
        <external-library-path>
          <path-element>${FLEX_HOME}frameworks/libs/player/10.2/playerglobal.swc</path-element>
        </external-library-path>
        <locale>
          <locale-element>en_US</locale-element>
          <locale-element>es_ES</locale-element>
          <locale-element>fr_FR</locale-element>
          <locale-element>it_IT</locale-element>
        </locale>
      </compiler>
      <target-player>10.2</target-player>
      <swf-version>11</swf-version>
      <static-link-runtime-shared-libraries>false</static-link-runtime-shared-libraries>
      <runtime-shared-library-path>
        <path-element>${FLEX_HOME}frameworks/libs/framework.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/framework_4.5.1.21489.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>framework_4.5.1.21489.swz</rsl-url>
        <policy-file-url />
      </runtime-shared-library-path>
      <runtime-shared-library-path>
        <path-element>${FLEX_HOME}frameworks/libs/textLayout.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/tlf/2.0.0.232/textLayout_2.0.0.232.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>textLayout_2.0.0.232.swz</rsl-url>
        <policy-file-url />
      </runtime-shared-library-path>
      <runtime-shared-library-path>
        <path-element>${FLEX_HOME}frameworks/libs/osmf.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/osmf_1.0.0.16316.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>osmf_1.0.0.16316.swz</rsl-url>
        <policy-file-url />
      </runtime-shared-library-path>
      <runtime-shared-library-path>
        <path-element>${FLEX_HOME}frameworks/libs/spark.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/spark_4.5.1.21489.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>spark_4.5.1.21489.swz</rsl-url>
        <policy-file-url />
      </runtime-shared-library-path>
      <runtime-shared-library-path>
        <path-element>${FLEX_HOME}frameworks/libs/sparkskins.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/sparkskins_4.5.1.21328.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>sparkskins_4.5.1.21328.swz</rsl-url>
        <policy-file-url />
      </runtime-shared-library-path>
      <runtime-shared-library-path>
        <path-element>${FLEX_HOME}frameworks/libs/rpc.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/rpc_4.5.1.21328.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>rpc_4.5.1.21328.swz</rsl-url>
        <policy-file-url />
      </runtime-shared-library-path>
      <runtime-shared-library-path>
        <path-element>${FLEX_HOME}frameworks/libs/charts.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/charts_4.5.1.21328.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>charts_4.5.1.21328.swz</rsl-url>
        <policy-file-url />
      </runtime-shared-library-path>
      <runtime-shared-library-path>
        <path-element>${FLEX_HOME}frameworks/libs/spark_dmv.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/spark_dmv_4.5.1.21328.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>spark_dmv_4.5.1.21328.swz</rsl-url>
        <policy-file-url />
      </runtime-shared-library-path>
      <runtime-shared-library-path>
        <path-element>${FLEX_HOME}frameworks/libs/mx/mx.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/mx_4.5.1.21489.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>mx_4.5.1.21489.swz</rsl-url>
        <policy-file-url />
      </runtime-shared-library-path>
      <runtime-shared-library-path>
        <path-element>${FLEX_HOME}frameworks/libs/advancedgrids.swc</path-element>
        <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.5.1.21328/advancedgrids_4.5.1.21328.swz</rsl-url>
        <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
        <rsl-url>advancedgrids_4.5.1.21328.swz</rsl-url>
        <policy-file-url />
      </runtime-shared-library-path>
      <file-specs>
        <path-element>${APP_ROOT}/src/@{module-package}/@{module-name}.mxml</path-element>
      </file-specs>
      <output>${DEPLOY_DIR}/@{out-path}/@{module-name}.swf</output>
    </flex-config>

  • Calling Stored procedure which uses Bulk Collect

    Hi All, I have Oracle stored procedure which uses Bulk Collect and returns table type parameter as output. Can anyone please help me how Can I call this kind of stored procedures which returns table type output using VB and Oracle's Driver. (I am successfully able to call using MS ODBC driver, but I want to use OraOLEDB driver.)

    861412 wrote:
    how Can I call this kind of stored procedures which returns table type output using VB and Oracle's Driver. This forum deals with the server-side languages SQL and PL/SQL.
    Your question deals with the client side and Visual Basic language.

  • Datasources with function module which uses table type

    hi..
    I am creating a datasource which extracts data using a function module from xRPM to BW. When creating the function module it gives an error " TABLES parameters are obsolete!" while trying to specify the extract structure. I searched in SDN and learnt that we need to use table types and use that in the changing tab.Not sure how that works and where we need to use the extract structure for this.
    Could someone please explain this to me and let me know how i can create my datasource using this type of function module.

    Hi,
    in your case you need the tables parameter, as the service api expects the result of the fm in a table called e_t_data. Of course table parameters are obsolet but you can just ignore the warning and it will work.
    regards
    Siggi
    PS: Extraction fm must follow a strict interface definition.
    Message was edited by:
            Siegfried Szameitat

  • TestStand internal mechanism: call sequence/ architecture c++ code module adapter, .dll functions

    I would like to know more about this particular aspect of TestStand's architecture:
    What exactly happens "internally" (class/seq diagram ?)when a c/c++ dll code module adapter step invokes/ calls an exported .dll function (testStand sequence executed from sequenceEditor) ?
    My guess (wrong/correct ?) is that:
    I execute
    SeqEdit.exe
    which hosts
    teengn.dll
    which hosts
    cppAdp.dll
    which hosts
    "myDllWithExportedFunctions.dll"
    and (finally) directly calls exported functions of "myDllWithExportedFunctions.dll"

    Christoph -
    Your binary file presentation at a high level is correct.
    The object relationship is:
    - The Sequence Editor is just a client of the TestStand engine.
    - The Engine is the creator of all TestStand objects.
    - The Engine creates the Sequence File object for the Sequence Editor.
    - The Sequence File has a reference to a Sequence object, i.e. RunState.SequenceFile.Data.Seq["MainSequence"]
    - The Sequence has a reference to a Step object, i.e. RunState.SequenceFile.Data.Seq["MainSequence"].Main["Action"]
    - The Step has a Module object, i.e. RunState.SequenceFile.Data.Seq["MainSequence"].Main["Action"].TS.SData
    - The Module object uses its associated Adapter class to Load/Run code modules.
    - The DLL handle and function pointer are stored
    in the Module object.
    - The Module object with the Adapters help knows how to call the function in the DLL.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • [Resolved] Distributing a Python module that uses C shared libs?

    I did some research on distutils, and I managed to find fairly detailed instructions for how one could distribute a Python module with C extensions. However, I have a Python module which uses ctypes to run code from C shared libraries (more specifically: SDL, and related libraries).
    Basically, this is what I have:
    pslab.py # requires ctypes wrapper modules below
    sdl.py # ctypes wrapper modules require respective shared libs below
    sdlmixer.py
    sdlimage.py
    sdlttf.py
    # This is for Linux -- .dll for Windows, .dylib for OSX.
    libSDL.so
    libSDL_mixer.so
    libSDL_image.so
    libSDL_ttf.so
    Is there a "standard" way to distribute modules of this type (maybe some undocumented distutils method, or something I failed to find)?
    The Python files are not the problem (distutils can handle them), but I need a way to install the appropriate shared libs for the platform in question (if necessary), so that ctypes wrapper modules can find and load them.
    Last edited by Goran (2012-08-14 08:51:19)

    You could distribute those files ... but I wouldn't recommend it.
    I believe the closest thing to a "standard" is simply to list sdl as a dependency.  A package distributor should not try to manage dependencies for users (only inform them of the dependencies).  That is either up to the user, or (more often) the distro's package management system.
    If I download a program that uses gtk, I don't expect it to include all of the gtk too.  Rather, the documentation would simply specify that gtk is a dependency.  Are you going to also distribute copies of the python interpreter?  Perhaps I'm missing something, but why would sdl be any different than python itself?  It's assumed (or speficied) that the user needs to have these installed for your package to work.
    Last edited by Trilby (2012-08-13 23:44:44)

  • Creating Plugin Modules for Use with Compiled Code

    Hi all,
    While programing a data analysis package in Labview, I've run into a problem that I don't really know how to answer.  It goes something like this: my program receives data from measurement devices in the form of ASCII or binary files, which I must then process and evaluate.  The problem is, the data files can have a variety of different formats.  Right now, I only know of 4 or 5, but more could literally be added at any time.
    My thought is this: I'd love to have some sort of modular plugins for reading the data files.  In other words, I could have a subfolder under my application's space in the "Program Files" directory.  The subfolder would contain any number of "ReadFileX.xxx" modules.  Upon initiation, my code would scan that folder, determine the possible formats (based on the *.xxx files therein), and be capable of reading any of the files.  Ideally, the user would select a file, I would note its format, and call the appropriate plugin module to handle reading the data into my code.
    What is the best approach for doing something like this?  I looked (briefly) into using DLL's, but (from what I can tell) I would need to explicitly define the function name and the inputs / outputs in the "Call Library Node" function.  This would appear the break the modularity feature, as I want to be able to load the software, and then develop new plugins down the road when the need arises.  I also found some information on source distributions (in an LLB).  This option would probably work, but my efforts at coding a basic test of VI-Server were met with errors.
    Does anyone have any experience performing a similar task?  If so, would you share your knowledge / secrets with me?  I would be extremely grateful for your feedback.
    Thanks!
    Mark

    Mark - there is a Coding Challenge currently going on, and I have submitted an entry that shows how to dynamically instantiate a class based on a class that resides on disk. Specifically, you're going to be interested in "Get LV Class Default Value.vi" under the "Cluster, Class, and Variant" palette that allows you to create an instance of an object based on the path of the .lvclass file. The class you load is going to be what's called a child class of a parent class (or base class), where the child class implementation overrides the function of the parent class. The "Get LV Class Default Value.vi" is very loosely analogous a Class Constructor.
    You can deploy your application having implemented all the base class functions, then subsequently develop and deploy new classes to reside in a "plugins" folder without needing to change the original app code.
    If you find that contest entry helpful, consider dropping a vote, huh? The LabVIEW Communities have had access errors sporadically the past few weeks, so if you get a "Server Error" you may need to try again later. There's also going to be Forums maintenance today and tomorrow.
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • Best practice for calling application module methods and plsql code

    In my application I am experiencing problems with connection pooling, I seem to be using a lot of connections in my application when only a few users are using the system. As part of our application we need to call database procedures for business logic.
    Our backing beans, call methods on the application module which in turn call a database procedure. For instance in the backing bean we have code like this to call the application module method.
    // Calling Module to generate new examination/test.
    CIGAppModuleImpl appMod = (CIGAppModuleImpl)Configuration.createRootApplicationModule("ky.gov.exam.model.CIGAppModule", "CIGAppModuleLocal");
    String testId = appMod.createTest( userId, examId, centerId).toString();
    AdfFacesContext.getCurrentInstance().getPageFlowScope().put("tid",testId);
    // Close the call
    System.out.println("Calling releaseRootApplicationModule remove");
    Configuration.releaseRootApplicationModule(appMod, true);
    System.out.println("Completed releaseRootApplicationModule remove");
    return returnResult;
    In the application module method we have the following code.
    System.out.println("CIGAppModuleImpl: Call the database and use the value from the iterator");
    CallableStatement cs = null;
    try{
    cs = getDBTransaction().createCallableStatement("begin ? := macilap.user_admin.new_test_init(?,?,?); end;", 0);
    cs.registerOutParameter(1, Types.NUMERIC);
    cs.setString(2, p_userId);
    cs.setString(3, p_examId);
    cs.setString(4, p_centerId);
    cs.executeUpdate();
    returnResult=cs.getInt(1);
    System.out.println("CIGAppModuleImpl.createTest: Return Result is " + returnResult);
    }catch (SQLException se){
    throw new JboException(se);
    finally {
    if (cs != null) {
    try {
    cs.close();
    catch (SQLException s) {
    throw new JboException(s);
    I have read in one of Steve Muench presentations (Oracle Fusion Applications Team' Best Practises) that calling the createRootApplicationModule method is a bad idea, and to call the method via the binding interface.
    I am assuming calling the createRootApplicationModule uses much more resources and database connections that calling the method through the binding interface such as
    BindingContainer bindings = getBindings();
    OperationBinding ob = bindings.getOperationBinding("customMethod");
    Object result = ob.execute()
    Is this the case? Also is using getDBTransaction().createCallableStatement the best way of calling database procedures. Would it be better to expose plsql packages as webservices and then call them from the applicationModule. Is this more efficient?
    Regards
    Orlando

    Thanks Shay, this is now working.
    I successfully got the binding to the application method in the pagedef.
    I used the following code in my backing bean.
    package view.backing;
    import oracle.binding.BindingContainer;
    import oracle.binding.OperationBinding;
    public class Testdatabase {
    private DCBindingContainer bindingContainer;
    public void setBindingContainer (DCBindingContainer bc) {this.bindingContainer = bc;}
    public DCBindingContainer getBindingContainer() {return bindingContainer;}
    public static String validateUser()
    // Calling Module to validate user and return user role details.
    System.out.println("Getting Binding Container from Home Backing Bean");
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    System.out.println("Obtain binding");
    OperationBinding operationBinding = bindings.getOperationBinding("calldatabase");
    System.out.println("Set username parameter");
    operationBinding.getParamsMap().put("p_userId",userId);
    System.out.println("Set password parameter");
    operationBinding.getParamsMap().put("p_testId",examId);
    Object result = operationBinding.execute();
    System.out.println("Obtain result");
    String userRole = result.toString();
    System.out.println("Result is "+userRole);
    }

  • Calling a function from a dll written by using visual studio c++

    Hi, how can i call a function from a dll which is written by visual studio c++ in test stand?  Although the functions in dll are exported and i've chosen c/c++ adapter, i saw no function in test stand. Is there a different step while i'm calling a function from a dll written by c++ than calling a function from a dll written by cvi?

    Hey Sadik,
    Selecting the C/C++ DLL Adapter Module should be sufficient for this. When you drag an action step for this onto the Main Step and navigate to the location of the DLL, the function list should populate and you should be able to select the function you want to use. If this is not the case, would you be able to post this DLL so that we can test this on our end?
    Regards,
    Jackie
    DAQ Product Marketing Engineer
    National Instruments

  • Prog/Function Module which call during pressing the button "Pattern" inSE38

    Dear Guru,
    I have encountered an issue : issue is like that I want the name of the function module/ program which invokes as soon as we press the "Pattern" Button in Application tool bar of ABAP se38 editor.
    Please help.
    Thanks & regards
    Saifur Rahaman

    Dear Guru,
    I have Encountered an Issue.
    The Scenario Is like this :-
    As soon as we create a new prog using SE38 it automatically generates a standard pattern like below :
    *& Report  ZSR_TEST_05
    REPORT  ZSR_TEST_05.
    But the requirment is like this as soon as we create a new prog using SE38 it automatically it should generate the The Pattern like below :--
    *& Project            :
    *& Program Name       :
    *& Transaction Code   :
    *& Program Type       :
    *& Functional Domain  :
    *& Technical Coding   :
    *& Functional Guidance:
    *& Coding Review      :
    *& Spec. Review       :
    *& Program Description:
    REPORT  ZSR_TEST_05.
    After going through sdn documentation i have identified that using dynamic pattern we can create this and call that dynamic pattern using PATTERN button in ABAP editor.
    But the thing we require as soon as we generate the prog thr. SE38 atomatically all the details must generate before the report <report_name>.
    For achieving thins what i have to do ... please show me some path to achieve this
    Duplicate locked
    Edited by: Rob Burbank on Oct 31, 2009 3:26 PM

  • What is the use of CALL FUNCTION MODULE - AT BACKGROUND TASK?

    Hi experts,
    I found Call functional module in background task will make the FM run at the next commit work as some people said. So I have some questions:
    1 if we use COMMIT WORK commend, the pending FM will be called? If there are several FMs called at background task, what is the sequence of them? How many conditions will trigger the running of these FMs?
    2 Where can I find the log of this pending FMs? In SAP library, it says there are 2 tables. But I checked these tables and can only find the FM name and user of it. And I can not understand content of these tables. It seems one is for the main information of FM, and the other is for the data of the FM, maybe the parameters.
    3 If I call a FM in this way, Can I canncel it before the next commit work in some way?
    Finally, thanks for reading and help.

    HI,
    When the COMMIT WORK statement is executed, the function modules registered for the current SAP-LUW are started in the order in which they were registered. ROLLBACK WORK deletes all previous registrations for the current SAP-LUW.
    If the specified destination is not available when COMMIT WORK is executed, an executable program called RSARFCSE is started in background processing. By default, this tries to start the function modules registered for a SAP-LUW in their destination every 15 minutes and up to 30 times. These parameters can be changed in the transaction SM59. If the destination does not become available within the defined time, it is recorded in the database table ARFCSDATA as the entry "CPICERR". The entry in the database table ARFCSSTATE is deleted after a standard period of eight days

Maybe you are looking for

  • Alternative to isFocusTraversable in 1.4

    Using JDK 1.3.1 I overrode isFocusTraversable to specify that some components should not gain focus when traversing via the keyboard but could gain focus via a mouse click. The Component.isFocusTraversable method has been deprecated in 1.4. The API d

  • How can I make adobe photoshop cs6 run faster?

    Windows 7 Ultimate Processor: AMD Athlon(tm) XP Processor 3000+ GHz Installed memory (RAM): 768 MB usable System Type: 32 bit operating system Thanks for your help!

  • SAP MM Flow in construction and oil industries

    Hi,       I know the flow of MM module in electronic manufacturing and trading company can you give some link oe give thr process of SAP MM flow in construction and oil and gas industries. regards,   zafar

  • Support/Supress multi page reports

    Post Author: mlowrance CA Forum: General We are creating a report that can have varying numbers of columns.  The report is for businesses that have multiple locations, however each company does not necissarily have the same number of locations.  Up t

  • Update 2.0.1 results in wifi failures

    I updated to iPod Touch software 2.0.1 on the day it was released. Having set up all of the wifi access points I connect to regularly under 2.0, everything worked fine. I could even connect to other networks. Then, I changed the configuration of my h