Run code simultaneously

Hello, i have an application for logging temperatures in different chambers. Each chamber has a start button to start the timer and logging of temperatures. The code is pretty large. I wanted to be able to run the code for many different chambers simultaneously. For Example, Press start button on Chamber 1 and have that code run. Then Press start on chamber 2 and have that code run while Chamber 1 is still runnng. The code is too large to have a lot of different case structures. I was hoping there was a way i could do this without making a lot of subvi's and Globals. Any suggestion is greatly appreciated.
Mike

GRMAN wrote:
Hello, i have an application for logging temperatures in different chambers. Each chamber has a start button to start the timer and logging of temperatures. The code is pretty large. I wanted to be able to run the code for many different chambers simultaneously. For Example, Press start button on Chamber 1 and have that code run. Then Press start on chamber 2 and have that code run while Chamber 1 is still runnng. The code is too large to have a lot of different case structures. I was hoping there was a way i could do this without making a lot of subvi's and Globals. Any suggestion is greatly appreciated.
Mike
I did something just like this a while back that worked well for me. This way you wont have to re-write or restructure your entire code.
The problem is that you can not have multiple instances of the same VI with the same name in memory, so what you have to do is create multiple instances (copies) of that VI with different names and then you can run them all simultaneously.
I wrote an application (very simple code) that does this. This utility loads a VI, copies it to another location (i.e. temp directory), renames the VI, and then runs it, after running it deletes the copy from HD, VI remains in Memory. Repeat this process to run more instances (rename the copy uniquely every time, I used a random number generator and included it in the name of the VI).
Caution, if you use a global variable, it will be shared among the instances and can cause problems.
Attached is my VI application-
Good luck.
Attachments:
Run Multiple Instances Of a VI.vi ‏49 KB

