Download PM-Digital

Transcript
PM-Digital User Manual
'loop until status is returned
Do Until MSComm1.InBufferCount > 0
Loop
'Get status byte
lngStatus = Asc(MSComm1.Input)
'Check each status bit
If lngStatus = 0 Then MsgBox "No Errors"
If (lngStatus And &H1) = &H1 Then MsgBox "Low
Battery"
If (lngStatus And &H2) = &H2 Then MsgBox "No
Probe"
If (lngStatus And &H4) = &H4 Then MsgBox "Over
Temp"
If (lngStatus And &H8) = &H8 Then MsgBox "Bad
Ref"
If (lngStatus And &H10) = &H10 Then MsgBox
"Bad CSum"
If (lngStatus And &H20) = &H20 Then MsgBox
"Bad Zero"
If (lngStatus And &H40) = &H40 Then MsgBox
"Bad Head"
End Sub
18