0% found this document useful (0 votes)
37 views15 pages

1

Uploaded by

car_5500
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views15 pages

1

Uploaded by

car_5500
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 15

Public m_svr As IModSca Dim PollHandle(35) As Integer Dim status(35) As Integer Dim SlaveDevice As Integer Dim temp(35) As Integer

Dim MA_BA1, MA_BA2, MA_BA3, MA_BA4, MA_BA5 As Integer Dim C_BA1, C_BA2, C_BA3, C_BA4, C_BA5 As Integer Dim Z_BA1, Z_BA2, Z_BA3, Z_BA4, Z_BA5 As Integer Dim LR_BA1, LR_BA2, LR_BA3, LR_BA4, LR_BA5 As Integer Dim PDHA_1A, PDHA_2A, PDHA_3A, PDHA_4A, PDHA_5A As Integer Dim PDHA_1B, PDHA_2B, PDHA_3B, PDHA_4B, PDHA_5B As Integer Dim LI_01, LI_02, FI_01, PI_01, TI_01 As Variant Dim i As Integer 'contador Dim C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 As String Dim C16, C17, C18, C19, C20, C21, C22, C23, C24, C25, C26, C27, C28, C29, C30 As String Dim C31, C32, C33, C34, C35 As String Dim MENSAJE As String Private Sub CBA1_Click() If CBA1.Caption = "ENCENDER" Then C_BA1 = MsgBox("CONFIRMAR COMANDO DE ENCENDER", vbYesNo, "ENCENDER BA01") If C_BA1 = vbYes Then C_BA1 = 1 CBA1.Caption = "APAGAR" End If If C_BA1 = vbNo Then C_BA1 = 0 CBA1.Caption = "ENCENDER" End If Else C_BA1 = MsgBox("CONFIRMAR COMANDO DE APAGAR", vbYesNo, "APAGAR BA01") If C_BA1 = vbYes Then C_BA1 = 0 CBA1.Caption = "ENCENDER" End If If C_BA1 = vbNo Then C_BA1 = 1 CBA1.Caption = "APAGAR" End If End If End Sub Private Sub CBA2_Click() If CBA2.Caption = "ENCENDER" Then C_BA2 = MsgBox("CONFIRMAR COMANDO DE ENCENDER", vbYesNo, "ENCENDER BA02") If C_BA2 = vbYes Then C_BA2 = 1 CBA2.Caption = "APAGAR" End If If C_BA2 = vbNo Then C_BA2 = 0 CBA2.Caption = "ENCENDER" End If Else C_BA2 = MsgBox("CONFIRMAR COMANDO DE APAGAR", vbYesNo, "APAGAR BA02") If C_BA2 = vbYes Then C_BA2 = 0 CBA2.Caption = "ENCENDER" End If If C_BA2 = vbNo Then C_BA2 = 1

