Dear all,
I have a problem as following expression
I am building the VB code for automatically heater
The heater turn on when temperature in room is lower than 17oC.
However, I just want it turn on in 1 min then it has to turn off
After 5 min, the system will check temperature again and the heater will turn on or off depend on the temperature.
I can set it in range as this:
Private Sub Timer1_Timer()
If Check1 = 1 Then
If Check6 = 1 Then
If tem2.Text < 17 Then
MSComm2.Output = "a"
HeaterCheck1 = 1
End If
If tem2.Text > 18 Then
MSComm2.Output = "A"
HeaterCheck1 = 0
End If
End Sub
I have a problem as following expression
I am building the VB code for automatically heater
The heater turn on when temperature in room is lower than 17oC.
However, I just want it turn on in 1 min then it has to turn off
After 5 min, the system will check temperature again and the heater will turn on or off depend on the temperature.
I can set it in range as this:
Private Sub Timer1_Timer()
If Check1 = 1 Then
If Check6 = 1 Then
If tem2.Text < 17 Then
MSComm2.Output = "a"
HeaterCheck1 = 1
End If
If tem2.Text > 18 Then
MSComm2.Output = "A"
HeaterCheck1 = 0
End If
End Sub