Hello I am quite new to ignition.
I need to update two memory tags only when the user clicks on a button so I am trying to build a list of parameters in order to call system.tag.writeblocking(Varl_list, Value_list, timeout)
here is my code:
# Create a list with the tag paths to be updated.
paths = [“[default]Produzione/ActDiametro”,“[default]Produzione/ActSpessore”]
# Create a list with the update values, one value for each path.
values = [{[default]configurazioni/SelectedCode[0,1]},{[default]configurazioni/SelectedCode[0,2]}]
# Execute the write operation.
system.tag.writeBlocking(paths, values,500)
I get the error:
org.python.core.PySyntaxError
File “function:runAction”, line 9
values = [{[default]configurazioni/SelectedCode[0,1]},{[default]configurazioni/SelectedCode[0,2]}]
^
SyntaxError: no viable alternative at input ‘configurazioni’
How can I fill in the values list with the value taken from other tags ?
Thank you.