Alarms set bit state,how to set Event Value equal to bit value?

One approach that would work would be to move your associated data expression to the label property:
image

Then, you could use the method I developed for renaming alarm status table columns to change the column headers in the table:

if event.propertyName == 'componentRunning':
	def getTable(statusTable):
		for component in statusTable.getComponents():
			if component.__class__.__name__ == 'AlarmStatusTable$1':
				return component
			else:
				table = getTable(component)
				if table:
					return table
	
	table = getTable(event.source)
	tableHeader= table.tableHeader
	columnModel = table.columnModel
	for column in range(table.columnCount):
		tableColumn = columnModel.getColumn(column)
		if tableColumn.headerValue == 'Label':
			tableColumn.setHeaderValue("Real Alarm Value")
		elif tableColumn.headerValue == 'Event Value':
			tableColumn.setHeaderValue("Tag Value")
	tableHeader.repaint()

Result:
image

2 Likes