Thread.ExternallySuspended method with asychronous vi

Hello

My sequence is launching a state machine in labview to type "launch vi" asynchronous queue stage teststand.  The vi runs for the duration of my sequence, waiting and acting on the message queue, initiated by certain steps teststand that call an "enqueue" labview vi.  I want teststand to pause while the work is done in vi, until the vi ends and waiting for another message from the queue.  From what I understand reading page 3-7 in the teststand reference manual, use it "Testand - Set wire external suspeded.vi" in teststand palette should accomplish this.  After reading this, I think, once there is a string in line waiting is received in the vi, set Thread.ExternallySuspended true and after work in vi, set it to false again to let the sequence to resume.  But the first experimentation, behavior does not conform to this.  The sequence continues anyway regardless of the true Thread.ExternallySuspended setting.  Help file says 'allow TestStand to suspend the thread of execution parent while still running code in the code module'.  The word "allow" implies that I need to do something on the side of teststand also, so he could take a break?  If Yes, what?

Thank you

David J.

Doug,

I think you hit the nail on the head, and this looks like something that would work in reality.  I have been to launch around something like this around in my head, but was not quite see where teststand would "listen" to the vi to do, but a message of the extra return of the vi worker queue is the perfect solution.   It would take me just to add a "waiting" after "enqueue" in vi that sends the message to the queue, which is actually a vi attached to a type of step.  While waiting to receive a message from the queue 'fact' return, teststand is actually suspended.  It's great.  This is a final head striker, would have thought this myself.

Thank you very much

Concerning

David J.

Tags: NI Software

Similar Questions

  • HTTP GET method with the body of the message

    Hi all

    I work with an API using HTTP to make calls to a server. I met an API call in the documetnation that uses the HTTP GET method with a message body. It seems that this is not supported by LV14 because I do not see an entry of message body for the LabVIEWHTTPClient.lvlib:GET.vi function. The POST methods and COULD appear to be banned for this API call, I a not found 405. I could be stuck with the help of GET.

    Certainly, this isn't recommended GET method - but it is not explicitly forbidden in the HTTP/1.1 specification. Is there a work around to submit an HTTP GET request to content? I have to use HTTP external DLL to achieve?

    All entries would be great.

    Thank you

    Richard

    Seems to be a problem on the server side?  Maybe I misunderstood what you were trying to get?

  • No method with the signature in extension of CO

    Dear friends

    without touch AM or its associated components, I made an extension of CO without a field (messagestyledtextbean). His suffering.,.

    1. but after that it is not in default, which allows to go to the next page

    2 and I ts throw an error when loading page.

    Error

    No - no method with the signature - signature getPendingApprovalItems method (class java.lang.String, java.lang.String class)

    any idea please help

    Aravinda,

    What I meant by "level" is not fun/resp/site. This is where you attach the controller.

    Will you be able to attach a screenshot of the personalization page where you specify the controller? AR attach you this to the pageLayoutRN?

    See you soon

    AJ

  • No method with signature

    Hi all
    I'm new here and I'll try to find a way, but I don't know where to find it. There is an error in the SupWorkerScorecardsCO class and the message is "no method with the signature - supPublishScorecardsStr (class java.lang.String, java.lang.String class).
    In this appeal, where can I find the supPublishScorecardsStr method?

    localObject = (String) paramOAPageContext.getRootApplicationModule () .invokeMethod)
    "supPublishScorecardsStr,"
    New serializable [] {(String) paramOAPageContext.getSessionValue ("SELECTED_MGR_ID"), getNtfMessage (paramOAPageContext, paramOAWebBean, "DialogComments")});

    Yes you are right, that this error comes when this method is not present in the AM, we can remove this method/signature of this method differs in AM.

    If you access AM, please check this method with the same signature (type of data to compare with number of parameters) exists or not

    Thank you
    Ashish

  • AM Customer Interface + method with a variable number of parameters

    Hello

    I use JDev11 & ADF. I have an App Module exteding, an application custom module (ApplicationModuleImpl) class. I created a few methods and expose them in the Client Interface. I read that I can only use the return types and methods of simple or serialized attributes in the Client Interface of AM. I need to create a method with the variable number and type of parameters, something like "Createwithparams", something like:
        public void Method(String[] FieldNames, Object[] FieldValues)
    Is there a way to do it?

    TKS.

    You just did it. It should work as far as I know.
    If you can not make available the method try list instead of normal array.

    Timo

  • In another thread - another method and then run Sub...

    I wrote a method to extract a string from a webpage using StreamConnection and it works perfectly... except that it runs on the main thread.  I wonder if there is a simple way to have a method that returns an object (String in this case) something to run on a thread and return it to the first thread.

    Everything I try the only thing I can get to work on the second thread is what's on the run method void, but that returns nothing... because it sucks...

    Until now what I thought is to pass the variables I need in the constructor, then set the connection stream real term where I want retruned is written in a class variable and another method that returns the class variable that has been filled with the run method... but that doesn't seem to just... thought he worked in a simple test I ran...

    A slightly different way (but completely equivalent) to work in a another thread is to create a class that implements Runnable and feed a thread. If, for any reason, you do not want to expand Thread (because your worker class extends already something else and it would be difficult to refactor), then this variant is a lifeline. You do something like this:

    class WorkerClass extends AnotherClass implements Runnable {    // ...    public void run() {       // do time-consuming work here    }}
    
    // later...WorkerClass worker = new WorkerClass();// initialize worker object. Then: new Thread(worker).start();
    

    As it is easy to turn a class in an executable (you simply add "implements Runnable" and a run() method), it's an easy way to avoid the subclassing Thread.

    Regardless of how you use to perform work in a separate thread, there is always the question of how to get the results. With the help of the observer is a common way to handle this, but in general, this means that the results are returned in the worker thread, not the thread from the main event. If you want to update the user interface, this can be a problem. Another approach is to structure your code something like the following:

    /** * Process the results of some time-consuming operation. */public void acceptResults(ResultType result) {  // ...}
    
    /** * Start a thread to carry out time-consuming work in a * separate thread and deliver the results back in the * event dispatching thread. */public void launchWork() {  new Thread() {        public void run() {           final ResultType res = computeResults();          Runnable r = new Runnable() {                public void run() {                   acceptResults(res);               }         }         Application.getApplication().invokeLater(r);      }
    
           /**        * Do time-consuming work in this method       */       private ResultType computeResults() {         // connect to server, interpret reply, etc.       } }.start();}
    

    You have the right idea that is running in a thread separate is how to manage a time consuming task. The point of all, however, is that you (the event dispatching thread) don't want to wait for the task at hand. Both the observer model and the code here offer a solution for a worker thread to do the work without blocking the thread of the event. The invokeLater() method was kindly provided by BlackBerry people to give the worker threads neatly transfer control on the event dispatching thread when needed.

  • Is there a better way to stop a Thread.stop () method?

    First my basic problem. In one of my programs I use Solver constraints. I call the Solver constraints with a set of constraints and it turns over a card with a satisfying assignment. In most cases, this works in acceptable time (less than 1 second). But in some cases, it can take hours. I am currently in a running of the service and using Thread.stop () Thread. That look like this:
         public Map<String, Object> getConcreteModel(
                   Collection<Constraint> constraints) {
              WorkingThread t=new WorkingThread(constraints);
              t.setName("WorkingThread");
              t.start();
              try {
                   t.join(Configuration.MAX_TIME);
              } catch (InterruptedException e) {
              }
              if(t.isAlive()){
                   t.stop();
              }
              return t.getSolution();
         }
    where t.getSolution (); Returns null if the Thread has been interrupted.

    Unfortunately, it sometimes blocks the JVM with:
    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006dbeb527, pid=5788, tid=4188
    #
    # JRE version: 6.0_18-b07
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode windows-amd64 )
    # Problematic frame:
    # V  [jvm.dll+0x3fb527]
    #
    # An error report file with more information is saved as:
    # F:\Eigene Dateien\Masterarbeit\workspace\JPF-Listener-Test\hs_err_pid5788.log
    #
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    #
    Anyone know a better way to do it?

    Thank you in advance.

    Note 1: the Solver constraints is a third-party tool and change it is infeasible. (I tried already)
    Note 2: Using Thread.stop (Throwable t) no chances as the error message.

    user7641489 wrote:
    Other tools are worse. And stop in the library, that those who do not work.

    I've read that it would be possible to put the calculation in another process using the java.lang.Runtime.exec (). does anyone know how this could look like.

    Note the two parameters and return values are serializeable then maybe with the object (in/out) putstream and getInputStream/getOutputStream.

    And if using another process how to get the result as soon as it is ready, but still be able to kill the process when his shot the time-out.

    Exec a java program that simply that the calculation doesn't work, prints the result, and then ends.

    http://www.JavaWorld.com/JavaWorld/JW-12-2000/JW-1229-traps.html

    Runtime.exec, or his preferred version, ProcessBuilder, you can get a java.lang.Process, who owns a destroy() method.

    As for "having the result as soon as it's ready," If you mean intermediate results on the fly, you can't if the library already provides a way to do. Otherwise, if you mean just get it as soon as the external process is finished, you will have it as soon as this process writes.

    Edited by: jverd April 27, 2011 11:19

  • Comparison of the data in the new thread in parallel with the hand

    I have a file of main sequence. Overall, I got a call from sequence that initializes an oscilloscope and returns to the hand. Next main action, I have the user turn on power supply and confirm with a popup message. My question is now, I need to create a new thread before action "light food" for the oscilloscope intercepts all overloads and continues to record. So if this is the case, what I'm trying to do is:

    Call sequence Initialize oscilloscope

    Call sequence oscilloscope Fetch

    Message Popup, power supply turns on, confirm with "OK".

    -Now, since the user disabled on food, I need compare all data, even while the user turns on the power and clicks "OK" and after.

    So, I need an oscilloscope running in parallel and by comparing data during execution of the main sequence. Any help would be appreciated.

    The type of call sequence step has an option of a sequence of sub in a new thread.

    Call sequence Initialize oscilloscope

    Sequence oscilloscope Fetch call (call in a new thread and it will acquire signals until it gets a signal to stop to the main following)

    Message Popup, power supply turns on, confirm with "OK".

    Delay if necessary

    Set the signal to stop the thread close.

    I hope this helps.

  • Thread and class with no thread

    Hi everyone , hope you can help me with this...

    I have two classes, extends a Thread and the other extends screen. My problem is that the screen needs all the information that the thread has had, but I do not know how to make the screen show upward when the thread is finished, or wait until this thread stops to see its information.

    Thanks in advance

    At the end of your thread, you can push the screen with:

    synchronized (UiApplication.getEventLock) {}

    UiApplication.getUiApplication () .pushScreen (yourMainScreen);

    }

  • ADF Data Control WS - methods with 'Object' instead of native types

    Recently, we noticed a strange behavior during the integration of services SOA Suite with ADF Web Service data controls:

    -Consider a service, where the WSDL has the following operation:

    <wsdl:operation name="CreateEmployee">
      <wsdl:input message="inp1:requestCreateEmployeeMessage"/>
      <wsdl:output message="inp1:replyCreateEmployeeMessage"/>
    </wsdl:operation>
    

    - And the request message is:

    <wsdl:message name="requestCreateEmployeeMessage">
      <wsdl:part name="payload" element="inp1:CreateEmployeeRequest"/>
    </wsdl:message>
    

    - And the element in the message:

    <element name="CreateEmployeeRequest">
      <complexType>
      <sequence>
      <element name="EmployeeId" type="int" minOccurs="0"/>
      <element name="EmployeeName" type="string" minOccurs="0" nillable="true"/>
      <element name="Salary" type="decimal" minOccurs="0"/>
      </sequence>
      </complexType>
    </element>
    

    -If this service is added to a project ADF as a Web Service data control, the method in the control of data will be represented by:

    CreateEmployee(Object)
    

    -However, if you change the WSDL file, so that the element has the same EXACT name as the operation:

    <wsdl:message name="requestCreateEmployeeMessage">
      <wsdl:part name="payload" element="inp1:CreateEmployee"/>
    </wsdl:message>
    <element name="CreateEmployee">
      <complexType>
      <sequence>
      <element name="EmployeeId" type="int" minOccurs="0"/>
      <element name="EmployeeName" type="string" minOccurs="0" nillable="true"/>
      <element name="Salary" type="decimal" minOccurs="0"/>
      </sequence>
      </complexType>
    </element>
    

    -Then method of data control will be displayed as:

    CreateEmployee(Integer, String, BigDecimal)
    

    It's strange because the WSDL file is still valid, if the element root of the query has a different name of the operation (the SOA service was created using JDeveloper).

    In addition to this solution that I share, alternative would be:

    (1) create a proxy for the service and register the proxy under control data instead

    (2) to call the service, as shown here

    Is this a Bug?

    When you have an object as a parameter to a data control, you should also see a parameter created object that has simple types.

    For example, see the video here:

    https://blogs.Oracle.com/Shay/entry/calling_web_service_with_complex

  • Problem creating ANE, ArgumentError: Error #3500: the context of the extension doesn't have a method with the name

    I'm bit confused about ANE generation, I'm already all direction, but the error always #3500 when I try to call the DONKEY.

    I create NSAS using java android.

    The tools I use: Flash Builder running on Win-64 win.7. I think I have to, right to the point, here, what I did first step by step;

    1. I create the JAVA application first, with the senigo.extension.android package then I create 3 files, Sample.java, SampleContext.java, PassTextFunction.java

    2.pngsdf.png

    Code Source Sample.Java

    package senigo.extension.android;
    
    
    import android.util.Log;
    import com.adobe.fre.FREContext;
    import com.adobe.fre.FREExtension;
    
    
    public class Sample implements FREExtension {
      @Override
      public FREContext createContext(String arg0) {
      // TODO Auto-generated method stub
      Log.i("Sample", "createContext");
    
    
      return new SampleContext();
      }
      @Override
      public void dispose() {
      // TODO Auto-generated method stub
      Log.i("Sample", "Dispose");
      }
      @Override
      public void initialize() {
      // TODO Auto-generated method stub
      Log.i("Sample", "Initialize");
      }
    
    
    }
    

    Source code for SampleContext.Java

    package senigo.extension.android;
    
    
    import java.util.HashMap;
    import java.util.Map;
    import android.util.Log;
    import com.adobe.fre.FREContext;
    import com.adobe.fre.FREFunction;
    
    
    public class SampleContext extends FREContext {
      public SampleContext()
      {
      Log.i("SampleContext", "constructor");
    
    
      }
      @Override
      public void dispose() {
      // TODO Auto-generated method stub
      Log.i("SampleContext", "dispose");
      }
      @Override
      public Map<String, FREFunction> getFunctions() {
      // TODO Auto-generated method stub
      Log.i("SampleContext", "getFunctions");
      Map<String, FREFunction> functionMap = new HashMap<String, FREFunction>();
      functionMap.put("passText", new PassTextFunction());
    
      return functionMap;
      }
    
    
    }
    

    Source code for PassTextFunction.Java

    package senigo.extension.android;
    
    
    import com.adobe.fre.FREContext;
    import com.adobe.fre.FREExtension;
    import com.adobe.fre.FREFunction;
    import com.adobe.fre.FREObject;
    
    
    public class PassTextFunction implements FREFunction {
    
    
      @Override
      public FREObject call(FREContext arg0, FREObject[] arg1) {
      // TODO Auto-generated method stub
    
      FREObject result = null;
      try{
      result =  FREObject.newObject("Hello World");
    
      }catch(Exception e)
      {
    
      }
      return result;
      }
    
    
    }
    

    After all the files, I create the jar file using the right click on the tree > > export > > Jar file > > Sample.Jar (I already create jar file that contains just the src folder and after I got frustrated, I create the .jar file contains all the project folder as a whole but still did not work).

    Okay, after that, I create project Flex Library Project, which is to contain the actionscript code to call the native and extension.xml, here the code.

    3.png

    Test Source code. As, FYI: I have already create the public function and the static function the error always the same #3500.

    package senigo.extension.android
    {
      import flash.external.ExtensionContext;
    
      public class test
      {
      private static var extContext:ExtensionContext = null;
    
      public function test()
      {
      trace ("Test Constructor");
    
      if (!extContext)
      {
      initExtension();
      }
      }
      public static function get passText():String
      {
      trace ("Test Pass Text");
      if (!extContext)
      {
      initExtension();
      }
      return extContext.call("passText") as String;
      }
    
    
      private static function initExtension():void
      {
      trace ("Vibration Constructor: Create an extension context");
      extContext = ExtensionContext.createExtensionContext("senigo.extension.android", null);
      }
    
    
      }
    }
    

    extension source code. XML

    FYI: Flex when I put the Native Extension, they said have Windows - x 86 so I already create 3 DONKEY, that contain Android-ARM, ARM Android contain by default, Android contain ARM, Default, and Windows - x 86, but still the same error. I don't have it where is the error.

    <extension xmlns="http://ns.adobe.com/air/extension/3.1">
      <id>senigo.extension.android</id>
      <versionNumber>1.0.0</versionNumber>
      <platforms>
      <platform name="Android-ARM">
      <applicationDeployment>
      <nativeLibrary>Sample.jar</nativeLibrary>
      <initializer>senigo.extension.android.Sample</initializer>
      <finalizer>senigo.extension.android.Sample</finalizer>
      </applicationDeployment>
      </platform>
      <!-- <platform name="Windows-x86">
      <applicationDeployment>
      <nativeLibrary>sample.jar</nativeLibrary>
      <initializer>senigo.extension.android.Sample</initializer>
      <finalizer>senigo.extension.android.Sample</finalizer>
      </applicationDeployment>
      </platform>
      -->
       <platform name="default"> 
    <applicationDeployment/> 
    </platform> 
      </platforms>
    </extension>
    

    After that I created, I copy the sample file of file and extension with the file Sample.jar .swc.

    I have extracted the .swc file, copy the library.swf file Android-ARM, by default, Windows-86 and I create build.bat containing the command like this

    adt -package  -storetype PKCS12 -keystore senigo.p12 -storepass l10nk1ng -target ane senigo.extension.android.ane extension.xml -swc AndroidLib.swc -platform Android-ARM -C ./Android-ARM/ . -platform default -C ./default/ .
    

    the I put the donkey for bending mobile project I created:

    4.png5.png

    6.png

    7.png

    I run, but received the error #3500, I get really confused? What is wrong with my code? is there something that I have wrong or I just missed?

    Please someone help me... and what is already donkey file I can debug in Flex Mobile project? I want to log.i code I wrote, but I confuse air how to the Levant in flash builder.

    in the end, I want to said sorry if my English is not very goods and thank you, because want to see my problem and I appreciate it a lot if you can give me a solution

    So you're saying that test.as I created belongs to android?

    Exactly.

    Okay, so then why when I put just ANE build contain Android-ARM, the error still appear?

    Because that when you launch it engine running Windows AIR request use default implementation in this case. But looks like the default implementation, you use the same Android and default value.

    is that what I have to put Windows-86 to run it on windows?

    If you are creating applications / DONKEY for mobile platforms you don't need it.

    I have to use another actionscript that does not ExtensionContext content?

    Exactly!

    For example, look at this: mesmotronic/air-full screen-ane · GitHub

    record full screen-ane-android - Android app

    full screen-ane-default - default implementation (for all other platforms exclude Android)

    It is an excellent example. It's pretty simple, you understand how it works.

  • Threads running separated with CS5

    I buy a second PC faster edition for video work.  The reason is to be able to continue to work while the rendering is in progress.   I learned that while I can install CS5 on 2 PC, I can't run CS5 on both of them at the same time.  So I can edit on one while the other is rendered.  My other option is to try to multitask with 2 threads on the faster one.

    Is possible mutithreading or what are my options to avoid annoying waiting for makes?

    I've only used controllers raid dedicated over the past 20 years, but I guess on-board raid controllers Act in the same way, you can define multiple volumes raid in BIOS, creating of multiple raid0 arrays, for example, if you have enough SATA ports.

  • Thread of messages with false contacts

    I have a thread of messages which, since the installation of Sierra is showing the wrong contact and the mix of messages from the two contacts.

    It seems that this is because the two contacts work for the same company and have identical entries their: 'work' of phone field. If I remove the scope one of the contacts and Messages to restart, the thread returns to two threads separated by the correct contact.

    The two contacts have iPhones and different MOBILE numbers that show as being related to separate Apple ID I assume that before I upgraded, Contacts, or Messages has been able to use this information to treat them as separate persons. Also, I assume that's the way it should work.

    How do I get things to normal?

    Thank you very much

    Christian

    Hello

    Change/edit the name of the field map to read 1 or something that prevents the binding.

    Report it here http://www.apple.com/feedback/ (there is no one of the separated Contacts).

    22:00 Friday. September 30, 2016

     iMac 2.5 Ghz i5 2011 (El Capitan)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro (Snow Leopard 10.6.8) 2 GB
     Mac OS X (10.6.8).
     iPhone and iPad (2)

  • Call Dialog.ask in the Thread Run method

    "in I want to call Dialog.alert and using following code but its exception to throw the wire.

    "Exception occurs java.lang.RuntimeException: pushModalScreen called by a thread of non-event."

    synchronized (Application.getEventLock ())

    {

    if (Dialog.ask ("catalog is obsolete. You want to keep it? ", choices, select, select [0])(==1)"

    {

    Run the required functionality

    }

    }

    pls help me

    I keep saying this, so forgive me of repeating myself, but:

    synchronized (Application.getEventLock ()) {}

    should only be used when nothing else will work for you or you make a very simple, very fast UI update.

    A Dialog.ask is not very fast!

    In this case, you have several options, but the most obvious solution is to ask the question before starting the Thread.  So, if that is your treatment

    Thread catUpdateThread = new Thread() {}

    public void run() {}

    Dialog.ask (...)

    Other treatments

    }

    }

    catUpdateThread.start ();

    What should do the same and works OK. :

    UiApplication.getUiApplication.invokelater (new Runnable() {}

    public void run() {}

    Dialog.ask (...)

    If (result == Yes) {}

    Thread catUpdateThread =...;

    catUpdateThread... Start();

    }

    }

    });

  • Exception when using tnsnames AND ezconnect resolution methods with managed Oracle ODP 12 c rel.3

    We are looking at upgrading to a web service to connect to Oracle using the unmanaged to the ODP ODP managed (12 c module 3).

    We use tnsnames and have the following configuration in the sqlnet.ora file: NAMES. DIRECTORY_PATH = (TNSNAMES, EZConnect).

    The resolver EZConnect is necessary because we use an OracleDependency object for database update notifications.

    When moving to the managed driver, a SocketException exception is thrown when you try to open a new connection. Looking at the call stack, I can see that the managed Oracle driver, actually a 'OracleInternal.Network.EZConnect' object, calls System.Net.Dns.GetAddrInfo to get an IP address, but with the alias tns as a parameter. Of course, it fails with this exception "unknown host".

    So it seems to me that there is a problem combining tnsnames, ezconnect manned ODP managed!

    Someone else who has experienced this and found a solution, or it could be an error in the driver?

    This problem seems to have been fixed in the version of 12 c 4.

Maybe you are looking for