Controler l'exécutio​n (break/res​ume/stop) d'une séquence teststand avec CVI

Bonjour,
Je souhaite commander l'exécution de le séquence de test (break/resume/stop) via CVI en utilisant directement teststand sans être obliger de passer par une interface operateur afin de conserver la possibilité d'éditer les séqeunces.
J'ai tenté la commande TS_ExecutionBreak mais sans succes. J'obtiens une erreur : "-2147467262; User-defined error code. Possible System Error: Cette interface n'est pas prise en charge."
Quelles  sont les conditions pour utiliser cette commande?
Quelle est la solution pour gérer l'exécution de la séquence via CVI ?
Merci

Voir à cette adresse:
http://forums.ni.com/ni/board/message?board.id=417​0&message.id=13111
.NIDays2008 {font-family:Arial, Helvetica, sans-serif; font-size:12px; color: #065fa3; font-weight: bold; text-decoration: none; text-align: right;} .NIDays2008 a, a:hover {text-decoration: none;} .NIDays2008 a img {height: 0; width: 0; border-width: 0;} .NIDays2008 a:hover img {position: absolute; height: 90px; width: 728px; margin-left: -728px; margin-top:-12px;}
>> Avez-vous entendu parler de NI Days ?

Similar Messages

  • My lock button doesn't work. It didn't break, it just stopped working

    Ok. So apparently during a workout outside, my brand new, month old iPhone 4S decides it wants to workout too. So I brought it to my workout, put it in a backpack, and set the bag down as I normally do. The dew on the grass that morning apparently casused enough condensation to trigger my litmus paper, and now my brnad new iPhone has no warranty, hence my question here. I have been searching for a week or 2 now on information for this, and can find nothing. Apple will do nothing but tellme they can replace the phone for $200 but then won't wanswer questions about the issue itself, and I seem to be the only iPhone owner in the world with this problem, so it's nowhere on the intarwebz.
    So my lock button, up top, on the shoulder, stopped working. It didn't break, it didn't get stuck down, it just stopped working. Like, the screen flashed (go to wake the phone up, it didn't wake up, so I pressed the button again, and it flashed on and then off again real quick, like normally would). Hit it again, nothing. Hit the Home button, woke up. Played with phone, etc, went to put to sleep...... nothing. Hit the button multiple times, nothing. Button still clicks down and functions as the button itself should, but no sleep or wake. The button only actually does what it's supposed to do when I hard reset, or the phone is off and I'm turning it on. I can't take a screenshoot of the phone, and every now and then my phone will be just sitting on the table or wherever, and it will wake up, the "Slide to Close" bar pops up, and then 15 seconds later, goes back to bed.
    Has anyone else experienced this issue, and what should I look at fixing inside? I have not taken this one apart yet as I don't have the tools anymore, waiting on them to get here, but I figure Apple has screwed me on my warranty, so I'm just going to fix it myself. Never had this specific issue before, so I'm not really sure what the **** is messed up until I can take a look inside. Any help until then would be wonderful. Sorry for the long back story, and thanks for looking.

    Your problem is rare from the symptoms you describe. Most lose the click function, yours still has it. Yours functions sporadically or only for certain functions. Maybe it is liquid damage causing this. Maybe it will dry and be OK.
    While waiting for your Pentalobe Screwdriver, try a Firmware Restore with iTunes. See if this helps. If you still decide to procede, the first step inside should be to carefully disconnect the battery at its connector. Also all the screws inside are different sizes, except for some of the Screen screws, so keep them well sorted.

  • I am facing issue with the new iOS 7 control center; where I am not able to stop Music or go to next track from this shortcut center. Any Solution or Settings ?

    Hi,
    I have upgraded my iphone 5 to new iOS7 where I see that we have a new shorcut feature Control Center to turn on Wifi, Blutooth, Air Play etc..In the same we have for MUSIC where I am not able to pause or stop music and also cant go to next track and issue withe those buttons.
    Please let me know any seetings needs to changed.
    Thanks
    Niranjan

    Last point...who archives? On my regular email page I now have the Archive icon to the left of my Delete icon which I would prefer was to the left, first in the line as this is the icon I use mostly. With Folders, my Sent and Trash lists, who needs to archive?
    I can help you only with the placement of the icon placement -- if you right-mouse click on the toolbar, then select Customize Toolbar, you can move an icon to where you want it to be.

  • Log & Transfer of .R3D to Apple Pro Res HQ stopped working

    I had been successfully Transferring my .R3d footage to Apple Pro Res HQ and now that I'm about half way through I am unable to bring my footage into the Log & Transfer queue. When I select the appropriate folder via Directory and click Open, nothing happens.
    Any suggestions?

    50 views and not 1 reply...doesn't anyone have a suggestion??? I've tried all the normal troubleshooting and I haven't made any progress

  • Linear actuator controlled with external encoder and smart motor - randomly stops

    Hi,
    This is my first experience with Labview or any sort of programming for that matter.  I am using an Animatic Smart Motor Model: SM1720M version 4.15b with an Ultra Motion Bug linear actuator: 4-2B.125-SM17-3.2-1NO-B/EC4 and a 600 series optical encoder.  I am trying to write a VI that allows me to manually control the linear actuator using the encoder.  I attached the one I have been using, but for some reason it randomly stops working, generally  when the actuator is extended about an inch and 2 1/2 inches.  It stops in the same general area, but not the exact same spot.  Any ideas?  Any help would be much appreciated!
    Attachments:
    Manual Command.vi ‏29 KB

    1. The VISA Clear and VISA Close should be outside the loop. You do not want to be re-initializing the VISA session each time through the loop.
    2. You have the port initialized to use line feed as a termination character. When using termination character, you should not use Bytes at Port. Just set the byte count input of VISA Read to a constant larger than the longest message you expect to receive.
    3. With the termination character you do not need the waits between or before the reads.
    4. The 10 ms Wait in the outer loop is rather meaningless when the start button is True. The VISA Write takes much longer than 10 ms for the string you are writing. It does make sense to have a Wait in the False case.
    5. The start button is set to Latch When Released mechanical action. With that setting it retuns to False every time it is read. The result is that the code in the True case only executes one time for each press of the button. Is that what you want?
    A state machine architecture is more flexible and more robust.
    As to why it stops in a particular place, you have not given us nearly enough information to even guess. What is the relationship between motor speed and displacement? Where do you do anything with the encoder? What is the format of the encoder output? How far does the motor move at various speed settings during one iteration of the outer loop? Where is the command to stop the motor when it gets to where you want it? 
    What error messages, if any, do you get when it stops?
    Lynn

  • Arrêter l'éxécutio​n d'un sous-VI dans une machine d'états

    Bonjour à toutes et à tous,
    J'ai réalisé un programme utilisant une machine d'états standard (du même type que dans les exemples). L'activation d'un bouton dans l'étape d'attente dirige vers un état qui lance l'exécution d'un sous-VI. Je souhaite pouvoir stopper l'éxécution de ce sous-VI via la face avant de la machine d'états.
    Le problème et je l'ai bien compris c'est que pendant l'éxécution du sous-VI, je n'ai plus la main dans l'étape d'attente donc je ne peux plus faire d'interaction.
    Quelqu'un peut-il apporter une solution à mon problème svp ?
    Merci.

    Voici le code lançant l'éxécution. Peut-être manque t-il des données à l'ouverture du VI.
    Merci.
    Bien cordialement,
    Pièces jointes :
    code_exe.jpg ‏44 KB

  • LabVIEW, LabWindows, TestStand Freelancer

    Test Engineer looking for contract-type work, and open to full-time opportunities as well.
    As part of my professional career I have developed very large LabVIEW/LabWindows/TestStand test programs. Some of these ATEs are currently deployed in engineering labs and production environments at CMs such as Sanmina, Celestica, Benchmark; the CMs are across different geographical areas (Mexico, USA, Thailand, China).
    Experience controlling different types of equipments such as oscilloscopes, power supplies, DC loads, network traffic generators, Data Acquisitions Units, relays, DIO, etc. Experience developing applications where units run in serial and parallel modes.
    LAVA username: nitulandia
    Please send me a Private Message for additional details.
    Fluent in English and Spanish.
    Thank you for reading this.

    Bonjour,
    Je cherche à envoyé des requêtes en TCP/IP sur un module 'maison', et récupérer les éventuels réponse. (LabVIEW)
    Faire cette procédure en boucle jusqu'a ce que je reçoive une réponse comportant une anomalie, l'arrêter (par ex) et l'inscrire dans un rapport. (TestStand)
    J'ai déjà fait le Module LabVIEW, j'aimerai intégrer ce module dans une séquence TestStand pour automatisé l'envoie et la prise de décision en fonction de la réponse reçu.
    Donc au final pouvoir choisir ce que j'envoie avec TestStand:
    [TestStand:    requêtes -> [LabVIEW] -> réponses ]
    Assez compréhensible ?
    Cordialement,
    Anthelme
    P.S.: Je dois avoué ne pas avoir compris vos solutions proposé...

  • Non-Interactive Report Break Formatting

    I have a non-interactive report that is very large and I am trying to use break formatting to provide subtotals. It works, but is quite ugly. Can anyone tell me where I might find a list of the various substitution strings that can be used for controlling the appearance of the breaks? For example, right now when it breaks for a change in "Payor Name", the subtotal row is labeled "Total for Payor Name". It would be much friendlier if the row label said "Total for Aetna" when Aetna is the Payor Name and "Total for Cigna" when the Payor Name is Cigna, etc. For example
    [Parent Name|http://ndhoast.tsh.mis.mckesson.com:7778/pls/apex/f?p=123:75:720425469268847:fsp_sort_1_desc::RP&fsp_region_id=27444927281350588|Sort by this column] [Payor Name|http://ndhoast.tsh.mis.mckesson.com:7778/pls/apex/f?p=123:75:720425469268847:fsp_sort_2::RP&fsp_region_id=27444927281350588|Sort by this column] ClaimType ST [RH Payor ID|http://ndhoast.tsh.mis.mckesson.com:7778/pls/apex/f?p=123:75:720425469268847:fsp_sort_5::RP&fsp_region_id=27444927281350588|Sort by this column] [Naic/EmdPayor Id|http://ndhoast.tsh.mis.mckesson.com:7778/pls/apex/f?p=123:75:720425469268847:fsp_sort_6::RP&fsp_region_id=27444927281350588|Sort by this column] LOC TRX [TRX Count|http://ndhoast.tsh.mis.mckesson.com:7778/pls/apex/f?p=123:75:720425469268847:fsp_sort_9::RP&fsp_region_id=27444927281350588|Sort by this column] [TRX Dollar Amt|http://ndhoast.tsh.mis.mckesson.com:7778/pls/apex/f?p=123:75:720425469268847:fsp_sort_10::RP&fsp_region_id=27444927281350588|Sort by this column]
    World Insurance Company World Insurance Company I - COMM085001 75276 DBQ CLM 18 $40,679.82
    Total for: ClaimType *18* *$40,679.82*
    P - COMM098401 75276 DBQ CLM 457 $129,959.38
    Total for: Payor Name *475* *$170,639.20*
    Total for: Parent Name *475* *$170,639.20*

    This has been an area in need of some attention for quite a while, in my opinion.
    Re: Formatting of Reporting Totals
    Re: Report Break Formatting
    I've just looked at 3.2, and the help messages are the same – not at all helpful – ones I remember from 1.6.
    I'm seem to recall this was raised on one of the enhancement request threads, but it doesn't seem to have been touched...

  • Preventing page breaks in PDF on converted web pages

    I've been happy with the speed and linking that is available when I convert web pages into pdf's. However, the pdf versions often break the pages at inappropriate places or even will break an image so that part appears on one page and the rest appears on the following page. How can I can control where the pages will break in the pdf version of the web page?

    Mike is correct in the breaking stakes but you can change the
    destination paper size, orientation and scaling inside the 'Create PDF
    from Web Site' settings ...
    Jon

  • Forced return, non-breaking hyphens & spaces, suppress hyphenation + XML

    Forced return (linefeed), non-breaking hyphens and spaces, suppress hyphenation.
    None of these are preserved when exporting from FrameMaker to XML, since they do not seem to be represented by a Unicode code point. My question to you is: How do you deal with those things in XML?
    The last issues (non-breaking and suppress hyphen) have recently been brought up in:
    http://forums.adobe.com/thread/450363
    http://forums.adobe.com/thread/459503
    Forced return is a common thing in many FrameMaker documents to improve readability of certain phrases.
    For export of FM to XML, there have been proposals to use a special element with a prefix just to capture the special FrameMaker symbol. It works, and may be a valid useful path in certain cases, but I think that it is a questionable way of dealing with it for several reasons:
    It is only relevant for roundtrip, since these special elements will hardly be interpreted by other XML tools, which of course limits the value of XML export.
    It is unwieldy, to say the least, to require the user to insert special elements for saying simple things that otherwise are just natural key strokes in the regular text flow, and which are not perceived as structural elements of information. Most users would think of these symbols/charactes as control characters, and there is no validation warning that says you may not use these characters/symbols.
    An element is used for formatting purposes only, whereas all other elements are used for content or structure.
    There is no automatic way of transforming an existing text that has these "symbols" into some special element when a document is structured with a conversion table.
    There is no automatic way of transforming a structured FM document to XML such that these special "symbols" get translated to some suitable XML construct.
    If the last point could be solved, i.e if all those control characters or markers could automatically be translated to a suitable XML representation, then I would consider the whole issue as solved, otherwise not.
    Even without FrameMaker, how do people deal with these things in "pure xml". For instance, when XML is used for publishing (which I know Arnis Gubins is doing), there will guaranteed be a need to control both hyphenation and line breaks. So how do you (they) do that?
    How do other vendors cope with these issues, e.g XPP?

    Lynne,
    As anyone can see, entity declarations have not really been in the domain of my expertise (understatement), but I might just learn bits and pieces...
    Thanks! I have now done some more reading in various pdfs, such as scructapps etc, but also the w3c xml spec, all of which I have "read" before, but reading is not always the same as understanding...
    I now have used the "entity approach" to make both discretionary hyphen and suppress hyphen work, so that it is represented in the XML export and round-trips just fine.
    Forced return still puzzles me somewhat though: I have a working solution for that using the same entity approach, but it will not work for text ranges (although it is a bit odd to have forced returns in text range elements). Moreover, I am not certain that it really is the best way. In reading other posts on this issue, I have seen that some people want forced returns to really be linefeeds in the xml output, with no other linefeeds, and conversely, when importing xml that are "formatted" in lines, such as code, they want to preserve that.
    One  way to achieve that is to use:
         reader line break is forced return;
         writer line break is 1000 characters;  (or more characters)
    Then it is completely symmetric (i.e works also if some other app has generated the xml with intentional line breaks. And this method is global for all elements, and it works for me.
    Another way to achieve this is to use the following, but it is only valid inside an element:
         preserve line breaks;
         writer line break is 1000 characters;
    Then it is also completely symmetric (in the above sense), and it works for me.
    The latter method has the drawback that it only works for text in the element; it is not inherited to its children.
    But if we look at only one element, what is the difference between the two methods?
    As far as I have been able to see, the results are identical! Why two methods? The first one seems more powerful and general(?)
    Scrutinizing the documentation though, it says that 'preserve line breaks' will add an attribute 'xml:space', but I can't see that in my output?
    Also, concerning the documentation for line break, it says that FM would ignore line breaks when exporting, but it does NOT do that (fortunately). Forced returns always result in linefeeds, no matter what.
    I would be thankful if these issues could be explained, or elaborated.
    Also, would you recommend against any of these methods?
    With my preferred method of using the global 'reader line break is forced return' instead of a local (or many local) 'preserve line breaks', there is of course the danger that when importing xml, it is absolutely necessary that the xml really only has line breaks where they are intended, and not generated every 80 characters or so!
    Is there anything that says it is "ugly" or "bad style" to honor line breaks, and generate long lines?
    Finally, why do we need to limit the number of characters written in one line these days? Why 80, why 1000, why not an unlimited number of characters!?
    Will software these days really crash if given a very long line (assuming that it doesn't exceed total ram memory of course)?
    Sorry about so many questions, but I can't find any answers to them in the docs I have read and searched.

  • Tab control usiong tool bar

    Hi!
    In my application i want show different graphs using tab control.How can i control the page selection  of tab cntrl.  using different buttons that i put up on my tool bar.Is there any property to this op.?
    Thanks
    DeWalker
    Solved!
    Go to Solution.

    Create a local variable of the tab control and wire a constant into it. Run this code when your button is pressed.
    The downside of this is that if you are reading the value of the tab control as well, it will break dataflow and cause a race condition. 
    - Cheers, Ed

  • Liquid transfer control/monitoring using valves, pumps, & sensors

    Hi there,
    My project is writing a labview program to control & monitor the transfer of a liquid from a tanker truck to a 70-tonne storage tank, and from the storage tank to multiple 3-tonne railroad tankers. We will be using a NI controller (I don't remember the name of it right now) to control this system. The piping network for this transfer process consists of several remote control valves, 1 flow meter, 2 pumps (centrifugal & diaphragm), level sensors, & load cells. The labview program needs to:
    1. control the flow of liquid (i.e. start/stop transfer, open/close valves & activate/deactivate pumps when certain setpoints are reached)
    2. monitor the inventory of liquid in the tanker truck, storage tank, & railroad tanker (flow meter will indicate the flow rate, level senors will be in both tankers to indicate levels, and storage tank has a load cell which can be used to indicate the inventory of liquid iside the tank)
    The transfer is split into 2 phases: tanker truck to storage tank & storage tank to railroad tanker. Both are separate processes (i.e. they do not occur simultaneously). So my labview program needs to be able to switch between these two processes.
    I am relatively new to using labview, and this is a pretty tall order. I was just wondering if anyone had any advice on how I could set the program up? Or possibly lead me to some example programs I could look at to help me out.
    I appreciate any feedback.
    Thanks,
    Daryn

    Daryn,
    You are right that "this is a pretty tall order" for a LabVIEW beginner. However, if you are patient and do not try to do too mcuh too quickly, you should be able to get it working.
    First, I recommend that you get some LV training to make sure that you are sound on the fundamentals before you do mcuh on this project.  Fumbling around making novice errors could become a big problem for a project like this.
    Next, break the problem down into "bite-sized" chunks. You will need to be able to read from the sensors. Write to controllers. Perform logical decision-making. Display data to the operators. Probably log information to files. Certainly handle error conditions.  LabVIEW makes it easy to keep things modular by using subVIs.
    Also, carefully design the program before you write much code.  Your system will probably include a state machine. Document the states, what happens in each state, and the conditions for transition to other states. (Do not forget error conditions and "that will never happen" possibilites).  This state design document will make writing the program much easier.
    Then look at the examples which come with LV. There are examples for data acquistion, for control, for state machines, and for other relevant parts of the code.  The examples most likely will not be directly useful in your final program but will save you lots of time in learning how to do some of these essential parts of your project.
    Lynn

  • About control commands in scripts

    hi abapers
    can u plz tell about control commands in scripts uses of control commands

    Hi,
    Control Command Purpose:
    The purpose of these is to allow control of the output formatting. These commands are not interpreted by the SAPscript editor, but are passed through to the SAPscript Composer for processing. The Composer is the program that converts text from the form displayed in the editor to the form used for printing. This includes, for example, line and page formatting, the replacement of symbols with their current values and the formatting of text according to the paragraph and character formats specified.
    The SAPscript control commands are described in the following sections.
    <b>Syntax of Control Commands</b>
    Explicit Page Break: NEW-PAGE
    Preventing Page Breaks: PROTECT
    Next Main Window: NEW-WINDOW
    Assigning a Value to a Text Symbol: DEFINE
    Formatting Date Fields: SET DATE MASK
    Formatting Time Fields: SET TIME MASK
    Country-Dependent Formatting: SET COUNTRY
    Position of the Leading Sign: SET SIGN
    Initializing Numbered Paragraphs: RESET
    Including Other Texts: INCLUDE
    Changing the Style: STYLE
    Formatting Addresses: ADDRESS
    Setting a Header Text in the Main Window: TOP
    Setting a Footer Text in the Main Window: BOTTOM
    Conditional Text: IF
    Finding a Match: CASE
    Calling ABAP Subroutines: PERFORM
    Inserting Print Controls: PRINT-CONTROL
    Boxes, Lines, Shading: BOX, POSITION, SIZE
    Hexadecimal Data: HEX, ENDHEX
    Summing a Program Symbol: SUMMING
    Br,
    Laxmi

  • Numeric Control = LEFT_CLICK problem

    I have a panel that has a Numeric control with a EVENT_LEFT_CLICK: that opens another panel. 
    When this second panel closes it updates the numeric on the first panel. 
    Up to this point everything works fine. 
    Now that the numeric has the focus on the first panel, to get the EVENT_LEFT_CLICK to fire the user has to double (and sometimes triple) click the control.  I would like the user to be able to click once to fire the event (we are using a touch screen and it makes it more difficult)  Its like the control is trying to help me select the value (it's highlighted).
    I have tried to put the focus on another control so that when they click the numeric it will fire right away with no luck.
    Any suggestions?
    int CVICALLBACK UDOFFSET (int panel, int control, int event,  void *callbackData, int eventData1, int eventData2)
     float ctrlVal=0.0;
      char msgBuffer[100]="\0";
     switch (event)
      case EVENT_LEFT_CLICK:
       status = GetCtrlVal (panel, control, &ctrlVal);
       // this is where I am setting the numeric with the value from the second panel that loads in the goCalc sub
       status = SetCtrlVal (panel, control, goCalc(panel, control, ctrlVal));   //goCalc brings up second panel
       status = InstallPopup(waitPH);
       status = GetCtrlVal(panel, control, &ctrlVal);
       status = RemovePopup(0);
       break;
     return 0;

    Regarding your comment for goCalc, it should not displaypanel as that is what InstallPopup does.
    I would something like this.
    //callback for clicking button and okbutton on popup panel
    int CVICALLBACK UDOFFSET (int panel, int control, int event,  void *callbackData, int eventData1, int eventData2)
     float ctrlVal;
     switch (event)
      case EVENT_LEFT_CLICK:
        status = GetCtrlVal (panelHandle, PANEL_ABSOLUTEPANELNAME, &ctrlVal);
        // this is where I am setting the numeric with the value from the second panel that loads in the goCalc sub
    status = SetCtrlVal (waitPW, control,ctrlVal );
        status = InstallPopup(waitPH);
    break;
     case EVENT_COMMIT:
    if (panel == waitPH) { //OK button callback from popup panel
    status = GetCtrlVal(waitPH, control, &ctrlVal);
    RemovePopup(0);
    if (!status) SetCtrlVal(panelHandle,PANEL_ABSOLUTECONTROLNAME,ctrlVal);
    break;
     return 0;
    Sorry, may be typos in there and it is not optimized, but a general idea.  i would recommend using the actual panel handles and controls in those functions as opposed to what is returned.  Otherwise it can start to get confusing the more complicated your program gets or when you start assigning the same callback to multiple controls.

  • Control the activity flow in thread T1 using thread T2

    Hi, im asking this question because i have two threads, one running at background, one at foreground directly interacting with users. the two should also intereact with each other, and perform correct actions depending on the command/request received from the other. for instance,
    Class BackgroundThread implements Runnable{
        private boolean _stop;
        public void run(){
            while(!shouldStop(){
                //do something
        public boolean shouldStop(){
            return _stop;
        public void signalStop(){
            _stop=false;
        public void signalContinue(){
            _stop=true;
    Class ForegroundThread implements Runnable{
        BackgroundThread _bgThread;
        public ForegroundThread (BackgroundThread bgThread){
            _bgThread=bgThread;
        public void run(){
            // lines of code that catches user input from console
            case 'r'
                _bgThread.signalContinue();    //LINE A
                break;
            case 's'
                _bgThread.signalStop();   
                break;
    public Class ClientMain(){
        public static void main(args[]){
            BackgroundThread bgT = new BackgroundThread();
            new Thread(bgT).start();
            new ForegroundThread (bgT).run;
        }these are just sample code, may have errors, but the logic i suppose is clear. basically users interact with foreground thread, and they can control the running of background thread by typing command, r and s. 's' signal stop, 'r' signal continue.
    at present i managed to stop the background thread - strictly not stopping it, but stop goin into the 'while' loop - once user key in 's'; but then if i key in 'r', the program does nothing. while what i want the system to do is to resume the execution of 'while'. i tried to replace the line A to
    _bgThread.signalContinue();
    _bgThread.run();and it does re-run, but then i cannot control the thread no more. ie, it doesnt stop upon command 's' anymore.
    how can i fix this please, any hints? thanks very much in advance!

    when the background thread exits the while loop, the thread stops and exits.
    try this, it works, but obviously will need to be customized for what you want to do. It should give you an idea though.
    class BackgroundThread implements Runnable
        private boolean _stop;
        private boolean _wait = true;
        public void run(){
             while(_wait)
                 while(!shouldStop()){
                      try{
                           Thread.sleep(1000);
                           System.out.println("Do Something");
                      catch(InterruptedException ie)
                 try{
                      Thread.sleep(1000);
                 catch(InterruptedException ie)
                 System.out.println("Paused...");
        public boolean shouldStop(){
            return _stop;
        public void signalStop(){
            _stop=true;
        public void signalContinue(){
            _stop=false;
        public void signalPause()
             _stop = true;
        public void signalExit()
             _wait = false;
             _stop = true;
    class ForegroundThread implements Runnable{
        BackgroundThread _bgThread;
        public ForegroundThread (BackgroundThread bgThread){
            _bgThread=bgThread;
        public void run(){
            // lines of code that catches user input from console
            Scanner scan = new Scanner(System.in);
            boolean exit = false;
             while(!exit)
                 System.out.println("enter action");
                 char resp = scan.next().charAt(0);
                 switch(resp)
                  case 'r':
                     _bgThread.signalContinue();    //LINE A
                     break;
                 case 's':
                     _bgThread.signalPause();   
                     break;
                 case 'e':
                      _bgThread.signalExit();
                      exit = true;
                      break;
    public class ClientMain
        public static void main(String [] args )
            BackgroundThread bgT = new BackgroundThread();
            new Thread(bgT).start();
            new ForegroundThread(bgT).run();
    }

Maybe you are looking for