The idea is that the client can select the value, and modify the setpoint from that table. This isn’t data coming from any historian or any sort of SQL server (such and such), it’s all live OPC data coming in from my PLC. I can figure out a way to update the table when the opc tag changes, but if i try to edit the table, the opc tag that the cell is bound to using the Cell Update binding doesn’t change the OPC tag.
If there is a better/easier way to do this, I don’t necessarily need to use a table, just anything that I can pair up with the analog indicator. I was originally looking to have a drop down component. The user would select which setpoint he’d want from that, and modify it after he selected it. The indicator on the left would then show the changes.
Just put a hidden column in the table that contains the tag path and then utilize on the OnCellEdited method of the table and issue a system.tag.write call to write the value to the tag?
1 Like
Ah! Brilliant! Thank you!
Is there any chance you could create a code snippet of how this would work. I’ve created the hidden column I’ve put in the tag paths in that column but struggling figuring out how to take the value on one column and write it to the tag in the other column.
Any help is appreciated.
Thanks.
The below assumes you are editing COLUMN 0 and the Tagpath is in COLUMN 1
Adjust as needed.
if colIndex==0:
tPath = self.data.getValueAt(rowIndex,1)
system.tag.write(tPath,newValue)
self.data = system.dataset.setValue(self.data, rowIndex, colIndex, newValue)
print tPath
1 Like
Thank you this solution worked for me