Zum Hauptinhalt gehen

Suche

Suche

Convert String to Hexadecimal for RFID

Kommentare

2 Kommentare

  • Avatar
    Peter Thane

    Hi Andrew,

    Your hex string in line 2 is incorrect as you have an extra 50 (P) in the string after the first Y (59).

    You need to convert the string to Ascii and then to hex and then set the filed add the Truncation > minimum 24 pad with 0 to the right.

    Depending on where the data is coming from you may need to use and Event Controlled Script but for my code below i added a field that I call TheBaseData and entered the 1PYKY459O to that.

    My VB is

    Value = Format.NamedSubStrings("TheBaseData").Value

    Value1 = Len(Value)

    For i = 1 To Value1
    Value2 = Value2 & Hex(CStr(Asc(Mid(Value, i, 1))))
    Next

    Value = Value2

    I hope this helps

     

    1
  • Avatar
    Roderick Bolt

    Thanks for this, can the same be done with GS1 Application Identifiers? GS1 have their own EPC Hexadecimal Encoder/Decoder, but I want everything to be embedded into Bartender.

    https://www.gs1.org/services/epc-encoderdecoder

    Is Bartender able to do something the same?

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.