Tecnico
Private Sub Command1_Click()
MsComm1.Output = "P"
End
End Sub
Private Sub Command2_Click()
MsComm1.Output = "P"
End Sub
Private Sub Form_Load()
Text1.Text =Text1.Text & Format("SISTEMA ACTIVADO ") & Format(Date, "general date") & Format(" ") & Format(Time, "HH:MM:SS AMPM") & Chr(13) & Chr(10)
Text1.Text = Text1.Text & Chr(13)& Chr(10)
LED1.FillColor = QBColor(8)
LED2.FillColor = QBColor(8)
LED3.FillColor = QBColor(8)
If MsComm1.PortOpen = False Then
MsComm1.PortOpen = True
End If
End Sub
Private SubMsComm1_OnComm()
Dim Apuntador As Byte
Dim a As String
a = MsComm1.InputData
If a = "1" Then
LED1.FillColor = QBColor(12)
Text1.Text = Text1.Text & Format("SONIDO ON ") & Format(Time,"HH:MM:SS AMPM") & Chr(13) & Chr(10)
End If
If a = "2" Then
LED1.FillColor = QBColor(8)
Text1.Text = Text1.Text & Format("SONIDO OFF ") & Format(Time, "HH:MM:SS AMPM") & Chr(13)& Chr(10)
End If
If a = "3" Then
LED2.FillColor = QBColor(12)
Text1.Text = Text1.Text & Format("LED ON ") & Format(Time, "HH:MM:SS AMPM") & Chr(13) & Chr(10)
End If
If a ="4" Then
LED2.FillColor = QBColor(8)
Text1.Text = Text1.Text & Format("LED OFF ") & Format(Time, "HH:MM:SS AMPM") & Chr(13) & Chr(10)
End If
If a = "5" Then
LED3.FillColor =QBColor(12)
Text1.Text = Text1.Text & Format("RELE ON ") & Format(Time, "HH:MM:SS AMPM") & Chr(13) & Chr(10)
End If
If a = "6" Then
LED3.FillColor = QBColor(8)
Text1.Text =Text1.Text & Format("RELE OFF ") & Format(Time, "HH:MM:SS AMPM") & Chr(13) & Chr(10)
End If
If a = "7" Then
LED1.FillColor = QBColor(8)
LED2.FillColor = QBColor(8)
LED3.FillColor =QBColor(8)
Text1.Text = Text1.Text & Format("TODOS LOS EQUIPOS APAGADOS ") & Format(Time, "HH:MM:SS AMPM") & Chr(13) & Chr(10)
End If
If a = "8" Then
Text1.Text = Text1.Text &...
Regístrate para leer el documento completo.