From HFML-FELIX Wiki
Jump to: navigation, search

Berthold LB5340 radiation logger uses the F2C protocol. The following regex can be used to match and unpack F2C messages:

(?<=\*)(.{4})(.{4})(.{2})(.{2})(.{2})(.{2})(.*)\*(.*)(?=\*)

  • (?<=\*) F2C message starts with asterisk
  • (.{4}) slave address
  • (.{4}) user address
  • (.{2}) PRC
  • (.{2}) MBR
  • (.{2}) TYP
  • (.{2}) ITEM
  • (.*) MASK+DATA
  • \* asterisk
  • (.*) checksum
  • (?=\*) message ends with asterisk