How to send the value of inside while loop outside

Hello

The goal of my project is to control the height of a ball in a tube (there is a fan down low to lift the ball to the top and bottom) and a Top ultrasound sensor read the distance of the ball.

I am currently using a PWM signal to control the speed of the fans (which works fine) and I use the VISA blocks read/write to communicate to my sensors (which works also very well - I can get the distance to the ball - when I move the ball up and down changing the duty cycle).

My problem:

Now, to create a control problem, I need read the distance of the ball, have some sort of controller and feed in this output as my new duty cycle for the fans... However, I need loops I have (running fans and continuous sensors to run (I guess? unless there is a way around it.) so the fans continue to work and sensors keep reading.) I need to get the measure of the distance of the loop of the sensor (after its been read) passed out of the loop and to be updated of course - then calculations can be made on that and then can be used as my duty.

Someone in a way that I can do this? Its all tied to your reference, version of labview 8.6.

Thanks heaps!

Nick.


Tags: NI Software

Similar Questions

  • How to send the value of the prompt to an another dashboard with action link?

    Dear all,

    I find how to send the parameter to a different dashboard with the link of the action.

    URL = http://hostname/analytics/saw.dll?Dashboard & PortalPath = % 2Fusers % 2Fweblogic % 2FMartin % 20Test % 2FMartin & Page = page 1 & Action = Browse & P0 = 1 & P1 = eq & P2 = entity. "" Gen6, entity ' & P3 = % 22EntityCode % 22

    But I don't know how to send the value of the command prompt. I tried @{EntityCode}, Entity.Gen6, Entity, etc. None of them worked. They just be send as a string.

    Anyone know the solution? Thank you.

    Best regards
    Martin

    Try to do a manual URL to see if it works. Static variables are called as Valueof (variable) and presentation of variables such as @{variable}
    Discover th url below and add your variables as needed and of course override other settings.

    '' || Link | ''

  • How to send the values in a column of "report" instead of a "part of the Page?

    Hello

    Here's my case: two pages A and B.
    A page is used to display each employee of a selected service.
    Page B is used to create / modify employees.

    I create a button page which redirects to page B.
    By default, page B is empty (from course to fill in the blanks to create a new employee).

    However, there are 2 values I want to send to page B (I want to fill in some blanks in advance): the service and the Manager ID ID (there is a Department Manager).
    -I managed with the service ID because it is a page element and in the "Action when click on the button" button I filled "Set these Items"-> agenda of Page B "with the values"-> about a Page A day.
    -I am confused with the ID of eating because it is not a page element, but a report column and there is nothing to do like I did for the service in the button ID to create.

    I'm a bit lost cause I don't know how transfer/send this value to the second page.

    Do you have any idea?

    Thanks again for your time!

    BR

    Ulrich

    "Cleared Cache to Page 4, when an employee existing is being changed."

    Where did you get that? >

    On page 3, region staff, the report Employee ID attribute

    See Empty the Cache under the link column

    Glad to have helped.

    Jeff

  • A result of sending the data to a while loop through another loop of TCP communication

    Hi all

    I have 2 screws

    1 matching model (using the method of Grab) which is put inside a while loop. This VI works correctly and returns a string in a specific format (position and the angle of the object).

    2 TCP server who always listens to a specific port, if it receives a correct command string, it sends the string above VI - 1 (position and angle).

    The two 2 screws works if they are in separate VI. But I want to combine them into 1 single VI and I get the problem: Pattern matching doesn't work anymore (the video has only first frame then stops).

    I tried to put the two while loop in parallel or put the TCP while loop inside while loop Pattern Matching. Nothing has worked.

    Pls see my attached VI and the TCP module.

    What is the solution for requirement?

    Thank you all!

    What I would do, is be your two screws at the same time.  Given that you do not send the last result, store the result in a global variable.  Your comparison models written VI the global variable of the results of each iteration of the loop and the TCP bed module global variable results when it receives the right to order and then send it.

  • How to get the value selected inside the forEach loop

    Hello
    I have foreach loop with a link inside command. It looks like in below:

    * < af:forEach items = "#{PagingBean.pages}" var = "item" > * "
    * < text af:commandLink = ' #{point} "id ="cl1. "
    * actionListener = "#{PagingBean.pageLinkClicked}" / > * "
    * < af:spacer width = "10" height = "10" id = "s1" / > *.
    * < / af:forEach > *.

    where PagingBean.pages is an array of integers.
    Now the links look like this * 1 2 3 4 5 * I want to get the value of the clicked link.
    Anyone please help me to get the value of commandlinks clicked in the bean

    Hello

    How about the text in the actionListener for the clicked commandLink and process accordingly?

    Ex:

     
                           
                           
    
    
        public void pageLinkClicked(ActionEvent actionEvent) {
            // Add event code here...
            System.out.println(((RichCommandLink)actionEvent.getSource()).getText());
        }
    

    Arun-

  • How to send the value of the variable to the application module to servlet?

    HII...
    How can you send a value to the application module to the servlet or jsp page when we call the function from the application module...
    as the return type of function module of the application must be zero when it to add in the client interface...

    Your Java Bean must be serializable. A quote from what is displayed when you click on 'Help' in the ' Add method on the client interface screen:

    A list of the generated methods available for export (only the public methods with parameters and return types that are primitive or implement that the Serializable interface will appear in the list).

    John

  • How can I update the values out of while loop

    The LabView waveform chart updates every 0.1 sec.

    When a user clicks on a button, I want to LabVIEW to wait 5 sec and beep for 5 sec.

    Meanwhile, it should be to update permanently the wavefrorm graph.

    When I have the structure case inside the while loop, it interferes with the updates of the waveform graph.

    When I structure case outside the while loop, the structure of the case is never executed.

    What can I do?

    I thought about it using the example of design of producer/consumer model.

    http://decibel.NI.com/content/docs/doc-5404

    It allows a variable that is updated in a while loop to update outside the while loop while the loop is running.

  • How to get the value of the outputtext in javascript and send it to backing bean

    Hi Experts ADF,

    JDev Version 11.1.1.7.0

    I have the following: the value of the outputtext must be treated in javascript and the serverlistener method has the same value. I founded this value returns a string that wshould see the mouseover NIJ.

    Help, please. Thanks in advance.

    < af:column sortProperty = "#{bindings." OrderProposalReadClient.hints.exceptions.name}.

    filterable = "true" sortable = "true".

    headerText = "#{suiviewBundle.EXCEPTIONS} '"

    ID = "c16" >

    < af:outputText value = "#{row.exceptions}" id = "ot32" clientComponent = "true" > "

    < af:clientListener type = "mouseOver".

    method = "customJsFunction" / >

    < af:serverListener type = "mycustomserverEvent".

    Method="#{pageFlowScope.ChangeOrderProposalBean.handleServerEvent}"/ >

    < / af:outputText >

    < / af:column >

    JavaScript

    < af:resource type = "javascript" >

    var customJsFunction = function (event)

    {

    var exceptiondata = AdfPage.PAGE.findComponentByAbsoluteId ('ot32');

    AdfCustomEvent.queue ();

    Returns true;

    }

    < / af:resource >

    BackingBean

    public String handleServerEvent(EC ClientEvent)

    {

    Please let me know how to get the value that javascript code sends here.

    Let's say javascript sends the value of outputtext as "001".

    So, I have to check "001" in my list and return a value that appears on mouseover.

    }

    Kind regards
    Roy

    Hello, Roy.

    To use the value on another component of the user interface, I shows an example:

    -code of the page

    shortDesc = "shortDesc" >

    method = "customJsFunction" / >


    -the javascript code

    var customJsFunction = function (event)

    {

    var exceptiondata = event.getSource ().findComponent("ot32").getValue ();

    AdfCustomEvent.queue (event.getSource (),

    "mycustomserverEvent,"

    {param1:exceptiondata},

    (true);

    Returns true;

    }

    -OutputTextCase11.java

    public void handleServerEvent (EC ClientEvent)

    {

    String param = (String) ce.getParameters () .get ("param1");

    RichOutputText outputText = (RichOutputText) ce.getComponent () .findComponent ("ot1");

    outputText.setShortDesc (param);

    outputText.setValue (param);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (outputText);

    }

    I hope this helps you.

    RFH.

  • How to read the value of an independent textInput element inside the method?

    Hello

    I had a group of detail based on a readonly viewobject. I added an independent element textInput, you say, EndDate to this group that the user can enter a value inside. Now, when I run the app I select a row in the table and press a button that triggers a method inside a bean. My question is how I read the value in independent textInput (EndDate) within the method element?

    getTable () .getRowData () does not print the unbound attribute. It seems that it only contains attributes underlying viewobject

    I use JDev 11.1.1.4

    Kind regards
    Will do

    Will do,

    You can better create a transitional attribute for that in your view object, so you can use a regular expression #{row.bindings...} to get the value.

    Steven Davelaar,
    JHeadstart team.

  • How to read the value attribute and put inside?

    What happens if we want to read the attribute value? And want to put the data of runtime on the value of the attribute as

    < psoID ID = "user id" / >

    How to get the value of the ID as the user id. And how to put the run value on it?

    I can think about is that

    /psoID/@ID/value GOLD psoID/@ID/*[local-name () = 'value']

    And how to put the value inside ID ="? »

    Thank you

    Because we are dealing with a structure of type anyType you must use the functions of node (local name) in combination with predicates ([]) to read or write values (node) of the element:

    To read the value for example use the copy rule:




    This wil read:

    /processResponse/result/psoID/@ID

    on the message:





    You will see the value 'B '.

    To write, you use:




    Kind regards

    Melvin

  • How to get the value of the TextField on Buton FieldChangeListener

    friends I am new on the development of blackberry applications could you please help me how to get the value of text I typed in the textField when I click the button?

    constructor

    public Dialogs()
    {
      
    using design in the same screen
      
    Display display = new MainScreen();
      
    ButtonField btnPress = new ButtonField();
    btnPress.setLabel ("press me");
    btnPress.setChangeListener (ButtonPressListener);
      
    TxtValue TextField = new TextField();
    txtvalue.setLabel ("enter something :");
      
    HFM VerticalFieldManager = new VerticalFieldManager (VerticalFieldManager.FIELD_VCENTER);
    HFM. Add (txtValue);
    HFM. Add (btnPress);
      
    mainScreen.add (hfm);
    pushScreen (mainScreen);
      
      
    }

    FieldChangeListener ButtonPressListener = new FieldChangeListener() {}
    ' Public Sub fieldChanged (field field, int context) {}
        
           
    Dialog.Alert (t.GetText ());
         
         
         
    }
    };

    any help would be appreciated.

    You must ensure that your FieldChangeListener has access to the object of txtvalue, while it can make a

    String inputString = txtvalue.getText ();

  • How to get the value on a model that is defined in the java code in email

    Hello

    I created a custom code and send email as well to custom component. I can send emails using the method:

    InternetFunctions.sendMailTo (EmailID, EmailTemplate, subject, cxt);

    But my problem is that I have to get a value in the model of "EmailTemplate" which are defined from java code. but I don't know how to get the value.

    I will highlight in the java code by using this code: binder.putLocal ("ErrorApproveRejectMsg", massegeBody);

    I'm trying to enhance the model using the code below, but not able to get.

    1 < $exec getValue ("#active", "ErrorApproveRejectMsg") $ >

    2 < $exec getValue ("#active", ErrorApproveRejectMsg) $ >

    3 < getValue ("ErrorApproveRejectMsg") $exec $ >

    4 < $exec getValue (ErrorApproveRejectMsg) $ >

    5 < getValue ("#local", ErrorApproveRejectMsg) $exec $ >

    6 < getValue ("#local", "ErrorApproveRejectMsg") $exec $ >

    7 < $ErrorApproveRejectMsg$ >

    8 < $exec ErrorApproveRejectMsg$ >

    Assuming that cxt will be your Service or execution context object

    You can do something like this

    DB. PutLocal ("ErrorApproveRejectMsg", "Error");

    cxt.setCachedObject ("DataBinder", db);

    PageMerger h = new PageMerger (db, cxt);

    cxt.setCachedObject ("PageMerger", h);

    InternetFunctions.sendMailTo (usersEmail, emailTemplate, emailSubject, cxt);

    where db is current databinder object, and you can put any variable custom in the workbook by using the putLocal method.

    Thank you

    Vikram

  • Send the value to myslq db

    I want to send a value in my myslq db... For me it is no problem to write the color on the input text box and sends the value with php and db after reading of adobe edge... But I want to do in another mode: user click on red or green rectangle to select the color and after press on save the color is send to my db... How can I do? Thanks in advance

    question.jpg

    Hello

    An attempt: managingEvents.zip - Box

  • How to get the value of viewrow by chain

    With the help of Jdev11.1.1.5.0 - adfbc - ireport3.0.0

    Here I will describe: what I've done.

    use jsff (dynamic region) while hitting the af:tree nodes it opens. Fine OK

    I had somevo manually wroten Query. and the query is fine no problem with it
     here i give sample not a original query
    select * from sometable where acctid = :pacctid
    I do drag and drop the pacctid correspondent run params vo as selectoncechoice


    public static vo
    Value of data - to pay account, advance

    Announcement name - ap, given


    in this jsff
    *page representation*
    
    account type :   account payable (ap) - select one choice type
                            advance           (ad) - select one choice type
    
    like this some select once choice and some inputs.
    
    Run report - command button
     .jsff code 
    <af:selectOneChoice value="#{bindings.ACCT_TYPE.inputValue}"
                              label="Account Type"
                              shortDesc="#{bindings.ACCT_TYPE.hints.tooltip}"
                              id="soc3" required="true" 
                              autoSubmit="true"
                              binding="#{backingBeanScope.SUP1040V.soc3}"
                              valuePassThru="true"
                              valueChangeListener="#{backingBeanScope.SUP1040V.ValueChangeListener1}">
                             
            <f:selectItems value="#{bindings.ACCT_TYPE.items}" id="si3"/>
          </af:selectOneChoice>
    
     <af:commandToolbarButton text="Export in pdf" id="ctb2">
              <af:fileDownloadActionListener method="#{backingBeanScope.SUP1040V.Report}"
                                             />
            </af:commandToolbarButton>
    . Java
         //while hitting the button following logs are appeared i show it as commented format.
    
        public void Report(FacesContext context, OutputStream out) throws IOException,Exception
            {
            
                FacesContext ctx = FacesContext.getCurrentInstance();
                HttpServletRequest request =
                    (HttpServletRequest)ctx.getExternalContext().getRequest();
                HttpServletResponse response =  
                    (HttpServletResponse)ctx.getExternalContext().getResponse();
                
            .....
                         
                BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                System.out.println("print binding" +bindings1 );
           
    //while using sop i get this in my log : :  print binding  ReportsPageFragments_SUP1040VPageDef_WEB_INF_TaskFlows_SUP1040_V_TF_xml_SUP1040_V_TF
    
           
                JUCtrlListBinding listBinding1 = (JUCtrlListBinding)bindings1.get("ACCT_TYPE");
                System.out.println("print list bindings" +listBinding1 );
           
    //while using sop i get this in my log : :  print list  bindings0
    
    
                Object selectedValue1 = listBinding1.getSelectedValue();
                System.out.println("print selected value" + selectedValue1);
    
    //while using sop i get this in my log : :  print selected  valueViewRow [oracle.jbo.Key[AP ]]    
                
                  
     request.setAttribute("ACCT_TYPE", //here i want the value  "AP" in  String  ); 
    
    if i use like this means
    request.setAttribute("ACCT_TYPE", soc1.getValue()  );  i get the index value.
    
    i need the dataname "ap" so i go above method which say wrotes ...
                 
              
                           ...                                    
                request.getRequestDispatcher(response.encodeURL("/sup1040servlet")).forward(request,response);
                
                System.out.println("hihihihih");
                response.flushBuffer();
                ctx.responseComplete();
           
            }
    
        public void ValueChangeListener1(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            String AcctType = valueChangeEvent.getNewValue().toString();
            System.out.println("AcctType" + AcctType);
            FacesContext contxt = FacesContext.getCurrentInstance();
            valueChangeEvent.getComponent().processUpdates(contxt); 
          
           BindingContainer bindings1 =
           BindingContext.getCurrent().getCurrentBindingsEntry();
           // Get the sepecific list binding
           JUCtrlListBinding listBinding1 =
           (JUCtrlListBinding)bindings1.get("ACCT_TYPE");
           // Get the value which is currently selected
           Object selectedValue1 = listBinding1.getSelectedValue();
           System.out.println(selectedValue1);
        }
    If I get ap means my report runs. or otherwise it will show an empty page.

    How to get the value of class viewrowimpl as string.

    Published by: ADF7 on March 24, 2012 07:27

    ADF7,
    I'm not sure that understand what you're up to.
    For as far as I understand you want to get the value of display rather than the index
    I use this code

        public void StatusChangedListener(ValueChangeEvent valueChangeEvent)
        {
            BindingContext lBindingContext = BindingContext.getCurrent();
            BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry();
            JUCtrlListBinding list = (JUCtrlListBinding) lBindingContainer.get("Status");
            int newindex = (Integer) valueChangeEvent.getNewValue();
            Object row = list.getDisplayData(); // Wichtig um die liste zu laden!!!!
            Row lFromList = (Row) list.getValueFromList(newindex);
            Object lAttribute = lFromList.getAttribute("Value");
            String newVal = (String) lAttribute;
        }
    

    to get the value of a component of selectOneChoice...

    Timo

  • How to extract the values of XMLTYPE column,

    SQL > create table temporary global xmtype_tab (xmlfile xmltype);

    SQL > select * from all_directories;

    SYS RESTOREDIR/home / / dbimptask /.

    insert into xmtype_tab values (xmltype (dbms_xslprocessor.read2clob ('RESTOREDIR ','LAS_SETUP.xml ')));

    1 line of creation.

    SQL > select * from xmtype_tab;

    XMLFILE
    --------------------------------------------------------------------------------
    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < DATA_CAPTURE_ON > 1 < / DATA_CAPTURE_ON >


    How to extract the values inside each tag?


    XML file has the following data...


    rowset <>
    < ROW >
    < DATA_CAPTURE_ON > 1 < / DATA_CAPTURE_ON >
    < > 9600 BAUD_RATE < / BAUD_RATE >
    < ACK_TIMEOUT > 1 < / ACK_TIMEOUT >
    < TUBE_TRAVEL_LIMIT > 4 < / TUBE_TRAVEL_LIMIT >
    < SEND_SID_TIMEOUT > 1 < / SEND_SID_TIMEOUT >
    < INDEX_Q_TIMEOUT > 2 < / INDEX_Q_TIMEOUT >
    < HW_HANDSHAKING > 1 < / HW_HANDSHAKING >
    < / ROW >
    < / LINES > ';

    I use the Oracle 10.2.0.3 version...

    Why does this work?

    You are missing the tag of the ROWSET:

    select extractvalue (xmlfile, '/ROWSET/ROW/BAUD_RATE') baud_rate
      from xmltype_tab
     where existsnode (xmlfile, '/ROWSET/ROW/BAUD_RATE') = 1;
    

Maybe you are looking for