Курсовая работа: Разработка модуля для контура управления tic-104
Srv.Open “uid=piadmin”
Set Controllers = Srv.PIModuleDB.PIModules.Item(“controllers”)
Set Controller = Controllers.PIModules.Item(“tic-104”)
LoadMfgData
LoadInstallationData
End Sub
Private Sub LoadMfgData()
Dim MfgData As PIProperty
Dim Prop As PIProperty
Dim strEntry As String
Dim mItem As ListItem
Dim iIndex As Integer
lvwMfgData.ListItems.Clear
lvwMfgData.ColumnHeaders.Clear
lvwMfgData.ColumnHeaders.Add , , “Property”, lvwMfgData.Width * 3 / 16
lvwMfgData.ColumnHeaders.Add , , “Value”, lvwMfgData.Width * 12 / 16
lvwMfgData.View = lvwReport
Set MfgData = Controller.PIProperties.Item(“Manufacturer Data”)
iIndex = 1
For Each Prop In MfgData.PIProperties
strEntry = Prop.Name & “: “ & Prop.Value
Set mItem = lvwMfgData.ListItems.Add(iIndex, Prop.Name, Prop.Name)
iIndex = iIndex + 1
mItem.SubItems(1) = Prop.Value
Next Prop
End Sub
Private Sub LoadInstallationData()
Dim InstallationData As PIProperty
Dim Prop As PIProperty