I have an array of ASCII codes coming from a PLC into Ignition - this corresponds to a string in the PLC. I am doing the following:
VALUES = [list of ASCII codes]
S = ''.join(chr(v) for v in VALUES)
test_string = [string equivalent to S]
This always returns False, even though S and test_string are type (str) and clearly the same. I think this has something to with chr() and Unicode vs. String, but I don't really know what I'm talking about here.
My goal is to compare the incoming "string" with a predefined reference string - could someone please point me in the right direction on this? I would prefer not decompose the reference string into ASCII characters and compare the arrays, but I will if it's the only way...