justacoder

MrPLC Member
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About justacoder

  • Rank
    Hi, I am New!

Contact Methods

  • ICQ 0
  1. ASCII Conversion

    Just thought I would supply an example. The string I am reading in looks like this: 0184191A001C In the real world, this is a HEX code It is ASCII (String) once in the ControlLogix. I need to break the string into this: 01 84 19 1A 00 1C I need to convert each 2 digits to HEX and add them together, appending the sum to the end of the orginial string, and send it all back out again. Remember, although the string is coming into the PLC as ASCII, they represent HEX numbers.
  2. I am reading in a 12 digit ASCII string from a barcode scanner to CH0 of a Controllogix. I need to convert every pair of digits in this 12 character string to HEX and then add them together. The string consists of letters and numbers (which rules out the STOD instruction). Is there a quick way to convert the ASCII data in to HEX, add the HEX values, and send the orginial ASCII string with 4 appended HEX values (the result of the addition, could be letters and/or numbers) back out CH0?