Sub lcd_cevap_NewData (buffer() As Byte)
    Dim hmi_txt As String=""
    Dim fn As String=""
    Dim ds As String=""
    Dim by As Int=0
    Dim cnt,i As Int=0
    Dim ne As Byte
    beat.Enabled=False
    hmi_txt=byc.HexFromBytes(buffer)
    cnt=hmi_txt.Length
    ne=buffer(0)
    'wh=buffer(1)
    If ne=0x70 Then  ' string header , for exp textbox or your any va variable text
        For i= 5 To cnt Step 2
            ds=s.Mid(hmi_txt,i,2)
           
            If ds="-1" Then
                file_status=False
                ne=0
                Exit
            End If
            by=Bit.ParseInt(ds, 16)
            If by=Asc("@") Then
               ne=buffer(1)
               Exit
            End If
            by=Bit.ParseInt(ds, 16)
            fn=fn & Chr(by)
        Next
    End If
   
    Select ne
        Case 0
            LogDebug(" dosya hatasi")
        Case 0x65   'command header  
                 kayit_kapat
                 LogDebug("dosya kapandi")
                 Exit
        Case 0x3C '  button component ID
            If file_status=False Then
                hmi_txt=fn & ".xls"
                LogDebug("FN : " & fn)
                file_status=True
                create_excel_file(hmi_txt)
                'hmi_txt_wr("t10.txt",hmi_txt)
                'beat.Enabled=True
                Exit
            End If
        Case 0x25
            If file_status=False Then
                LogDebug("FN : " & fn)
                saat_guncelle(fn)
                Exit
            End If
    End Select
    beat.Enabled=True
End Sub