CBA2.Caption = "APAGAR" End If End If End Sub Private Sub CBA3_Click() If CBA3.Caption = "ENCENDER" Then C_BA3 = MsgBox("CONFIRMAR COMANDO If C_BA3 = vbYes Then C_BA3 = 1 CBA3.Caption = "APAGAR" End If If C_BA3 = vbNo Then C_BA3 = 0 CBA3.Caption = "ENCENDER" End If Else C_BA3 = MsgBox("CONFIRMAR COMANDO If C_BA3 = vbYes Then C_BA3 = 0 CBA3.Caption = "ENCENDER" End If If C_BA3 = vbNo Then C_BA3 = 1 CBA3.Caption = "APAGAR" End If End If End Sub Private Sub CBA4_Click() If CBA4.Caption = "ENCENDER" Then C_BA4 = MsgBox("CONFIRMAR COMANDO If C_BA4 = vbYes Then C_BA4 = 1 CBA4.Caption = "APAGAR" End If If C_BA4 = vbNo Then C_BA4 = 0 CBA4.Caption = "ENCENDER" End If Else C_BA4 = MsgBox("CONFIRMAR COMANDO If C_BA4 = vbYes Then C_BA4 = 0 CBA4.Caption = "ENCENDER" End If If C_BA4 = vbNo Then C_BA4 = 1 CBA4.Caption = "APAGAR" End If End If End Sub Private Sub CBA5_Click() If CBA5.Caption = "ENCENDER" Then C_BA5 = MsgBox("CONFIRMAR COMANDO If C_BA5 = vbYes Then C_BA5 = 1 CBA5.Caption = "APAGAR" End If If C_BA5 = vbNo Then C_BA5 = 0 CBA5.Caption = "ENCENDER"

DE ENCENDER", vbYesNo, "ENCENDER BA03")

DE APAGAR", vbYesNo, "APAGAR BA03")

DE ENCENDER", vbYesNo, "ENCENDER BA04")

DE APAGAR", vbYesNo, "APAGAR BA04")

DE ENCENDER", vbYesNo, "ENCENDER BA05")

End If Else C_BA5 = MsgBox("CONFIRMAR COMANDO DE APAGAR", vbYesNo, "APAGAR BA05") If C_BA5 = vbYes Then C_BA5 = 0 CBA5.Caption = "ENCENDER" End If If C_BA5 = vbNo Then C_BA5 = 1 CBA5.Caption = "APAGAR" End If End If End Sub Private Sub Form_Load() Set m_svr = CreateObject("ModScan32.Document") tcpServer1.RemoteHost = "192.168.0.171" tcpServer1.RemotePort = 4000 tcpServer1.LocalPort = 4000 tcpServer1.Listen SlaveDevice = 1 'COMANDOS MANUAL-AUTOMATICO PollHandle(1) = m_svr.CreatePollRequest(SlaveDevice, 1, 1) PollHandle(2) = m_svr.CreatePollRequest(SlaveDevice, 2, 1) PollHandle(3) = m_svr.CreatePollRequest(SlaveDevice, 3, 1) PollHandle(4) = m_svr.CreatePollRequest(SlaveDevice, 4, 1) PollHandle(5) = m_svr.CreatePollRequest(SlaveDevice, 5, 1) 'COMANDOS ENCENDER-APAGAR PollHandle(6) = m_svr.CreatePollRequest(SlaveDevice, 6, 1) PollHandle(7) = m_svr.CreatePollRequest(SlaveDevice, 7, 1) PollHandle(8) = m_svr.CreatePollRequest(SlaveDevice, 8, 1) PollHandle(9) = m_svr.CreatePollRequest(SlaveDevice, 9, 1) PollHandle(10) = m_svr.CreatePollRequest(SlaveDevice, 10, 1) 'RETRO ENCENDIDO-APAGADO PollHandle(11) = m_svr.CreatePollRequest(SlaveDevice, 10001, 1) PollHandle(12) = m_svr.CreatePollRequest(SlaveDevice, 10002, 1) PollHandle(13) = m_svr.CreatePollRequest(SlaveDevice, 10003, 1) PollHandle(14) = m_svr.CreatePollRequest(SlaveDevice, 10004, 1) PollHandle(15) = m_svr.CreatePollRequest(SlaveDevice, 10005, 1) 'RETRO LOCAL-REMOTO PollHandle(16) = m_svr.CreatePollRequest(SlaveDevice, 10006, 1) PollHandle(17) = m_svr.CreatePollRequest(SlaveDevice, 10007, 1) PollHandle(18) = m_svr.CreatePollRequest(SlaveDevice, 10008, 1) PollHandle(19) = m_svr.CreatePollRequest(SlaveDevice, 10009, 1) PollHandle(20) = m_svr.CreatePollRequest(SlaveDevice, 10010, 1) 'ALARMAS PRESION DIFERENCIAL PollHandle(21) = m_svr.CreatePollRequest(SlaveDevice, 10011, 1) PollHandle(22) = m_svr.CreatePollRequest(SlaveDevice, 10012, 1) PollHandle(23) = m_svr.CreatePollRequest(SlaveDevice, 10013, 1) PollHandle(24) = m_svr.CreatePollRequest(SlaveDevice, 10014, 1) PollHandle(25) = m_svr.CreatePollRequest(SlaveDevice, 10015, 1) PollHandle(26) = m_svr.CreatePollRequest(SlaveDevice, 10016, 1) PollHandle(27) = m_svr.CreatePollRequest(SlaveDevice, 10017, 1) PollHandle(28) = m_svr.CreatePollRequest(SlaveDevice, 10018, 1) PollHandle(29) = m_svr.CreatePollRequest(SlaveDevice, 10019, 1) PollHandle(30) = m_svr.CreatePollRequest(SlaveDevice, 10020, 1) 'INDICADORES ANALOGICOS PollHandle(31) = m_svr.CreatePollRequest(SlaveDevice, 30001, 1) PollHandle(32) = m_svr.CreatePollRequest(SlaveDevice, 30002, 1) PollHandle(33) = m_svr.CreatePollRequest(SlaveDevice, 30003, 1) PollHandle(34) = m_svr.CreatePollRequest(SlaveDevice, 30004, 1)

PollHandle(35) = m_svr.CreatePollRequest(SlaveDevice, 30005, 1) statusline = "** UNINITIALIZED **" MA_BA1 = 1 MA_BA2 = 1 MA_BA3 = 1 MA_BA4 = 1 MA_BA5 = 1 C_BA1 = 0 C_BA2 = 0 C_BA3 = 0 C_BA4 = 0 C_BA5 = 0 End Sub Private Sub MABA1_Click() If MABA1.Caption = "A" Then MA_BA1 = MsgBox("DESEA OPERAR EN MODO MANUAL?", vbYesNo, "MODO DE OPERACION BA01" ) If MA_BA1 = vbYes Then MA_BA1 = 1 MABA1.Caption = "M" End If If MA_BA1 = vbNo Then MA_BA1 = 0 MABA1.Caption = "A" End If Else MA_BA1 = MsgBox("DESEA OPERAR EN MODO AUTOMATICO?", vbYesNo, "MODO DE OPERACION B A01") If MA_BA1 = vbYes Then MA_BA1 = 0 MABA1.Caption = "A" End If If MA_BA1 = vbNo Then MA_BA1 = 1 MABA1.Caption = "M" End If End If If MABA1.Caption = "A" Then CBA1.Enabled = False Else CBA1.Enabled = True End If End Sub Private Sub MABA2_Click() If MABA2.Caption = "A" Then MA_BA2 = MsgBox("DESEA OPERAR EN MODO MANUAL?", vbYesNo, "MODO DE OPERACION BA02" ) If MA_BA2 = vbYes Then MA_BA2 = 1 MABA2.Caption = "M" End If If MA_BA2 = vbNo Then MA_BA2 = 0 MABA2.Caption = "A" End If Else MA_BA2 = MsgBox("DESEA OPERAR EN MODO AUTOMATICO?", vbYesNo, "MODO DE OPERACION B A02") If MA_BA2 = vbYes Then MA_BA2 = 0

MABA2.Caption = "A" End If If MA_BA2 = vbNo Then MA_BA2 = 1 MABA2.Caption = "M" End If End If If MABA2.Caption = "A" Then CBA2.Enabled = False Else CBA2.Enabled = True End If End Sub Private Sub MABA3_Click() If MABA3.Caption = "A" Then MA_BA3 = MsgBox("DESEA OPERAR ) If MA_BA3 = vbYes Then MA_BA3 = 1 MABA3.Caption = "M" End If If MA_BA3 = vbNo Then MA_BA3 = 0 MABA3.Caption = "A" End If Else MA_BA3 = MsgBox("DESEA OPERAR A03") If MA_BA3 = vbYes Then MA_BA3 = 0 MABA3.Caption = "A" End If If MA_BA3 = vbNo Then MA_BA3 = 1 MABA3.Caption = "M" End If End If If MABA3.Caption = "A" Then CBA3.Enabled = False Else CBA3.Enabled = True End If End Sub Private Sub MABA4_Click() If MABA4.Caption = "A" Then MA_BA4 = MsgBox("DESEA OPERAR ) If MA_BA4 = vbYes Then MA_BA4 = 1 MABA4.Caption = "M" End If If MA_BA4 = vbNo Then MA_BA4 = 0 MABA4.Caption = "A" End If Else MA_BA4 = MsgBox("DESEA OPERAR A04") If MA_BA4 = vbYes Then MA_BA4 = 0

EN MODO MANUAL?", vbYesNo, "MODO DE OPERACION BA03"

EN MODO AUTOMATICO?", vbYesNo, "MODO DE OPERACION B

EN MODO MANUAL?", vbYesNo, "MODO DE OPERACION BA04"

EN MODO AUTOMATICO?", vbYesNo, "MODO DE OPERACION B

MABA4.Caption = "A" End If If MA_BA4 = vbNo Then MA_BA4 = 1 MABA4.Caption = "M" End If End If If MABA4.Caption = "A" Then CBA4.Enabled = False Else CBA4.Enabled = True End If End Sub Private Sub MABA5_Click() If MABA5.Caption = "A" Then MA_BA5 = MsgBox("DESEA OPERAR EN MODO MANUAL?", vbYesNo, "MODO DE OPERACION BA05" ) If MA_BA5 = vbYes Then MA_BA5 = 1 MABA5.Caption = "M" End If If MA_BA5 = vbNo Then MA_BA5 = 0 MABA5.Caption = "A" End If Else MA_BA5 = MsgBox("DESEA OPERAR EN MODO AUTOMATICO?", vbYesNo, "MODO DE OPERACION B A05") If MA_BA5 = vbYes Then MA_BA5 = 0 MABA5.Caption = "A" End If If MA_BA5 = vbNo Then MA_BA5 = 1 MABA5.Caption = "M" End If End If If MABA5.Caption = "A" Then CBA5.Enabled = False Else CBA5.Enabled = True End If End Sub Private Sub tcpServer_ConnectionRequest(Index As Integer, ByVal requestID As Lon g) If tcpServer(0).State <> sckClosed Then _ tcpServer(0).Close tcpServer(0).Accept requestID End Sub Private Sub tcpServer1_ConnectionRequest(ByVal requestID As Long) If tcpServer1.State <> sckClosed Then _ tcpServer1.Close tcpServer1.Accept requestID End Sub Private Sub tcpServer1_Error(ByVal Number As Integer, Description As String, ByV al Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Bo olean) Timer2.Enabled = False tcpServer1.Close

End Sub Private Sub Timer1_Timer() 'COMANDOS DE ESCRITURA MANUAL-AUTOMATICO status(1) = m_svr.WriteValue(PollHandle(1), 0, MA_BA1) StatusMsg (status(1)) status(2) = m_svr.WriteValue(PollHandle(2), 0, MA_BA2) StatusMsg (status(2)) status(3) = m_svr.WriteValue(PollHandle(3), 0, MA_BA3) StatusMsg (status(3)) status(4) = m_svr.WriteValue(PollHandle(4), 0, MA_BA4) StatusMsg (status(4)) status(5) = m_svr.WriteValue(PollHandle(5), 0, MA_BA5) StatusMsg (status(5)) 'COMANDOS DE ESCRITURA ENCENDER-APAGAR status(6) = m_svr.WriteValue(PollHandle(6), 0, C_BA1) StatusMsg (status(6)) status(7) = m_svr.WriteValue(PollHandle(7), 0, C_BA2) StatusMsg (status(7)) status(8) = m_svr.WriteValue(PollHandle(8), 0, C_BA3) StatusMsg (status(8)) status(9) = m_svr.WriteValue(PollHandle(9), 0, C_BA4) StatusMsg (status(9)) status(10) = m_svr.WriteValue(PollHandle(10), 0, C_BA5) StatusMsg (status(10)) 'LECTURA DE DATOS DE RETROAVIZOS ENCENDIDO-APAGADO status(11) = m_svr.ReadValue(PollHandle(11), 0, temp(11)) Z_BA1 = temp(11) If temp(11) = 1 Then BA1.FillColor = &HC0C0& 'VERDE (ENCENDIDA) Else BA1.FillColor = &H40C0& 'ROJO (APAGADA) End If status(12) = m_svr.ReadValue(PollHandle(12), 0, temp(12)) Z_BA2 = temp(12) If temp(12) = 1 Then BA2.FillColor = &HC0C0& 'VERDE (ENCENDIDA) Else BA2.FillColor = &H40C0& 'ROJO (APAGADA) End If status(13) = m_svr.ReadValue(PollHandle(13), 0, temp(13)) Z_BA3 = temp(13) If temp(13) = 1 Then BA3.FillColor = &HC0C0& 'VERDE (ENCENDIDA) Else BA3.FillColor = &H40C0& 'ROJO (APAGADA) End If status(14) = m_svr.ReadValue(PollHandle(14), 0, temp(14)) Z_BA4 = temp(14) If temp(14) = 1 Then BA4.FillColor = &HC0C0& 'VERDE (ENCENDIDA) Else BA4.FillColor = &H40C0& 'ROJO (APAGADA) End If status(15) = m_svr.ReadValue(PollHandle(15), 0, temp(15)) Z_BA5 = temp(15) If temp(15) = 1 Then BA5.FillColor = &HC0C0& 'VERDE (ENCENDIDA) Else BA5.FillColor = &H40C0& 'ROJO (APAGADA) End If

' LECTURA DE DATOS MODO LOCAL-REMOTO status(16) = m_svr.ReadValue(PollHandle(16), 0, LR_BA1 = temp(16) If temp(16) = 0 Then LBA1.Caption = "L" 'LOCAL MABA1.Enabled = False CBA1.Enabled = False Else LBA1.Caption = "R" 'REMOTO MABA1.Enabled = True If MABA1.Caption = "M" Then CBA1.Enabled = True End If status(17) = m_svr.ReadValue(PollHandle(17), 0, LR_BA2 = temp(17) If temp(17) = 0 Then LBA2.Caption = "L" 'LOCAL MABA2.Enabled = False CBA2.Enabled = False Else LBA2.Caption = "R" 'REMOTO MABA2.Enabled = True If MABA2.Caption = "M" Then CBA2.Enabled = True End If status(18) = m_svr.ReadValue(PollHandle(18), 0, LR_BA3 = temp(18) If temp(18) = 0 Then LBA3.Caption = "L" 'LOCAL MABA3.Enabled = False CBA3.Enabled = False Else LBA3.Caption = "R" 'REMOTO MABA3.Enabled = True If MABA3.Caption = "M" Then CBA3.Enabled = True End If status(19) = m_svr.ReadValue(PollHandle(19), 0, LR_BA4 = temp(19) If temp(19) = 0 Then LBA4.Caption = "L" 'LOCAL MABA4.Enabled = False CBA4.Enabled = False Else LBA4.Caption = "R" 'REMOTO MABA4.Enabled = True If MABA4.Caption = "M" Then CBA4.Enabled = True End If status(20) = m_svr.ReadValue(PollHandle(20), 0, LR_BA5 = temp(20) If temp(20) = 0 Then LBA5.Caption = "L" 'LOCAL MABA5.Enabled = False CBA5.Enabled = False Else LBA5.Caption = "R" 'REMOTO MABA5.Enabled = True If MABA5.Caption = "M" Then CBA5.Enabled = True End If 'INIDCADORES ALARMAS ALTA PRESION DIFERENCIAL status(21) = m_svr.ReadValue(PollHandle(21), 0, PDHA_1A = temp(21) If temp(21) = 0 Then

temp(16))

temp(17))

temp(18))

temp(19))

