Table cell update binding doesn't update tag value after editing

I bind some tag to cell update binding of a table. I try to change the value of the cell in run time but the tag which is binded doesn’t change.
can someone tell me why changing value in table doesn’t effect tag itself?

I can’t find any documentation anywhere stating it, but I don’t think Cell Update is a bi-directional binding. Typically you get the check box in the binding menu to allow it to be bi-directional if it is.

But someone else might know more about this component than I do.

1 Like

You have to write script to change the data source. if your table binding was to a database query tag, you would have to run an update query to reflect the table change in the data source itself. So in your case you will probably have to write some script to run on cell edited:

value = x
system.tag.write("tag",value)
3 Likes

Thank you. But how I can find out which tag I should update by system.tag.write?
For each cell I use different tag and there 20 of them. In cellupdate event I can find out the selected row and column but I can’t find out the tag path which is cell bind to it.

You can use a dictionary. As key, the tagpath of each Tag bound in the cell update binding of the table. As item, a list of positions inside the dataset. I know dictionary is not intended to be used this way but it does the job :wink:
The script is the following.

import system
my_dict = {'Random Int': [0, 0], 'Random Int 2': [0, 1]}
tag = my_dict.keys()[my_dict.values().index([rowIndex, colIndex])] 
system.tag.write(tag,newValue)

Basically, it separates the dictionary’s values in a list, finds the position of the value you have, and gets the key at that position.

1 Like

thanks. very clever solutions.

do you know how I can add what tag service provider the tag is in with your code here?

Thanks.

Just add [TagProvider] to your TagPath.
So if my TagProvider is Machine1 and my TagPath is Random Int the end result will be [Machine1]Random Int

import system
my_dict = {'[Machine1]Random Int': [0, 0], '[Machine1]Random Int 2': [0, 1]}
tag = my_dict.keys()[my_dict.values().index([rowIndex, colIndex])] 
system.tag.write(tag,newValue)

This is valid for Ignition 8, I don’t know if it will still be good for Ignition 7

1 Like

Thanks for the reply.