Similar Messages

  • Unable to run code analysis with WDK 9926

    Hi,
    I am trying to run code analysis with WDK 9926 and seeing below issue? can anybody help me to resolve this ?
    Error:
    ====
    C:\sw\dev\T4\windows\Src\kernel\vbd>msbuild.exe cht4vbd.vcxproj /p:Configuration="Windows 8.1 Debug" /P:Platform=x64 /P:RunCodeAnalysisOnce=True
    Microsoft (R) Build Engine version 12.0.21005.1
    [Microsoft .NET Framework, version 4.0.30319.33440]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Build started 4/7/2015 12:08:30 AM.
    Project "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" on node 1 (defaul
    t targets).
    DriverBuildNotifications:
      Building 'cht4vbd' with toolset 'WindowsKernelModeDriver10.0' and the 'Deskto
      p' target platform.
      Using KMDF 1.11.
    PrepareForBuild:
      Creating directory "x64\Windows8.1Debug\".
      Creating directory "C:\sw\dev\T4\windows\Src\kernel\vbd\x64\Windows8.1Debug\c
      hk\x64\".
      Creating directory "x64\Windows8.1Debug\cht4vbd.tlog\".
    InitializeBuildStatus:
      Creating "x64\Windows8.1Debug\cht4vbd.tlog\unsuccessfulbuild" because "Always
      Create" was specified.
    StampInf:
      c:\Program Files (x86)\Windows Kits\10\bin\x86\stampinf.exe -d "*" -a "amd64"
       -k "1.11" -f x64\Windows8.1Debug\chvbdx64.inf
      Copying "C:\sw\dev\T4\windows\Src\kernel\vbd\chvbdx64.inf" to "x64\Windows8.1
      Debug\chvbdx64.inf" for stamping
      Using version information from c:\Program Files (x86)\Windows Kits\10\Include
      \shared\\ntverp.h
      Could not open version header file c:\Program Files (x86)\Windows Kits\10\Inc
      lude\shared\\bldnump.h. (0x00000002)
      Could not determine version information.  Please specify using -v option.
      Updates common INF file directives
            USAGE:
            stampinf -f filename [-s section] [-d <xx/yy/zzzz> | *]
                     -a architecture -n [-c catalogfile]
                                 [-v <w.x.y.z> | *]
                                 [-k nnnnn] [-u nnnnn]
                                 [-i path]
            -f  specifies the INF file to process
            -s  specifies the INF section to place the DriverVer= directive.  By
                default this directive is placed in the [Version] section.
            -d  specifies the date written in the DriverVer= directive.  Note that
                a '*' given for a date value means for stampinf to write the
                current date. If the date is not specified, the date is taken
                from the STAMPINF_DATE environment variable.
            -v  specifies the version written in the DriverVer= directive. Note
                that a '*' given for a version value means for stampinf to write
                the current time (h.m.s.ms).  This is useful during development
                in order to get increasing version numbers. If the version is not
                specified, its value is taken from the STAMPINF_VERSION
                environment variable.
            -a  specifies the architecture string to replace the $ARCH$ keyword.
                The $ARCH$ keyword is used to tailor a TargetOSVersion decoration
                in a [Manufacturer] section, as well as its respective section
                name, to a specific platform. If no value is specified, stampinf
                takes its value from the _BuildArch environment variable.
            -c  specifies the value to be written in the CatalogFile= directive
                in the [Version] section. By default, this directive is not
                written.
            -k  specifies the version of KMDF that this driver depends on.  This
                is used to tailor the KmdfLibraryVersion & KMDF co-installer name
                in the INF. This will replace the $KMDFVERSION$ and
                $KMDFCOINSTALLERVERSION$ keywords in the INF.  The string is of
                the format:
                    <major_version>.<minor_version>
                As an example, supplying 1.5 as the version string will result in
                values of 1.5 and 01005 for the two keywords (respectively).
            -u  specifies the version of UMDF that this driver depends on.  This
                is used to tailor the UmdfLibraryVersion & UMDF co-installer name
                in the INF. This will replace the $UMDFVERSION$ and
                $UMDFCOINSTALLERVERSION$ keywords in the INF.  The string is of
                the format:
                    <major_version>.<minor_version>.<service_version>
                (where service_version is generally zero)
                As an example, supplying 1.5.0 as the version string will result
                in values of 1.5.0 and 01005 for the two keywords (respectively).
            -i  specifies the location of ntverp.h file.
                path represent the fully qualified
                location of the directory containing ntverp.h.
            -n  noisy mode shows verbose stampinf output
              -x  removes the coinstaller tag from the file and replaces the line w
      ith a ";"
            NOTES:
            The environment variable PRIVATE_DRIVER_PACKAGE can be set to
            enable stampinf's 'developer mode' behavior. When this is
            set, the date and version used for DriverVer is set to the
            current date and time, regardless of the command line
            settings. Also, 'CatalogFile=delta.cat' is written to the
            version section, unless a catalog was already specified
            with '-c'.
    c:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(355,5
    ): error MSB6006: "stampinf.exe" exited with code 1. [C:\sw\dev\T4\windows\Src\
    kernel\vbd\cht4vbd.vcxproj]
    Done Building Project "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" (de
    fault targets) -- FAILED.
    Build FAILED.
    "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" (default target) (1) ->
    (StampInf target) ->
      c:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(355
    ,5): error MSB6006: "stampinf.exe" exited with code 1. [C:\sw\dev\T4\windows\Sr
    c\kernel\vbd\cht4vbd.vcxproj]
        0 Warning(s)
        1 Error(s)
    Time Elapsed 00:00:04.07
    Thanks, Krishna

    Hi,
    I am trying to run code analysis with WDK 9926 and seeing below issue? can anybody help me to resolve this ?
    Error:
    ====
    C:\sw\dev\T4\windows\Src\kernel\vbd>msbuild.exe cht4vbd.vcxproj /p:Configuration="Windows 8.1 Debug" /P:Platform=x64 /P:RunCodeAnalysisOnce=True
    Microsoft (R) Build Engine version 12.0.21005.1
    [Microsoft .NET Framework, version 4.0.30319.33440]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Build started 4/7/2015 12:08:30 AM.
    Project "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" on node 1 (defaul
    t targets).
    DriverBuildNotifications:
      Building 'cht4vbd' with toolset 'WindowsKernelModeDriver10.0' and the 'Deskto
      p' target platform.
      Using KMDF 1.11.
    PrepareForBuild:
      Creating directory "x64\Windows8.1Debug\".
      Creating directory "C:\sw\dev\T4\windows\Src\kernel\vbd\x64\Windows8.1Debug\c
      hk\x64\".
      Creating directory "x64\Windows8.1Debug\cht4vbd.tlog\".
    InitializeBuildStatus:
      Creating "x64\Windows8.1Debug\cht4vbd.tlog\unsuccessfulbuild" because "Always
      Create" was specified.
    StampInf:
      c:\Program Files (x86)\Windows Kits\10\bin\x86\stampinf.exe -d "*" -a "amd64"
       -k "1.11" -f x64\Windows8.1Debug\chvbdx64.inf
      Copying "C:\sw\dev\T4\windows\Src\kernel\vbd\chvbdx64.inf" to "x64\Windows8.1
      Debug\chvbdx64.inf" for stamping
      Using version information from c:\Program Files (x86)\Windows Kits\10\Include
      \shared\\ntverp.h
      Could not open version header file c:\Program Files (x86)\Windows Kits\10\Inc
      lude\shared\\bldnump.h. (0x00000002)
      Could not determine version information.  Please specify using -v option.
      Updates common INF file directives
            USAGE:
            stampinf -f filename [-s section] [-d <xx/yy/zzzz> | *]
                     -a architecture -n [-c catalogfile]
                                 [-v <w.x.y.z> | *]
                                 [-k nnnnn] [-u nnnnn]
                                 [-i path]
            -f  specifies the INF file to process
            -s  specifies the INF section to place the DriverVer= directive.  By
                default this directive is placed in the [Version] section.
            -d  specifies the date written in the DriverVer= directive.  Note that
                a '*' given for a date value means for stampinf to write the
                current date. If the date is not specified, the date is taken
                from the STAMPINF_DATE environment variable.
            -v  specifies the version written in the DriverVer= directive. Note
                that a '*' given for a version value means for stampinf to write
                the current time (h.m.s.ms).  This is useful during development
                in order to get increasing version numbers. If the version is not
                specified, its value is taken from the STAMPINF_VERSION
                environment variable.
            -a  specifies the architecture string to replace the $ARCH$ keyword.
                The $ARCH$ keyword is used to tailor a TargetOSVersion decoration
                in a [Manufacturer] section, as well as its respective section
                name, to a specific platform. If no value is specified, stampinf
                takes its value from the _BuildArch environment variable.
            -c  specifies the value to be written in the CatalogFile= directive
                in the [Version] section. By default, this directive is not
                written.
            -k  specifies the version of KMDF that this driver depends on.  This
                is used to tailor the KmdfLibraryVersion & KMDF co-installer name
                in the INF. This will replace the $KMDFVERSION$ and
                $KMDFCOINSTALLERVERSION$ keywords in the INF.  The string is of
                the format:
                    <major_version>.<minor_version>
                As an example, supplying 1.5 as the version string will result in
                values of 1.5 and 01005 for the two keywords (respectively).
            -u  specifies the version of UMDF that this driver depends on.  This
                is used to tailor the UmdfLibraryVersion & UMDF co-installer name
                in the INF. This will replace the $UMDFVERSION$ and
                $UMDFCOINSTALLERVERSION$ keywords in the INF.  The string is of
                the format:
                    <major_version>.<minor_version>.<service_version>
                (where service_version is generally zero)
                As an example, supplying 1.5.0 as the version string will result
                in values of 1.5.0 and 01005 for the two keywords (respectively).
            -i  specifies the location of ntverp.h file.
                path represent the fully qualified
                location of the directory containing ntverp.h.
            -n  noisy mode shows verbose stampinf output
              -x  removes the coinstaller tag from the file and replaces the line w
      ith a ";"
            NOTES:
            The environment variable PRIVATE_DRIVER_PACKAGE can be set to
            enable stampinf's 'developer mode' behavior. When this is
            set, the date and version used for DriverVer is set to the
            current date and time, regardless of the command line
            settings. Also, 'CatalogFile=delta.cat' is written to the
            version section, unless a catalog was already specified
            with '-c'.
    c:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(355,5
    ): error MSB6006: "stampinf.exe" exited with code 1. [C:\sw\dev\T4\windows\Src\
    kernel\vbd\cht4vbd.vcxproj]
    Done Building Project "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" (de
    fault targets) -- FAILED.
    Build FAILED.
    "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" (default target) (1) ->
    (StampInf target) ->
      c:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(355
    ,5): error MSB6006: "stampinf.exe" exited with code 1. [C:\sw\dev\T4\windows\Sr
    c\kernel\vbd\cht4vbd.vcxproj]
        0 Warning(s)
        1 Error(s)
    Time Elapsed 00:00:04.07
    Thanks, Krishna

  • Error while running code template mapping between two oracle tables

    Hello All
    Iam getting the following error while running code template mapping between two oracle tables. Using OWB 11gR2 and oracle 11gR2 DB.
    java.sql.SQLException: ORA-20001: The active workspace is not valid as a target for this mapping
    c: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1065
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1087
    ORA-06512: at "SOURCE.FILENET_EX_UNIT_3", line 555
    ORA-06512: at line 4                                        
    Job 51 error: java.sql.SQLException: ORA-20001: The active workspace is not valid as a target for this mapping
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1065
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1087
    ORA-06512: at "SOURCE.FILENET_EX_UNIT_3", line 555
    ORA-06512: at line 4
    Quick help is highly appreciated.

    Dera Dallan
    its only a target user for the workspace where you are deploying the mapping from.
    I have two repositories for two different projects. each repositary has its own workspace.
    ex:-
    Project 1
    Work space bpms_rep_owner
    Repositary owner bpms_rep_owner
    Repositary user bpms_rep_user
    Project 2
    Work space dem_rep_owner
    Repositary owner dem_rep_owner
    Repositary user dem_rep_user
    Reg
    S.Gyazuddin

  • Run Code Continuously in Event Driven State Machine

    Hi there, I was wondering what is the best way to run code continuously in an event driven state machine. Particularly, I am going off the JKI state machine. At the moment I put the code I want to run continuously (acquire from an instrument) in the timeout case of the event structure. When the user presses the button, the event sends the value 0 to the timeout terminal of the event structure (through a shift register). If the user stops the acquisition then the value -1 is sent to the timeout terminal. This is a tip that I took from an article by Mike Porter.
    Would it be better to run this process in a separate loop? Is a state machine a bad design choice for running code continuously? I don't like my current solution because if I have another process I'll have to start putting case structures into the timeout case. Also, if the process takes a while then the event structure will take a while to respond.
    Thanks for your input!

    AKA_TG wrote:
     Adding to that I believe Preview Queue element to read the data and Lossy  enqueue to transfer the I/O output, especially if the I/O device responds slowly. This should keep your event structure polling along very nicely during I/O calls to the other structure.
    I actually prefer to use an User Event to send the data to the main event structure and/or whoever else needs it.  I am not a fan of the lossy enqueue (loss of data).  At that point, I might as well just use a Notifier and/or global variable.

  • Can my MBA run COD 4 and Civilization V?

    I recently got a MBA mid-2011 11" and I was wondering if it can run COD 4 and Civilization V.
    I have a
    Processor  1.6 GHz Intel Core i5
    Memory  4 GB 1333 MHz DDR3
    Graphics  Intel HD Graphics 3000 384 MB
    Serial Number  C02G44FMDJYD
    Software  Mac OS X Lion 10.7 (11A2063)
    Please help me out,
    Thanks

    Not sure if Civ V will run. I have the i7 11" and it is struggling at low quality graphics.

  • Running two different VI codes simultaneously

    Hello guys
    I am conducting a study in which I am required to run multiple codes for different harwares simultaneously, I have the vi codes for them, I am looking for suggestions on how I can integrate them in such a way that all of them run simultaneously, can I use "Sync" option provided in the pallate. 
    Please suggest
    Thanks in advance 
    Best
    Deependra
    P.S-  All the hardwares are independent and I am not using any chassis to sync them externally, I only need to integrate the vi codes

    Are you just reading from the EMG and force plate?
    I'm not hearing anything that says you need absolute synchronization.  So I would just run them as two separate subVIs.  You will want to get away from the example and use the actual driver VIs.  If they both are just reading, them put then in the same loop.  Read the EMG then read the force plate.  Do whatever with the data and loop through it again.  This usually works well as a Queued Message Handler.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Flex iPad Application : Run code before application enters background  Application Type: Flex Mobile Application Target Platform: iPad AIR Version: 4.0 Development Environment: Flash builder 4.6  I want to run some code just before iphone application goes

    Application Type: Flex Mobile Application
    Target Platform: iPad
    AIR Version: 4.0
    Development Environment: Flash builder 4.6
    I want to run some code just before iphone application goes into background. I need function similar to didEnterBackground
    of native xcode app
    (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegat e_Protocol/Reference/Reference.h
    tml#//apple_ref/occ/intfm/UIApplicationDelegate/applicationDidEnterBackground:)
    I tried using devactivated function of flash.display.STAGE.
    I used following addEventListener:
    STAGE = this.parent.stage;
    STAGE.addEventListener(Event.DEACTIVATE, onAppDeactivated);
    It worked for me but only when device is connected to development environment in debug mode. When I create my release build
    it is not working.
    So how can I make sure that my code runs before application goes into background.

    Even I am facing almost same issue
    Problem installing Adhoc version to iPhone and iPad - Development Environment Is - Adobe Flash CS6

  • Run code when a radio button is clicked

    I have a radio group with various radio buttons in there
    named date, time,
    reg etc
    When I click on a button I need the following:
    Which radio button was pressed
    The value of that button eg date, time, reg etc
    Then run some code (I will use the value to run a MYSQL
    query)
    The idea is to be able to sort a table based on the header
    that was clicked.
    Cheers
    SteveW

    Thanks for the help so far.
    I am using dreamweaver 8. ASP VBScript
    I would rather not use javascript as our operators have PDA's
    and we are
    trying to use the same interface for everyone.
    What I am trying to do is re-sort a Table by either reg,
    date, user order
    etc. by clicking on the radio buttons.
    The table is populated with MYSQL have a look at
    http://80.5.54.164/swiff/contact.asp
    user 1 password 1
    Unless there is another way to achieve this
    Cheers
    SteveW
    "bregent" <[email protected]> wrote in
    message
    news:elithk$a5n$[email protected]..
    > >Then run some code (I will use the value to run a
    MYSQL query)
    >
    > >The idea is to be able to sort a table based on the
    header that was
    > >clicked.
    >
    > Are you trying to sort the table by resubmitting a new
    sql query, or sort
    > the
    > table client side? I would suggest the latter.
    >

  • Trying to run code from this weeks question of the  week

    i've copied the code from this weeks question of the week "sending an http req from a normal class." when i compile it everything looks fine. i've installed tomcat and it works. so i guess i am confused as to where i put the servlet class file??? and do i need to change a web.xml file?
    any help would be appreciated,
    erik

    for simplicity i just put Hello.class and HelloServlet.class in C:\tomcat\webapps\ROOT\WEB-INF\classes. i still cannot get this to work. here are my source files:
    Hello.java:
    import java.net.*;
    import java.util.*;
    import java.io.*;
    public class Hello {
    public static void main(String args[]) {
    ObjectInputStream is;
    URL url;
    String uri =
    "http://localhost:8080/HelloServlet";
    HashMap hash = new HashMap();
    try {
    //calling the servlet by passing params
    url = new URL(uri + "?&name=MyName&age=25");
    // open input stream and read the hashmap
    // returned by the servlet
    is = new ObjectInputStream(url.openStream());
    hash = (HashMap) is.readObject();
    // print it out
    System.out.println(hash);
    } catch (Exception e) {
    e.printStackTrace(System.err);
    HelloServlet.java:
    import java.util.HashMap;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class HelloServlet extends HttpServlet {
    public void service(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
         // getting the parameters
    String name = request.getParameter("name");
    String age = request.getParameter("age");
         //putting them in a hashmap
    HashMap hm = new HashMap();
    hm.put("name", name);
    hm.put("age", age);
         //returning them
    try {
    ObjectOutputStream p = new                                    
         ObjectOutputStream(response.getOutputStream());
    p.writeObject(hm);
    p.flush();
    p.close();
    }catch (Exception e) {
    e.printStackTrace();
    can anyone see a problem. this code is supposed to be run from the command line. and i am doing that.
    thanks for the help,
    erik

  • How to run code after each other?

    Hi there, a little question.
    I call a function that returns the path of a new saved image as a string.
    In that function I  use a loader to load the image. After the image is loaded I set the url of the saved image and return it.
    Next = id of the new saved image
    Imageurl = the url of the image to load.
    thumborfull = an indication to see if the thumb needs to be saved or the full image, so the thumb can be saved in a different folder than the full image.
    My problem: when I call this function.. the return goes first, and then the loader complete. In the loader complete I set the new path of the image which i want to return.
    So, my code runs synchronal, and not synchronic.. How do you get it to run synchronic?
    Please some help.
    code:
         public var myimageurl:String;
         public function saveImageFromInternet(next:Number, imageurl:String, thumborfull:String):String
              var imgClass:Class;
              //the second way
              var loader:Loader;
              //source code of the second way
              loader = new Loader();
              //notice: NOT _loader.addEventListener,is  _loader.contentLoaderInfo.addEventListener
              loader.contentLoaderInfo.addEventListener(Event.COMPLETE,function(event:Event):void
                    var loader:Loader = Loader(event.target.loader);
                        // width and heigt of selected image
                   var originalimgwidth:Number=event.target.width;
                   var originalimgheight:Number=event.target.height;
                   //put original image into bitmapdata
                   var bitmapje:BitmapData;
                   bitmapje=new BitmapData(originalimgwidth, originalimgheight, false, 0xFFFFFFFF );
                   bitmapje.draw(loader.content,null,null,null,null,true);          
                   var newimagefile:File=new File();
                   if(thumborfull=="thumb")
                        newimagefile=docsDir.resolvePath("Tmtp/I"+next+".mtp"); //image path
                        myimageurl=newimagefile.nativePath;
                   else
                        newimagefile=docsDir.resolvePath("Fmtp/I"+next+".mtp"); //image path
                        myimageurl=newimagefile.nativePath;               
                   var stream:FileStream = new FileStream;          // create new filestream
                   stream.open(newimagefile, FileMode.WRITE);     // open filestream
                   var data:ByteArray = encodeToJpg(bitmapje);     // convert bitmapdata to a jpg bytearry
                   stream.writeBytes(data, 0, data.length);     // writing the image
                   stream.close();
              loader.load(new URLRequest(encodeURI(imageurl)));
              return myimageurl;

    If you are concerned that you are losing the url as it is not available from the complete event, you could use a custom event, which allows you to pass your own data into the custom event. Then in your custom complete event object you will still have the url.
    http://livedocs.adobe.com/flex/3/html/help.html?content=createevents_1.html

  • Run code\function after stopping a QTP\UFT script

    Hi,
    I have a scenario where I want to perform some tasks (like zipping and attaching files to QC) after my UFT\QTP script is stopped.
    The script can stop in all these scenarios:
    1.) forcefully manual-stop the script
    2.) run-time errors
    3.) script test fail (exittest) condition
    4.) script successfully ended.
    I have tried calling the function (which zips and attaches files to QC) inside my script.
    But, disadvantages are:
    1.) i have to be very specific at what are the places of code i want to insert this code into.
    2.) its a huge performance issue, each time i call this function: it does all these tasks "everytime"...zipping and attaching files.
    I just want this function to be called just once, after the QTP script has been stopped.
    Is this possible, please help me out.
    Thanks,
    Nutan.

    Muthu,
    You are getting this error when you do any operation in your page, or when you try to access your page you are getting this error?
    /main/oracle/apps/po/demo/webui/MainPG is your page ?
    Thanks,
    With regards,
    Kali.
    OSSI.

  • Can I (and if so, how would I) connect two encoders (one linear and one angular) to the same chassis (NI 9401) and get their respective NI MAX tasks to run as simultaneously as possible?

    Sorry, but I am still rather new to LabVIEW and NI MAX. I connected both devices (a linear probe and an angular encoder) to my NI 9401 chassis. I figured out how to create tasks for each and get continous samples readings from each. When trying to run both in LabVIEW, I get the error saying that I cannot run multiple tasks at once. It suggests the Control Task VI, but I did not see any help in that. Any advice?
    Here is some general information, whatever it is worth: Both encoders are operating off of the same clock source, PFI4, which to my knowledge corresponds to CTR 1 A, where the angular encoder's A signal is wired in. The linear's physical channel is ctr0 and the angular's is ctr1.
    Thank you very much for taking the time to look at this and help me out!
    Solved!
    Go to Solution.

    So if I go the Edge Counter route, is there any way for the task to figure out direction of the encoders? It looks like my options are always counting up or always counting down whenever the encoder is read... For my application, I need it to read when the linear encoder goes in and when it goes out... Am I doing something incorrectly with it?
    I am using a probe to measure the contour of a part, and using a motor to spin the part, with one encoder measuring the angle of the motor and the other measuring the displacement of the probe.
    Also I am still not seeing a way to simultaneously read both devices in NI MAX... I cannot use two counter inputs from the same device at once in the same task it seems.

  • Newbie having trouble compling and running code

    Ok I bought a beginning Java book to learn. I loaded the JDK into a file c:\java\jdk1.5.0_06. Set up a folder called code at c:\java\code. Set my paths for both PATH and CLASSPATH under both user variable and system variable to c:\java\jdk1.5.0_06\bin. During compiling I had a problem with the error "'javac' is not recognized as an internal or exter..." I got that worked out. I have my party.class file in the code directory. When I try to run it using "c:\java\code> java party" I get this error. "Exception in thread "main" java.lang.NoClassDefFoundError: party. " I ran a dir and I can see party.class. I get the same results when I run the HelloWorldApp.class also.
    One thing I did try was "set CLASSPATH = "
    Then I could run the HelloWorldApp.class ., but the Party.class still will not run. It gives this error "Exception in thread "main" java.lang.NoSuchMethodError: main"
    I have read through a bunch of forums online but have not find anything to rmemdy this.
    Here is the code
    Party.java
    import java.awt.*;
    import java.awt.event.*;
    class party {
      public void buildInvite(){
        Frame f = new Frame();
        Label l = new Label ("Party at Tim's");
        Button b = new Button ("You Bet");
        Button c = new Button ("Shoot me");
        Panel p = new Panel();
        p.add(l);
        } //more code here...
    } HelloWorldApp.java
    * The HelloWorldApp class implements an application that
    * simply displays "Hello World!" to the standard output.
    class HelloWorldApp {
        public static void main(String[] args) {
            //Display "Hello World!"
            System.out.println("Hello World!");
    }Thanks for your help

    OK I think I figured out the main method thing. But
    now I have gone back to getting the "Exception in
    thread "main" java.lang.NoClassDefFoundError: party.
    " error. Everything I have read said this was cause
    by looking int he wrong dir. But I can run dir and
    see party.class
    import java.awt.*;
    import java.awt.event.*;
    class party {
         public void buildInvite(){
              Frame f = new Frame();
              Label l = new Label ("Party at Tim's");
              Button b = new Button ("You Bet");
              Button c = new Button ("Shoot me");
              Panel p = new Panel();
              p.add(l);
         } //more code here...
         public static void main(String[] args) {
                  // code here
    } Does this one work?

  • Auto-Run Code on OC4J start

    Hi,
    Is is possible to Auto-Run a piece of code, either by
    calling a method on a Session bean or calling a Servlet,
    when OC4J is started up?
    Cheers,
    Ro

    Hi
    You can also use a servlet that implements ServletContextListener - this fires before the application server opens up for user requests. Great for loading lookup codes, etc....

  • "Pre-Run" Code Execution

    Hi,
        This is sort of a detailed question, so i'll try and explain it as best I can. So what I have is a text file, which contains a large list that I am parsing through regular expressions. I would like to take this list, place it in a combo box, allow the user to select their item and then continue. Now to achieve this, i've created two VI's. The first parses the text file and the second does something to the input. Now what i'm trying to achieve here is to bring this down to only one VI. I'm trying to write a "toolkit-like" bit of code for our company and the less VI and user understanding it requires, the better. So i'd like to be able to have a VI that executes a bit of a code prior to run so that the user can select the item they would like, and then hit run.  If you want a good example of what i'm trying to achieve it would be similair to the selection of GPIB devices on the VISA references VI. If this is unachievable then my next question would be how do i create a subvi that populates a combo box that can be made available to the parent VI. Currently I get the list of items from the sub-vi and then populate the combo box through a property node in the main VI. When i try moving the property node and combo box inside the sub vi and then connecting the combo box control to the connectors and creating a control for it in the parent VI it doesn't operate properly. Thanks for any help!
    Regards,
    Ken

    Hi everyone,
    I've expanded upon these ideas to make them more convenient and easy-to-use for client programmers. Functional global variables are very powerful programming techniques, but they have one slight draw-back. A functional global can execute any number of different cases, but only some of the inputs are relevant for any given case. In Dynamik's example above, for instance, the Read case requires a ComboBox refnum to be input, but how is the client programmer to know that the Execute case doesn't require this input anymore? Also, how is the client programmer to know that the ComboBox refnum IS required in the first case? You can't set the input to required unless it's required for ALL calls to the functional global, which doesn't make sense.
    You can solve this problem by creating a polymorphic VI whose instances all wrap the functional global and call different cases of it. For instance, in the example above, you could create two VIs that call the Read and Execute case of ComboBoxTool.vi respectively. The Read-case VI would select Read for the enum and have a ComboBox refnum input that's REQUIRED. The Execute-case VI, on the other hand, would select Execute for the enum, but would only wire a constant into the ComboBox input. This way, when the client programmer calls the Execute case, there's no possible input for a ComboBox refnum, so one's obviously not needed.
    Why did I specify that you should wire a constant ComboBox refnum into the ComboBoxTool.vi input for the Execute-case? This allows you to modify the original functional global (ComboBoxTool) to have ALL its inputs required. Since the client programmer never accesses the VI directly, this is ok. You can then eliminate some of the overhead of calling an extra subVI. Because LabVIEW knows that all of the inputs for ComboBoxTool are required, it doesn't ever have to check if valid values were input to the function before calling it. It knows that values are there to use. This saves some execution time.
    I've attached the example below. The only thing it requires is a little knowledge on how to build Polymorphic VIs. Trust me, once you've built your first one, it's really simple! And since all the cases are very similar (they all call the same functional global, just with different inputs), you can copy them quickly and modify the connector pane. This technique will give you greater control over what the client programmer sees and uses, and it won't require you to upgrade to LabVIEW 8. (If you do have LabVIEW 8, however, you can extend this technique and embed the functional global, it's polymorphic wrapper and all the instances into a Project Library and set the original functional global to Private. This would make it impossible for the client programmer to access it directly!) Take a look at Dynamik's example modified below.
    Jarrod S.
    National Instruments
    Attachments:
    Polymorphic_ComboboxTool.zip ‏44 KB

Maybe you are looking for