temp(20))

temp(21))

PDHA1A.BackColor = &HC0C0& 'VERDE DESACTIVADA Else PDHA1A.BackColor = &H40C0& 'ROJO ACTIVADA End If status(22) = m_svr.ReadValue(PollHandle(22), 0, PDHA_1B = temp(22) If temp(22) = 0 Then PDHA1B.BackColor = &HC0C0& 'VERDE DESACTIVADA Else PDHA1B.BackColor = &H40C0& 'ROJO ACTIVADA End If status(23) = m_svr.ReadValue(PollHandle(23), 0, PDHA_2A = temp(23) If temp(23) = 0 Then PDHA2A.BackColor = &HC0C0& 'VERDE DESACTIVADA Else PDHA2A.BackColor = &H40C0& 'ROJO ACTIVADA End If status(24) = m_svr.ReadValue(PollHandle(24), 0, PDHA_2B = temp(24) If temp(24) = 0 Then PDHA2B.BackColor = &HC0C0& 'VERDE DESACTIVADA Else PDHA2B.BackColor = &H40C0& 'ROJO ACTIVADA End If status(25) = m_svr.ReadValue(PollHandle(25), 0, PDHA_3A = temp(25) If temp(25) = 0 Then PDHA3A.BackColor = &HC0C0& 'VERDE DESACTIVADA Else PDHA3A.BackColor = &H40C0& 'ROJO ACTIVADA End If status(26) = m_svr.ReadValue(PollHandle(26), 0, PDHA_3B = temp(26) If temp(26) = 0 Then PDHA3B.BackColor = &HC0C0& 'VERDE DESACTIVADA Else PDHA3B.BackColor = &H40C0& 'ROJO ACTIVADA End If status(27) = m_svr.ReadValue(PollHandle(27), 0, PDHA_4A = temp(27) If temp(27) = 0 Then PDHA4A.BackColor = &HC0C0& 'VERDE DESACTIVADA Else PDHA4A.BackColor = &H40C0& 'ROJO ACTIVADA End If status(28) = m_svr.ReadValue(PollHandle(28), 0, PDHA_4B = temp(28) If temp(28) = 0 Then PDHA4B.BackColor = &HC0C0& 'VERDE DESACTIVADA Else PDHA4B.BackColor = &H40C0& 'ROJO ACTIVADA End If status(29) = m_svr.ReadValue(PollHandle(29), 0, PDHA_5A = temp(29) If temp(29) = 0 Then PDHA5A.BackColor = &HC0C0& 'VERDE DESACTIVADA Else PDHA5A.BackColor = &H40C0& 'ROJO ACTIVADA End If

temp(22))

temp(23))

temp(24))

temp(25))

temp(26))

temp(27))

temp(28))

temp(29))

