VISA: Parallel threads and locking instruments

Hello,
i have 50 instruments that are controlled in two threads running at the same time.
Thread 1: Only VISA write (configuration of the instruments)
Thread 2: Visa write and Visa read (read measurement from instrument)
Can i now simply add the "Visa Lock Async VI" before the write and "Visa Unlock" at the end?
Thread 1: Visa Lock -> Write -> Visa Unlock
Thread 2: Visa Lock -> Write -> Read -> Visa Unlock
Thanks

It is really best if you can put all of the instrument control into a single thread.  That way you don't have to play these lock-do something-unlock games.  A Queued Message Handler works wonderfully for this situation.  But if you insist on not doing that (I know there are situations where you can't), then a Semaphore is really the way to go.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

Similar Messages

  • InfoPack processing (PSA and data targets in parallel) data and lock issues

    Good morning,
    We are on BW 3.5 and contemplating changing our InfoPackages from option 1 (PSA then data targets) to option 2 (PSA and data targets in parallel) for performance reasons (test have shown a gain of 50% in load time compared to using option 1).
    Issues have been raised that using option 2 may lead to data consistency and lock issues especially for SD infosources where we are dealing with multiple daily status changes for same document that need to be read in a specific order.
    From what I have read, such issues were possible in BW 2.x e.g. OSS Note 384023 and 364577. However, I am under the impression that the issues may have been resolved in BW 3.x and that it is "safe" to use option 2 (PSA and data targets in parallel).
    Would really appreciate if you could please share your experience when using processing option 2 (PSA // DT) especially in a BW 3.xx system.
    Thank you in advance,
    Catherine

    Hi Amit,
    The help text (vers. 3.5) for this method of loading says simply -
    "A process is started to write the data from this data packet into the PSA for each data package. If the data is successfully updated in the PSA, a second parallel process is started. In this process, the transfer rules are used for the package data records, data is adopted by the communication structure, and it is finally written to the data targets. Posting of the data occurs in parallel by packet.
    This method is used to update data into the PSA and the data targets with a high level of performance. The BW system receives the data from the source system, writes it to the PSA, and starts the update immediately and in parallel into the corresponding data target"
    Not sure where you got your description from, but is not explained well and confusing.
    Regards,
    Ken

  • Parallel model and locking

    Is there an option to ensure that some code within a labwindows code module is executed atomically  ?  That means that Teststand doesn't switch to another (parallel running) thread within that code sequence.  

    You can do synchronized sections in TestStand.  Use the Batch Synchronization step and set the Section Type to One Thread Only, Serial or Parallel.  Then use the same step type to Exit the synchronized section. 
    Also the Auto Scheduler is pretty cool for locking resources.  Check it out in the examples.
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • What is the best way to open close and pass instrument handles from labview in teststand parallel model?

    I have a number of test systems that use a parallel model with labview. We have a good number of instruments(PXI).
    What is the prefered method for open,closing and passing instrument handles in teststand using labview? 
    Solved!
    Go to Solution.

    Hi,
    No, Below is a bit from the Session Manager Help
    Currently, Session Manager supports the following instrument session types:
    IVI Sessions—Use an IVI session to obtain the C-based instance handle for an IVI logical or virtual instrument name. NI Session Manager does not support IVI-COM drivers at this time. When IVI-COM drivers are available, you can use an IVI session to obtain an ActiveX interface reference to an IVI-COM driver.
    VXIplug&play Sessions—Use a VXIplug&play session to obtain a C-based instance handle for a VXIplug&play logical or virtual instrument name. Configure VXIplug&play names in the <VXIplug&play directory>\<Platform directory>\NISessionMgr.ini file.
    VISA Sessions—Use a VISA instrument session to obtain a C-based viSession handle to a VISA resource or logical name. Configure VISA logical names in the <VXIplug&play directory>\<Platform directory>\NISessionMgr.ini file.
    Custom Sessions—Use a custom session to create a data container object that shares ActiveX objects you create or other data between software components you write. Use the Attach and Get methods to attach data to and retrieve data from a session. A custom session does not initialize, close, or own an instrument handle. The data you share with a custom session does not have to be instrumentation related. You can create a custom session with any name you request.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Having a problem with threads and using locks

    I was hoping someone could give me some hits on getting my code to run properly. The problem I am having is I think my locks and unlocks are not working properly. Plus, for some reason I always get the same output, which is:
    Withdrawal Threads         Deposit Threads            Balance
    Thread 2 attempts $29 Withdrawal - Blocked - Insufficient Funds
    Thread 4 attempts $45 Withdrawal - Blocked - Insufficient Funds
    Thread 6 attempts $34 Withdrawal - Blocked - Insufficient Funds
    Thread 7 attempts $40 Withdrawal - Blocked - Insufficient Funds
                                    Thread 1 deposits $187          $187
                                    Thread 3 deposits $169          $356
                                    Thread 5 deposits $61           $417
    Press any key to continue...If someone can see the error I made and doesn't mind explaining it to me, so I can learn from it, I would appreciate that very much.
    /************Assign2_Main.java************/
    import java.util.concurrent.*;
    public class Assign2_Main
    {//start Assign2_Main
        public static void main(String[] args)
        {//start main
               // create ExecutorService to manage threads
               ExecutorService threadExecutor = Executors.newCachedThreadPool();
            Account account = new SynchronizedThreads();
            Deposit deposit1 = new Deposit(account, "Thread 1");
            Deposit deposit2 = new Deposit(account, "Thread 3");
            Deposit deposit3 = new Deposit(account, "Thread 5");
            Withdrawal withdrawal1 = new Withdrawal(account, "Thread 2");
            Withdrawal withdrawal2 = new Withdrawal(account, "Thread 4");
            Withdrawal withdrawal3 = new Withdrawal(account, "Thread 6");
            Withdrawal withdrawal4 = new Withdrawal(account, "Thread 7");
            System.out.println("Withdrawal Threads\t\tDeposit Threads\t\t\tBalance");
            System.out.println("------------------\t\t---------------\t\t\t-------\n");
            try
                threadExecutor.execute(withdrawal1);       
                threadExecutor.execute(deposit1);     
                threadExecutor.execute(withdrawal2);  
                threadExecutor.execute(deposit2);    
                threadExecutor.execute(withdrawal3);
                threadExecutor.execute(deposit3);       
                threadExecutor.execute(withdrawal4);
            catch ( Exception e )
                 e.printStackTrace();
                //shutdown worker threads
               threadExecutor.shutdown();
        }//end main
    }//end Assign2_Main/******************Withdrawal.java****************************/
    public class Withdrawal implements Runnable
    {//start  class Withdrawal
          *constructor
        public Withdrawal(Account money, String n)
             account = money;
             name = n;
        public void run()
        {//start ruin
             int newNum = 0;
                newNum = account.getBalance(name); 
               Thread.yield();
        }//end run
        private Account account;
        private String name;
    }//end  class Withdrawal/*******************Deposit.java***************/
    import java.util.Random;
    public class Deposit implements Runnable
    {//start class Deposit
          *constructor
        public Deposit(Account money, String n)
             account = money;
             name = n;
        public void run()
        {//start run
                try
                     Thread.sleep(100);
                   account.setBalance(random.nextInt(200), name);
                }// end try
                catch (InterruptedException e)
                  e.printStackTrace();
       }//end run
       private Account account;
       private Random random = new Random();
       private String name;
    }//end class Deposit/********************Account.java*****************/
    *Account interface specifies methods called by Producer and Consumer.
    public interface Account
         //place sum into Account
         public void setBalance(int sum, String name);
         //return  value of Account
            public int getBalance(String name);         
    } /**************SynchronizedThreads.java****************/
    import java.util.concurrent.locks.*;
    import java.util.Random;
    public class SynchronizedThreads implements Account
    {//start SynchronizedThreads
          *place money into buffer
        public void setBalance(int amount, String name)
        {//start setBalance
             // lock object
             myLock.lock();           
            sum += amount;
            System.out.println("\t\t\t\t" + name + " deposits $" + amount +"\t\t$"+ sum+"\n");       
               //threads are singnaled to wakeup
            MakeWD.signalAll();
              // unlock object                                                
            myLock.unlock();
           }//end setBalance
            *gets the balance from buffer
           public int getBalance(String name)
        {//start getBalance
             int NewSum = random.nextInt(50);
             //lock object
            myLock.lock();
            try
                 if(sum > NewSum)
                     //takes NewSum away from the account
                     sum -= NewSum;
                        System.out.println(name + " withdraws $" + NewSum +"\t\t\t\t\t\t$"+ sum+"\n");
                else
                     System.out.println(name +  " attempts $" + NewSum + " Withdrawal - Blocked - Insufficient Funds\n");                 
                     //not enough funds so thread waits
                        MakeWD.await();         
                //threads are singnaled to wakeup
                MakeD.signalAll();     
                }//end try
            catch (InterruptedException e)
                   e.printStackTrace();
            finally
                 //unlock object
                 myLock.unlock();
            return NewSum;     
         }//end getBalance
         private Random random = new Random();  
         private Lock myLock = new ReentrantLock();
         private Condition MakeD = myLock.newCondition();
         private Condition MakeWD = myLock.newCondition();
         private int sum = 0;
    }//end SynchronizedThreads

    You can also try to provide a greater Priority to your player thread so that it gains the CPU time when ever it needs it and don't harm the playback.
    However a loop in a Thread and that to an infinite loop is one kind of very bad programming, 'cuz the loop eats up most of your CPU time which in turn adds up more delays of the execution of other tasks (just as in your case it is the playback). By witting codes bit efficiently and planning out the architectural execution flow of the app before start writing the code helps solve these kind of issues.
    You can go through [this simple tutorial|http://oreilly.com/catalog/expjava/excerpt/index.html] about Basics of Java and Threads to know more about threads.
    Regds,
    SD
    N.B. And yes there are more articles and tutorials available but much of them targets the Java SE / EE, but if you want to read them here is [another great one straight from SUN|http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html] .
    Edited by: find_suvro@SDN on 7 Nov, 2008 12:00 PM

  • Why are the Apple mods deleting and locking threads?

    I would like an answer as to why the mods are deleting and locking threads that have to do with the error that pervasive in the iPod 1.1 upgrade. It seems that Apple will not acknowledge it but some of us are trying to find an answer and Apple locks the thread and deletes another one. As paying customers, Apple should realize that it is us who keeps the lights on in Cupertino. I think a bit more respect to the paying customer is in order here.

    Just post your questions and replies in a calm and concise way Don and follow the guidelines within the Terms of Use;-):
    http://discussions.apple.com/help.jspa#adua
    Contrary to any belief you may have I can assure you that there are no attempts of covering up any alleged bugs in software or anything else in these fora.
    Here's a reframe to your original question - The fact that the thread was locked means that the Hosts have seen the thread. It is reasonable therefore to conclude that they would have allerted the relevant people of the issue and referred them to that thread.

  • Deleting posts and locking a thread

    Yesterday, there was a reply made to the FMB size shrinks dramatically thread, where the poster described a situation where his Forms 10 fmb file somehow became corrupted, and the compiled fmx would no longer open or run. He posted that finding the semicolon - semicolon Replace All procedure had fixed the problem.
    I posted a reply that acknowledged his post and warned anyone else reading and trying the procedure to be careful, that any "referenced" program units copied from another source would lose its reference link to the source. (Fortunately, most people do not use the referenced feature.)
    Now today, I see those two posts have been deleted, and the thread is locked.
    I would like to point out that the "semicolon - semicolon replace-all" process STILL works even on the latest version of the Forms Builder. Forms Builder has always stuffed compiled code into fmb files, and it can cause trouble when trying to run the fmx against a new database. (It was a less-than-optimum idea back in the beginning of the client/server Forms development cycle, but has never been fixed.) The replace-all / save process removes the old compiled code so the fmb is significantly smaller and clean, and a new compile will generate new and clean code.
    I realize the thread is over five years old, but deleting new posts and locking the thread removes valuable information that just might help someone even today. I hope whoever locked the thread and deleted the posts will reconsider their actions. This forum is a valuable resource for Forms developers around the world, and even information in very old threads can be useful.

    altenbach wrote:
    Maybe the act of marking a solution should lock the thread 15 minutes later automatically.
    That would work for most of the cases.  But then there are those who for whatever reason don't mark solutions.  Maybe allow some of us to mark solutions for people in that board?
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • GarageBand locks up after installing Finale 2008 and Garritan Instruments

    I'm having a problem with GarageBand 3 and Native Instruments (or Finale 2008a or Garritan Instruments)...
    Our school bought a Finale 2008 5-pack which I'm installing on four new MacMinis and a MacBook. All of the computers have 1GB or RAM. We're running Mac OS 10.4.11 and iLife '06 (GarageBand 3.0.4)
    I installed Finale 2008 as well as the updater to Finale 2008a. In addition, I installed the Garritan Instruments from the Finale CDs.
    At [root level] on the Mac, GarageBand works fine. But, when users login on the same computer and launch GarageBand, the following error message appears:
    Native Instruments
    Installation folder is not writable. Pease select a folder now.
    GarageBand locks up and the user must force-quit. Prior to installing Finale and the Garritan Instruments, GarageBand was working fine.
    Suggestions???

    I (finally) found an answer to this after several emails with Finale support and Native Instruments support. Solved by repairing permissions AND installing the "Mac OS X 10.5 Leopard Installer Patch for KONTAKT PLAYER" from...
    http://www.native-instruments.com/
    I installed this patch while logged in at root - then, repaired permissions afterwards.
    Even though the 'problem computers' are running 10.4.11, it's the 10.5 Leopard patch that fixed it!!!

  • Should we lock the desktop thread and start some new ones?

    Lets face it, you can't read the whole thing now anyway!
    I propose that we retire it and start some new threads for desktops based on WM/DE environment, so we'd have a thread each for:
    · xfce
    · gnome
    · kde
    · *box
    · fvwm
    And others that anyone can think of.  The strength of this idea is it's biggest weakness - easy to see screenies for different desktops but you have several thread to view and can't look at it all together - but what are tabs for eh?
    Vote soon!

    miqorz wrote:I think it's a terrible idea and only creates a great way to be ignorant and delusional of every other desktop enviroment and window manager.
    This is so typical of you miqorz - ignorance and ignorant behaviour, as you often clearly demonstrate, is something that some people will be just be prone to.
    miqorz wrote:I wouldn't have made my recent "switch" to xfce if it hadn't been for screenshots I didn't seek.
    Why do you assume everyone is as narrow minded and cynical as you?
    Even if we keep it in one thread most people post links to their screenies along with an "XFCE and torsmo..." type intro - what forces such ignorant people to follow the links?  Nothing.  So...that's a stupid arguement.
    I like the idea of monthly threads and i agree that loads of seperate threads could produce TOO many BUT we could limit it to a few specifics and then "Others" - how many ion or wmii people actually post their screenies frequently?
    The poll is looking very much in favour of the switch at the moment!
    I think we may hold another shorter poll afterwards tho - monthly vs individual

  • Open VI Reference prevents execution of other parallel threads

    I am using splash screen to start an application. I use dynamic loading of the Main.vi and an animation during the loading, both in parallel threads (see image below). However, when the Open VI reference VI is called everything else stops executing (the animation stops running) until the Open VI reference is done. I must call the Main.vi dynamically, because it takes some time to load and I want to notify a user that the application is loading (using animation). Is there an option to prevent the Open VI reference to block the execution of other threads? Or should I use some other approach?

    andrej wrote:
    But the problem is not in the Run.VI method because the Open VI Reference blocks the execution of the top loop and I need the Open VI Reference to call the Get VI Dependencies method. Other approach could be to create a static array of dependencies and then to use this array to load VIs from bottom up.
    The only question now is if the Get VI Dependencies method returns dependencies in top to bottom order? If it does then I can just load VIs in reverse order from the array.
    Well the problem is the Open VI Reference! This executes in the UI thread, as several people have explained already (and really can't be made to do otherwise without causing a number of possible and nasty race conditions, some of them even related to the underlaying OS and not just LabVIEW itself), just as your two Property Nodes in the upper loop have to use the UI thread too.
    Once Open VI starts it only returns if it has loaded the required VI fully into memory (and that includes any dependencies that aren't already in memory) and linked them all properly together or runs into an error during loading. For this duration, NO UI Property Node can execute, which is what stalls your upper loop. If you would use local variables or terminals instead the upper loop would happily run along while Run VI loads the entire VI hierarchy but it would still not show on the UI, because in order to draw the new data from the diagram passed to locals and terminals LabVIEW has to catch the UI thread to do the UI drawing.
    So first fix is to kick out any property nodes from the upper loop and the second part of the solution is to load your VI hierarchy in chunks instead of simply loading only the top level VI directly. It would be nice if Open VI had an option to allow UI thread release between loading of chunks of VIs, but the implications are not that nice. It would be quite easy for an uncareful LabVIEW programmer to create a lockout situtation then, where two functions are in fact waiting on each other to release some locks so that the program gets hang up. And a simple warning in the documentation to watchout as this option can allow to create such lockout situations is not very useful as nobody reads them anyhow.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to mute and lock screen rotation at the same time? Loved this feature in iOS 5.

    How to mute and lock screen rotation at the same time? Loved this feature in iOS 5.

    You cannot do two different simultaneous VISA writes over a serial bus. There is a single rx line on the pc's com port and a single rx line on the instrument. You only hope is if the instrument allows you to chain commands and the reception of the carriage return triggers the instrument to implement both at the same time. Maybe you can send CTS01 and CTS02 separated by a space or comma. The manual should tell you if that's possible or maybe you need to ask the manufacturer.

  • Why did the thread get locked or deleted?

    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information below at your own discretion.
    Occasionally you may see a thread get locked or deleted, or the possibility of a user having been banned. This tip is a viewpoint of an end user of how the Terms of Use apply to deletions, locks, or bans. Moderators may at their discretion choose these actions as the Terms of Use allow them to, even when none of these points below matter.
    When you signed up on this board, a Terms of Use page was agreed to in order for you to enter. That Terms of Use page is also on the link "Help & Terms of Use" on the right hand side. Posts themselves may get deleted that weren't the source of the thread being locked or deleted. So if you didn't disobey the Terms of use, someone else might have.
    Do not take either as a sign of censorship, a sign of personal chastisement, or anything negative per say. This is after all a community open to the public.
    When one of the terms of use is violated, it is either because it does not offer constructive points of view for fixing a technical issue from end user to end user, or it is overly digressive from doing such actions. Terms of use suggest to avoid:
    1. Prognosticating.
    2. Guessing Apple's policy.
    3. Offer advice on something which may be against copyright laws.
    4. Offer advice on something which would violate a license agreement.
    5. Posting in a thread with "me toos". Try to solve the problem at hand. It makes it very hard for those of us trying to help the original poster when additional people chime in, saying they too have the same problem, or have a problem almost identical. Those trying to help
    the original poster, may not know if the solution applies to all the people having the problem, or just some. It ends up requiring people coming to help to directly address a person to avoid confusing who should follow various advice.
    A Post New Topic is available at all Forum levels, but at the Category level of Discussions. For more on this discussion, see the tip here:
    http://discussions.apple.com/ann.jspa?annID=650
    6. Other things which may be illegal in the State of California or in the United States of America
    should not be suggested or inferred by what you post.
    7. Rants or complaints about people and companies.
    They are unhelpful, and really don't solve technical issues.
    Approach complaints with tact when posting in a public forum that is moderated such as this one.
    It is one thing to say, I hate this feature being missing, is there any way to get this feature added, or are there any ways of getting it from another source?
    It is another thing to blame Apple for a feature that is missing, and drop the ball at that waiting for a response. These type of posts are more likely to be frowned upon.
    Complaining of a service not rendered is also often frowned upon. There are points of contact later in this tip to address such service issues. This is a forum for addressing technical inquiries about how things work or if things can be made to work on your system.
    8. Polls asking for a feature to be added/removed are generally frowned upon, as well as polls about various apparent defects and their propensity. You are only addressing less than 1% of the Apple using population here.
    Such polls would not be very scientific even if they are carried out for long periods of time. Long threads may appear to act as polls, and may violate terms of use. If you see such a thread and wonder why it hasn't been locked or deleted, you are welcome to ask that in Discussions Feedback, or click on "Report This Post" at the bottom right corner if available.
    As the Terms of Use state, in the end essentially it is up to the moderator to decide if a thread is worthy being deleted or locked. Don't take it personally if it is. Also Level 2 through Level 5 users, while we can ask the moderators look at a thread, we are not Apple Employees. You may also ask a moderator look at a thread or an individual on the Discussion Feedback forum or by clicking Report this post at the bottom right hand corner of a specific post.
    If the purpose of your thread is to provide feedback to Apple for a product, see these pages:
    http://www.apple.com/contact/
    http://www.apple.com/feedback/
    http://www.apple.com/contact/feedback.html
    If you have isolated a bug with a procedure worthy of a software developer, sign up for a free developer account on http://developer.apple.com/ and report the bug here:
    http://bugreporter.apple.com/
    As this is a user to user forum answers may not come right away. Have patience, and usually someone eventually can come up with an answer. Some forums may not fit the subject line of your topic, and you are welcome to ask if you are unsure where to post a topic.
    This is the 2nd version of this tip. It was submitted on September 28, 2010 by a brody.
    Do you want to provide feedback on this User Contributed Tip or contribute your own? If you have achieved Level 2 status, visit the User Tips Library Contributions forum for more information.

    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information below at your own discretion.
    Occasionally you may see a thread get locked or deleted, or the possibility of a user having been banned. This tip is a viewpoint of an end user of how the Terms of Use apply to deletions, locks, or bans. Moderators may at their discretion choose these actions as the Terms of Use allow them to, even when none of these points below matter.
    When you signed up on this board, a Terms of Use page was agreed to in order for you to enter. That Terms of Use page is also on the link "Help & Terms of Use" on the right hand side. Posts themselves may get deleted that weren't the source of the thread being locked or deleted. So if you didn't disobey the Terms of use, someone else might have.
    Do not take either as a sign of censorship, a sign of personal chastisement, or anything negative per say. This is after all a community open to the public.
    When one of the terms of use is violated, it is either because it does not offer constructive points of view for fixing a technical issue from end user to end user, or it is overly digressive from doing such actions. Terms of use suggest to avoid:
    1. Prognosticating.
    2. Guessing Apple's policy.
    3. Offer advice on something which may be against copyright laws.
    4. Offer advice on something which would violate a license agreement.
    5. Posting in a thread with "me toos". Try to solve the problem at hand. It makes it very hard for those of us trying to help the original poster when additional people chime in, saying they too have the same problem, or have a problem almost identical. Those trying to help
    the original poster, may not know if the solution applies to all the people having the problem, or just some. It ends up requiring people coming to help to directly address a person to avoid confusing who should follow various advice.
    A Post New Topic is available at all Forum levels, but at the Category level of Discussions. For more on this discussion, see the tip here:
    http://discussions.apple.com/ann.jspa?annID=650
    6. Other things which may be illegal in the State of California or in the United States of America
    should not be suggested or inferred by what you post.
    7. Rants or complaints about people and companies.
    They are unhelpful, and really don't solve technical issues.
    Approach complaints with tact when posting in a public forum that is moderated such as this one.
    It is one thing to say, I hate this feature being missing, is there any way to get this feature added, or are there any ways of getting it from another source?
    It is another thing to blame Apple for a feature that is missing, and drop the ball at that waiting for a response. These type of posts are more likely to be frowned upon.
    Complaining of a service not rendered is also often frowned upon. There are points of contact later in this tip to address such service issues. This is a forum for addressing technical inquiries about how things work or if things can be made to work on your system.
    8. Polls asking for a feature to be added/removed are generally frowned upon, as well as polls about various apparent defects and their propensity. You are only addressing less than 1% of the Apple using population here.
    Such polls would not be very scientific even if they are carried out for long periods of time. Long threads may appear to act as polls, and may violate terms of use. If you see such a thread and wonder why it hasn't been locked or deleted, you are welcome to ask that in Discussions Feedback, or click on "Report This Post" at the bottom right corner if available.
    As the Terms of Use state, in the end essentially it is up to the moderator to decide if a thread is worthy being deleted or locked. Don't take it personally if it is. Also Level 2 through Level 5 users, while we can ask the moderators look at a thread, we are not Apple Employees. You may also ask a moderator look at a thread or an individual on the Discussion Feedback forum or by clicking Report this post at the bottom right hand corner of a specific post.
    If the purpose of your thread is to provide feedback to Apple for a product, see these pages:
    http://www.apple.com/contact/
    http://www.apple.com/feedback/
    http://www.apple.com/contact/feedback.html
    If you have isolated a bug with a procedure worthy of a software developer, sign up for a free developer account on http://developer.apple.com/ and report the bug here:
    http://bugreporter.apple.com/
    As this is a user to user forum answers may not come right away. Have patience, and usually someone eventually can come up with an answer. Some forums may not fit the subject line of your topic, and you are welcome to ask if you are unsure where to post a topic.
    This is the 2nd version of this tip. It was submitted on September 28, 2010 by a brody.
    Do you want to provide feedback on this User Contributed Tip or contribute your own? If you have achieved Level 2 status, visit the User Tips Library Contributions forum for more information.

  • Crashes and Lock-ups

    I have been experiencing crashes and lock-ups in Premiere CS4.
    Last week I was running Encore to burn a DVD and when I noticed the processor was running flat out. I decided to run Core Temp to check the temperatures. At that point my encoding stopped and Encore locked up.
    Now I usually have Core Temp start when I load Windows. I have now disabled it and when I ran Premiere last night guess what? No lock-ups. Now this is early days but I suspect Core Temp might be the problem. I hope so. I'll report back with my findings when I have had more time to experiment.
    PS I'm running Windows XP SP3, Quad Core 6600 and 4Gb RAM
    Cheers,
    Tim

    You posted near the end of a similar thread in the CS5 forum.  I branched your post into a new topic and moved it here to this forum.  My post #1 was a request to be more careful where you post.
    If you want to see where you originally posted, click on the word "thread" in the phrase "Branched from an earlier thread", located at the top of the post list.
    -Jeff

  • How to use notification with parallel thread

    Hi,
    I am learning to use Notification to communicate between thread. I still don't know how to use it. In my current project I have a case to use this so I think I should implement this technique. My example is I have a main sequence in that I make a new thread. What I want is the new thread will do a task A when receive a notfication or to exit the thread when the main sequence stop.
    I am not sure if using notification is a best practice here? Or should I use a reference data?
    What about if I want my thread to do task B if it receive another notification. Is notification still be helpful?
    Regards,
    Thang Nguyen
    Solved!
    Go to Solution.

    Hello,
    You can use Notification to handle parallel threads. I often create two sequences : one containing the process A of your example (StartProcessA). and a second one to stop this process (StopProcessA). In StartProcessA, I create a Notification, with a defined name (as string constante, "StopProcessANotifier" for instance) in the setup group. Then I have the process, in a loop. At the end of this loop, I check the Notification (Wait) with a  timeout enabled, and no error if a timeout occurs. this way, the Notification Wait can be used as loop timing, and if the notification is Set in MainSequence, this exit the loop (pick a look at Notification property Step.Result.TimeoutOccured).
    To sum up, use a first sequence call in MainSequence, calling StartProcessA, with NewThread option, and do not forget to call StopProcessA at the end of you MainSequence. The Cleanup group is a very good location, because it will be executed even in case of error.
    This is a very simple use of Notification. Note, I believe that make it simple is often the most important but also the most complicated thing to do 
    Hope this helps....
    .mrLeft{float:left} .mrInfo{border-left:solid 1px #989898;font-size:x-small;color:#989898}
    Mathieu R.  
      CTD - Certified TestStand Developer / Développeur TestStand Certifié  
      CLAD - Certified LabVIEW Associate Developer  

  • Threading and Re-Use of buffers Using Call By Reference node (Duct Tape required)

    I have been trying to get the following information into the public domain for years and now that I have the answers, I will share with those that may be interested.
    Warning!
    Wrap your head in duct tape before reading just for safety sakes.
    My two questions have been;
    1) can LV Re-use the buffers of the calling VI when using VI Serve Call by reference?
    2) Is the UI thread used when using Call by reference?
    1. When calling a VI using the call by reference node, does the data going into the connector pane of the node get copied, or is it in-line as it would be with a properly set up subVI?
    Short answer: It is somewhere in-between.
    Long answer:
    The compiler doesn't know what VI will be called, but it does have a hint:
    the reference wired into the Call By Reference node. It uses that to get the "Prototype" for the call. So for the best performance, use a prototype that has the same "in-placeness characteristics" as the called VI. That being said, users don't know what the "in-placeness characteristics" are.
    Before I go into the details, I should say that the overhead of these copies shouldn't matter much unless it is a large data structure (an array with a lot of elements, or a cluster/class with many fields or containing large arrays etc.).
    Example 1:
    If the prototype does not modify the data then the compiler assumes that the Call By Reference node will not modify the data. However at run-time a check is made to see if the actual called VI will modify the data. If so, then a copy is made and passed in so that the original data can remain unmodified.
    Example 2:
    If the prototype contains an input that is wired through to an output in such a way that both the input and output terminals can use the same memory buffer, but at run-time a check determines that the actual called VI's input and output do not share a buffer, then a copy will be made from the actual call's output to the original VIs (combined input and output) buffer.
    I should also mention that even with this "attempt to agree with the prototype" behavior, it's not always possible to get as good performance as a regular SubVI call. For instance if you have a situation where the prototype does not modify the data and passes it through to an output then the compiler must assume that the data is modified (because as in example 2, there exist VIs that may modify it even if the actual VI called does not).
    And there are some caveats:
    1) This "using a prototype" behavior was new to 2009. Before that we used a more naive way of passing data that assumed all inputs will be modified and no outputs share a buffer with an input.
    2) This behavior is subject to change in future versions, if we find further optimizations.
    3) This behavior is the same as we use for dynamic dispatch VIs (when using LV classes)
    4) If you want to create a VI only to be used as a prototype, then you can use features of the In-Place Element Structure to control the "in-placeness characteristics" Namely the In/Out Element border nodes, the "Mark as modifier" feature of the border nodes (note the pencil icon on the In Element), and the Always Copy node.
    5) The prototype is only the first reference ever wired into the Call By Reference node. So if you do make a new prototype VI, you can't just make a reference out of it to wire to the Call By Reference node. I suggest deleting the Call By Reference node and dropping a new one.
    6) For remote calls, we always have to "make copies" by passing data over a network.
    I hope this helps, if you want any further information/clarification, then feel free to ask.
    2. Does the call by reference node execute in the UI thread? If the call is being made by a remote machine over ethernet, which thread does the host (the machine that makes the call by reference) execute on and which thread does the target (the machine that contains the VI file) execute on?
    In the local case, the Call by Reference node does not require the UI thread and can run in whatever thread the VI wants to execute in.
    When calling a remote VI, the Call by Reference node uses the UI thread (detailed below) on both the client and on the server.
    The client uses the UI thread to send the call request to the server and then again when the response comes back. The UI thread is not blocked during the time in between.
    The server receives the TCP message in the UI thread and then starts the call in the UI thread. The server also uses the UI thread to send the response back to the client. The UI thread is not blocked on the server during the execution of the VI.
    I hope people find this when they need it!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Solved!
    Go to Solution.

    I never use duct tape. I wrap my head in aluminum foil and thus get much better shielding from the aliens trying to tap my mind.
    Also easier to remove later, but why risk taking it off??
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • Form PDF email output issue

    I developed a from in smart form to send it as PDF attachment in email. It worked fine but I have a issue. When I send PDF it send in the way the the layout was designed but if some user sends it the fields are printed zigzag. Alignment is getting me

  • Photo synch Problem

    Hello there! I' ve got a problem with photo synch via iTunes. Everytime I try to synch the photos( doesnt matter if try it with 1000 or just 10 photos), iTunes stopps at the first photo and tells me after a few minutes, that the synchronisation has b

  • Find letter assigned to USB pen drive

    Hi to all, I need to programatically find out the letter assigned to a USB pen drive, after I plug it (in a Win OS) I've searched, but I haven't find anything useful. Could you help me, please? Vix In claris non fit interpretatio Using LV 2013 SP1 on

  • Doesn't close properly the anonymous user's session.

    Hello experts. We are implementing the anonymous user in Portal, according to the following link: http://help.sap.com/saphelp_nw04s/helpdata/en/1e/e19f58136e654d9709befa464314f2/frameset.htm We have used the notes: 709354, 837898 and 728106 And the o

  • Forced 1080p60 Canon HF R400

    This is what I have: Canon HF R400 Blackmagic Mini Converters HDMI to SDI Blackmagic Decklink Duo Wirecast I had to call Canon to verify, which I have done. The Canon HF R400 does NOT give you the option to force 1080i60. Canon says if the camcorder