Plotting graph from several tags


In my project we have table consisting of 96 fields that we fill manually with different values, i need to plot a graph that shows the pattern of these values.

Can you please help me on doing that.

This is pretty vague. Some extra info might help.

  • Is there an x/y relationship, or are they just atomic values?

  • What type of graph are you envisioning?

  • Is there a sample of data we can see?

you’re not been too clear. Are these tags storing data in DB? what chart do you want to use?

thank you for the reply and sorry that my question was not so clear, i’ll try to explain more the requirement:

we are using the ignition SCADA to control inverter connected to PV plant, in one of the modes (Energy Shifting) we have a table of requested power from the inverter. this table represent the power for every 15 min so what we have is 96 numeric input fields against every 15 min of time that we need to fill and put the requested power in kW. the client is asking after the operator fills this table, a graph should be displayed to show the operator the pattern he entered.
right now these tags are not stored in the DB.

I hope its more clear this time.

One last question. What is your tag structure like? There will definitely be some scripting here, and knowing what the structure is like may help.

Or, we might find a way to streamline what you need to do.

No there is no structure, its only normal tags writing directly to the PLC.

If you have all tags located in the same folder you can run a script. System. Tags. Browsetags() loop through all values and put them in a dataset. Use that dataset for a chart

1 Like

yes all the tags in the same folder but with other tags also.
can you provide more details.

This code reads the tag in the specified folder, and creates a dataset of all these tags. It only looks for atomic tags, not UDTs. Also it does not run recursive through folders.


#Get tag paths from root folder
results = system.tag.browse(rootPath, tagFilter)
paths= [str(result["fullPath"]) for result in results.getResults() if str(result["tagType"])=="AtomicTag" ]

#Read values from these paths
values = system.tag.readBlocking(tagPaths, 1000)

#Create dataset of these qualified values
pyDataRows= [[float(i.value)] for i in values]

headers= ["valueColumn"]
print dataset