Binded variables change value of modbus PLC variable when application starts

Hello,
I have a front panel with controls binded to some shared variables that use a modbus server to control a PLC. There is no logic behind that front panel, all I want to do is to be able to read/write some variables on the PLC.
I binded the control with datasocket. The reason I did not use PSP is that I would like to bind the controls programmatically so if the client change the server (that holds the library and the citadel BD) the only thing he would have to do is to change the name of the server in the configuration file. It's seems that there is a bug in the Data Bindingath Property and it always return me an error when I try to bind dynamically (Which is not the case with the DataSocket:URL Property) .
Now the PROBLEM: 
Lets say a certains variable on the PLC holds the value 10. When I open my panel, I can see that value (10) a very short moment (milliseconds) and the value shifts to '0'. That undesirable '0' is indded written on the shared variable on the server and on the PLC. After that I can change the same value back and everything works properly. Its seems to me that the problem occurs only at the first connection. Same thing apend with booleans controls.
I would like to be able to open my application, see the '10' in my control, update it if I want, close the application and get the last value when I re-open it.
I'm running an executable with the DSC run-time.
Thanks in advance for your help!
Vincent

Hello Vincent,
This was reported to R&D (#161821) for further investigation.  I noticed that this only happens for controls in subVIs.  Perhaps you could restructure your program so that it no longer needs to view the front panel of its subVIs.  I will let you know if I find any other workarounds.  Thanks for the feedback!
Regards,
Burt S

Similar Messages

  • How can I change the proggrams my Mac opens when I start my laptop?

    How can I change the proggrams my Mac opens when I start my laptop? My mac book Air opens Word and Skype automatically and I can´t seem to make not to do this. Help!

    Your Mac will also open anything that was open when it was shut down unless you uncheck this option in the restart and shutdown dialog.

  • AS3 in timeline - variable changes value on its own

    I've just started working with Flash CS4 and Actionscript 3 after being away from Flash for almost 10 years.
    I've set up a menu that allows users to select from five sections. When users select an option, flow goes to the corresponding section of the timeline and a movieclip plays. Stop actions prevent flow from continuing past the current section. A home button takes users back to the menu in the first frame. This works just fine.
    The client wants to provide a 'next' button which should play through all sections in sequence when the learner clicks it. I've defined a variable which I set to true when the user clicks 'next'. I've added if...else logic to the stop actions:
      trace("nextClicked "+nextClicked);
      if (nextClicked == true)
          play();
      else
          stop();
    This should stop flow unless the play button has been pressed setting the variable nextClicked to true. That's not what happens - flow stops even if when I click the 'next' button. I added the trace to verify the variable has the correct value and discovered that the variable value resets to false from true before it gets to this script.
    What am I missing about ActionScript 3 that might account for this behaviour? I have tried to read the Actionscript 3 materials but I get bogged down in the complexity of the programming requirements and the lack of depth in the examples provided. I'm sure the examples are perfectly adequate if you're trying to do what they illustrate but I haven't found an example that fits what I'm trying to do here.
    Thanks.

    Thank you for your suggestion:
    I have declared the variable at the beginning. This is a sample of the code in the first frame:
    //define variable
    var nextClicked:Boolean;
    //define event listeners and the corresponding functions for menu buttons
    //Me
    btn_me.addEventListener(MouseEvent.CLICK, gotome);
    function gotome(event:MouseEvent):void {
        //set var to false to indicate Next has not been clicked
        var nextClicked = false;
        trace("Me selected "+nextClicked);
        gotoAndPlay("me");
    [.....more code defining more listeners...]
    //define listener for Next button
    btn_next.addEventListener(MouseEvent.CLICK,gonext);
    function gonext(event:MouseEvent):void {
        //set var to true to indicate Next has been clicked
        var nextClicked=true;
        trace("Clicked next "+nextClicked);
        play();
    This seems very similar to what you suggested except you also included this line:
    Button1.label = "show Var";
    and I'm not sure what that line does. Does it set a label for the button? Since I've already set these explicitly, I don't see that this would be necessary. More importantly, I don't understand why leaving this out would cause the problem I'm having - the value of the variable changes from true to false without any code being executed.
    I'm still in the dark - and I still need to solve this.
    Thanks.

  • How to assign a JSP variabl's value to a JavaScript variable?

    Hello,
    I want to assign a JSP variable's value to JAVASCRIPT variable.
    or how to assign JavaScript variable's value to JSP varialbe
    HOw do i do it ?
    can anyone please help?
    Regards and thanks for your time.
    Ashvini

    I want to assign a JSP variable's value to
    JAVASCRIPT variable.
    var jsVariable = <%=someVariable%>;
    or how to assign JavaScript variable's value to JSP
    varialbeYou can't. JSP is server-side and JavaScript is client-side. The JSP variables are never available on the client side for any sort of assignment.

  • Web Form Cancel Edit button changes value of List View item when clicked

    I have a web form, I shows 3 buttons, Edit, Save, And cancel. When the user presses the edit button it enables editing. When the user makes an edit and presses the save button it saves the changes. When the user presses the cancel button, it does cancel
    the edit ok but it changes the vale in the left list view to a different value.  For instance my left list view has a list of vendor names.  When I click cancel, the vendor name shown for the selected record, changes to the vendor number.  I
    have experimented with different values to show in the list view, I have turned off sorting, etc.  No matter what everytime I click cancel button it changes the vendor name to the vendor number.
    Even stranger is when I scroll the list up and the item that changed is move out of view and then you scroll back down to put it in view it puts the value back to the vendor name.
    This isn't consistent as I have created some forms where it doesn't do this. 
    Also when I create a new list view, does anyone know how to get it into the tile pane .  the only way to get anything in that list appears to be that I have to create a whole new table.
    Jim

    This forum is for the desktop user interface Windows Forms, its classes, apis and components.
    For a webform try the ASP.Net forums.
    http://forums.asp.net
    Success
    Cor

  • Change values of drop down list when other drop-down list value is clicked

    Hi Gurus,
    I look for my requirement very much but I can't find. I think it must be very simple but I can't do it, please help :
    I have to custom added fields. Both of them is made drop-down list by picklist defined in GET_P...methods.
    When I click and select a value from the first drop-down list, I want that second drop-down values are fully changed, depend on what I select in the first list. If I select my value and press enter in the first drop down box, I can do my requirement with GET_V...method. But if I don't press enter, the values of second list doesn't change, they remain same. I want exactly that when I click and select a value from first drop-down list, second drop-down list values are automatically change, dependent on what selected. Do I have to define and event?? where and how, please help me..

    Hi,
    You must have created the field as a dropdown using the below code in the get_p method.
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter~fp_fieldtype.
            rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
      ENDCASE.
    Here you need to add the below lines of code along with the previous code. for the first dropdown value
      IF iv_property =  if_bsp_wd_model_setter_getter=>fp_server_event.
        rv_value = 'DDLB_CLICK'.
      ENDIF.
    This would refresh the screen when the user selects any value from the dropdown.
    Regards,
    Radhika

  • How to change value of instance variable and local variable at run time?

    As we can change value at run time using debug mode of Eclipse. I want to do this by using a standalone prgram from where I can change the value of a variable at runtime.
    Suppose I have a class, say employee like -
    class employee {
    public String name;
    employee(String name){
    this.name = name;
    public int showSalary(){
    int salary = 10000;
    return salary;
    public String showName()
    return name;
    i want to change the value of instance variable "name" and local variable "salary" from a stand alone program?
    My standalone program will not use employee class; i mean not creating any instance or extending it. This is being used by any other calss in project.
    Can someone tell me how to change these value?
    Please help
    Regards,
    Sujeet Sharma

    This is the tutorial You should interest in. According to 'name' field of the class, it's value can be change with reflection. I'm not sure if local variable ('salary') can be changed - rather not.

  • Using Javascript function to change the value of a request variable

    Have a javascript function that activates onchange within a form variable. Would like the javascript function to change the value of a request variable.
    The javascript function is able to obtain the current value of the request variable ( which is 0 ) however I am unsuccessful in changing the value to 1.
    I have been trying to use the following:
         var vchange = 'request.changes_made = 1 ;' ;
         eval(vchange);
    Any ideas?

    If the user makes a change to the content of the form, and then attempts to leave the form, a javascript alert pops up giving the user the option of cancelling the submit, returning to the form and saving it.
    If there have been no changes, then the user is free to migrate to another page.
    This process is to protect users from losing valuable information but not to annoy them with "R U Sure" messages.
    Knowing the status of the form content is important to the functionality of the application.
    G

  • Swf in IE 7 not changing value when variable value in flashvar changes...

    Hi Friends,
    Below is decription of the file
    1. I have a flash file which is loading php variable through flash vars.
    2. The flash var variable contains the .txt filename in which data is kept.
    3. When I open the php page the swf loads with variable having .txt filename and value containing swf path.
    4. I have created timer in flash which check for change of value.
    5. When value changes the other flash file loads.
    6. All this works fine in all browsers except IE 7
    ONLY ISSUE WITH IE 7 is
    1. The swf not changing when value changes.
    WHAT I NOTICED
    1. When we click to load another tab in the same IE 7 browser the changed value that is another swf loads.
    WHAT I THINK
    1. Refreshing browser when value changes will solve the issue in IE7.
    Pls. let me know your suggestion and if possible solution to this issue.
    Thanks in advance.
    With Regards,
    Sagar S. Ranpise

    copy and paste your embedding html code.

  • Changing values of substitution variables on the basis of selection in Page

    Hi All,
    I am developing a classic planning application using hyperion 11.1.2.1. All of my data forms are based on substitution variables i.e. I define three variables:
    sv_CurrYear = FY12
    sv_CurrYearMinus1 = FY11
    sv_CurrYearMinus2 = FY10
    and i am using these 3 variables in columns section of my data form i.e First Column contains sv_CurrYearMinus2, second column contains sv_CurrYearMinus1 and third column contains sv_CurrYearMinus2.
    Now my understanding is that every year system admin will update the values of these variable and data form updated automatically.
    But my client want to have such a mechanism through which he would be able to see the data of previous years. i.e He want to have Year dimension in Page section, so that he will select his desired year from drop down and as a result form will display the desired year's data. Now if i have only one column(i.e curr year) in my data form then i could easily do that but since i have three different year's so it didn't seems easy to me.
    One idea that originate in my mind is that i add a custom dim by the name of Custom year and its member would be like this CY10, CY11, CY12 ... and so on, then i will place this dimension in Page so that user will select his desired year and when he presses the "Go" button then some sort of script executed which change the values of my Substitution Variables. But i don't know whether its possible or not? if yes, then how or any other alternate idea?

    I dont know if it is possible and make sense in your application, but you could create a new Custom Dimension with the members "Current Year" "Previous Year" etc. All values of the current plan period would be saved to "Current Year" and if you change to next plan period (FY+1) you need to copy the data from FY->"Current Year" to FY+1->"Previous Year" and so on.
    Then you would be able to put the Financial Year Dimension in Page and the Custom Dimension in Columns.
    Disadvantage: your cube data would grow faster.
    Kind regards
    André

  • How to change BPS multiplanning area variable selected value

    Hi!
    I have a variable, Drop down list, filld with an exit. Now the variable is filld with values and the value selected last time is marked as selected when application is started. I need to start with the variable unselected or take control over whitch value to have as selected.
    Any sugestions how to do that?
    Edited by: Jan Kihlström on May 29, 2008 8:38 AM
    Edited by: Jan Kihlström on Jun 10, 2008 9:52 AM

    Hi,
    whenever we execute layout second time, it will always show the last saved variable value.
    what can you do in this case, clear the output of the variable exit at the start in the exit itself.

  • Binding a JavaFX variable to a Java class instance variable

    Hi,
    I am pretty new to JavaFX but have been developing in Java for many years. I am trying to develop a JavaFX webservice client. What I am doing is creating a basic scene that displays the data values that I am polling with a Java class that extends Thread. The Java class is reading temperature and voltage from a remote server and storing the response in an instance variable. I would like to bind a JavaFx variable to the Java class instance variable so that I can display the values whenever they change.
    var conn: WebserviceConnection; // Java class that extends Thread
    var response: WebserviceResponse;
    try {
    conn = new WebserviceConnection("some_url");
    conn.start();
    Thread.sleep(10000);
    } catch (e:Exception) {
    e.printStackTrace();
    def bindTemp = bind conn.getResponse().getTemperature();
    def bindVolt = bind conn.getResponse().getVoltage();
    The WebserviceConnection class is opening a socket connection and reading some data in a separate thread. A regular socket connection is used because the server is not using HTTP.
    When I run the application, the bindTemp and bindVolt are not updated whenever new data values are received.
    Am I missing something with how bind works? Can I do what I want to do with 'bind'. I basically want to run a separate thread to retrieve data and want my UI to be updated when the data changes.
    Is there a better way to do this than the way I am trying to do it?
    Thanks for any help in advance.
    -Richard

    Hi,
    If you don't want to constantly poll for value change, you can use the observer design pattern, but you need to modify the classes that serve the values to javafx.
    Heres a simple example:
    The Thread which updates a value in every second:
    // TimeServer.java
    public class TimeServer extends Thread {
        private boolean interrupted = false;
        public ValueObject valueObject = new ValueObject();
        @Override
        public void run() {
            while (!interrupted) {
                try {
                    valueObject.setValue(Long.toString(System.currentTimeMillis()));
                    sleep(1000);
                } catch (InterruptedException ex) {
                    interrupted = true;
    }The ValueObject class which contains the values we want to bind in javafx:
    // ValueObject.java
    import java.util.Observable;
    public class ValueObject extends Observable {
        private String value;
        public String getValue() {
            return this.value;
        public void setValue(String value) {
            this.value = value;
            fireNotify();
        private void fireNotify() {
            setChanged();
            notifyObservers();
    }We also need an adapter class in JFX so we can use bind:
    // ValueObjectAdapter.fx
    import java.util.Observer;
    import java.util.Observable;
    public class ValueObjectAdapter extends Observer {
        public-read var value : String;
        public var valueObject : ValueObject
            on replace { valueObject.addObserver(this)}
        override function update(observable: Observable, arg: Object) {
             // We need to run every code in the JFX EDT
             // do not change if the update method can be called outside the Event Dispatch Thread!
             FX.deferAction(
                 function(): Void {
                    value = valueObject.getValue();
    }And finally the main JFX code which displays the canging value:
    // Main.fx
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import threadbindfx.TimeServer;
    var timeServer : TimeServer;
    var valueObjectAdapter : ValueObjectAdapter = new ValueObjectAdapter();
    timeServer = new TimeServer();
    valueObjectAdapter.valueObject = timeServer.valueObject;
    timeServer.start();
    Stage {
        title: "Time Application"
        width: 250
        height: 80
        scene: Scene {
            content: Text {
                font : Font {
                    size : 24
                x : 10, y : 30
                content: bind valueObjectAdapter.value;
    }This approach uses less cpu time than constant polling, and changes aren't dependent on the polling interval.
    However this cannot be applied to code which you cannot change obviously.
    I hope this helps.

  • Format of Variables Change When Debugging

    When debugging in LabWindows, the format of the variables (decimal, hex, ASCII, etc.) is always set to the default under certain circumstances.  For example if you step into a function, change format of a variable, step out then back in, the format has been reset to the default.  There are other instances when you run, stop, rebuild and debug where this is done also.
    I've asked NI to explain why the variable format can't be retained, at least within one debug session (until exiting LabWindows).  The explanation is they use a stack-based system to store this information so it is lost during debug.
    I find this to be an extreme annoyance and an enormous waste of time.  For example, I deal with a lot of arrays of binary data.  Seeing these array values in ASCII is of no value.  So I'm nearly constantly setting the format back to hex during debugging.
    I'm curious whether anyone else thinks this is a problem.  NI knows about this, but it's unlikely they'll do anything unless there is a lot of feedback from us users on the value of fixing this.  Post a note and let me (and NI) know what you think, whether you think this is important or not.
    Thanks,
    Dave

    Hi Chris,
    Yes, using Format >> Preferences is exactly what I was talking about when I said "change the format of a variable".  Thanks for giving the exact details of doing this.
    I'm still using v8.1.  I'm leery of renewing my service contract because I don't feel NI is listening to me (as a customer, not just a LabWindows user) regarding the issues that affect my work and ways to greatly improve my productivity.  I have been suggesting this for a few years now, to no avail, both with tech support on the phone and through your product suggestion center.
    I can't explain all the intricacies of the issue.  Maybe what you have to do is set breakpoints and run rather than step in and out.  Here's what an engineer in NI's R&D center said:
    It's not actually rebuilding the project that causes the information to be lost. It's actually even worse than that. As variables come in and out of scope, the formatting and the expand/collapse state of each variable is lost. So, if you've hit a breakpoint in a function and re-formatted a local variable, and then continue debugging outside the function, eventually stepping back into the function, the formatting for the original variable is reset when the item is created anew in the variable display, based on the data type of the variable.
    The problem we have is that the formatting information is stored in stack-based memory which is associated with the actual items that you see in the variable display. As these items disappear and are re-created in the variable display, the formatting information is reset.
    The complexity of representing variable scope information, including arbitrary block scopes, makes it pretty hard to maintain variable information in global, non-stack-based memory. It's obviously not impossible, but unfortunately it would require a fundamental redesign of our debugging paradigm.
    Finally, we have heard this request from multiple customers, and I assure you that you are not the only customer who has asked for this feature.  The problem with this feature, as with many other feature requests is one of trade-off. It is obviously impossible to accept all the feedback that we receive, and so we are constantly having to weigh development costs of a particular feature, the risks involved in implementing it, and how widespread its benefits are.  So far, this feature has not made the cut. However, this does not mean that we're ignoring it, or any other customer feedback. Many customer-requested features have made it into previous releases, and we're confident that this will too, in the not too distant future. As a matter of fact, we can honestly say that most new features in a given CVI release originate with customer requests. I also just want to re-emphasize that each time you reiterate how important a given feature is, it drives up its priority and makes it more likely that we will implement it sooner, rather than later. With that in mind, we definitely welcome your suggestion to post a note about this request in the forum. We expect other people to second the request, and the more people that do that, the better.
    So my question wasn't posted for NI to respond.  It was to find out if anybody else using LabWindows finds this issue to be detrimental to productivity.
    Thanks,
    Dave

  • Assigning a value to a substitute variable

    Hi, I would like to know if it is possible to assign a value to a substitute variable.
    This is what I'm doing:
    - Prompting user for input
    ACCEPT uom CHAR PROMPT 'Enter number of UOM system you would like: ' DEF '0'
    (displayed list of options are numbers 0-5)
    - Based on input, open corresponding file
    (start i:\utc\all\oracle\uom\uom_column_heading_&&uom..sql)
    Problem:
    - Default selection is 0, meaning use the CURRENT UOM system (a number, 1-5)
    - That being said, &&uom must be assigned a 1-5 value in order to open the file that corresponds to the CURRENT UOM system
    Let me know if any additional information is needed.
    Thanks!

    I apologize for the format. I tried to make it more legible, but was not able to. FYI: It appears to be easier to read in "Edit" view.
    Thanks, I tried the &&uom := your_function(); suggestion, but I am getting an error. It looks like the "value" of &&uom is being read in the assignment statement, not the variable name.
    I have copied the piece of the code, for your reference.
    ACCEPT uom CHAR PROMPT 'Enter number of UOM system you would like: ' DEF '0'
    DECLARE
    v_uom_sys_selection NUMBER;
    v_curr_uom_sys VARCHAR2 (50);
    v_uom_num NUMBER;
    BEGIN
    v_uom_sys_selection := to_number(&uom);
    v_curr_uom_sys := EG.GET_CURRENT_UOM();
    v_uom_num := eg.get_user_selected_uomnum(v_curr_uom_sys);
    &&uom := to_char(v_uom_num);
    dbms_output.put_line('v_uom_num = ' || v_uom_num);
    dbms_output.put_line('&&uom = ' || &&uom);
    END;
    --prompt "&&uom"
    start i:\utc\all\oracle\uom\uom_column_heading_&&uom..sql
    Below are the results I get when commenting out the &&uom := to_char(v_uom_num); line. NOTE: the "value" of &&uom = 0.
    v_uom_num = 1
    0 = 0
    If I leave that line in, I get the following error:
    PLS-00103: Encountered the symbol "0" when expecting one of the following:
    begin case declare end exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe
    The symbol "<an identifier> was inserted before "0" to continue.
    Message was edited by:
    user449676

  • How to Get User entered value in a text variable

    Hi,
    I have made a text variable to show the user entered value in the column header.
    The user enteres value in a formula variable ABC whose default value is say '30'.
    I am using customer exit to capture this value in the text variable. The code is as follows
    IF i_vnam EQ 'txtvar'.
    if i_step = 2.
    LOOP AT i_t_var_range INTO loc_var_range
    WHERE vnam = 'ABC'.
    CLEAR l_s_range.
    l_s_range-low = loc_var_range-low.
    l_s_range-opt = 'EQ'.
    l_s_range-sign = 'I'.
    APPEND l_s_range TO e_t_range.
    EXIT.
    ENDLOOP.
    endif.
    endif.
    Now when I am executing the query I am getting the default value in the column header i,e, 30. But when the user changes this default value to something else while executing the query, I simply get blank in the column. The changed value is not getting captured in the text variable.
    Thanks

    Hi,
    Insted of  going for exit,
    just create a Text variable proceesing typr Default/ Manual Entry and set the default value as u wish,
    use it in the KF header; dont use the same Text Variable for Query Title.
    Now i tried this for you and it is working fine.
    Regards
    ReddY A

Maybe you are looking for

  • Classic 120gb - is the speaker connection different from other ipods?

    I purchased my first iPod at the airport in October. As I was paying the guy said "do you want to buy any accessories?" I said I'd look when I got home from my holiday. He then said "you do know that the new Classic has a different docking thingy (he

  • Complete Newbie, Logic won't open

    I'm making the switch to a Mac from my PC. I ordered logic Studio, it installed fine. I was watching tutorial videos and went to open it up and the icon just bounced up and down, the loading window came up, acted like it was going to load, and then..

  • List of instance and databases

    My sql server contains multiple instances and each instance contains multiple databases. Now how to list of all the instances and their corresponding databases? i used select * from sys.servers for instances and sys.databases for number of databases.

  • Modelling business objects

    Hello! I am developing a custom enterprise service with ESR and PI 7.1 SP 4. According to the german book "Entwicklung von Enterprise Services für SAP" (SAP PRESS) it is possible to model the structure of a business objekt in SAP SERM with a "SAP Bus

  • Mail font too small

    How do I change the size of the outgoing mail font for reading purposes?