Keyence SR-L100 message value used in an expression

When I try to create an expression tag using the Message tag from the SR-L device, I get a false value for the expression even if the expression should be true.

If I replace the {[~]SR_L Gallon/9004/Message} tag with a SQL tag that has the same string value as the Message tag, the expression tag will go True.

The expression statement should be the 2 tags shown above in the expression equaling each other

White space issue?

trim(toString({[~]SR_L Gallon/9004/Message})) = trim(toString({Your SQL Tag}))

Other things: \r or \n? Try replace() to see if that does it

It looks the string is 13 characters but your byte array is 14, I would check your delimiter settings in the tcp driver and verify if the device is sending a \n vs \r\n . you can also look in the byte array and see which value is extra.

Thank you.

I did try the trim expression.

I did not have any settings in the TCP driver under Message Delimiter.

I added a \n to fix the issue and kept the trim expression in.

If it working, don't fix it!