Change value of tag set by parameter

Why do I get this error when I try to change the value of a UDT tag that was set by the UDT’s parameters? My tags Access Rights are set to Read/Write.

Error writing to script.value: Bad_ReadOnly("The specified value is dynamic and cannot be written.")

What type of binding are you using?

Value Source? It is Memory

Is it because the memory tags value is bound to the parameter?

Is there some other way I am suppose to set the tag to the parameter?

Try using an expression tag instead.

Changing to an expression tag has the same issue. I am running version 8.0.12.

I just upgraded to 8.0.15 and I have the same issue.

You can not write to an expression tag or a bound property on a memory tag. You will want to try a derived tag instead. Giving us more info and maybe we can provide more help.

I am trying to create a UDT instance with some of the tags inside the UDT being set to an initial value. If I cannot change the values later by writing to them that will not work.

I can easily create the UDT instance and then immediately write to the UDT changing the values to there initial state. I just thought it would be better to create the UDT all in one statement than it would be to have to create the tag and then write the values in a second statement.

Are the initial values different for specific instances? If not, you can set the initial value in the udt.

Yes every instance will have different initial values.

did you ever figure this out?

What are you trying to do? Looking back at this, it seems Ignition is doing what would be expected in that dynamic values that derive their value from an expression or binding will not allow you to write to them as it inherently is a read-only value at that point.

My spreadsheet import tool on the exchange explicitly handles this case, and with careful iteration, can do so with very tight spreadsheet content.

2 Likes