Yokogawa JUXTA VJ Series Limit Alarms Manual de usuario Pagina 32

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 60
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 31
3-18
<Toc> <Ind> <3. PC Link Communication >
IM 77J01J11-01E
'Initialize label control that displays character strings sent and received
Label1.Caption = ""
Label2.Caption = ""
End Sub
--------------------------------------------------------------------------------
'This processing starts each time 1 byte is received
Private Sub MSComm1_OnComm()
Dim strBuf0 As String
Select Case MSComm1.CommEvent
Case comEvReceive
strBuf0 = MSComm1.Input '
Select Case strBuf0 'Case classification based on 1 byte received
Case Chr(2) 'When it is stx
strBuf1 = "[stx]"
Case Chr(3) 'When it is etx
strBuf1 = strBuf1 & "[etx]"
Case Chr(13) 'When it is cr
strBuf1 = strBuf1 & "[cr]"
'This is provided as a measure against the fact that a command sent may
'be seen as response depending on a combination with communication
'converter.
If strBuf1 = Label1.Caption Then
strBuf1 = ""
Else
strReceive = strBuf1 'Completion of character string received
fSend = False 'When it is not stx, etx, or cr
End If
Case Else 'stx,etx,crÇǻǢÇÇ´
strBuf1 = strBuf1 & strBuf0
End Select
Case Else
End Select
End Sub
--------------------------------------------------------------------------------
'Timeout
Private Sub Timer1_Timer()
3rd Edition : Oct. 15, 2007-00
Vista de pagina 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 ... 59 60

Comentarios a estos manuales

Sin comentarios