VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "SmartDEN Logger"
   ClientHeight    =   9435
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   6270
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   9435
   ScaleWidth      =   6270
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame Frame1 
      Caption         =   "Settings"
      Height          =   2175
      Left            =   3000
      TabIndex        =   112
      Top             =   7200
      Width           =   3135
      Begin VB.TextBox ipTextBox 
         Height          =   285
         Left            =   1440
         TabIndex        =   116
         Text            =   "88.87.18.249"
         Top             =   360
         Width           =   1455
      End
      Begin VB.TextBox portTextBox 
         Height          =   285
         Left            =   1440
         TabIndex        =   115
         Text            =   "8161"
         Top             =   720
         Width           =   1455
      End
      Begin VB.TextBox passwordTextBox 
         Height          =   285
         Left            =   1440
         TabIndex        =   114
         Text            =   "admin"
         Top             =   1080
         Width           =   1455
      End
      Begin VB.CommandButton refreshButton 
         Caption         =   "Refresh"
         Height          =   615
         Left            =   240
         TabIndex        =   113
         Top             =   1440
         Width           =   2655
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         Caption         =   "IP"
         Height          =   255
         Left            =   600
         TabIndex        =   119
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label2 
         Alignment       =   1  'Right Justify
         Caption         =   "Port"
         Height          =   255
         Left            =   600
         TabIndex        =   118
         Top             =   720
         Width           =   735
      End
      Begin VB.Label Label3 
         Alignment       =   1  'Right Justify
         Caption         =   "Password"
         Height          =   255
         Left            =   600
         TabIndex        =   117
         Top             =   1080
         Width           =   735
      End
   End
   Begin VB.Frame digitalInFrame 
      Caption         =   "Digital Inputs"
      Height          =   3495
      Left            =   120
      TabIndex        =   57
      Top             =   0
      Width           =   6015
      Begin VB.Label Label4 
         Caption         =   "¹"
         Height          =   255
         Left            =   120
         TabIndex        =   111
         Top             =   240
         Width           =   255
      End
      Begin VB.Label Label5 
         Caption         =   "1"
         Height          =   255
         Left            =   120
         TabIndex        =   110
         Top             =   600
         Width           =   255
      End
      Begin VB.Label Label6 
         Caption         =   "2"
         Height          =   255
         Left            =   120
         TabIndex        =   109
         Top             =   960
         Width           =   255
      End
      Begin VB.Label Label7 
         Caption         =   "3"
         Height          =   255
         Left            =   120
         TabIndex        =   108
         Top             =   1320
         Width           =   255
      End
      Begin VB.Label Label8 
         Caption         =   "4"
         Height          =   255
         Left            =   120
         TabIndex        =   107
         Top             =   1680
         Width           =   255
      End
      Begin VB.Label Label9 
         Caption         =   "5"
         Height          =   255
         Left            =   120
         TabIndex        =   106
         Top             =   2040
         Width           =   375
      End
      Begin VB.Label Label10 
         Caption         =   "6"
         Height          =   255
         Left            =   120
         TabIndex        =   105
         Top             =   2400
         Width           =   255
      End
      Begin VB.Label Label11 
         Caption         =   "7"
         Height          =   255
         Left            =   120
         TabIndex        =   104
         Top             =   2760
         Width           =   255
      End
      Begin VB.Label Label12 
         Caption         =   "8"
         Height          =   255
         Left            =   120
         TabIndex        =   103
         Top             =   3120
         Width           =   255
      End
      Begin VB.Label Label13 
         Alignment       =   2  'Center
         Caption         =   "Name"
         Height          =   255
         Left            =   360
         TabIndex        =   102
         Top             =   240
         Width           =   975
      End
      Begin VB.Label Label14 
         Alignment       =   2  'Center
         Caption         =   "Value"
         Height          =   255
         Left            =   1560
         TabIndex        =   101
         Top             =   240
         Width           =   855
      End
      Begin VB.Label Label16 
         Caption         =   "¹"
         Height          =   255
         Left            =   3120
         TabIndex        =   100
         Top             =   240
         Width           =   255
      End
      Begin VB.Label Label17 
         Caption         =   "9"
         Height          =   255
         Left            =   3120
         TabIndex        =   99
         Top             =   600
         Width           =   255
      End
      Begin VB.Label Label18 
         Caption         =   "10"
         Height          =   255
         Left            =   3120
         TabIndex        =   98
         Top             =   960
         Width           =   255
      End
      Begin VB.Label Label19 
         Caption         =   "11"
         Height          =   255
         Left            =   3120
         TabIndex        =   97
         Top             =   1320
         Width           =   255
      End
      Begin VB.Label Label20 
         Caption         =   "12"
         Height          =   255
         Left            =   3120
         TabIndex        =   96
         Top             =   1680
         Width           =   255
      End
      Begin VB.Label Label21 
         Caption         =   "13"
         Height          =   255
         Left            =   3120
         TabIndex        =   95
         Top             =   2040
         Width           =   375
      End
      Begin VB.Label Label22 
         Caption         =   "14"
         Height          =   255
         Left            =   3120
         TabIndex        =   94
         Top             =   2400
         Width           =   255
      End
      Begin VB.Label Label23 
         Caption         =   "15"
         Height          =   255
         Left            =   3120
         TabIndex        =   93
         Top             =   2760
         Width           =   255
      End
      Begin VB.Label Label24 
         Caption         =   "16"
         Height          =   255
         Left            =   3120
         TabIndex        =   92
         Top             =   3120
         Width           =   255
      End
      Begin VB.Label Label25 
         Alignment       =   2  'Center
         Caption         =   "Name"
         Height          =   255
         Left            =   3600
         TabIndex        =   91
         Top             =   240
         Width           =   975
      End
      Begin VB.Label Label26 
         Alignment       =   2  'Center
         Caption         =   "Value"
         Height          =   255
         Left            =   4800
         TabIndex        =   90
         Top             =   240
         Width           =   855
      End
      Begin VB.Label diName1 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   89
         Top             =   600
         Width           =   975
      End
      Begin VB.Label diValue1 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   88
         Top             =   600
         Width           =   975
      End
      Begin VB.Label diName2 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   87
         Top             =   960
         Width           =   975
      End
      Begin VB.Label diValue2 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   86
         Top             =   960
         Width           =   975
      End
      Begin VB.Label diName3 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   85
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label diValue3 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   84
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label diName4 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   83
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label diValue4 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   82
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label diName5 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   81
         Top             =   2040
         Width           =   975
      End
      Begin VB.Label diValue5 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   80
         Top             =   2040
         Width           =   975
      End
      Begin VB.Label diName6 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   79
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label diValue6 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   78
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label diName7 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   77
         Top             =   2760
         Width           =   975
      End
      Begin VB.Label diValue7 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   76
         Top             =   2760
         Width           =   975
      End
      Begin VB.Label diName8 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   75
         Top             =   3120
         Width           =   975
      End
      Begin VB.Label diValue8 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   74
         Top             =   3120
         Width           =   975
      End
      Begin VB.Label diName9 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   3600
         TabIndex        =   73
         Top             =   600
         Width           =   975
      End
      Begin VB.Label diValue9 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   4800
         TabIndex        =   72
         Top             =   600
         Width           =   975
      End
      Begin VB.Label diName10 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   3600
         TabIndex        =   71
         Top             =   960
         Width           =   975
      End
      Begin VB.Label diValue10 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   4800
         TabIndex        =   70
         Top             =   960
         Width           =   975
      End
      Begin VB.Label diName11 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   3600
         TabIndex        =   69
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label diValue11 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   4800
         TabIndex        =   68
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label diName12 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   3600
         TabIndex        =   67
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label diValue12 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   4800
         TabIndex        =   66
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label diName13 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   3600
         TabIndex        =   65
         Top             =   2040
         Width           =   975
      End
      Begin VB.Label diValue13 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   4800
         TabIndex        =   64
         Top             =   2040
         Width           =   975
      End
      Begin VB.Label diName14 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   3600
         TabIndex        =   63
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label diValue14 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   4800
         TabIndex        =   62
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label diName15 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   3600
         TabIndex        =   61
         Top             =   2760
         Width           =   975
      End
      Begin VB.Label diValue15 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   4800
         TabIndex        =   60
         Top             =   2760
         Width           =   975
      End
      Begin VB.Label diName16 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   3600
         TabIndex        =   59
         Top             =   3120
         Width           =   975
      End
      Begin VB.Label diValue16 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   4800
         TabIndex        =   58
         Top             =   3120
         Width           =   975
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "Analog Inputs"
      Height          =   3495
      Left            =   120
      TabIndex        =   29
      Top             =   3600
      Width           =   3015
      Begin VB.Label Label28 
         Caption         =   "¹"
         Height          =   255
         Left            =   120
         TabIndex        =   56
         Top             =   240
         Width           =   255
      End
      Begin VB.Label Label29 
         Caption         =   "1"
         Height          =   255
         Left            =   120
         TabIndex        =   55
         Top             =   600
         Width           =   255
      End
      Begin VB.Label Label30 
         Caption         =   "2"
         Height          =   255
         Left            =   120
         TabIndex        =   54
         Top             =   960
         Width           =   255
      End
      Begin VB.Label Label31 
         Caption         =   "3"
         Height          =   255
         Left            =   120
         TabIndex        =   53
         Top             =   1320
         Width           =   255
      End
      Begin VB.Label Label32 
         Caption         =   "4"
         Height          =   255
         Left            =   120
         TabIndex        =   52
         Top             =   1680
         Width           =   255
      End
      Begin VB.Label Label33 
         Caption         =   "5"
         Height          =   255
         Left            =   120
         TabIndex        =   51
         Top             =   2040
         Width           =   375
      End
      Begin VB.Label Label34 
         Caption         =   "6"
         Height          =   255
         Left            =   120
         TabIndex        =   50
         Top             =   2400
         Width           =   255
      End
      Begin VB.Label Label35 
         Caption         =   "7"
         Height          =   255
         Left            =   120
         TabIndex        =   49
         Top             =   2760
         Width           =   255
      End
      Begin VB.Label Label36 
         Caption         =   "8"
         Height          =   255
         Left            =   120
         TabIndex        =   48
         Top             =   3120
         Width           =   255
      End
      Begin VB.Label Label37 
         Alignment       =   2  'Center
         Caption         =   "Name"
         Height          =   255
         Left            =   360
         TabIndex        =   47
         Top             =   240
         Width           =   975
      End
      Begin VB.Label Label38 
         Alignment       =   2  'Center
         Caption         =   "Value"
         Height          =   255
         Left            =   1560
         TabIndex        =   46
         Top             =   240
         Width           =   855
      End
      Begin VB.Label aiName1 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   45
         Top             =   600
         Width           =   975
      End
      Begin VB.Label aiValue1 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   44
         Top             =   600
         Width           =   975
      End
      Begin VB.Label aiName2 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   43
         Top             =   960
         Width           =   975
      End
      Begin VB.Label aiValue2 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   42
         Top             =   960
         Width           =   975
      End
      Begin VB.Label aiName3 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   41
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label aiValue3 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   40
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label aiName4 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   39
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label aiValue4 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   38
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label aiName5 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   37
         Top             =   2040
         Width           =   975
      End
      Begin VB.Label aiValue5 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   36
         Top             =   2040
         Width           =   975
      End
      Begin VB.Label aiName6 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   35
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label aiValue6 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   34
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label aiName7 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   33
         Top             =   2760
         Width           =   975
      End
      Begin VB.Label aiValue7 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   32
         Top             =   2760
         Width           =   975
      End
      Begin VB.Label aiName8 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   31
         Top             =   3120
         Width           =   975
      End
      Begin VB.Label aiValue8 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   30
         Top             =   3120
         Width           =   975
      End
   End
   Begin VB.Frame Frame3 
      Caption         =   "Temperature Inputs, °C"
      Height          =   3495
      Left            =   3240
      TabIndex        =   1
      Top             =   3600
      Width           =   2895
      Begin VB.Label Label40 
         Caption         =   "¹"
         Height          =   255
         Left            =   120
         TabIndex        =   28
         Top             =   240
         Width           =   255
      End
      Begin VB.Label Label41 
         Caption         =   "1"
         Height          =   255
         Left            =   120
         TabIndex        =   27
         Top             =   600
         Width           =   255
      End
      Begin VB.Label Label42 
         Caption         =   "2"
         Height          =   255
         Left            =   120
         TabIndex        =   26
         Top             =   960
         Width           =   255
      End
      Begin VB.Label Label43 
         Caption         =   "3"
         Height          =   255
         Left            =   120
         TabIndex        =   25
         Top             =   1320
         Width           =   255
      End
      Begin VB.Label Label44 
         Caption         =   "4"
         Height          =   255
         Left            =   120
         TabIndex        =   24
         Top             =   1680
         Width           =   255
      End
      Begin VB.Label Label45 
         Caption         =   "5"
         Height          =   255
         Left            =   120
         TabIndex        =   23
         Top             =   2040
         Width           =   375
      End
      Begin VB.Label Label46 
         Caption         =   "6"
         Height          =   255
         Left            =   120
         TabIndex        =   22
         Top             =   2400
         Width           =   255
      End
      Begin VB.Label Label47 
         Caption         =   "7"
         Height          =   255
         Left            =   120
         TabIndex        =   21
         Top             =   2760
         Width           =   255
      End
      Begin VB.Label Label48 
         Caption         =   "8"
         Height          =   255
         Left            =   120
         TabIndex        =   20
         Top             =   3120
         Width           =   255
      End
      Begin VB.Label Label49 
         Alignment       =   2  'Center
         Caption         =   "Name"
         Height          =   255
         Left            =   360
         TabIndex        =   19
         Top             =   240
         Width           =   975
      End
      Begin VB.Label Label50 
         Alignment       =   2  'Center
         Caption         =   "Value"
         Height          =   255
         Left            =   1560
         TabIndex        =   18
         Top             =   240
         Width           =   855
      End
      Begin VB.Label tiName1 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   17
         Top             =   600
         Width           =   975
      End
      Begin VB.Label tiValue1 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   16
         Top             =   600
         Width           =   975
      End
      Begin VB.Label tiName2 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   15
         Top             =   960
         Width           =   975
      End
      Begin VB.Label tiValue2 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   14
         Top             =   960
         Width           =   975
      End
      Begin VB.Label tiName3 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   13
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label tiValue3 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   12
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label tiName4 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   11
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label tiValue4 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   10
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label tiName5 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   9
         Top             =   2040
         Width           =   975
      End
      Begin VB.Label tiValue5 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   8
         Top             =   2040
         Width           =   975
      End
      Begin VB.Label tiName6 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   7
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label tiValue6 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   6
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label tiName7 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   5
         Top             =   2760
         Width           =   975
      End
      Begin VB.Label tiValue7 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   4
         Top             =   2760
         Width           =   975
      End
      Begin VB.Label tiName8 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   360
         TabIndex        =   3
         Top             =   3120
         Width           =   975
      End
      Begin VB.Label tiValue8 
         Alignment       =   2  'Center
         Height          =   255
         Left            =   1560
         TabIndex        =   2
         Top             =   3120
         Width           =   975
      End
   End
   Begin VB.PictureBox Picture1 
      Height          =   495
      Left            =   360
      Picture         =   "Form1.frx":0CCA
      ScaleHeight     =   435
      ScaleWidth      =   2115
      TabIndex        =   0
      Top             =   7680
      Width           =   2175
   End
   Begin VB.Label statusLabel 
      Alignment       =   2  'Center
      Height          =   495
      Left            =   240
      TabIndex        =   120
      Top             =   8760
      Width           =   2535
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Function httpRequest() As String
    Dim url As String
    url = "http://" + ipTextBox.Text + ":" + portTextBox.Text + "/current_state.xml?pw=" + passwordTextBox.Text
    On Error GoTo ErrHandler
    Dim http As MSXML2.XMLHTTP
    Set http = CreateObject("MSXML2.ServerXMLHTTP")
    http.open "GET", url, False
    http.setRequestHeader "Connection", "close"
    'http.setRequestHeader "Cache-Control", "max-age=0"
    'http.setRequestHeader "Upgrade-Insecure-Requests", "1"
    http.send
    httpRequest = http.responseText
    Set http = Nothing
    statusLabel.Caption = "Success"
    Exit Function
