MVP 2023 Joe Tauser Posted August 13, 2021 MVP 2023 Report Share Posted August 13, 2021 Now it's programming fun time. See my previous post. Try stacking them up by adding the incoming number to a buffer. If the buffer wasn't 0, multiply it by 10 before you do your addition. Joe T. Link to comment Share on other sites More sharing options...
Tara Posted February 16, 2023 Report Share Posted February 16, 2023 Hi everyone, I'm getting in trouble with RS232 scan protocol Is there any way to prevent the "index of received message" from turning -1 when an incorrect message has been received ? Tara Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted February 16, 2023 MVP 2023 Report Share Posted February 16, 2023 Create an entry in your scan table of one big Stream type variable that will be larger than any message you anticipate receiving. When something comes in that doesn't match your other entries it will land there- I find the pre-defined string / variable entries in the Protocol Scan block to be extremely unpredictable. I do almost everything with a general-purpose string receiver (as shown above) and then sort it out in ladder logic. It's a little more complicated to do it this way but a lot more robust. Joe T. . 1 Link to comment Share on other sites More sharing options...
Tara Posted February 17, 2023 Report Share Posted February 17, 2023 Thanks to you, it seems to work. But I have a question: Does the "incorrect message" when it appears can make my index MI3 equal to 9 or will it only affect MI900? I tested it and it doesn't make MI3=9, but I want to make sure that it won't happen. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now