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. Quote 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 Quote 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 Quote 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.