What I am doing:
At the end of the test, I want to display the results of the selected cell to a table.
I want to be able to easily export all the cells of data or all the cells of data with buttons.
What is the best way to trigger the tag to read real[250] from the plc for each of the 6 cells when I had the cell enabled and the test finishes?
My preferences so far:
I liked that the query tags have an execution mode.
I don't know if I like tag groups though. I don't a tag group every time I want to trigger collecting real array data form plc I think.
If you don't want to have the tags be subscribed to all the time, then you can use system.opc.readValue() or system.opc.readValues() to read the tags directly from the device at the time of need.
Processing those results into a dataset to place in a table, or export is something that is covered all over the forum.
IMO, it's less about being cautious and more about, do you need those 1500 tags, for anything other than this one thing. Are these tags that you care about the raw value at any time other than after a test is performed? Do they need to be on a display/view somewhere? Are you going to bind to them for some calculated value? In other words do you need these tags to have there values persitsed?
If you're asking if you're gateway will handle 1500 more tags, we would need more information, what I can tell you is, I have a gateway with fairly minimal specs that is handling 200K+ tags, no problem. And if you have the right hardware, there are installations out there with 1M+ tags.
But just because the gateway can handle the tags, and you can make them, doesn't mean that you need to or should.
Tomorrow I will be figuring out how to format the data.
valuesIn = system.opc.readValues(server, pathList)
t_stamp =system.date.now()
#for i in xrange(250):
print valuesIn[1].getValue()
valuesOut =[]
for i, value in enumerate(valuesIn):
valuesOut.append([ i, valuesIn[i].getValue()])
for i in xrange(250):
print valuesOut[i]
Got a list of lists of the enumerated number and the value.
Need to decide if I want to write to a tag or update rows in a db.