status(30) = m_svr.ReadValue(PollHandle(30), 0, temp(30)) PDHA_5B = temp(30) If temp(30) = 0 Then PDHA5B.BackColor = &HC0C0& 'VERDE DESACTIVADA Else PDHA5B.BackColor = &H40C0& 'ROJO ACTIVADA End If ' INSTRUMENTOS ANALOGICOS status(31) = m_svr.ReadValue(PollHandle(31), 0, temp(31)) LI01.Caption = temp(31) LI_01 = temp(31) If temp(31) = 100 Then LI1.Height = 0 If temp(31) = 99 Then LI1.Height = 18.15 If temp(31) = 98 Then LI1.Height = 36.3 If temp(31) = 97 Then LI1.Height = 54.45 If temp(31) = 96 Then LI1.Height = 72.6 If temp(31) = 95 Then LI1.Height = 99.8 If temp(31) = 94 Then LI1.Height = 108.8 If temp(31) = 93 Then LI1.Height = 120 If temp(31) = 92 Then LI1.Height = 145.1 If temp(31) = 91 Then LI1.Height = 160 If temp(31) = 90 Then LI1.Height = 181.4 If temp(31) = 89 Then LI1.Height = 195 If temp(31) = 88 Then LI1.Height = 217.7 If temp(31) = 87 Then LI1.Height = 245 If temp(31) = 86 Then LI1.Height = 254 If temp(31) = 85 Then LI1.Height = 275 If temp(31) = 84 Then LI1.Height = 290.3 If temp(31) = 83 Then LI1.Height = 310 If temp(31) = 82 Then LI1.Height = 326.6 If temp(31) = 81 Then LI1.Height = 345 If temp(31) = 80 Then LI1.Height = 362.9 If temp(31) = 79 Then LI1.Height = 380 If temp(31) = 78 Then LI1.Height = 399.2 If temp(31) = 77 Then LI1.Height = 415 If temp(31) = 76 Then LI1.Height = 435.5 If temp(31) = 75 Then LI1.Height = 455 If temp(31) = 74 Then LI1.Height = 471.8 If temp(31) = 73 Then LI1.Height = 486 If temp(31) = 72 Then LI1.Height = 508.1 If temp(31) = 71 Then LI1.Height = 530 If temp(31) = 70 Then LI1.Height = 544.4 If temp(31) = 69 Then LI1.Height = 555 If temp(31) = 68 Then LI1.Height = 580.7 If temp(31) = 67 Then LI1.Height = 600 If temp(31) = 66 Then LI1.Height = 617 If temp(31) = 65 Then LI1.Height = 635 If temp(31) = 64 Then LI1.Height = 653.3 If temp(31) = 63 Then LI1.Height = 679 If temp(31) = 62 Then LI1.Height = 689.6 If temp(31) = 61 Then LI1.Height = 710 If temp(31) = 60 Then LI1.Height = 725.9 If temp(31) = 59 Then LI1.Height = 743 If temp(31) = 58 Then LI1.Height = 762.2 If temp(31) = 57 Then LI1.Height = 778 If temp(31) = 56 Then LI1.Height = 798.5 If temp(31) = 55 Then LI1.Height = 812 If temp(31) = 54 Then LI1.Height = 834.8 If temp(31) = 53 Then LI1.Height = 852 If temp(31) = 52 Then LI1.Height = 871.1

