Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create an Analysis with the following:
    Data Points: Mode Begin Time,Mode Duration,Mode End Time,Equipment Note
    Filter By: Equipment Path = @eqPath AND Equipment Mode Type = 'Maintenance' (or Production or whatever Mode you wish to Filter by)
    Group By: Mode Begin Time
    on your Analysis Controller, add a Custom Property eqPath = string
    in the Property Window, the Analysis Controller should look like this:
  2. add a Date Range and a Power Table Component
    you will bind
    the Analysis Controller Start/End Date to the Date Range Start/End Date
    and
    the Power Table Data to the Analysis Controller Data
  3. add some Scripting to the Power Table Extension Function onCellEdited

    Code Block
    if colName == "Equipment Note":
    		# get the equipment path from the MES Object Selector
    		eqPath = self.parent.getComponent('MES Object Selector').equipmentItemPath
    		# get the date of the event from the Analysis dataset
    		date = self.data.getValueAt(rowIndex, 'Mode Begin Time')
    		
    		# check to see if there is not already a note
    		if system.mes.getTagCollectorValue(eqPath, 'Equipment Note', '', date,) is None:
    			# if no note exists, add the note
    			system.mes.addTagCollectorValue(eqPath, 'Equipment Note', '', date, newValue)
    		else:
    			# otherwise, update the note
    			system.mes.updateTagCollectorValue(eqPath, 'Equipment Note', '', date, newValue)
    		# rerun the analysis	
    		self.parent.getComponent('MES Analysis Controller').refresh()




    the following .proj is built-in with all of the above (on Inductive 7.9.10)

View file
nameMaintain Equipment Notes 7910.proj
height250

Content by Label
showLabelsfalse
max5
spacesSKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("note","custom","equipment") and type = "page" and space = "SKB"
labelscustom equipment note

...