Accessing custom parameter of a UDT instance inside a popup window

Can you write to the UDT tag itself from the tag browser?

Do you have the indicatorValue bound to the right tag?

Yes, I am able to change the control variable thru the tag browser which reflects in the display on the view in the run mode of the designer.

That also means that the indicator value is bound to the right tag. However the button pressed from the view in designer in run mode, doesn’t write to the tag and change the status of the button!

Does it have anything to do with the transient and permanent status flag of the control and indicator tags? But I think once a tag is bound it becomes permanent isn’t it?

I have bound both the control and indicator tags to the same property corresponding to the mode tag in the tag browser.

Do you have the controlValue bound to the tag as well and is it bidirectional?

yes both are set to bidirectional. I have bound it to property rather than a tag as its a template which works on large number of UDT instances.

it changes mode to auto or hand or off correctly first then goes off to off status next cycle.

The indicator shouldn’t be set to bidirectional, maybe that’s the issue? When you say it’s bound to a property, what exactly do you mean?

The indicatorvalue is not bidirectional, only the controlvalue is. What I mean by property is as shown in screen below

As this is a template view, I am binding it to property

This is where my udt type param knowledge is super flakey, but are you able to bidirectionally bind the UDT type to your embedded view? (I have no idea if you can do that or not)

Yes I am able to bind other parameters of the UDT to components like led display and text display, but not the mode tag corresponding to the multi-state button!

I think there is a problem with writing outputs from the embedded view to the UDT where as the inputs to the view from UDT work fine!

When I click on button , momentarily the button state changes to appropriate state then in the next cycle it goes back to previous value.Where as if I write to the tag directly from tag browser, it changes the state and reflects properly in the view!

I installed the latest version of Ignition 8.1.14 thinking that this could be related to an older version of Ignition, but no it still doesn’t work! Only difference is that now when I click the button corresponding to multi-state button , now it doesn’t momentarily change the status and go back to old status. It remains in same status now when I click a button!

I don’t know what’s wrong thing that I am doing! Is the binding to property ok? Or should I bind to an indirect tag? But the other components like LED display and text etc which are bound to appropriate property of the UDT are working fine!

Can you copy into here the json of the mulitstate component? (just copy the component and paste into a new forum reply into a code block)

[
  {
    "type": "ia.container.flex",
    "version": 0,
    "props": {},
    "meta": {
      "name": "root"
    },
    "position": {},
    "custom": {},
    "children": [
      {
        "type": "ia.display.label",
        "version": 0,
        "props": {
          "textStyle": {
            "classes": "Header"
          },
          "style": {
            "fontFamily": "Arial",
            "fontSize": 12,
            "textAlign": "center"
          }
        },
        "meta": {
          "name": "Label"
        },
        "position": {
          "grow": 1,
          "basis": "138px"
        },
        "custom": {},
        "propConfig": {
          "props.text": {
            "binding": {
              "config": {
                "path": "view.params.SensorUDT.Name"
              },
              "type": "property"
            }
          }
        }
      },
      {
        "type": "ia.display.led-display",
        "version": 0,
        "props": {
          "numberFormat": "0.0"
        },
        "meta": {
          "tooltip": {
            "location": "center-right"
          },
          "name": "LedDisplay"
        },
        "position": {
          "shrink": 0,
          "basis": "128px"
        },
        "custom": {},
        "propConfig": {
          "props.value": {
            "binding": {
              "config": {
                "path": "view.params.SensorUDT.Readingtag"
              },
              "type": "property"
            }
          }
        }
      },
      {
        "type": "ia.display.image",
        "version": 0,
        "props": {
          "source": "/system/images/Builtin/icons/48/trafficlight_green.png",
          "fit": {
            "mode": "fill"
          }
        },
        "meta": {
          "name": "Image"
        },
        "position": {
          "grow": 1,
          "basis": "100px"
        },
        "custom": {}
      },
      {
        "type": "ia.input.multi-state-button",
        "version": 0,
        "props": {
          "states": [
            {
              "selectedStyle": {
                "classes": "",
                "backgroundColor": "#FFF275"
              },
              "unselectedStyle": {
                "classes": ""
              },
              "text": "Hand",
              "value": 2
            },
            {
              "selectedStyle": {
                "backgroundColor": "#F84553",
                "classes": ""
              },
              "text": "Off",
              "unselectedStyle": {
                "classes": ""
              },
              "value": 0
            },
            {
              "selectedStyle": {
                "backgroundColor": "#7CEA9C",
                "classes": ""
              },
              "text": "Auto",
              "unselectedStyle": {
                "classes": ""
              },
              "value": 1
            }
          ],
          "buttonGap": 2
        },
        "meta": {
          "name": "MultiStateButton"
        },
        "position": {
          "grow": 1,
          "basis": "80px"
        },
        "custom": {},
        "propConfig": {
          "props.controlValue": {
            "binding": {
              "config": {
                "path": "view.params.SensorUDT.Modetag"
              },
              "type": "property"
            },
            "persistent": false
          },
          "props.enabled": {
            "binding": {
              "config": {
                "expression": "isAuthorized(false,\"Authenticated/Roles/Operator\")"
              },
              "type": "expr"
            }
          },
          "props.indicatorValue": {
            "binding": {
              "config": {
                "path": "view.params.SensorUDT.Modetag"
              },
              "type": "property"
            }
          }
        }
      }
    ]
  }
]

Hope I did the right thing? Its not a component , its a embedded view being used as a template. Just copied the template view from designer and copy pasted it here.