If temp(31) = 51 Then LI1.Height = 891 If temp(31) = 50 Then LI1.Height = 907.4 If temp(31) = 49 Then LI1.Height = 920 If temp(31) = 48 Then LI1.Height = 943.7 If temp(31) = 47 Then LI1.Height = 960 If temp(31) = 46 Then LI1.Height = 980 If temp(31) = 45 Then LI1.Height = 1000 If temp(31) = 44 Then LI1.Height = 1016.3 If temp(31) = 43 Then LI1.Height = 1036 If temp(31) = 42 Then LI1.Height = 1052.6 If temp(31) = 41 Then LI1.Height = 1068 If temp(31) = 40 Then LI1.Height = 1088.9 If temp(31) = 39 Then LI1.Height = 1100 If temp(31) = 38 Then LI1.Height = 1125.2 If temp(31) = 37 Then LI1.Height = 1145 If temp(31) = 36 Then LI1.Height = 1161.5 If temp(31) = 35 Then LI1.Height = 1180 If temp(31) = 34 Then LI1.Height = 1197.8 If temp(31) = 33 Then LI1.Height = 1210 If temp(31) = 32 Then LI1.Height = 1234.1 If temp(31) = 31 Then LI1.Height = 1250 If temp(31) = 30 Then LI1.Height = 1270.4 If temp(31) = 29 Then LI1.Height = 1285 If temp(31) = 28 Then LI1.Height = 1306.7 If temp(31) = 27 Then LI1.Height = 1320 If temp(31) = 26 Then LI1.Height = 1343 If temp(31) = 25 Then LI1.Height = 1360 If temp(31) = 24 Then LI1.Height = 1379.3 If temp(31) = 23 Then LI1.Height = 1395 If temp(31) = 22 Then LI1.Height = 1415.6 If temp(31) = 21 Then LI1.Height = 1430 If temp(31) = 20 Then LI1.Height = 1451.9 If temp(31) = 19 Then LI1.Height = 1466 If temp(31) = 18 Then LI1.Height = 1488.2 If temp(31) = 17 Then LI1.Height = 1505 If temp(31) = 16 Then LI1.Height = 1524.5 If temp(31) = 15 Then LI1.Height = 1545 If temp(31) = 14 Then LI1.Height = 1560.8 If temp(31) = 13 Then LI1.Height = 1578 If temp(31) = 12 Then LI1.Height = 1597.1 If temp(31) = 11 Then LI1.Height = 1610 If temp(31) = 10 Then LI1.Height = 1633.4 If temp(31) = 9 Then LI1.Height = 1650 If temp(31) = 8 Then LI1.Height = 1669.7 If temp(31) = 7 Then LI1.Height = 1691 If temp(31) = 6 Then LI1.Height = 1706 If temp(31) = 5 Then LI1.Height = 1720 If temp(31) = 4 Then LI1.Height = 1742.3 If temp(31) = 3 Then LI1.Height = 1764 If temp(31) = 2 Then LI1.Height = 1778.6 If temp(31) = 1 Then LI1.Height = 1800 If temp(31) = 0 Then LI1.Height = 1815 status(32) = m_svr.ReadValue(PollHandle(32), 0, temp(32)) LI02.Caption = temp(32) LI_02 = temp(32) If temp(32) = 100 Then LI2.Height = 0 If temp(32) = 99 Then LI2.Height = 18.15 If temp(32) = 98 Then LI2.Height = 36.3 If temp(32) = 97 Then LI2.Height = 54.45 If temp(32) = 96 Then LI2.Height = 72.6

