User Manual W51PC DCOM Interface V1.1
Programming Examples
•
19
Visual Basic
' Class containing the data decoder handling code.
'=================================================
Private WithEvents m_objW51Server1 As W51SERVERLib.W51System
Public Sub ActivateDataDecoder1()
'
===================================================================
========
' ActivateDataDecoder1
' ---------------------------------------------------------------
------------
' This subroutine is responsible for the activation of the first
data decoder
' driver instance.
'
' Parameter Name Dir Description
' -------------
--- -----------
'
' ---------------------------------------------------------------
------------
Dim I As Integer
' Kill any possible current instatiation.
On Error Resume Next
Set m_objW51Server1 = Nothing
' Create a new instantiation of it.
Err = 0
Set m_objW51Server1 = CreateObject("W51System.W51System.1")
' Connect to the card.
m_objW51Server1.Connect Format$("One")
' Set the interface parameters.
m_objW51Server1.SetParam ""
m_objW51Server1.SetUpdateRate 1000
m_objW51Server1.EnableCallBackText False
Err = 0
End Sub
Public Sub m_objW51Server1_NewTextData(ByVal Data As String)
'
===================================================================
========
' m_objW51Server1_NewTextData
' ---------------------------------------------------------------
------------
' This event is activated when the Data Decoder has detected new
text data.
'
' Parameter Name Dir Description
' -------------
--- -----------
' Data IN The textual data received.
' ---------------------------------------------------------------
------------
' Get the decoder number for the channel.
If Len(Data) = 0 Then Exit Sub
' If paused ignore the data else update the log and the display.
frmDisplay.Text1 = frmDisplay.Text1 & Data
End Sub
Summary of Contents for W51PC
Page 1: ...User Manual W51PC DCOM Interface V1 1 By WAVECOM ELEKTRONIK AG...
Page 4: ......
Page 28: ......