Signametrics
30
Global Const SixWire = &H1E
' Since the DLL is written in "C", where TRUE = 1 and FALSE = 0
' and VB has -1 for True, use YES and NO instead of True and False
Global Const YES = 1
Global Const NO = 0
‘Error handling code:
Public Sub ShowFault(status As Long)
Dim errtext As String * 48
Dim errcode As Long
Dim start As Single
If status < 0 Then
errcode = SCANErrString(status, errtext, 48)
SimplePanel.TextLine.Text = errtext
If status <> -3 Then 'if not autorange wait with message
start = Timer
While ((Timer - start) < 2#) 'delay for 1.1 seconds
DoEvents
Wend
End If
SimplePanel.TextLine.Text = ""
End If
End Sub
SimplePanel.frm Form file contents:
Option Explicit
Private Sub CommandSelect_Click()
ShowFault SCANSelectChannel(0, Lng(TextChan.Text)) 'Select the channel
End Sub
Private Sub Form_Load()
Dim errtext As String * 64
Dim i, j, k As Long
i = SCANInit(0) 'Initialize scanner 0
End Sub
Private Sub Option2W_Click()
ShowFault SCANSetConfig(0, TwoWire)
End Sub
Private Sub Option4W_Click()
ShowFault SCANSetConfig(0, FourWire)
End Sub
Private Sub Option6W_Click()
ShowFault SCANSetConfig(0, SixWire)
End Sub
5.4 Windows DLL Default Modes and Parameters
Summary of Contents for SM4020
Page 61: ...Signametrics 60...