Write to a memory tag from a label field

How can I Write to a memoryTAg from a Label field, or a Numeric Entry field?

You can't edit a Label component. You mean a Text Field component?

Are you working in Vision or Perspective? Please select the tag from the dropdown below your question title.

Ignition perpestive

You cannot use a label as an entry field, use a text field instead. Bidirectionally bind the value of the text field to the memory tag you want to receive the value.

If you want the label to display the value of the tag, unidirectionally bind the tag to the label.

1 Like

You say you want to write to a memory tag but the tag you have shown is an expression tag. Do you mean to write to that tag or a different one?

Broadly speaking, there are 2 ways to write to MEMORY tags:

  • bidirectional bindings:
    Put a tag binding on your text field, pointing to the tag. This will make the text field display the value of the tag. Now make the binding bidirectional by checking the appropriate checkbox in the binding configuration popup, and the link will work in both directions. Writing a value in the text field will also write that value in the tag
  • scripted writes:
    You can also use the built-in functions system.tag.writeBlocking and system.tag.writeAsync to write to your tag. In this case, you'll need a trigger that tells your script to run, usually an event on one of your component. It could be a button's onActionPerformed event, a gateway scheduled event to perform the write at a specific time of the day, a value change event on a tag or a property...

Do like @ryan.white said and watch the university videos, and read some doc. This is a FOUNDAMENTAL part of ignition and you NEED to understand it. The good news is, it's not very complicated.

1 Like

Thank you so much! It already works, after watching the video I followed your instructions