ErrHandler:
    statusLabel.Caption = "Error"
    Set http = Nothing
    httpRequest = ""
End Function

Private Sub refreshButton_Click()
    statusLabel.Caption = "Connecting..."
    DoEvents
    Dim result As String
    result = httpRequest()
    updateValues (result)
End Sub

Sub updateValues(sourceString As String)
    Dim value As String
    Dim posInString As Integer
    Dim delimiter As String
    Dim searchedParameter As String
    delimiter = "</"
    searchedParameter = "Name>"
    posInString = 1
    
    On Error GoTo ErrHandler
    Dim index As Integer
    'Digital Inputs
    For index = 1 To 16
        searchedParameter = "DigitalInput" + CStr(index)
        posInString = InStr(posInString, sourceString, searchedParameter) + Len(searchedParameter)
        searchedParameter = "Name>"
        posInString = InStr(posInString, sourceString, searchedParameter) + Len(searchedParameter)
        value = Mid$(sourceString, posInString)
        Set GetCtlByName = Me.Controls("diName" + CStr(index))
        GetCtlByName.Caption = Left$(value, InStr(value, delimiter) - 1)
        searchedParameter = "Value>"
        posInString = InStr(posInString, sourceString, searchedParameter) + Len(searchedParameter)
        value = Mid$(sourceString, posInString)
        Set GetCtlByName = Me.Controls("diValue" + CStr(index))
        GetCtlByName.Caption = Left$(value, InStr(value, delimiter) - 1)
    Next
    
    'Analog Inputs
    posInString = 1
    For index = 1 To 8
        searchedParameter = "AnalogInput" + CStr(index)
        posInString = InStr(posInString, sourceString, searchedParameter) + Len(searchedParameter)
        searchedParameter = "Name>"
        posInString = InStr(posInString, sourceString, searchedParameter) + Len(searchedParameter)
        value = Mid$(sourceString, posInString)
        Set GetCtlByName = Me.Controls("aiName" + CStr(index))
        GetCtlByName.Caption = Left$(value, InStr(value, delimiter) - 1)
        searchedParameter = "Value>"
        posInString = InStr(posInString, sourceString, searchedParameter) + Len(searchedParameter)
        value = Mid$(sourceString, posInString)
        Set GetCtlByName = Me.Controls("aiValue" + CStr(index))
        GetCtlByName.Caption = Left$(value, InStr(value, delimiter) - 1)
    Next
    
    'Temperature Inputs
    posInString = 1
    For index = 1 To 8
        searchedParameter = "TemperatureInput" + CStr(index)
        posInString = InStr(posInString, sourceString, searchedParameter) + Len(searchedParameter)
        searchedParameter = "Name>"
        posInString = InStr(posInString, sourceString, searchedParameter) + Len(searchedParameter)
        value = Mid$(sourceString, posInString)
        Set GetCtlByName = Me.Controls("tiName" + CStr(index))
        GetCtlByName.Caption = Left$(value, InStr(value, delimiter) - 1)
        searchedParameter = "Value>"
        posInString = InStr(posInString, sourceString, searchedParameter) + Len(searchedParameter)
        value = Mid$(sourceString, posInString)
        Set GetCtlByName = Me.Controls("tiValue" + CStr(index))
        GetCtlByName.Caption = Left$(value, InStr(value, delimiter) - 1)
    Next
    Exit Sub
    
ErrHandler:
    statusLabel.Caption = "Error"
    Set http = Nothing
    userClick = True
End Sub

