# Vision and tag design help - 6 cells of real\[250\] from plc

**URL:** <https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [July 21, 2023, 3:26pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711 "2023-07-21T15:26:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 21, 2023, 3:26pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/1 "2023-07-21T15:26:31Z")

</div>

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?

**Do I need to use driven tag group with oneshot true when that test was enabled and the test finished?**  
[Driven Tag Group Video at Inductive University](http://inductiveuniversity.com/video/driven-tag-group/8.1)]  
**Or is there another way?**

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.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 21, 2023, 5:33pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/2 "2023-07-21T17:33:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 21, 2023, 7:58pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/3 "2023-07-21T19:58:07Z")

</div>

Am I being overly cautious trying to avoid subscribing to 6x 250 real tags?

I have a full gateway.  
I am at about 24000 tags.  
10% cpu, memory "sawtooths" to 75% these days.

I think I need some benchmarks.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 21, 2023, 8:53pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/4 "2023-07-21T20:53:02Z")

</div>

> [@zacharyw.larson](#):
>
> Am I being overly cautious

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.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 24, 2023, 12:40pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/5 "2023-07-24T12:40:25Z")

</div>

Thanks again

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 31, 2023, 3:58pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/6 "2023-07-31T15:58:59Z")

</div>

I saw this:  
[How to create a 5000 element float array in UDT - #24 by jfan](https://forum.inductiveautomation.com/t/how-to-create-a-5000-element-float-array-in-udt/44584/24)]  
Jordan posted an example script using a list comprehension to insert a float array to a database.

I tried to read the array to a value.  
Going to work with support I think.  
Something is an issue with the path or the server name.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 31, 2023, 6:24pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/7 "2023-07-31T18:24:04Z")

</div>

To answer your previous edits:

'ns=1' is assumed if you don't include it.

I usually create one tag so that I can hace an OPC path string for reference, then beat that string into submisson.

If you show what you've tried, my answers usually get better. Usually... probably...

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 31, 2023, 6:28pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/8 "2023-07-31T18:28:57Z")

</div>

```auto

server = 'Ignition OPC UA Server'
path = '[Machine1]Global.Gross_Average'
value	= system.opc.readValue(server, path)

print "Value: " + str(value.getValue())

```

I think the server is there.  
I need to state which provider?

~~Tag's OPC Server is identical.  
OPC Item Path is different. Has the `ns=1;s=[Machine1]Global.Gross_Average`~~

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 31, 2023, 6:38pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/9 "2023-07-31T18:38:50Z")

</div>

Heard back from support.

~~7.9: 'Ignition OPC UA Server'  
8.1: 'Ignition OPC-UA Server'~~

 

~~Manual for 8.1 needed updating for that he said.~~

* * *

Update  
For me on my gateway, I needed a hyphen between 'OPC' and 'UA' for the provider name.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 31, 2023, 6:51pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/10 "2023-07-31T18:51:41Z")

</div>

[https://docs.inductiveautomation.com/display/DOC81/7.9+to+8.1+Upgrade+Guide#id-7.9to8.1UpgradeGuide-ImportingProjectsintoaFreshInstall](https://docs.inductiveautomation.com/display/DOC81/7.9+to+8.1+Upgrade+Guide#id-7.9to8.1UpgradeGuide-ImportingProjectsintoaFreshInstall)

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 31, 2023, 7:00pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/11 "2023-07-31T19:00:30Z")

</div>

I am using 8.1.19.  
I never used 7.9.

* * *

That page says the opposite of what I did or something that confuses me:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/e/5ec81824fd0adf99227de3f6a4e4969f760dbdf7.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 31, 2023, 7:07pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/12 "2023-07-31T19:07:43Z")

</div>

What you heard from support is wrong, or you misheard. The hyphen is out of date.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 31, 2023, 7:08pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/13 "2023-07-31T19:08:34Z")

</div>

I didn't have a hyphen.

I added the hyphen, it works now.

I am confused why this is.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 31, 2023, 7:10pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/14 "2023-07-31T19:10:00Z")

</div>

You are working on a system that was originally created in 7.9, so the name of the loopback connection is what it used to be?

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 31, 2023, 7:12pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/15 "2023-07-31T19:12:28Z")

</div>

I am just a worker bee.  
I didn't know that.

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [July 31, 2023, 7:13pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/16 "2023-07-31T19:13:56Z")

</div>

It has to match whatever is here:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/b/cba0e6aad5faa3fc33ef1b2f17de1d7b93e3c8b2.png)

You could call it `foo_bar_connection` if someone chose to setup an OPC connection with that name.

Our system started as a 7.7 gateway, and has carried the hyphen ever since.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 31, 2023, 7:15pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/17 "2023-07-31T19:15:58Z")

</div>

Alright, everyone change it back to having a hyphen.  
Just kidding, thanks for showing me.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 31, 2023, 7:44pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/18 "2023-07-31T19:44:59Z")

</div>

Don't sweat it too much. In the dark mists of yesteryear, it was called 'IgnitionOPCUA'. 🤷

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 31, 2023, 8:31pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/19 "2023-07-31T20:31:37Z")

</div>

Tomorrow I will be figuring out how to format the data.

```auto
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.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 31, 2023, 8:38pm UTC](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711/20 "2023-07-31T20:38:52Z")

</div>

Should just need something like:

```auto
valuesOut = [[i,qv.value] for i,qv in enumerate(system.opc.readValues(server,pathList))]

```

[Next page](https://forum.inductiveautomation.com/t/vision-and-tag-design-help-6-cells-of-real-250-from-plc/76711.md?page=2)
