Skip to content

String Data Byte Swap in PLC Collector

Correct the byte order of string data collected from a PLC so that strings stored in the PLC can be handled in the expected order.

  • Why strings collected from a PLC may appear with swapped characters or garbled text
  • How to configure the Byte swap setting in PLC Collector
  • The difference between collected strings when Byte swap is enabled and disabled

Collect the following string data from the PLC and retrieve each value as the expected string.

Data nameAddressExpected value
lot_numberD000012345678
model_codeD0010ABCD
station_nameD0020LINE01TEST
unicode_textD0030😀
  • PLC Collector (data collection)
  1. Collect the following string data with PLC Collector:
    • lot_number (D0000)
    • model_code (D0010)
    • station_name (D0020)
    • unicode_text (D0030)
  1. Enter the connection settings for PLC Collector.

  2. Configure the string data to collect. Add lot_number (D0000), model_code (D0010), station_name (D0020), and unicode_text (D0030), and turn Byte swap ON for each data item.

  3. Save the settings and start PLC Collector.

Check the string data collected by PLC Collector. When Byte swap was OFF, the strings were collected with swapped characters or garbled text.

By turning Byte swap ON, the byte order of the string data is corrected, and the expected strings can be collected correctly.