tag.readAll Easy probably

I understand results returned are 3 components per Tag. After looking at the help, I just don’t understand how to just pull/use the xxx.value

So, if we have values = system.tag.readAll(taglist),

what is the scripting/format equivalent to the original individual read?

old way:
myVal=system.tag.read(“xxxx”).value

new way??
I understand the info for the first tag is values[0] I guess but how to grab only the value, and use it as an integer value say ?

is it values[0][0] or ???

Thanks

Use values[0].value, values[1].value, etc. I often use a list comprehension in a one-liner to get just the values. Like so:

values = [x.value for x in system.tag.readAll(listOfTags)] This is only suitable when you don’t need the qualities, of course.

To answer your question, it would be values[0].value

pturmel's method grabs just the values up front. Then it would be values[0] :wink:

EDIT: Apologies to pturmel. should have read a bit closer! Time for more coffee! :laughing: