We create tag with name State:
In this example we'd like to enter tag's value in Text/EditField object:
We need to enable Output value property and fill it like this:
Click OK to confirm your changes and Run simulation to check your settings:
You can download this project here.