dhuggins88 Posted September 18, 2017 Report Share Posted September 18, 2017 Hello all, I am trying to scroll through active messages in a message center within a Variable: Lists of Texts on the HMI. So say I have 20 messages in the "message center" and it will display the each message or all high bits every 4 seconds. Once it reaches the last active one it will then loop back and start over. I achieved this in a different software using a file bit compare. It compares a reference dint with a value of zero to the test dint. It increments 1 bit at a time and each time it sees a mismatch it stores that number. Is there an eloquent way to do this in visilogic? I am just looking for a pointer on which FB I should use for this. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted September 18, 2017 MVP 2023 Report Share Posted September 18, 2017 There are quite a few Vector Operations functions (including a Vector Compare) available in VisiLogic. Have you reviewed them in the Help file to see if one or more might be useful to your objective? Link to comment Share on other sites More sharing options...
dhuggins88 Posted September 18, 2017 Author Report Share Posted September 18, 2017 I am currently looking through the Vector FB's. The vector compare seems as if it is comparing the entire length of the vector not individual bits. Maybe I am reading it wrong? Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted September 18, 2017 MVP 2023 Report Share Posted September 18, 2017 Check out the EVENTS FB, under the FB menu and see if that would be of help. 1 Link to comment Share on other sites More sharing options...
dhuggins88 Posted September 18, 2017 Author Report Share Posted September 18, 2017 Yes thank you greatly for that! I believe that will work great. I can initiate a scan to find the first active bit then say every 4 or 5 seconds do a next event. The only issue I see is how to define when it needs to loop back once it has reached the end of the vector. It seems there is no done bit per say. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted September 18, 2017 MVP 2023 Report Share Posted September 18, 2017 It's been so many years since I last used that FB that I don't remember the details. Perhaps someone else will chime in, but if not just play with it a bit and you'll figure it out. Link to comment Share on other sites More sharing options...
dhuggins88 Posted September 18, 2017 Author Report Share Posted September 18, 2017 Awesome. You definitely got me in the right direction. Thank you for the help sir! Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted September 18, 2017 MVP 2023 Report Share Posted September 18, 2017 My customer that makes fountains uses Events in every program for monitoring alarms to do exactly what you are trying. If you have any trouble getting it to work post your code and I'll check it out. Joe T. Link to comment Share on other sites More sharing options...
dhuggins88 Posted September 18, 2017 Author Report Share Posted September 18, 2017 10 4 will do. Link to comment Share on other sites More sharing options...
dhuggins88 Posted September 18, 2017 Author Report Share Posted September 18, 2017 Got it setup and working. There is no need for a loopback function in my case because it automatically goes back around to the first active bit in the vector. Super simple!! Again I appreciate it guys. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted September 18, 2017 MVP 2023 Report Share Posted September 18, 2017 Took me a while to remember that EVENTS FB. Glad it helped! Link to comment Share on other sites More sharing options...
Isakovic Posted September 19, 2017 Report Share Posted September 19, 2017 This EVENT block is new to me. Glad I found it. I always used ladder with mesh of timers and indexes to achieve such scrolling through messages. This is much more elegant. Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted September 19, 2017 MVP 2023 Report Share Posted September 19, 2017 18 hours ago, Isakovic said: This EVENT block is new to me. Glad I found it. Couldn't agree more. No matter how many times I have meandered around the program, the forum still brings me useful info I have completely missed. cheers, Aus 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