I would use a bar chart component to shoiw two bars: TargetPieces (which is an OPC tag already present in my gateway) and ProducedPieces (which is an OPC tag already present in my gateway)
How can I do that? Should I build an expression dataset tag and bind it to the graphical obj? In this case how can I do that?
I would use objectScript() (part of Simulation Aids) to do it in a simple expression:
objectScript("system.dataset.toDataSet(['Pieces'],[[x] for x in args])",
You can do this with runScript, too, if you encapsulate the logic above in a project script function.
I defined a shared script
rows = 
oneRow = [“Pz”, args, args]
headers = ["Pz", "Target", "Act"]
data = system.dataset.toDataSet(headers, rows)
then an expression dataset tag in which the expression is a call to the previous function
and I attached this tag to my bar chart obj … perfect!
thank you for your help