Memory Tags with Null value

Hi, everyone!

In the UDT definitions, I created a new data type and added several memory tags. As you can see in the image, I'm in the Tags tab and all my Memory Tags have the value “null” except for “TMPPL1” In it, I managed to put the script I wanted and it works perfectly.

All of them are string tags, all of them with null my script or another test don't work. Is there anything I can do to fix it?

My guess is, the script. Hard to tell when we can't see it.

Also, only TMPPL1 and TMPPL2 have scripts configured.

Actually, only TMPPL1 is scripted. I'm reading a string that comes from my Mqtt and updates whenever I publish something, but that's beside the point.

My biggest issue is that these tags in null, with the same script or a different one, with binding or another test I've done, these tags don't work and, if I create a new one, it comes up with null.

Is there a limit to the number of tags I can have in a UDT?

Your screen shots clearly show that TMPPL2 has an event script configured.

image

You're just not providing enough information for us to help.

What does "don't work" mean?
What is the "different script"?
What binding did you try?
What was this "another test"?
What does the UDT definition look like for one of the tags that "don't work"?

No

Your script, which you claim works perfectly, has errors. If the value change is fired and the current value is equal to the present value, then you will try to use variables which have not been defined.

All you really need is this:

if previousValue.value and previousValue.value != currentValue.value:
	values = [currentValue.value.split('; ')[0]]
	paths = ['[default]_Adamntina/BB/B1/SET_SUP_BB/TMPPL1']
	system.tag.writeAsync(paths, values)

Yes, but TMPPL2 had the script disabled so the icon remains anyway
image

I apologize, Louis, for my lack of description. In the next questions, I'll be more specific.

But I didn't say it worked perfectly, it's only working for my tests with mqtt at the moment, anyway I'll test the code you sent thank you very much!

But oddly enough in the UDT definitions in the value I pressed basckspace and another I tested leaving with a space. I updated and the null disappeared, I put my script and it worked!


Thank you very much for your attention Louis!

Related topic:

Same problem, same day, good coincidence, Thanks

1 Like