ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • PDA RF TAG WRITE
    MES/자동화장비 2024. 10. 16. 07:44
    728x90
    반응형

    1. RF TAG용 PDA에서 쓰기...(HEX로 변환 후 )

     

     

            sData = Mid(sData & Space(12), 1, 12)

            WriteData = ""
            '
            For i = 1 To Len(sData)
                WriteData = WriteData & Hex(Asc(Mid(sData, i, 1)))
            Next
            '** RFID **
            ' 해당 메모리 뱅크의 start 번지에 WriteData를 기록한다.

            RFID.AT570UHF_BankSelectWrite AT570UHF_NET.AT570UHF_NET.MEMBANK_CODE.BANK_EPC, start, WriteData)

     

     

    2. RF Tag 읽기 (Read...후 변환)

     

            sData = MemoryData

            If Len(sData) > 4 Then
                TextBox4.Text = Trim(Hex2Chr(Mid(sData, 5)))
                '
                AT570UHF_NET.AT570UHF_NET.PlaySuccess()
                iRead = 1
                TextBox1.Text = ""
                Call LoadData()
            Else
                TextBox4.Text = ""
            End If

     

     

     Public Function Hex2Chr(ByVal sData As String) As String
            '
            Dim sHex As String
            '
            Dim i As Integer

            Dim s1 As String
            Dim s2 As String
            '
            Dim iS1 As Integer
            Dim iS2 As Integer
            '
            Dim iValue As Integer
            sHex = "0123456789ABCDEF"
            '
            Hex2Chr = ""
            '
            For i = 1 To Len(sData) Step 2
                s1 = Mid(sData, i, 1)
                s2 = Mid(sData, i + 1, 1)
                '
                iS1 = (InStr(sHex, s1) - 1) * 16
                iS2 = InStr(sHex, s2) - 1
                '
                iValue = iS1 + iS2
                If iValue >= 32 And iValue <= 126 Then
                    Hex2Chr = Hex2Chr & Chr(iS1 + iS2)
                End If
            Next i
            '
        End Function

     

     

     

    ** AT570, AT870  등에서..사용한 기본 Module

    728x90

    'MES > 자동화장비' 카테고리의 다른 글

    PCIRL  (2) 2024.10.18
    PL8030을 이용한 재고실사 소스  (0) 2024.10.18
    MC7090 간단 매뉴얼  (1) 2024.10.15
    PDA 제어  (0) 2024.10.13
    PDA용 SOCKET PGM  (0) 2024.10.13
Designed by Tistory.