How to get value of tag

please teach me how to get value of tag.
I want to know how to get the value of tag when writing to a script. When assigning the value of tag to the character x, x=tagpath, but an error occurred.

You make a readBlocking() call.

x = system.tag.readBlocking(['[someProviderName]path/to/tag'])[0].value

Notes:

  • The call itself returns a LIST of QualifiedValues.
  • The actual tag value is at the .value property of the QV.
  • The actual value can be a Python None if the quality is bad.

I highly recommend going through all the courses here Browse the Lesson Library at Inductive University

though you can also just focus on the sections that are related to what you are doing, there is one focused on tags.