How to set the value of a variable in a cluster in LabVIEW to c#?

Hi guys, I'm working on a small c# program, which by using the interface provided by LabVIEW.  And I know that, with the help of lv. SetControlValue (name, value) can set a variable just on the front panel. But in my case, there are several groups on the front panel. Then it confused me how to set the variables in these groups. For example, there is a cluster named clusterA and a variable named a., I tried something like this:

lv.SetControlValue("clusterA.valueA",1);

but it totally inoperable. Everyone has some experience with this sort of thing? Thank you very much!!

Hey guys, thanks a lot for all your response. I just found a simple way to solve this problem. For example, there is a cluster named "ClusterA", and there are only two witnesses, who are: an int value named "IntA" (default = 10 IntA value) and a string value named "StringA" (by default the StringA = 'abc'). In c#, if you call the method:

var clusterA is vi (Array). GetControlValue ("ClusterA");

you will get a table looks like: clusterA = {10, 'abc'}; So if you want to change IntA 123, you simply do:

clusterA.SetValue (123, 0); 123 the value, 0 is the index of IntA in clusterA, after this clusterA table = {123, 'abc'}

After that, simply to make the table in LabVIEW using:

VI. SetControlValue ("ClusterA", clusterA);

and now you see the LabVIEW, IntA is changed.

Tags: NI Software

