Help for Process Priority (STOP buttons)

I , I have a problem with my program.
I make the acquisition with a device connected to GPIB.
I want to have my main program with 2 For Loop and a stop button which stop the program and the device.
The problem is that, if the program is doing an acquisition and is in a For loop, I can press stop button and nothing happens until the end of the for loop.
I can stop with main stop red button but my device is not Off.
I tried an event structure but it don’t works.
The goal is to have a stop process priority to the acquisition process.
I attached my structure of program. I only need to keep the 2 For Loop.
Event structure and while Loop can be removed.
I use LV2012 sp1f5 but I can upgrade to LV2014 if really necessary
thanks in advance for your help.
Solved!
Go to Solution.
Attachments:
priority_process_LV2012.vi ‏16 KB
Capture.JPG ‏114 KB

Rigth click on the border of the loop you want to leave and add the conditional terminal.
Place the Stop button inside the loop.
Greetings from Germany
Henrik
LV since v3.1
“ground” is a convenient fantasy
'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Similar Messages

  • Display array contents & prompt user for process priority

    Hi, i need help developing an interface.
    I have an array which contains a complete list of models available at my company. Now, i want to create an interface where the contents are displayed and user is able enter numbers to select the models he/she wants to run and the process priority.
    eg: The array contains models A to Z. The user is able to select models D, A, G and B and instruct the program to process them at the same sequence.
    How do i acheive this in Labview?
    I'm very poor at designing interface, can someone point me to any literature and tutorials in developing frontpanel interface in Labview?
    Thank you.

    Hey, I have done something similar to this in the past.  The way I did it was by using a listbox.  I had buttons that the user would select to tell me what to do and how to modify the listbox contents.  For example, in your case, I would have an Edit button.  When the user selects the Model and hits Edit, I would pop up a screen asking him which process he would like to assign to the model.  Then I would check for errors and if none existed, I would update the listbox contents with the new information.
    Let me know if this helps or if I should provide more explantation.
    Thanks!
    Dan
    Daniel Eaton
    National Instruments
    Systems Engineering
    Embedded and Industrial Control

  • HELP FOR OPEN IE FROM BUTTON CLICK ?

    Hello All,
    i make a jframe i want to open internet explorer window for particuler site by button
    click any body tell me plz.
    Thanks ...
    Arif.

    See this Application below, use it in your application
    //to open an application during the run time use runtime
    //n no of applications can be opened during the run time
    import java.awt.*;
    import java.io.*;
    public class RT
    public static void main(String str[])
    try
    Runtime rt = Runtime.getRuntime();
    rt.exec("notepad"); //exit or execute
    // rt.exec("wordpad");
    rt.exec("c:/progra~1/netscape/communicator/PROGRAM/NETSCAPE.EXE");
    /* Process p = exec(perl xyz.pl);
    DataInputStream dis = new DataInputStream(p.getInputStream());
    System.out.println(dis.readLine()); */
    catch ( Exception e)
    e.printStackTrace();

  • Action Script 3 code not working for start and stop button?

    Ok so I have this simple animation I created of a circle that moves from one side of the stage to the other. I have added a new layer and called it buttons. On this layer I have added 2 buttons. One for start and another one for stop. The purpose is to get my circle to move from one side of the stage to the other but be able to use my buttons so that I can start and stop the animations at random times during playback. I fixed all my compiler errors now the problem lies in that everytime I click the start or the stop button I get an output error. I have a 3rd layer in which is titled actions and this is where all my code is posted. I removed that layer and placed my code in the first frame of the buttons layer to see if this would change anything but I still get the same output errors. So I just added back my actions layer. What could I be doing wrong? I have made sure to name all my movie clips and buttons correctly and I even added an instance name to them.
    Here is my code and the errors I am getting when I press the play and stop button on test-
    start_btn.addEventListener(MouseEvent.CLICK, startCircle);
    stop_btn.addEventListener(MouseEvent.CLICK, stopCircle);
    function startCircle(e:MouseEvent):void{
        circle.play();
    function stopCircle(e:MouseEvent):void{
        circle.stop();
    green_btn.addEventListener(MouseEvent.CLICK, greenCircle);
    red_btn.addEventListener(MouseEvent.CLICK, redCircle);
    function greenCircle(e:MouseEvent):void{
        circle.play();
    function redCircle(e:MouseEvent):void{
        circle.stop();
    Here are my output errors-
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at exercise2_fla::MainTimeline/redCircle()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at exercise2_fla::MainTimeline/greenCircle()

    ok so my circle is my movie clip and it is titled circle and the instance name is circle. Am I supposed to change MovieClip to circle? I put the code at the top of my actions script but for some reason it did not work. I did change play to stop and it got the movie clip to stop when I do test movie but my buttons still do not work. So I changed stop back to play. Strange.
    I did try changing MovieClip to circle but that did not work so I did Circle with a capital C and that did me no good eigther.
    I meant to add that I did get an error that said- 1180 Call to a possibly undefined method circle.

  • Help: my process priority of 'ora_pmon_sid' is decreased to 0 by OS!

    Hi, I see this is a group about Linux, but it seems its the most appropriate forum to post my problem.
    My world is composed of Unixware7 and Oracle 8.1.5 and some processes of my owner application.
    Everything is OK after my application started, but several hours later, the prioriy of process 'ora_pmon_sid' is decreased to 0(I found out using ps -ef|grep ora_), while all other processes seems alright and my application runs on.
    To my best knowledge, OS will decrease a process's priority if only it occupied too many resources. I have no idea what it is doing now, anyone help me?
    No warnings, no errors, the %idle of CPU remains 50%.

    You should look at the Windows Event Log for errors / reasons.
    Probably (this is a guess), you ran out of space for the Paging file.

  • Urgent help for processing XML stream read from a JAR file

    Hi, everyone,
         Urgently need your help!
         I am reading an XML config file from a jar file. It can print out the result well when I use the following code:
    ===============================================
    InputStream is = getClass().getResourceAsStream("conf/config.xml");
    BufferedReader br = new BufferedReader(new InputStreamReader(is));
    String line;
    while ((line = br.readLine()) != null) {
    System.out.println(line); // It works fine here, which means that the inputstream is correct
    // process the XML stream I read from above
    NodeIterator ni = processXPath("//grid/gridinfo", is);
    Below is the processXPath() function I have written:
    public static NodeIterator processXPath(String xpath, InputStream byteStream) throws Exception {
    // Set up a DOM tree to query.
    InputSource in = new InputSource(byteStream);
    DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
    dfactory.setNamespaceAware(true);
    Document doc = dfactory.newDocumentBuilder().parse(in);
    // Use the simple XPath API to select a nodeIterator.
    System.out.println("Querying DOM using " + xpath);
    NodeIterator ni = XPathAPI.selectNodeIterator(doc, xpath);
    return ni;
    It gives me so much errors:
    org.xml.sax.SAXParseException: The root element is required in a well-formed doc
    ument.
    at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213
    at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XM
    LDocumentScanner.java:570)
    at org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.endO
    fInput(XMLDocumentScanner.java:790)
    at org.apache.xerces.framework.XMLDocumentScanner.endOfInput(XMLDocument
    Scanner.java:418)
    at org.apache.xerces.validators.common.XMLValidator.sendEndOfInputNotifi
    cations(XMLValidator.java:712)
    at org.apache.xerces.readers.DefaultEntityHandler.changeReaders(DefaultE
    ntityHandler.java:1031)
    at org.apache.xerces.readers.XMLEntityReader.changeReaders(XMLEntityRead
    er.java:168)
    at org.apache.xerces.readers.UTF8Reader.changeReaders(UTF8Reader.java:18
    2)
    at org.apache.xerces.readers.UTF8Reader.lookingAtChar(UTF8Reader.java:19
    7)
    at org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.disp
    atch(XMLDocumentScanner.java:686)
    at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
    canner.java:381)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.
    java:195)
    at processXPath(Unknown Source)
    Thank you very much!
    Sincerely Yours
    David

    org.xml.sax.SAXParseException: The root element is required in a well-formed document.This often means that the parser can't find the document. You think it should be able to find the document because your test code could. However if your test code was not in the same package as your real (failing) code, your test is no good because getResourceAsStream("conf/config.xml") is looking for that file name relative to the package of the class that contains that line of code.
    If your test code wasn't in any package, put a slash before the filename and see if that works.

  • Help: my process priority is decreased to zero by OS?

    Hi, I see this is a group about Linux, but it seems its the most appropriate forum to post my problem.
    My world is composed of Unixware7 and Oracle 8.1.5 and some processes of my owner application.
    Everything is OK after my application started, but several hours later, the prioriy of process 'ora_pmon_sid' is decreased to 0(I found out using ps -ef|grep ora_), while all other processes seems alright and my application runs on.
    To my best knowledge, OS will decrease a process's priority if only it occupied too many resources. I have no idea what it is doing now, anyone help me?
    No warnings, no errors, the %idle of CPU remains 50%.

    Hi
    On linux, priority goes from -20 (highest priority) to 20 (lower priority) so a priority of 0 is not bad ;)
    Most UNIX do this, so first check the priority system under your UNIX, and get the highest/lower value...
    Anyway if CPU is 50% the machine is working fine, is not hanged.....
    A10!
    PS: How many simultaneous connections to the database and machine did you have?

  • Help for processing of the FM 'BAPI_INSPOPER_GETDETAIL'.

    Hi,
       Can anyone please help me with the processing of the FM 'BAPI_INSPOPER_GETDETAIL'.
    There seems to be no documentation on this FM on the net or on SDN.
    I basically need to use this FM to fetch the values of three fields Target Value (SOLLWERT) , Lower Tolerance Limit (TOLERANZUN) and Upper Tolerance Limit (TOLERANZOB).
    Currently I am not able to this but there seems to be some way out of it. Please help.
    Thanks.

    Hi,
      Please pass the below data for BAPI 'BAPI_INSPOPER_GETDETAIL'.
    CALL FUNCTION 'BAPI_INSPOPER_GETDETAIL'
      EXPORTING
        insplot                               = '010000000001'
        inspoper                             = '0010'
        read_insppoints                   = 'X'
        read_char_requirements       = 'X'
        read_char_results                 = 'X'
        read_sample_results             = 'X'
        read_single_results                = 'X'
        read_chars_with_classes         = 'X'
        read_chars_without_recording   = 'X'
        res_org                                    = ' '
        char_filter_no                           = '1   '
        char_filter_tcode                      = 'QE11'
        max_insppoints                        = 100
        insppoint_from                          = 0
    TABLES
         CHAR_REQUIREMENTS                  =  it_charreq
    From table IT_CHARREQ you can get lower tolerance limit(IT_CHARREQ - LW_TOL_LMT),Upper tolerance limit(IT_CHARREQ - UP_TOL_LMT),Target value (IT_CHARREQ-TARGET_VAL).
    Hope this may helpful.
    Regards,
    Sravanthi.

  • Desperately seeking help for displaying image on button

    i wrote the following method to create and display a button with an icon, doesn't work and i cannot figure out what the problem might be and how to fix it, please help me...
    clo :))
    public static void addButton(Container c, String title,
    ActionListener listener)
    JButton button = new JButton(title);
    button.setBorder(null);
    button.setFocusPainted(false);
    button.setBorderPainted(false);
    button.setContentAreaFilled(false);
    ImageIcon icon = new ImageIcon("anImage.jpg");
    button.setIcon(icon);
    c.add(button);
    button.addActionListener(listener);
    the parameter c is of JPanel type and gets added to a JFrame object,
    the source compiles and runs but i see no image on my button, sigh :((!
    PS(the image file is placed in the same dir as the source file).

    Why buttons and labels might not show up the icon?
    Either your image is not in the classpath and you are trying to load it as a resource: see
    http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html
    or you are running the java machine from a different directory that you expect it does.
    or the file doesn't exist.
    To prove that the system cannot load the image use the example in the above link and the url will be null.
    URL iconURL = ClassLoader.getSystemResource("anImage.jpg");

  • Help with Process Chain - Stop remaining Processes if Package returns 0 rec

    Hi, i have a Process Chain that starts with a single InfoPackage.  Then it goes on to distribute the load to multiple DSO's and then onto DSO Activation.  I would like the Process Chain to stop right after the InfoPackage if no records are loaded. 
    Is this possible using the decision variant somehow?  Any details on how to achieve this are greatly appreciated!

    Hi ,
    The request is goin to red status when 0 records are pulled in. There is a option in info package so that even when 0 records come in the request status would be green.
    Open your info package , then in the menu goto "Scheduler > Treatment of warnings > Select Green" so that in future even if the info package pulls 0 records the status would be green . then the activation step in the process chain would also be carried out smoothly.
    In this way you need not manually change any request status to green . Saves you time.
    regards
    Venky

  • Why doesn't stop button always stop my VI?

    We are using the default "Continuous Acquisition to Spreadsheet" VI that came with Labview. Our application is recording 32 temperature readings to a text file, and displaying them simultaneously to the monitor. The scan rate is one per minute, the buffer size is 1 and the number of scans to write at a time is 1. When the stop button is hit, sometimes the VI stops soon (after the next write?), sometimes it doesn't and the stop button needs to be hit repeatedly to get the VI to stop. I'm not sure what is happening. Any suggestions? Thank you in advance.

    I have a feeling that this has to do with your data acquisition being so slow.
    If you are only doing one scan per minute, I suggest you do use the AI Sample Channels VI, rather than a continuous acquisition.
    The reason is, in the VI you are using, LabVIEW ties up the processor when the AI Read VI is called, and it is waiting for the data to be available in the buffer. Since you are scanning at 1 scan per minute, it will have to wait a minute until the data is ready, and it will take control of all the CPU time in the process.
    Depending on when in the cycle you pressed the stop button determines how long you'd have to wait until the AI Read comes back with the data, and allows the CPU to process the stop button.
    Using the AI Sample Channels VI with
    a 1 minute delay will accomplish the same task, but it won't tie up the CPU like it is currently.
    Mark

  • Measurement mark for start and stop interval

    I have added measurement mark as Start interval and Stop Interval and saving that in the Time interval measure as indicator for BAM in my BPM Process.
    This is to calculate the time it takes to finish some task. e.g.
    A. process is started
    B. Start Interval measurement mark is added and saved in measure BAM indicator
    C. some task takes places.
    D. Stop Interval measurement mark is added and saved in measure BAM indicator
    But, when I create the report, the measure indicator doesn't have any value.
    I think I am doing something wrong, but don't know what.
    Has any one done this or come across this situation.
    Thanks

    Dear sir,
    My application development steps are as follows:
    1. My application consists of three control buttons are Start, Stop & Exit
    2. Initially input parameters validation (Limits are assigned)
    3. If any value entered out of limit, it will show the error message and the start button will gray and disabled. The user should not start the application until entered values are valied.
    4. Internally some conversions and logics are implimented.
    5. Coming to Front panel (GUI) start button is green color and stop button is red color.
    6. The user entered the correct parameters and he started the appilication. After sometime he should know already application was started and he should not start again until he stops the appilcation.
    For this i need logic for start and stop buttons to implement in my application. Thats why i choosen the traffic light concept changing the colors vice versa (which button shows green he should press that perticular button).
    Please suggest me or provide any better option for start and stop buttons.
    Regards,
    S Nagaraju

  • Providing F4 help for the same field on selection screen

    Hello Experts,
    My requirement is :
    There are 2 radio buttons and a parameter "p_file" on my selection scree.
    1. rb_appl
    2. rb_pres
    If the radio button rb_appl = 'X', I need to place the logic of F4 help of application server for the field p_file. Else if the rb_pres = 'X', then I need to place the logic of F4 help of presentation server for the same field p_file.
    I have written the code in the below manner
    PARAMETERS: rb_appl RADIOBUTTON GROUP rad DEFAULT 'X',
                             rb_pres RADIOBUTTON GROUP rad ,
                             p_file   TYPE ibipparms-path.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      IF rb_appl = 'X'.
          PERFORM f_applictn_server_filenm.
      ELSEIF rb_pres = 'X'.
        PERFORM f_presentation_filenm.
      ENDIF.
    But I am getting the F4 help for only the radio button for which i have placed the default value in the parameters.
    So please let me know how to define the F4 help for the same field based on the radio buttons.

    Hi,
    You can acheive the same by the addition of [USER-COMMAND fcode].
    RADIOBUTTON GROUP group [USER-COMMAND fcode] - The addition USER-COMMAND can be used to assign a function code fcode to the first parameter in a radio button group. The function code fcode must be specified directly, and have a maximum length of 20 characters. When the user selects any radio button of the radio button group on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and transfers the function code fcode to the component ucomm of the interface work area sscrfields.
    So you code should be altered as
    PARAMETERS: rb_appl  RADIOBUTTON GROUP rad
                         USER-COMMAND radclick    "Addition which you have to make.
                         DEFAULT 'X',
                rb_pres  RADIOBUTTON GROUP rad ,
                p_file   TYPE ibipparms-path.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      IF rb_appl = 'X'.
        PERFORM f_applictn_server_filenm.
      ELSEIF rb_pres = 'X'.
        PERFORM f_presentation_filenm.
      ENDIF.
    Thanks & Regards,
    Harish

  • When I download the new itunes (on my pc); going through the dowload process it stop me and a window pops up and it says: (there is a problem with this windows installer package. A program required for this install to complete could not be run.) Help

    when I download the new itunes (on my pc); going through the dowload process it stop me and a window pops up and it says: (there is a problem with this windows installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor.)
    I have tried several times to redownload and keep getting the same message. what am I doing wrong...

    Let's try the following user tip with that one:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • How to terminate or exit a for loop when the user clicks on stop button

    Actually my problem is to stop a loop when i click on stop button.
    example:i have two buttons 'start' and 'stop'
    in start buttom i wrote a for loop as
    dim i as integer
    For i=1 To 100000
    print i
    Next
    when i click on start buuton it prints 'i' value up tp 100000.
    my question is when i click on 'Stop' button the for loop has to terminate or Exit from the  loop and should stops the execution.
    Is it possible to termianate or Exit the 'for loop'
    PS.Shakeer Hussain
    Hyderabad

    I am unable to stop the loop and application not at all allowing to Press the Stop button.
    It seems like Hung, any advise ?
    Private Sub btnStart_Click(sender As Object, e As EventArgs) Handles btnStart.Click
            btnStop.Enabled = True
            btnSelectFile.Enabled = False
            btnStart.Enabled = False
            btnStop.Focus()
            Dim strFileName As String = txtFileName.Text.ToString
            Dim strLineText As String
            If System.IO.File.Exists(strFileName) = True Then
                Dim objReader As New System.IO.StreamReader(strFileName)
                While objReader.Peek() <> -1 And stopclick = False
                    strLineText = objReader.ReadLine()
                    MsgBox(strLineText, MsgBoxStyle.Information)
                    Application.DoEvents()
                    Thread.Sleep(My.Settings("strDelay") * 1000)
                    'System.Diagnostics.Process.Start(My.Settings("strFireFoxLocation"), strLineText)
                End While
            End If
        End Sub
        Private Sub btnStop_Click(sender As Object, e As EventArgs) Handles btnStop.Click
            stopclick = True
            btnSelectFile.Enabled = True
            btnStart.Enabled = True
            btnStop.Enabled = False
        End Sub
    Raman Katwal
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

Maybe you are looking for

  • Cannot 'save' a pdf file in AR 10.0.1

    I just upgraded to AR 10.0.1. I'm running W7(64). When I download a PDF file and it is on the screen there is no option anywhere to 'save' the file. At the bottom of the page, in the center, appears a 'fluttering' oval containing the Save, Print, etc

  • Problem with N95 8Gb Gallery

    I have a quite annoying problem with my N95 8Gb Gallery. Since last week, when I open the gallery it appears a lot of system files that shouldn't be there instead of only showing my videos and photos. It makes the phone a lot slower and it crashes. I

  • Authorization for UB document type in PO create

    Hi All, We wanted to restirct some user from creating PO other than UB. We want them to give authorization only for UB document type in ME21N. What is teh best way to make it work? Thanks for your support. KHAN

  • Ipod is not syncing right.

    When I plug in my ipod and sync it, it is not allowing me to add playlist to my ipod or sync a new audible book I have just purchased. it appears to be locked or something. Is this a problem with the new update or what?

  • Issue in Reprocessing Incorrect Confirmations

    Hi Folks, I have a issue were i work on CO16N to reprocess incorrect confirmations i have a list of 40 production orders , and i choose to process in batch of 5 and execute , i get system dump since the transaction times out and dump error . When my