Connecting 3000 tags using script that makes Ignition gateway restart automatically (ERROR)

I am trying to read the DB from the siemens PLC. The DB contains an ARRAY captured from the photocells. I want to see the array value on the perspective. I created an array visual to perspective (attached image) and linked with the script (script image attached) which is reading value from the tag and printing on the label array. I have used system.tag.read function for this purpose. Now the problem is it cant handle reading all the values and the goes to restart automatically. How to achieve this goal? Any Idea. Or I need to connect tag 1 by 1 (Total 3000 tags)

Need HELP!


Doing 3,000 individual system.tag.read calls inside a transform is... bad.

8 Likes

You are trying to process 3000 tags, one at a time, every 100 milliseconds?

2 Likes

Ok then any good solution?

But I'm going to guess that it isn't the tag reading that crashes your gateway, but some astonishingly inefficient repeating Perspective view gobbling up RAM.

Yeah tag reading is not crashing the gateway. I think the script is

The script is the tag reading.

How have you constructed the view?

At the very least you could read all 3,000 tags in a single call to system.tag.readBlocking, but I think there are probably larger design flaws that need to be addressed here.

Doing this inside a transform every 100ms isn't great, and as @pturmel hinted this page/view design may have issues of its own...

There are 62 columns (Each column is a template). Each column contains 47 labels. So the template is repeated 62 times (embeded view).

so it is a 62x47 matrix.

Each column is connected to a script shared above in the image. Each column is trying to read 47 tags using script.

Please don't take this the wrong way, but that was a poor design choice.

How is a "single" label intended to work?

Ooooo! Even worse.

That script isn't reading just the elements from start to stop, since your range() expression doesn't involve start. So the embedded views are all starting at array subscript zero. The latter ones would be reading all 3000. So you are actually trying to read (62 * 3000)/2 => 93000 tags, one at a time, every 100ms.

And trying to push them into a complex nested view setup.

Ok so I understood that the design is poor.

Lets make it simple.

If I have 3000 small labels on the perspective screen and I want to read all the 3000 tag values and push those values to the labels then what would be a general idea for this?

Honestly I'd probably do a gateway script that pulls the data you need into a dataset tag and then display it via a table that is bound to that dataset tag.

3 Likes

Well, that depends on what the label is supposed to do. What are you trying to do with them, perhaps a Label isn't the best component for the task.

You need to not have 3000 components on screen, full stop. Perspective just won't be able to handle that well.
A Table might work, with advanced row customization (but don't use embedded views!) but your best bet is going to be rendering a custom SVG out via script and displaying that single element.

I want to say there was a thread with a similar problem on this a while back...

2 Likes

This is where my brain is at as well, just trying to figure out what is supposed to happen based on the value of the individual tags.

This thread may be useful to you, OP, for a fundamentally different approach.

5 Likes

I purpose that I am trying to achive is to put labels in the matrix form and read the values from the tags (integer values) which are coming from the photocells and analyse them.

What datatype are these tags, and how do you want to show them? (I'm thinking a table with 62 columns, styled by cell.)

Integer datatype and I want to show them in integer form on perspective. Table could be good choice but do I need to convert the array of integers into dataset or something?