Similar Questions

  • How to set the value of a variable in automator?

    I'm totally new to automator I found a post that I try to reuse

    to Re: copy multiple files from TextEdit in one Word file

    I want to open a series of html files in a folder and convert in a TextEdit rtf file.

    However, I am unable to automator find out how set the value of a variable such that it appears in this post

    I looked at every command in library without a lot of fortune

    Any help?

    Thank you

    Dan

    Its in Utilities.

    In Automator, use the search box:

  • How get/set the value of the DataObject object in the task of the API?

    How get/set the value of the DataObject object in the task of the API?

    Are there examples of code availible?

    Hello

    You are here: http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_worklistcust.htm

    Antonis

  • How to assign the value of a variable to a quiz?

    Hi, I have a problem, I attempted to set the value of a variable for the quiz on the final value of the project, any suggestions?

    Sorry but I do not understand your question at all. If you talk about a quiz like cpQuizInfoPointsscored or cpInfoPercentage system variable, this is all simply impossible because the system variables are read-only.

  • How to set the value of QUERY using PL/SQL process?

    Hello

    I use APEX 4.2...
    How to set the value of the REQUEST using process of PL/SQL which lies before the header - where the value of the REQUEST should appear on the URL?

    Kind regards
    Fateh

    You cannot set a value of demand in a PL/SQL block. You can run a PL/SQL block on a request which is the id of a button for example.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • How to set the value of something in a component of the main application?

    Hello

    Maybe I've worked on it too long, but I can't understand how to set the value of the text property of a text entry field in my main application component in a block of mx:Script. I have a component called Login in the components folder, and I need to set the text value of empNum. In my statement of mxml up there, I said these components such as xmlns = "components.*" so, logically, the property, I'm putting a c.Login.empNum.text. I can't understand the correct syntax to make this work, and I've tried everything I can think of. Does anyone have any suggestions? I think this should be easy, and there is just something missing me.

    Thank you!
    Holli

    Have you tried to give him an id?

    If later you can make the loginScreen. empNum.text = "my text".

    Laurent,

  • How to set the value of a field from the LOV of another field.

    I'm trying to figure out how to set the value of a field (P_PROGRAM) to the value of another field of based lov (P_STATE).

    The P_PROGRAM field is a hidden field. The P_STATE field is a required field and is based on a list of values for the State Codes.

    When a user selects the State to P_STATE, the field of the P_PROGRAM should be set to this value, as well.

    I tried different ways to get there via a function call on the post for the calculation of the field P_STATE, defining the source P_PROGRAM to the value of the page item P_STATE put varialbles, creating a process before SENDING, and they all still come back as having a NULL value for P_PROGRAM, therefore impossible to create the file in the db as the PROGRAM is a mandatory field in the table.

    Can you please help? Thank you, Laura

    Laura,

    It is always helpful if you provide information about the Apex version you are using. The Apex 4 you can use Dynamic Actions to achieve this. In earlier versions is possible using processes to submit or javacsripts, as well.

    Heres how you do in 3.x with treatment to submit, to make it work in 4.0 as well.

    1 do the P_STATE ' select list submits the Page.
    2. Add a calculation on the point P_PROGRAM, or write to him assign a value based on a process. The treatment should be OnLoad after the header
    3. If the page does not have an unconditional branch that loops on itself, add a. NOTE: The direction must be the last branch (larger sequence number) and should have checked "Save Session State".

    This is what will happen
    a. when the State is selected Page will be submitted
    (b) it will take the unconditional branch to himself and save the value of P_STATE
    c. the calculation process / fills the value of the P_PROGRAM element when the page reloads

    Kind regards

  • How to set the value of the variable bind in VO on page load?

    Hello, I use JDeveloper 11.1.2.3.0.

    I created a VO in my application that uses a variable binding in the where clause. I want to put the value of this variable on the loading of the page automatically.

    I read that I can do this through setNamedWhereClauseParam()... but I can't find out where and how to use it.

    Can anyone help please?

    You can put in different places:

    AppModuleImpl,

    ViewObjectImpl,

    ViewRowImpl

    Just him export the customer interface and use whenever you want

  • How to set the value of adjecent record

    Hello

    For an interactive report, I wanted to know, how set the value for one of the value column taken recording (the visible record in the report) adjecent to the same column in the current record.    The reason behind this requirement is, the table contains cirtain ID which is populated based on cirtain condition.  And the same ID must be set to adjecent different records.  Since this is event based on human evaluation of the data, I can not run the UPDATE command in the background.

    To simplify the requirement, suppose, report IR on the employee.  Based on the user, click one of the dummy 'comlumn link', the value COMMISSION_PERCENT must be copied to the next record.  If I know EMPLOYEE_ID value of the next record, then update SQL will do the job.  But how?

    Thank you

    -Anand

    Hi Anand,

    Please check the sample application you gave, I created the same according to your requirement.

    Here are the steps that I did.

    1. edition your column that you use as a button.

    A class has been added to this button under link attributes

    class="uButton cpycomm" role="button"
    

    URL: javascript:void (0);

    2. edited Page attributes

    Under run when the Page loads

     $("a.cpycomm").click(function(){
        var $el = $(this);
        var nextemp = $el.closest("tr").next().find('td[headers="C725254625175515007"]').text();
        var comm = $el.closest("tr").find('td[headers="C725255480705515009"]').text();
        $("#P1_EMPNO").val(nextemp);
        $("#P1_COMM").val(comm);
    
        if (confirm('Copy Commission to next record ?')) {
           apex.submit('SAVE');
        }
      });
    

    3. a process page to update the commision has created.

    Kind regards

    Jitendra

  • HOW TO SET THE VALUE TO A PAGE OF AJAX ON DEMMAND PROCESS ELEMENT?

    Hi, I have a javascript that calls an ajax on demmand process , and I need a the ajax process variable value is updated about my page: P2_CONTENT:

    • Here's my javascript call:

    doprint() function

    {

    Apex. Server.Process ("GENTICKET", {pageItems: "#P2_PARAM1"}, {async: false});

    }

    • and here is My ajax on demmand process (GENTICKET):

    BEGIN

    declare

    CONT varchar2 (1000); -the return value is less than this length, I have already checked in my table-

    Start

    Here, I call a DB procedure that fills my data. I verifyed and works nice!

    pro_generate (:P2_PARAM1);


    Here, I select the data obtained in the previous step

    Select tic_text

    in cont

    of t_reim

    WHERE f_type =:P2_PARAM1 ;



    Here, I need to set the value to display in my page field


    APEX_UTIL. SET_SESSION_STATE ('P2_CONTENT', CONT);  -< < < < < that doesn't work. I tried: P2_CONTENT: = cont; but does not


    end;

    END;


    Thanks in advance for the help.

    You can do all this declaratively by using dynamic actions, to try jQuery is like trying to swim before you can float.

    You can influence the value returned from JavaScript with this PL/SQL:

    HTP. PRN (cont);

    Then include a function of success (as described in the previous link) to run code like:

    success: function {(pData)

    $s ('P2_CONTENT', pData);

    }

  • How to set the value of a * APPLICATION * with apex.server.process?

    If I have a page named point P1_MY_PAGE_ITEM, I could put its value in the session by doing this:

    $s('P1_MY_PAGE_ITEM', 'I Like Pie!');
    
    apex.server.process(   'dummy'
                           , { pageItems: "#P1_MY_PAGE_ITEM" }
                           , { dataType: "text",
                             async: false,
                               complete: function( ajaxResponse )
                                     {
                                          var ignoredReturn = ajaxResponse.responseText;
                                     }
                             });

    Which works very well. If you check the session, the P1_MY_PAGE_ITEM will now have the value: I like pie!

    However, if I have an Application element (not a page element!) named MY_APP_ITEM, how could I do the same thing? How can I use apex.server.process to set the value of MY_APP_ITEM in the session? I wouldn't be able to use "pageItems" because MY_APP_ITEM is not a page element, it is a part of the application.

    What is the correct syntax to do this?

    Thank you

    -Joe

    Hey Joe,

    Returning to that thread you made a couple of months ago, the answer is here:

    Post adjustment Application items in the apex.server.process for a * process application *.

    Defining a point of application is as easy as providing the name of the application element to p_arg_names Bay and set a corresponding value in the p_arg_values table.

    For example, in an application with article SOME_ITEM of the application, I can put the value as follows:

    (function(){
    var arrNames = [], arrValues = [];
    arrNames.push("SOME_ITEM");
    arrValues.push('some value');
    apex.server.process(   'dummy'
                         , { p_arg_names: arrNames, p_arg_values: arrValues }
                         , { dataType: "text"
                           });
    })()
    

    Any required application process. Should the item be free that you set it from the browser.

  • How to set the value of the point of application using pl/sql in the application process

    Hi guys,.

    I want a global variable (application point) whose value will be set to start when a user logs on to the application. The value will be retrieved from the database by using a sql query. I don't exactly know the syntax to set the value of the point of application in the application process. Also, I want to know what type of enforcement process should I use to set the value of the point of application, when a user starts a session. The value of the point of application varies from one user to the user.

    Help, please.

    I use apex 4.2

    Kind regards

    Waqas

    You can use the application element as a link with his name. That is to say. your point of application is named G_MY_APPLICATION_ITEM, then you can / set of access using: G_MY_APPLICATION_ITEM.

    For example

    BEGIN

    -assign as a variable

    : G_MY_APPLICATION_ITEM: = 'LARRY ';

    --

    -use in a SQL statement

    SELECT WHATEVER_COLUMN

    IN: G_MY_APPLICATION_ITEM

    FROM MY_TABLE

    WHERE USERNAME =: APP_USER

    ;

    END;

    Peter

  • How to set the value of a column in a table according to another column?

    Hello world!

    I use Apex 4.1.
    My question is how can I set the value of a column in a table according to another column?
    I have a table and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).

    I tried to use javascript as
     $('input[name=f02]').live('change', function(){
    if($(this).val()!='1'){
    $('input[name=f03]').val("test")}
    }); 
    for the development of the column note to test if the value typed in the content of the column is not 1, but this code assigns the value to all the lines and I need to set only the specified line.

    Can someone give me a hint in any way to do this if possible?

    Kind regards
    drama9346

    You will need create a process on your page type PLSQL and develop this process "we demand" of the page. In this process, you can run the PLSQL you need. That is to say to retrieve the note value as described in your PC:

    and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).

    In this process, you must provide a return value of the call, and you can do this by using htp.p. Example:

    DECLARE
       --putting x01 in a var to simplify
       l_test_var VARCHAR2(200) := apex_application.g_x01;
       l_return VARCHAR2(200);
    BEGIN
       -- a simplistic test
       IF LENGTH(l_test_var) BETWEEN 10 AND 20 THEN
          l_return := 'String is between 10 and 20';
       END IF;
    
       --this will write l_return to the buffer, and the ajax callback will receive this
       htp.p(l_return);
    END;
    

    And the code that I wrote above, which is javascript, would need to go where your current code is that binds to the onchange event. The result should be that, when a change is made to this element, an ajax request is made on the server. When the call is finished, it will be the value returned in the item you want.

  • How to set the value of the xml node.

    Hello

    I have the PDF application can be entered by the user using the key. When sending

    I use following code to set the value of the xml node.

    XFA. Data.assignnode ("Employee.ID", "123", 0):

    If its generators of xml as below.

    < employee >.

    < id > 123 / < ID >.

    < / name >

    < / employee >

    Now, I need to generate xml as below.

    < employee id = '123' >

    < / name >

    < / employee >

    So, how together create the id of node as above?

    Thanks in advance.

    Kind regards

    Dhiyane

    Hi Dhiyane,

    You must set contains the property if the node id to "metadata", i.e.;

    xfa.data.assignNode ("employee.id", "123", 0);
    XFA. Data.Employee.ID.Contains = 'metadata ';

    Very awkward, if you have a number of them, in which case you might want to look at using E4X.

    Good luck

    Bruce

  • How I set the value of a dynamic text field row

    I have a repeated line form that contains a button and several text fields.  There is a text field (input field) above with some information I want to place in the table and several buttons that I want to read the value of and defined on the table.  Excuse me there are several questions I have and I use pseudocode to describe.

    Top shape resembles

    InputField

    | ButtonX1 | ButtonY1 | DescriptionX1 (read the text only field)

    ...

    | ButtonXn | ButtonY1 | DescriptionXn

    OutputRow looks like

    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |

    So, I want to do

    ButtonX1.click

    {

    OutputTable.OutputRow.addInstance (true) //this works - everything I have questions on

    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue

    /*

    Question 1

    How should I address the location of each table to set a value

    Question 2

    How can I get the value of the description field in the same row as button and table

    I would like to say something to the effect of the OutputTable.OutputRow [?]. OutputField1.rawValue = this.parent.DescriptionX

    */

    OutputTable.OutputRow.OutputField2 = InputField.rawValue

    /*

    Same question as above - how can I specify a dynamic line - it's the syntax appropriate for obtaining the value of the input field?

    */

    OutputTable.OutputRow.OutputField3 is this. ButtonLabel

    /*

    Question 3

    How can I get the value of the label of the button to set the field

    There should be a lot of these buttons and buttons will be added - I'd rather set the value based on the label of the button to facilitate value - not requiring only not to change the code

    */

    Issue 4--unrelated to those at the top.

    Is it possible to build the first table

    | ButtonX | ButtonY | Description |

    from a XML file.  I've seen examples showing how to build if it's just data, but XML can be pushed into a form with the code to perform the above actions?

    Glad you figured it out... nothing wrong with doing it this way.

    Normally XML contains data and no default legends these xml files are bouond to the rawValue property. You can enable the dynamic linking and other properties of the object will be bindable (they appear as links) in the user interface. If you click on the link to legend an Assistant appears allowing you to bind the node in the XML file.

    Paul

Maybe you are looking for