Set control in subVI

I would like to set programmatically a control in a SubVI via VI server - how can I do this?
Thanks
Urs

Zip the attached to a folder.
Run the main.vi
Sub.vi will be called and opened
Change settings from within main.vi
(Observe changes to the controls in Sub.vi)
Best regards
ian.f
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010
依恩与LabVIEW
LVVILIB.blogspot.com
Attachments:
VI_Server_example.zip ‏47 KB

Similar Messages

  • Mouse down event handling of table control in subvi

    Hello Everyone.......
    I have created a vi which has a table control and xy graph... the function of the vi is to plot the data of two particular column of table into xy-graph after user selects the data from table....  In this vi , I have used mouse down event for selecting data set so that the color of selected row get changed for user reference.......  the vi is working fine..... 
    My problem is that this vi is a part of main vi.. and I want to use this vi as a subvi.... So, in my main vi I have a table control which is connected as input to the subvi...  I come to know that I need to register event for triggering a event in a subvi.......
    (1) How to register Mouse down event of table control which is on Main Vi to trigger mouse down event of table in subvi.... Another Important thing is... how to link every property of table control of subvi to the table control of main vi... so it just act as single control adapting every property like when user selects a particular row its color changes in subvi....so it should be reflected even if user selects a row in main vi... I mean table control of main vi and subvi should be a single control...is it possible?
    I hope I am clear......Thanks ..

    See the modified version of the VI. I use the 'Point to Row Column' method to get the cell that was clicked on - your method also worked using 'Selection Start' but I thought I'd show you an alternative.
    I've used a single event structure to update two table controls - the point is that if you have the references to the controls you can update the control from anywhere. You can also 'register for events' to allow you to register for events from a different VI (again, using the references) that doesn't have the control on the front panel.
    Couple of things about your VI:
    You don't need to put a wait node if you have a timeout on your event structure.
    You don't need the for loop for the columns/rows - if you look at the help for the 'Active Cell' property you can use a value of -2 for the row/column to select all cells in the row/column.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets
    Attachments:
    Highlight Selected Row in Table Control_lv2009.vi ‏13 KB

  • Error in Invoke Node-Set Control Value

    I've a trouble with a VI: the error cluster warns ERR(7) when I try to pass the output of the "FLATTEN TO STRING" function to an Invoke Node-Set Control Value.
    In the file attachments there's the upmentioned VI. Thank you
    Attachments:
    Cambia_i_valori_di_default.vi ‏147 KB

    Error 7 is file not found. I would think that this error is generated by one of your Open VI References and not any of the Set Control Values. Check your paths and verify that they're correct. Also, you haven't included two subVIs or the VIs that you're trying to modify so it's impossible for anyone to try and recreate your problem. Save them into an LLB and attach that if you still have problems and want some help.

  • Set control value method

    How do I use the set control value method to send a cluster to a sub-vi? I have tried just sending the cluster as it is, but the invoke method gave me an error. I have thought about sending in the Control[] property of the cluster, and then in the subVI use "to more specific class". But my cluster is very big, and this would be a lot of coding. Can you think of an easier way to do this. Thanks a lot.

    Hello,
    You should definitely be able to pass the cluster from the main VI to a sub VI. Most likely, the cluster you have created in the sub VI does not have exactly the same elements in the same order as the main VI's cluster. To view or change a cluster's element order, right-click on the border of the cluster and select "Reorder Controls in Cluster..." There is also a lot of great information on clusters in the LabVIEW Help. Please also see my attached example for further information.
    I hope this helps! Have a great day!
    Liz Fausak
    National Instruments
    Attachments:
    ClusterOrderExample1.vi ‏21 KB

  • Indicator reverts to default after set control value

    Sorry.   Tried to put a tab in my message, then pushed space twice and apparently posted this a couple times....
       I've noticed that if I try to programatically set the value of an indicator (which is in the connector pane) using the Set Control Value method it reverts back to its default value once the VI is finished executing.  If it's not in the connector pane I don't have this problem.  If I use Set Control Value, then read from a local variable of the indicator to set the indicator I also get no problem.  Why is this?  I've attached two block diagram images below showing what I did. 
      I'm interested in this because I'm trying to write a subvi that retrieves and stores a bunch of global values from a config file.  The easiest way to do this seemed to me to use the OpenG vi that reads and writes the front panel controls to a config file (since some of my controls I wish to save are complicated).  It didn't seem to work unless I added the second step of using the local variable to update the indicator. 
    Message Edited by Phamton on 11-21-2007 05:30 PM
    Attachments:
    set control value_bd0.jpg ‏8 KB
    set control value 2_bd0.jpg ‏17 KB

    Discussion of this thread has moved to here.

  • Trying to set control hints in entity object attributes in generic classes

    Hi, how are you? I work for a project , that uses JDeveloper 10.1.3.3 version and I am assigned to solve some problems in the part that is associated with ADF Business Components—Model—of the application. The question is how could I implement generic functionality in CustomEntityImpl and there I am to assign some control hint values to some attributes and then the entities that will extend this class will acquire this functionality in their attributes.
    I send you some code I have in my mind in order to find out how to write something relevant to set control hints. I have searched in relevant api’s for AttributeHints and EntityDef but I did not find a solution to my problem. I’ve tried this code:
    AttributeHints ah=new AttributeHints(new AttributeDef(RIBUTE_DISPLAY_HINT_HIDE ) );
    but it does not work. How could I set this value – to hide one attribute whenever it exists in my entities , setting it once in my CustomEntityImpl class?
    I’ve read the whole tutorial ADF Business Components For Forms 4GL Developers but I did not find a solution to my problem. Your help would be a gift to me. Thank you very much!
    private String primary_key = "Id";
    private final String dte_insert = "Dteinsert";
    private final String dte_update = "Dteupdate";
    private final String user_insert = "Usrinsert";
    private final String user_update = "Usrupdate";
    private final String afm = "Afm";
    protected boolean findAttribute(String name) {
    String[] list = this.getAttributeNames();
    for (int i = 0; i < list.length; i++) {                       
    if (name.equals(list))
    return true;
    return false;
    protected void doDML(int operation, TransactionEvent transactionEvent) {
    //Insert Operation
    if (operation == DML_INSERT) {
    //Add history column
    if (findAttribute(dte_insert)) {
    Date date = new Date((new Date()).getCurrentDate());
    this.setAttribute(dte_insert, date);
    //Update Operation
    else if (operation == DML_UPDATE) {
    //Add history column
    if (findAttribute(dte_update)) {
    Date date = new Date((new Date()).getCurrentDate());
    this.setAttribute(dte_update, date);
    //Delete Operation
    else if (operation == DML_DELETE) {
    //To DO
    super.doDML(operation, transactionEvent);

    I Suggest you set its Attribute on EOImpl, override doDML, and before call super.doDML set your Attribute. There is a special reason to set Attribute on beforeCommit?
    Best Regards

  • Using "Set Control Value" to pass a reference

    Hi,
    every time I tried to passe a Control Reference using "Set Control Value" I have the Error 1 (invalid input parameter at invoke node). Why is it not possible to pass a control reference using the invoke node??
    Thanks
    Golzio

    Hi,
    This is possible. Trick is, the type of the control reference needs to be
    the same as the input. E.g. a string control reference is a different type
    as a numeric control reference (, or a control reference).
    To avoid this conflic, make sure the input of the vi is a control reference
    (and not a e.g. string control reference). Also make sure the to convert the
    reference you pass to a control reference (using Application Control>To More
    Generic Class).
    Regards,
    Wiebe.
    "Golzio" wrote in message
    news:506500000008000000C1F00000-1079395200000@exch​ange.ni.com...
    > Hi,
    > every time I tried to passe a Control Reference using "Set Control
    > Value" I have the Error 1 (invalid input parameter at invoke node).
    > Why is it not possible to pass a control re
    ference using the invoke
    > node??
    >
    > Thanks
    > Golzio

  • Set Controlling Area pop up window - while creating Shopping Cart

    Hi SRM Experts,
    I am getting Popup Window to Set Controlling Area when I click on Add to Shopping Cart in Shopping Cart Creation Process.
    Problem Explanation: I went to Shopping Cart Creation from SRM (4.0) Web Browser -> Describe Requirement -> entered the details description, quantiy, unit-> clicked on Add to Shopping -> here I am getting Popup Window - Set Controlling Area.
    This is strange issue for me.
    Could you please guide me or provide solution.
    Thanks a lot in advance for your help.
    Thanks,
    Sudarsan

    Hi Deepti,
    Thanks a lot for your response.
    I have gone thru the note 883578. Still I have the same issue in my system.
    I am working on SRM 4.0 with Support Pack 7 (SAPKIBKS07) and extended classic scenario.
    Please let me know any one has an idea to get solution to my issue.
    Thanks,
    Sudarsan

  • Transport request for Set Control Parameters for Actual Data.

    Hi Viewers,
    I am unable to create the transport request for the below settings
    Controlling->Profit Center Accounting->Basic Settings->Controlling Area Settings->Activate Direct Postings->Set Control Parameters for Actual Data.
    Is it possible to move the request through transport request or do we need to create the settings directly in the target system.
    Thanks
    Aswin.

    Hi,
    Please read the IMG help at the given path.  There are certain profit center accounting settings which cannot be transported directly from the same path, but there is another node in SPRO path for doing this.  If possible I will try to locate the path but I am not sure I can post it immediately as I am not having system handy.
    thanks,
    Kumar

  • Do you have the recommend Parameter Sets Controlling IPC Resources on Solaris 8 (64-bits)

    Do you have the recommend value of "Parameter Sets Controlling IPC Resources"
    for Tuxedo8(32-bits) on Sun Solaris8.0 (64-bits) ?

    Hi Asgorath,
    Unfortunately I do not have an answer for you but I
    am experiencing the identical problem on a HP
    Proliant BL25p Blade Server. Here is my hardware
    config:
    CPU - Dual Opteron 2.6 Single Core
    Memory - 16gb
    Controller - HP Smart Array 6i
    Logical drives - 1 (2x72gb RAID1+0)
    I have tried the same things as you and I still get
    intermittant boots. Power on and off does not always
    work as the system still hangs. It's totally hit or
    miss. Once it soes boot it seems to work fine. I have
    also installed the latest Solaris 10 for x86 Patch
    Cluster in hopes that some of the kernal patches
    would fix the problem. So far no luck as the system
    continues to hang...HARD!! HP was out to my site
    today and the Eng. is going back to the group that
    qualified Solaris10 on the HP Blades and see if they
    have any input. If I receive anything back I will
    post it here. I know this post is late and if you
    have resolved please post your fix.Hi doc42755,
    I have not come up with a solution as of yet, if I do come up with a solution i will most certainly post it here.
    However, if you find the solution could you let us know in this thread aswell.
    Thanks
    Asgaroth

  • Problem with one control in Subvi to use in MainVi...

    Hi,
    I'll try to explain easy. I have my application with main window, where I do calculates and have one graph data. I use subvi to open the serial port and when I close the subvi, the data is drawed in the mainvi graph. Now I am trying to implement one option to do several test from serial port automatically. I want to have one Control Bottom in subvi, that when I active it, When I close the Subvi acquisition data, automatically active the save bottom and save the file and THEN open again the subvi ready to acquire another run of data. So I only need to start/Finish the data entry and it will going save diferent test in file.
    I tried several things, but I have the problem when I active the option. In the first time, appear me BEFORE the execution of Subvi than the option to save the file. In the second run it seems works well, so 3rd,... the problem come when I disable the option in the Subvi and when I close the window in the mainVi the values aren't changed and appear the new save option and Subvi several times, until the iteration change and put 0 value and it works normally again. I am trying to retard the for/else 1 or 2 iterations but I dont know to do it, since The iteration value is increasing from starting the program and when I open the Subvi it only stops to count and when I come back again to Main continues with the last value. I would need the iteration of loop reset to 0 to say to the for/else to wait 2 iterations or use any counter... I tried to do it, but I spent my ideas.
    I tried to do one example program in Lv7.1. 
    It have the same structure and the same problem that in my program. In this example even I can't close the subvi between it is saving and re-openning it. I suppose since It is so simple, the active value do the subvi open directly.
    I hope you tell me any idea to do it.
    Regards, Fonsi.
    Attachments:
    Main.vi ‏55 KB
    Subvi2.vi ‏14 KB

    The reason why you seem to need that "extra run" is due to a race condition. If you watch your code in highlight mode you will see this. You have 3 independent case structure. Let's say you start the VI and then press the "Start Test" button. The main VI is now executing the True part of the top-left case. Meanwhile, the other two case structures are executing since there is no data dependency. They see the values of the local variables as they were when you pressed that "Start Test" button. You set the "Active Multiple Runs" to True. The top-left case ends, and now the loop can go to the next iteration since all code has completed. In this iteration "ActMultiple" is True, so in the bottom case structure you execute the True case where you delay for 0.5 seconds, and then set "NewRun" and "MultSave" to 1. Meanwhile, the other two cases have already run. You now finish this iteration and move to the next. In this iteration the top-left case evaluates to True since "NewRun" is 1. So you get the dialog. While the dialog is up, the other two cases have already finished. You set the "Active Multiple Runs" control to False. The subVI ends, "ActMultiple" is set to False. and the loop iteration completes. Next iteration. Even though "ActMultiple" is False, you are probably thinking that you will get the "NewRun" and "MultSave" set to False because of the bottom case structure, so the top-left and top-right should see the values. This is not what happens. LabVIEW will read the values of the local variables before you enter the bottom case structure to set them. This is the race condition.

  • Creating a full VI controling several subVIs

    Hi everybody,
    I've now almost finished my project and I have to control all my VI thanks to a single VI in order to make VIs run one after the others.
    I've looked at the section "creating subVIs" in the LabView help but there is a step I don't manage to do. They write about the connector pane for each subVI and how to set inputs and outputs from the mother VI but I didn't find the way to do that.
    Can you help me with this ?
    I you have any idea about how choose and set inputs I want for each subVI in the mother VI and how to recover ouputs in the mother VI let me know...
    Thanks a lot
    PS : I work with LabView 8, windows 2000, the Base Package...

    It's quite straightforward.
    1) remember that any control in your subvi can be an input and any indicator can be an output, so if you don't already have  all needed controls/indicators, create them
    2) right-click on the subvi's icon and choose Show Connector: you will see the icon area probably divided into small rectangular areas; each area, named terminal, can be choosen for an input (wire to the sub-vi) or an output (wire from the sub-vi)
    3) if you are not satisfied with the current connector (very probable), you may: add a terminal, delete a terminal, choose a specific terminal pattern, etc.: all this is accomplished right clicking on the connector and choosing functions from the context menu
    4) once you have your preferred pattern, assign terminals to controls/indicators by clicking on an unassigned terminal and then on the choosen control/indicator
    5) save the sub-vi
    6) add your subvi's to your main vi and wire inputs and outputs accordingly to the program's logic
    Paolo
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011

  • Setting control to default value when it is a strict type def

    If my subVI has a control that happens to be a strict type defined cluster and I have saved the values in the control as the default values, how can I change them back to the default values of the type def (which are empty).  Because it is a strict type definition, i cannot click on the elements inside the cluster and modify them (e.g. click on an array inside the cluster and do an empty array operation.)
    In the attached screenshot, the control "BLE Meters To Test" is just an array of clusters and I was able to empty the array.  The control "Capture Data" is a strict type def.  I would like to clear the contents of this control without having to delete the control and add it back with a new instance of the same strict type def.
    Solved!
    Go to Solution.
    Attachments:
    screenshot.PNG ‏33 KB

    are you talking about edit mode or run mode?
    You could temporarily add a second instance of the typedef (all empty), then change it to a constant. Whenver you need to reset at run time, write the new digram constant to a local variable of the control.
    glstill wrote:
    Because it is a strict type definition, i cannot click on the elements inside the cluster and modify them (e.g. click on an array inside the cluster and do an empty array operation.)
    Make sure to click on the array container, not on the array elements.
    LabVIEW Champion . Do more with less code and in less time .

  • Send name and value of control to subvi

    Hi all
    I am trying to send the names and values of controls to a subvi. 
    I know that I can extract the name and value of the control using a property node, but I was looking for a way to make is easy to use for the programmer.
    I am thinking of some kind of bundle function, it saves the name and value of the control, but I would like the programmer to be able to connect a random number
    of controls to this subvi without having to specify the number of controls anywer.
    I know there is configuration file stuff in labview, but it looks a bit more complex then what I want to do.
    Also i know that I can use the OpenG toolkit, but I'll rather not use any add-ons to labview, as this VI might be running on many different computers.
    Hope I made my problem clear enough! 
    Have a nice day
    Regards
    Tommy
    Running LabVIEW 2009 32bit SP1 on Windows 7 64Bit
    Solved!
    Go to Solution.

    tombech wrote:
    Hi all
    I am trying to send the names and values of controls to a subvi. 
    I know that I can extract the name and value of the control using a property node, but I was looking for a way to make is easy to use for the programmer.
    I am thinking of some kind of bundle function, it saves the name and value of the control, but I would like the programmer to be able to connect a random number
    of controls to this subvi without having to specify the number of controls anywer.
    I know there is configuration file stuff in labview, but it looks a bit more complex then what I want to do.
    Also i know that I can use the OpenG toolkit, but I'll rather not use any add-ons to labview, as this VI might be running on many different computers.
    Hope I made my problem clear enough! 
    Have a nice day
    Regards
    Tommy
    I am not sure what you have in mind Tommy but lets rule out the rediculous.
    You can find a Nugget I wrote here that explains how I managed to write an Save/Restore function that will automatically adapt to a type-def'd cluster. THat Nugget include my original source code as well as a full description of what where why and how.
    I have used that code in multiple applications and it has demonstrated that it works.
    No not all data types are supported! I left that as an exercise for the reader.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Setting control bar to resume auto-play (Captivate 6)

    Hi,
    I am currently using Captivate 6 to create an eLearning course.  We have decided to display the bottom control bar to allow flexibility for the student to move between screens in each lesson.  Currently if the student uses the progress arrow in the control bar to move forward or backward the lesson pauses and the user has to press the Play button to resume the lesson.
    Does anyone know of a setting within Captivate or whether it is possible to program the control bar so that it will resume auto-play mode whenever the student uses the progress bar to move back and forth within a lesson?
    Cheers,
    Richard

    Hello and welcome
    I think you are talking about scrubbing the progress bar? I don't know about a way to achieve AutoPlay. Moreover, if your course is not linear, it is not a good idea to give free navigation that way at all. Same for the buttons on the normal playbars. I almost never use it for that reason. Another way to allow free navigation is the TOC (which you can have in overlay so that it can be hidden/shown by the user). In the TOC it is easier to show chapters, and if you add labels to the slides, at least user will know where he is going to.
    Lilybiri

Maybe you are looking for

  • Using user-defined transport recording routine with table maintenance view?

    Hi, I have  a table that is maintained through a maintenance view. I need to record the changes to a dedicated transport object (not TABU) with my own recording routine instead of teh standard recording routine.Could someone tell me which/how the eve

  • Applet Urgent Help Plz

    Hello Everyone, im having a major problem with this applet.I am trying to create a Black Jack card game to play around.It is compiling with no errors however the applet doesnt seem to get initialised thus it is not possible to be viewed in the applet

  • Why doesn't  _xscale work the same as _yscale?

    I have created a SWF that loads data dynamically from an ASP page. It loads the FlashVars m_XWidth and m_YHeight . I declared the Flash variables DynX and DynY and assigned the FlashVars to them respectively (so far so good). BUT - when I say: this.d

  • Oracle 11g Express Edition.

    I successfully downloaded Oracle 11g Express Edition, but I got stuck on login to the database. I used my Oracle Username: [email protected] and password: Malka@123 that I had created. This is the message I am getting when I try to login: "Invalid Lo

  • Production Overhead Rates

    Hi, What procedures are required for entering both material and production overhead rates? I will need to establish production OH rates for the 3 stages which are in cement manufacturing Raw Mix, Clinker, and Cement Production.For each stage we will