If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If If

temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32) temp(32)

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36

Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then Then

LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height LI2.Height

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

99.8 108.8 120 145.1 160 181.4 195 217.7 245 254 275 290.3 310 326.6 345 362.9 380 399.2 415 435.5 455 471.8 486 508.1 530 544.4 555 580.7 600 617 635 653.3 679 689.6 710 725.9 743 762.2 778 798.5 812 834.8 852 871.1 891 907.4 920 943.7 960 980 1000 1016.3 1036 1052.6 1068 1088.9 1100 1125.2 1145 1161.5

If temp(32) = 35 Then LI2.Height = 1180 If temp(32) = 34 Then LI2.Height = 1197.8 If temp(32) = 33 Then LI2.Height = 1210 If temp(32) = 32 Then LI2.Height = 1234.1 If temp(32) = 31 Then LI2.Height = 1250 If temp(32) = 30 Then LI2.Height = 1270.4 If temp(32) = 29 Then LI2.Height = 1285 If temp(32) = 28 Then LI2.Height = 1306.7 If temp(32) = 27 Then LI2.Height = 1320 If temp(32) = 26 Then LI2.Height = 1343 If temp(32) = 25 Then LI2.Height = 1360 If temp(32) = 24 Then LI2.Height = 1379.3 If temp(32) = 23 Then LI2.Height = 1395 If temp(32) = 22 Then LI2.Height = 1415.6 If temp(32) = 21 Then LI2.Height = 1430 If temp(32) = 20 Then LI2.Height = 1451.9 If temp(32) = 19 Then LI2.Height = 1466 If temp(32) = 18 Then LI2.Height = 1488.2 If temp(32) = 17 Then LI2.Height = 1505 If temp(32) = 16 Then LI2.Height = 1524.5 If temp(32) = 15 Then LI2.Height = 1545 If temp(32) = 14 Then LI2.Height = 1560.8 If temp(32) = 13 Then LI2.Height = 1578 If temp(32) = 12 Then LI2.Height = 1597.1 If temp(32) = 11 Then LI2.Height = 1610 If temp(32) = 10 Then LI2.Height = 1633.4 If temp(32) = 9 Then LI2.Height = 1650 If temp(32) = 8 Then LI2.Height = 1669.7 If temp(32) = 7 Then LI2.Height = 1691 If temp(32) = 6 Then LI2.Height = 1706 If temp(32) = 5 Then LI2.Height = 1720 If temp(32) = 4 Then LI2.Height = 1742.3 If temp(32) = 3 Then LI2.Height = 1764 If temp(32) = 2 Then LI2.Height = 1778.6 If temp(32) = 1 Then LI2.Height = 1800 If temp(32) = 0 Then LI2.Height = 1815 status(33) = m_svr.ReadValue(PollHandle(33), 0, temp(33)) StatusMsg (status(33)) FI01.Caption = temp(33) FI_01 = temp(33) status(34) = m_svr.ReadValue(PollHandle(34), 0, temp(34)) StatusMsg (status(34)) PI01.Caption = temp(34) PI_01 = temp(34) status(35) = m_svr.ReadValue(PollHandle(35), 0, temp(35)) StatusMsg (status(35)) TI01.Caption = temp(35) TI_01 = temp(35) End Sub Private Sub Timer2_Timer() If MA_BA1 = 0 Then C1 = "0" If MA_BA1 = 1 Then C1 = "1" If MA_BA2 = 0 Then C2 = "0" If MA_BA2 = 1 Then C2 = "1" If MA_BA3 = 0 Then C3 = "0" If MA_BA3 = 1 Then C3 = "1" If MA_BA4 = 0 Then C4 = "0" If MA_BA4 = 1 Then C4 = "1" If MA_BA5 = 0 Then C5 = "0" If MA_BA5 = 1 Then C5 = "1"

