Jump to content
dhuggins88

Automatically Scrolling Through a List of Texts

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
http:///