Chao ban cai nay khong kho lam minh dung VB viet:
tao action cho I/O:
123.jpg
code:
Dim objCon
Set objCon = HMIRuntime.ActiveScreen.ScreenItems("Picture Window10")
objCon.Top = 50
objCon.Left = 50
objCon.Height = 320
objCon.Width = 700
objCon.Visible = 0
objCon.PictureName= "sg1_trend_tank_water"
objCon.Visible = 1
Dim objCon1
HMIRuntime.Trace "Test-Kont" & vbCrLf
Set objCon1 = HMIRuntime.ActiveScreen.ScreenItems("f")
objCon1.TrendIndex = 0
objCon1.TrendRename = "FT0010"
objCon1.TrendTagName = "luu_luong_01\FT0010"
objCon1.TrendIndex = 1
objCon1.TrendRename = "FT0009"
objCon1.TrendTagName = "luu_luong_01\FT0009"
objCon1.TrendIndex = 2
objCon1.TrendRename = "FT0008"
objCon1.TrendTagName = "luu_luong_01\FT0008"
objCon1.TrendIndex = 3
objCon1.TrendRename = "FT0007"
objCon1.TrendTagName = "luu_luong_01\FT0007"
objCon1.TrendIndex = 4
objCon1.TrendRename = "FT0006"
objCon1.TrendTagName = "luu_luong_01\FT0006"
objCon1.TrendIndex = 5
objCon1.TrendRename = "FT0005"
objCon1.TrendTagName = "luu_luong_01\FT0005"
objCon1.TrendIndex = 6
objCon1.TrendRename = "FT0004"
objCon1.TrendTagName = "luu_luong_01\FT0004"
objCon1.TrendIndex = 7
objCon1.TrendRename = "FT0003"
objCon1.TrendTagName = "luu_luong_01\FT0003"
objCon1.TrendIndex = 8
objCon1.TrendRename = "FT0002"
objCon1.TrendTagName = "luu_luong_01\FT0002"
objCon1.TrendIndex = 9
objCon1.TrendRename = "FT0001"
objCon1.TrendTagName = "luu_luong_01\FT0001"
End Sub
doan code tren minh viet cho 8 line con ban muon may line ban viet them nhe: ah ma nho trong face cua trend thi tao nhu hinh duoi nhe:
234.png
Đánh dấu