Hi everyone,
I have a weird issue that I hope someone can shed some light on. I have a password field that’s bound to a lot number OPC tag. On power up, or when the gateway resets, the lot number gets populated by a very old value. This same value continues to populate the tag on power up, even if the lot number has changed multiple times. Does anyone know where this value could be stored at? If more questions on the system are needed, ask away.
Below is an error that gets thrown when I open the screen in designer that contains the tag value. There are no window open scripts on the window, or property change scripts that are acting on the password field / lot number OPC tag.
This is the wrapper log info:
13:23:08.194 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil -- Error writing "038472283" to tag [default]GlobalTags/LotNumberBad("Bad_NotWritable: The access level does not allow writing to the Node.")
13:23:08.451 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil -- Error writing "" to tag [default]GlobalTags/LotNumberBad("Bad_NotWritable: The access level does not allow writing to the Node.")
13:37:38.919 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil -- Error writing "038472283" to tag [default]GlobalTags/LotNumberBad("Bad_NotWritable: The access level does not allow writing to the Node.")
13:37:39.080 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil -- Error writing "" to tag [default]GlobalTags/LotNumberBad("Bad_NotWritable: The access level does not allow writing to the Node.")
This is the the error box message:
Error writing "038472283" to tag [default]GlobalTags/LotNumber
Bad("Bad_NotWritable: The access level does not allow writing to the Node.")
TIA
             
            
              
              
              
            
            
           
          
            
            
              You have a bidirectional binding from your field to that tag.  Bidirectional bindings are subject to event script races that can cause a write back (of a last saved designer value) on initialization.  I don't ever directly tie a data entry field to a tag value bidirectionally, because such race conditions are difficult to debug/fix.
             
            
              
              
              1 Like
            
            
           
          
            
            
              Thanks for your response. Where would I look to see what the last saved designer value is? Because from my knowledge its always the same value. I.e. New values have been pushed to the tag multiple times over and weeks later when theres a power failure, it always goes back to this same value.
Also, if you don’t tie it directly, what’s the best way to accomplish this? Is making a customer parameter and then binding the password field value parameter to a custom parameter better?
             
            
              
              
              
            
            
           
          
            
            
              Yes, I always use a custom property to which to connect the bidirectional bindings, and then use a unidirectional property binding to the actual entry field's text (or numeric) property.  I then include a boolean custom property with an expression binding that yields True when the two values do not match.  That is a reliable indicator that an operator has typed in the field, versus and value coming from the PLC.  That boolean can drive styling to show that an edit is present, and enable a button that actually performs the write.  (I usually have the button copy the edited value to the bidirectionally bound custom prop, letting that binding do the write.)  Works best if the editable field is set to not defer updates while editing.
             
            
              
              
              1 Like
            
            
           
          
            
            
              Thanks @pturmel . I will transition to use that method, sounds very solid. Do you know if its possible to see the last saved value? Is it stored somewhere accessible?
             
            
              
              
              
            
            
           
          
            
            
              
If your project is set to save vision windows as xml, then you can find it in the window's definition file in the file system. Opening the window may work as well, but it’s more than likely to just update it to the current value, unless maybe you turn off the comms mode option in the designer before you open the window.
             
            
              
              
              2 Likes