Scale reggex nightmare
Why oh why is this so hard.
I am trying to connect CAS ER Plus scale that uses Samsung stable protocol but i am unable to get it right with the reading mask:
?????????(?:(?<Weight>\.?\d+(?:\x2E\d+)?))
This is what scale sends:
s<STX>S 0.400kg
Can a kind soul give me a light at the end of the tunnel ?
0
-
Not got a device to test with but shouldn't the pattern be something like
s\x02S\x20???????
0 -
I got it to work with only (?:(?<Weight>\.?\d+(?:\x2E\d+)?)) but reading gets very erratic, it gives right weight but at 1/3 of the time it jumps to 0 weight. On other software's it works fine.
0
Please sign in to leave a comment.
Comments
2 comments