Download Advantech GeniDAQ User's Manual

Transcript
Private Sub List1_Click()
Text1.Text = List1.List(List1.ListIndex)
bOK = TagList.SelectTask(Text1.Text)
List2.Clear
While Not TagList.EndofList()
List2.AddItem TagList.GetTagName()
TagList.GoNext
Wend
End Sub
Private Sub List1_KeyDown(KeyCode As Integer, Shift As Integer)
Text1.Text = List1.List(List1.ListIndex)
TagList.SelectTask (Text1.Text)
List2.Clear
While Not TagList.EndofList()
List2.AddItem TagList.GetTagName()
TagList.GoNext
Wend
End Sub
Private Sub List2_Click()
Text2.Text = List2.List(List2.ListIndex)
fBuf = DBCenter.GetTagDataFloat(Text1.Text, Text2.Text, 0)
Text3.Text = Str(fBuf)
End Sub
Private Sub List2_KeyDown(KeyCode As Integer, Shift As Integer)
Text2.Text = List2.List(List2.ListIndex)
fBuf = DBCenter.GetTagDataFloat(Text1.Text, Text2.Text, 0)
Text3.Text = Str(fBuf)
End Sub
5. Launch GeniDAQ builder and run a project, for example demo.gni. Then execute the VB program.
Select Task 1 in the Task list field, it retrieves and shows all available tags under the Task 1 in the
Tag list. Then click AI1 tag, it shows its value in Tag value field.
11-10