If C_BA1 = 0 Then C6 = "0" If C_BA1 = 1 Then C6 = "1" If C_BA2 = 0 Then C7 = "0" If C_BA2 = 1 Then C7 = "1" If C_BA3 = 0 Then C8 = "0" If C_BA3 = 1 Then C8 = "1" If C_BA4 = 0 Then C9 = "0" If C_BA4 = 1 Then C9 = "1" If C_BA5 = 0 Then C10 = "0" If C_BA5 = 1 Then C10 = "1" If Z_BA1 = 0 Then C11 = "0" If Z_BA1 = 1 Then C11 = "1" If Z_BA2 = 0 Then C12 = "0" If Z_BA2 = 1 Then C12 = "1" If Z_BA3 = 0 Then C13 = "0" If Z_BA3 = 1 Then C13 = "1" If Z_BA4 = 0 Then C14 = "0" If Z_BA4 = 1 Then C14 = "1" If Z_BA5 = 0 Then C15 = "0" If Z_BA5 = 1 Then C15 = "1" If LR_BA1 = 0 Then C16 = "0" If LR_BA1 = 1 Then C16 = "1" If LR_BA2 = 0 Then C17 = "0" If LR_BA2 = 1 Then C17 = "1" If LR_BA3 = 0 Then C18 = "0" If LR_BA3 = 1 Then C18 = "1" If LR_BA4 = 0 Then C19 = "0" If LR_BA4 = 1 Then C19 = "1" If LR_BA5 = 0 Then C20 = "0" If LR_BA5 = 1 Then C20 = "1" If PDHA_1A = 0 Then C21 = "0" If PDHA_1A = 1 Then C21 = "1" If PDHA_1B = 0 Then C22 = "0" If PDHA_1B = 1 Then C22 = "1" If PDHA_2A = 0 Then C23 = "0" If PDHA_2A = 1 Then C23 = "1" If PDHA_2B = 0 Then C24 = "0" If PDHA_2B = 1 Then C24 = "1" If PDHA_3A = 0 Then C25 = "0" If PDHA_3A = 1 Then C25 = "1" If PDHA_3B = 0 Then C26 = "0" If PDHA_3B = 1 Then C26 = "1" If PDHA_4A = 0 Then C27 = "0" If PDHA_4A = 1 Then C27 = "1" If PDHA_4B = 0 Then C28 = "0" If PDHA_4B = 1 Then C28 = "1" If PDHA_5A = 0 Then C29 = "0" If PDHA_5A = 1 Then C29 = "1" If PDHA_5B = 0 Then C30 = "0" If PDHA_5B = 1 Then C30 = "1" C31 = Str(LI_01) C32 = Str(LI_02) C33 = Str(FI_01) C34 = Str(PI_01) C35 = Str(TI_01) C31 = Str(LI_01) MENSAJE = C1 + C2 + C3 + C4 + C5 + C6 + C7 + C8 + C9 + C10 + C11 + C12 + C13 + C 14 + C15 + C16 + C17 + C18 + C19 + C20 + C21 + C22 + C23 + C24 + C25 + C26 + C27 + C28 + C29 + C30 + C31 + C3 2 + C33 + C34 + C35

Text1.Text = MENSAJE tcpServer1.SendData MENSAJE End Sub

You might also like