Hi,
I’m trying to create a script in the project library to store some tag values to a database.
Using system.tag.browse in the script console, I’m able to do this by using
timers = system.tag.browse(path = "[default]Limits/Speed")
for row in timers.getResults():
print row
val = row["value"]
Adding the script to the project library, It seems like the “value” - key is not available.
Kinda strange since I can see this when I print each row
Is it more efficient to execute a readBlocking when the value allready exists in the browse result?
Seems like the script somehow is working from project library now, can’t say I have done any adjustments Guess the good old “restart your computer” did the trick.
If you need some or all of the data that is returned with the browse results then yeah, it makes since to pull the value from them. If you don’t then, readBlocking is definitely going to be more efficient.
I see that I didn’t explain what I was trying to achieve I’m using browse to extract tag name,full path and value to log to a database. Easy way to have a backup of “retain” variables in the plc.