Sign in to follow this  
Followers 0
jcurado

Help with RSLogix 5000

6 posts in this topic

Hello I'm doing my first AB project with RSLogix 5000. In the PLCs I'm used to, there is a flag that togles every 50ms that I can use for adding values to a index. Is there the same type of flag in AB? The image shows what I try to do. Will this work, or I have to call the routine 12 times with diferent parameters? Thak you João Edited by jcurado

Share this post


Link to post
Share on other sites
The subroutine will be called once every program scan with an index 1 to 12, so it will take 12 program scans to service the complete array. If you want to do it all in one scan, you can loop using a conditional jump back to the 1st rung.

Share this post


Link to post
Share on other sites
Thank you I manage to make this work as needed. Can anyone tell me if there is such a flag, that changes evry 50ms (Like the Modicon Premium %S5, and %S6, for those know that PLC). Thank's João

Share this post


Link to post
Share on other sites
RSLogix 5000 doesn't have "flasher" bits like many older PLC platforms had. You could make your own from the free-running system clock, but I don't think it's worth the trouble. There are two easy ways to make things run "periodically" in RSLogix 5000. The first, and most accurate, is to put the routines you want into a Periodic Task. You can set the repeat rate for almost anything you want. This is great for equations that rely on an accurate calculation interval (like PID). The second is to simply use a self-resetting timer: XIO timer.dn TON timer 50 0 the timer.dn bit will be on for one program scan every 50 milliseconds.

Share this post


Link to post
Share on other sites
You should also look into the other comparison instructions; EQU, NEQ, LES, GRT, GEQ, and LEQ all execute faster than the CMP Comparison instruction does. Also take a look at how the FOR / NEXT instructions work in Logix. They are a great way to call a subroutine with an index, with little extra fuss.

Share this post


Link to post
Share on other sites
Thank you Ken It is in fact my first program in AB, so any help is wellcome. I use mostely Schneider's Premiums and Micros, Siemens and Omron, but I must admit that I'm loving RSLogix 5000. João

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
Sign in to follow this  
Followers 0