Complete a teststand thread safe

Hello

I created a vi using the audio wizard and vibrations. He simpply plays a tone of 1 kHz. I start it to use a new thread execution in TestStand (generate the audio wire)

I then proceed to route the audio from my USE speaker R - the operator must then select the pass/fail if hear sound out of the speaker.

Then, I continue to send the sound to the speaker L and provide a pass/fail another popup.

I wonder how I can kill the audio thread 'generate' without including a timeout routine in my vi?

Not sure if this is possible or safe?

Thanks & best regards,

Shane.

Hey Don1,.

It seems that this could be an easy fix if I understand your problem. The idea is to have the operator, click go, and then a tone is played on the right side, they confirm / deny hearing it and then it moves on the left side and confirm or deny. The best way to take care of this would be to use only one step for each audio side, for a total if you want, but the idea is to have the LabVIEW to hold the popup of user until the user interacts with it. This could be accomplished with separate vi have by a dialog box pop-up in a while loop when the right audio is running, once the user confirms audio, it stops the loop and returns the result to TestStand. They can then move to the left audio in the same way. If you prefer this in one step, you could use consecutive while loops to hold the user up to the interaction operator dialog box and then move on to the next audio side and then pass the results back as needed.

Thanks again,

Nick

Tags: NI Software

Similar Questions

  • Am I right in thinking if a draining power completely, it will be safe to store?

    As on another thread, we have a dead ipod that was rarely used, but for the holidays. New Ipod bought yesterday and now go on holiday after a few problems with Win XP and the new material and again find itunes.

    The dead Ipod looks like that the battery will not hold a charge. It works flawlessly when it's plugged in but just flashes on then market back when disconnected. He was left with a full load of close since April have not been used. It is now a paper weight. I'd stick to one of the cars on the sticks of memory, but they are expensive to have windows replaced if anyone seen an ipod left inside.

    So with retune a new in a straight week of holidays I think if a draining power completely, it will be safe to store?

    As on another thread, we have a dead ipod that was rarely used, but for the holidays. New Ipod bought yesterday and now go on holiday after a few problems with Win XP and the new material and again find itunes.

    Its not needed or wanted for something but on vacation although I understand daily use is better as my trusty old I phone. I just think on next holiday comes my sister can give me his ipod to add any music she bought and it will work as expected again.

    No, certainly do not store the machine with a dead battery. This behavior is detrimental to the long-term life of a modern Lithium battery.

  • SimpleParser consistency class is not thread-safe?

    Coherense has the utility class to XML very convinent which we use it a lot in our coherence-related applications.

    But meet us some lock mysterious question (dead end, maybe?) and have identified that it would be that the com.tangosol.run.xml.SimpleParser class is not thread-safe.

    We use tomcat 6 and Spring 2.0.6.

    Application Web has 2 bean that implements the InitializingBean interface.

    Bean A afterPropertiesSet() method will use com.tangosol.run.xml.XmlHelper.loadXml method to parse a XML file.
    Method of Bean B afterPropertiesSet() will acts as a tcp expand clients and retrieve data from a cluster of coherence. Which, I think, consistency will also use XML class useful during parsing of the configuration files.

    We meet randomly blocking of tomcat (which never end starting webapp deployment alternation) as 1 on 2 or 3 tests.

    Use of jconsole and tomcat connection we can see that the main thread stuck in the class SimpleParser. Here's the thread dump.

    Name: main
    State: EXECUTABLE
    Blocked in total: 156 Total expected: 0

    *************************************************************************************************

    Stack trace:
    com.tangosol.run.xml.SimpleParser.instantiateDocument(SimpleParser.java:150)
    com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:115)
    -locking com.tangosol.run.xml.SimpleParser@f10c77
    com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:71)
    com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:84)
    com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:109)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
    org.springframework.beans.factory.support.AbstractBeanFactory$ 1.getObject(AbstractBeanFactory.java:251)
    org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
    -locking java.util.concurrent.ConcurrentHashMap@dee55c
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
    org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    -locking java.lang.Object@d21555
    org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
    org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
    org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
    org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
    -locking org.apache.catalina.core.StandardContext@1c64ed8
    org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    -locking java.util.HashMap@76a6d9
    org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
    org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
    org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
    org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    -locking org.apache.catalina.core.StandardHost@1c42c4b
    org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    -locking org.apache.catalina.core.StandardHost@1c42c4b
    org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    -locking org.apache.catalina.core.StandardEngine@37fd24
    org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    org.apache.catalina.core.StandardService.start(StandardService.java:516)
    -locking org.apache.catalina.core.StandardEngine@37fd24
    org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    -locked [Lorg.apache.catalina.Service;@1cc55fb
    org.apache.catalina.startup.Catalina.start(Catalina.java:566)
    sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
    java.lang.reflect.Method.invoke (unknown Source)
    org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:413)

    *************************************************************************************************

    After we have add the tag is based on applying bean B wait on A bean to complete initialization, we encounter is no longer blocked when starting tomcat.

    We suspect that maybe SimpleParser class is not thread-safe and will cause potential deadlock issue.

    Published by: user639604 on June 22, 2009 10:36

    It seems that the 'hand' thread comes to the point that he is responsible for the class of SimpleDocument around the same time as the thread "Timer-0"comes to the point where he is in charge of the class ExternalizableHelper. According to what son get on-demand, if the loading of the class ExternalizableHelper happens point of needing to SimpleDocument after the main thread starts to load SimpleDocument, then a deadlock (inside the JVM loading infrastructure class) happen.

    While you are correct that it is our fault (we shouldn't have used a subset of the ExternalizableHelper static initializer), there is probably a simple solution; Just do the following in an initializer static for your first loads or the classes related to the coherence, for example ClusterConfigurator and OPCacheManager:

    static
      {
      // this should force the ExternalizableHelper class to be loaded
      ExternalizableHelper.makeTrint(0L);
      }
    

    Peace,

    Cameron Purdy | The Oracle coherence

  • Are thread-safe queues

    Hi all

    Are secure i.e. thread queues are enqueue, dequeue Atomic etc?

    I'm looking to use queues to transfer objects between concurrent loops States, but am worried if I need to protect the access via a semaphore.

    Thank you

    Phill

    Yes.  Queue operations are atomic.  It is safe to assume that everything in LabVIEW is thread-safe, unless otherwise stated, it is since always a language designed for operation in parallel.

  • Thread Safe variables - several symbol at link definitions

    I'm going through the tutorial "Multithreading in LabWindows/CVI.

    The following line is in the tutorial about the variables in Thread-Safe:

    "If you need to access the variable in thread-safe from more than one file source, use the macro DeclareThreadSafeScalarVar or DeclareThreadSafeArrayVar in an include (.h) file for create statements for the accessor functions."

    OK works with a source file, but when I include the header file in a second file from the source, I have "Several definitions for symbol" errors when link for all functions of accessor in the two source files.

    It's probably something simple, but after a few hours I'm at a loss. Any ideas are appreciated.

    Scott T

    You should have DefineThreadSafeXXX in exactly a source file and a DeclareThreadSafeXXX in any number of source files (or in a file header included in the source files). The following works for me in 2012 of the CVI:

    / * temp.h * /.

    #include

    DeclareThreadSafeScalarVar (double, Num);

    void test (void);

    * Temp.c * /.

    #include "temp.h".

    DefineThreadSafeScalarVar (double, Num,-1);

    void main (void) {}

    InitializeNum();

    test();

    }

    / * temp2.c * /.

    #include "temp.h".

    void test (void) {}

    SetNum (1.0);

    }

  • tables dynamic thread-safe

    Hi all

    trying to convert my application single-threaded for multithreading, that I met a new obstacle:

    I would like to have a global data structure. This structure must be dynamically allocated and reallocated as the number of threads (and thus the size of the structure) depends on the program execute / user.

    The main thread as long as secondary threads should be able to access this structure, so I need to use a variable in thread safe, somehow. All the samples I've traveled so far, either use a single variable using the DefineThreadSafeScalarVar macro, or an array of size fixed by using the DefineThreadSafeArrayVar macro.

    I haven't found an example of this type of a dynamic array, unfortunately... Some kind soul would be willing to teach me how to proceed?

    Thank you

    Wolfgang

    In your case, you must use a TSV scalar that contains the pointer is allocated/re-allocated. See the following example of a TSV that mimics a dynamic array of integers. In some cases, a better solution would be to have a TSV scalar that contains a list, say, box tools ListType.

    #include

    DefineThreadSafeVar (int *, DynMem);

    void main (void)
    {
    int * pDynMem, i.;
       
    Initialize the TSV
    InitializeDynMem();
       
    Define HSV 'table' to hold 10 integers
    SetDynMem (malloc (10 * sizeof (int)));
       
    Set and get the 'elements' of TSV
    pDynMem = GetPointerToDynMem();
    for (i = 0; i< 10;="">
    {
    (* pDynMem) [i] = i;
    printf ("DynMem [%d] = %d\n", (* pDynMem) [i], i);
    }
    ReleasePointerToDynMem();
       
    Resize the TSV "array".
    pDynMem = GetPointerToDynMem();
    * pDynMem = realloc (* pDynMem, 20 * sizeof;)
    for (i = 10; I)< 20;="">
    (* pDynMem) [i] = i;
    for (i = 0; i< 20;="">
    printf ("DynMem [%d] = %d\n", (* pDynMem) [i], i);
    ReleasePointerToDynMem();
       
    Free TSV "array".
    pDynMem = GetPointerToDynMem();
    Free(*pDynMem);
    ReleasePointerToDynMem();
       
    Cancel initialization of TSV
    UninitializeDynMem();
    }

  • BBM SDK Thread Safe?

    Anyone know if the messages sent/received are thread-safe, or do we do us our own synchronization to ensure that a new message does not come before the end of the old?

    In this case messages would be delivered in the order they are received.  Each call is on the same thread.

  • Does container managed entity manager is thread-safe in stateless session bean?

    Hello

    I have read JEE6 doc and confused with

    Manager managed entity containing does (injected by PersistenceContext annotation) is thread-safe in bean of stateless session in env mutiple-thread?

    See code below, if there are 2 requests to stateless session bean in 2 concurrent threads, is it using the same Instance of the managing body or not?

    @Stateless (name = "HRFacade", mappedName = "HR_FACES_EJB_JPA-HRFacade-HRFacade")

    / public class HRFacadeBean implements HRFacade, HRFacadeLocal {}

    @Resource

    SessionContext sessionContext;

    @PersistenceContext (unitName = "HRFacade")

    Private EntityManager em;

    public places (places sites) persistLocations {}
    EM. Persist (rentals);
    return places;
    }

    public places (places sites) mergeLocations {}
    Return em.merge (rentals);
    }

    {} public void removeLocations (places sites)
    location = em.find (Locations.class, locations.getLocationId ());
    EM. Remove (rentals);
    }

    / * < code > o selection of the places where < code > * /.
    @TransactionAttribute (TransactionAttributeType.NOT_SUPPORTED)
    public list < location > getLocationsFindAll() {}
    Return em.createNamedQuery ("Locations.findAll", Locations.class) .getResultList ();
    }

    }

    Yes its safe. Stateless beans would be useless if it wasn't the case. That's the bit of "controlled container" description, as long as you leave the container do its job, you don't have to worry about such details.

  • OTMQ + JCA - it is thread-safe?

    Hello

    Currently, we are conducting a doubt in our minds regarding using the OTMQ with a JCA component. We build into our architecture a component in order to call by a java bean that is deployed inside a WL server, an OTMQ instance that is running on the same machine. This OTMQ instance is the platform independent (not Tuxedo + OTMQ) OTMQ and on the side of Java, we would use a mixture of JCA and, if necessary, JNI calls to establish a connection between these two components.

    My question here is, because WL will have multiple instances of this bean, are there problems I should be aware with respect, using multiple threads in such a component? In my view, that should we not we have no problem with that, given that OTMQ works similar like Tuxedo/q, but I was wondering if there is something you miss here.

    If you could just help me understand if I am having trouble with this architecture, I would be very grateful.

    Thank you

    brunno Attorre

    Hi Brunno,

    The JCA adapter is thread-safe, and if you find any problems associated with the JCA adapter threads, report it to the Support of Oracle.  About OTMQ, in my opinion, that these libraries are thread-safe, you can create an OTMQ multi-threaded server, but we do not support the use of JNI to call one of our libraries.  Why would you use JNI?  You can simply use the JCA/waiting for Message Queuing adapter.

    Kind regards

    Todd little

    Chief Architect of Oracle Tuxedo

  • Is JTextArea append() method thread-safe?

    It was noted in another ad that in JDK 7, the JTextArea append() method is more explicitly described as being thread-safe:

    http://download.Java.NET/jdk7/docs/API/javax/swing/JTextArea.html#append
    I do not use JDK7, but here is the code for the method append in JDK6_7 (I guess that he has not changed in JDK7?):
    public void append(String str) {
        Document doc = getDocument();
        if (doc != null) {
            try {
                doc.insertString(doc.getLength(), str, null);
            }
            catch (BadLocationException e) {
            }
        }
    }
    As you can see the code simply calls the insertString (...) method of the Document. JDK7 documentation, the insertString (...) method is still marked as being thread-safe:

    http://download.Java.NET/jdk7/docs/API/javax/swing/text/PlainDocument.html#insertString

    I always confused when you work with Threads. A few questions:

    (1) if the append() method eventually calls insertString (...), which is a safe method of thread that does the method append() safe thread?

    (2) assuming that the code in the method append has not changed in JDK 7 documentation has been bad for the first 6 versions of the JDK? Or is the documentation for JDK 7 lack instruction thread safe?

    (3) I know in the past I've suggested append() is thread-safe. It seems I should change my advice to wrap this method in a SwingUtilities.invokeLater (...). Is this a safe approach in any case to avoid confusion?

    camickr wrote:
    The PlainDocument does not use a lock. Here's the code for the JDK6:

    The lock is #insertString AbstractDocument. The additional filter of PlainDocument #insertString code is thread-safe, because it uses only local variables and GetFilter() reading is true or false/null.

    Even if filtering is not done, is it not theoretically possible that change of threads can occur before the super.insertString (...) is running?

    I guess what I'm asking is that if a single line of code runs before the writeLock() method is called is there way for there to be threading issues?

    Yes, but it's similar to the way in which a synchronized map is thread-safe, you can call containsKey (k) followed by get (k), and these methods are "thread-safe", but if you want to combine you need to do an extra lock. The only thread safe object is immutable.
    One difference here is that a card will return NULL but AbstractDocument launches a BadLocationException. Also if you want to get the lock, the only option is to subclass since writeLock() is protected and final.

  • is NamedCache thread-safe?

    Hello

    I use coherance NamedCache (say "TradeCache"), to store objects in the cache.

    My application is designed so that multiple threads can place data in "TradeCache" at the same time.

    What kind of thread safety, we need to take care of?

    Hi user 1696.

    With regard to your questions:

    (a) what kind of locking is used, is that they lock the entire map?
    (b) or basic locking key is made?

    Coherence use essential basic locking.

    (c) if by default all implementations are thread-safe, which is the use of namedcache.lock () api

    NamedCache.lock () is provided so that applications that make use of coherence can have some control over several readers and/or authors using the same object in space of the application. This is not to prevent corruption in the cache store. It must provide a way for applications to control the race as conditions have several operations on the same object at the same time. So that the application can control which of the puts should occur for example.

    Can you please me to any document (short & concise) cohernace good.

    You can find pointers to official documentation and white papers, among others to the OTN on Oracle coherence page following

    http://www.Oracle.com/technology/products/coherence/coherence_suite.html

    and there is also a wealth of information on the site of the Oracle coherence Knowledge Base at:

    http://coherence.Oracle.com

    In regards to your 2nd question about 2 java clients using the same NamedCache and do put and remove operations, you can provide more details on your example? Java clients 2 performing put or remove on the same object or different objects?

    Patrick

    Published by: P Fry on April 30, 2010 12:09

  • Can not leave completely insensitive - Firefox, use Safe Mode, reinstall or uninstall

    I installed Firefox less than a month ago. Two days ago, that he left suddenly during the navigation. This does seem like a problem, really - I thought I would just restart - but it REMAINS open. Shows the icon in my dock (on Mac), and the menu bar appears when I click on the icon. I can browse the menu selections but can not choose one.

    I can't:
    -Leave Firefox - from the menu or with Ctrl + Q
    -Open a new fenΩtre
    -Open help
    -Access to "troubleshooting information.
    -Select "restart with modules disabled...". »
    -Use the Safe Mode

    Because I can not use Safe Mode and cannot leave the program, I have IMPOSSIBLE:
    -Uninstall (it refuses to remove, because the program is 'open', as it won't leave)
    -Reinstall (I can't substitute the existing because the program is 'open')
    -Remove my dock
    -.. pretty much anything else.

    I've read many articles dealing with troubleshooting, Safe Mode, reinstall clean, etc, but unfortunately I can't make one of these because Firefox is open but completely insensitive.

    (PS - I tried to install the below troubleshooting information, but, even once, because Firefox is not responding, I couldn't open it lol - there was "no application available" to read it.) I can't go through the manual steps because I cannot access the troubleshooting information in the Help menu and so cannot even begin step 1.)

    If anyone has any suggestions, I would be VERY happy! I thank very you much for your time and help!

    If qutting, it's because of the questions are now trying down option as you click the icon in the dock and choose force quit from the list!

    Also you have tired Fox fire rest functionality (otherwise said if your power to access)
    To do:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.
  • Windows cannot complete the installation in safe mode

    I really need a help.

    I just bought a samsung series 5 ultra-thin with AMD and windows already installed sound 8.
    And suddenly my laptop was showing a notification to the black screen that says: "Windows is unable to complete the installation in Mode without failure. To continue installing Windows, restart the computer.
    There was only the OK button. And after I press the OK button, my windows will restart and keep showing that the notification. Even I try to turn off my laptop with power button / stop, its still impossible return to normal mode.
    The windows keep again and again, reboot
    Anyone know how to get back to my normal mode? Please help me.

    Hello

    I just realized that you cannot start to access msconfig... I'm sorry.

    If you have a Setup disk, repair disk or USB flash, you may be able to access the command prompt and enter a command to disable Secure Mode...

    You have a possibility to do a repair on the POST screen before Windows tries to start...

    You may be able to quickly hit Ctrl + Alt + Delete at the end of the POST right to start an auto repair.

    It might take three tests...

    You must get to the command prompt (.cmd)

    (1) start from the Windows 8 DVD or any other method available...

    Steps 2, 3 and 4 may not be in order, depending on how you start...
    2) click Next
    (3) select repair your computer

    (4) select troubleshooting
    (5) select Advanced Options
    (6) select command prompt

    This link gives instructions on what to do when you receive a command prompt...

    http://www.bleepingcomputer.com/forums/t/423290/Windows-7-boot-to-safe-mode-reboot-loop/

    The statement to the command...

    /deletevalue {GUID} safeboot bcdedit where {GUID} is Windows 7 loader GUID.

    {GUID}   refers to the "identifier" listed under a Windows boot loader that appears after entering bcdedit/c.

    In their example, entry to the so command prompt...

    /deletevalue {96378fc1-9402-11e0-990d-e3ec25d51f78} safeboot bcdedit

     

     

  • My system is continuously restarting and willingness to complete start only in safe mode. System Restore will not work even through DOS command. What to do next?

    Running Vista SP2 64 bit on a Dell Inspiron 530.  System will come up to the login window, if there is no connection - will restart on its own, repeatedly.  It will allow me to log in, but as soon as I get on the desktop, in a short period of time, it will restart.

    I am able to connect through safe mode and safe mode with networking mode.  I tried the system restore by selecting many different restore points using rstrui.exe / offline: C:\windows command safe mode.  The operating system is running on the C drive.  Status on C «Ready to restore» watch

    He always enough immediately cause the error:

    System restore failed... System restore failed due to an unspecified error.  The parameter is incorrect.  (0 x 80070057)

    I did not knowingly install something again before that happens.

    What to do next?

    Hello

    Here's how to use the system without a command restore.

    http://bertk.MVPs.org/html/restoresysv.html

    And information of Dell.

    How ro reinstall from the Dell recovery partition:

    http://www.Dell.com/support/troubleshooting/us/en/04/KCS/KcsArticles/ArticleView?c=us&l=en&s=BSD&docid=DSN_336966

    Reinstalling the printer Dell supplied disk:

    http://www.Dell.com/support/troubleshooting/us/en/19/KCS/KcsArticles/ArticleView?c=us&l=en&s=DHS&docid=DSN_339949

    Reference Dell troubleshooting with startup problems:

    http://www.Dell.com/support/troubleshooting/us/en/19/KCS/KcsArticles/ArticleView?c=us&l=en&s=DHS&docid=DSN_343119

    Run the built-in diagnostic software:

    http://www.Dell.com/support/troubleshooting/us/en/04/KCS/KcsArticles/ArticleView?c=us&l=en&s=BSD&docid=266787

    And if this does not resolve your problem, please contact Dell or their Support Forums:

    http://en.community.Dell.com/support-forums/default.aspx

    See you soon.

  • I want a non thread-safe container

    My application met with muti-threaded, it seems unwise to use a vector, which can cause the deadlock. So should what container I use?

    It is fairly easy to roll your own container. But the danger of blocking with a vector is weak as it syncs on itself, but nothing else in their own country. Just do your synchronization of higher level on something else than the vector itself and all it should cost is some additional synchronization overhead.

Maybe you are looking for