zach_zachary1@yahoo.com

RS Logix 5000 New Subroutine

8 posts in this topic

I recently added some very simple logic to a large PLC program I have running on L-7 processor.  It is basically just a elapsed time meter for some odor control fans. For organizational sake I added a new subroutine and called it Run_Times.  Under Main Program for that file I added a JSR and named it Run_Times.  My problem is that the logic is not active.  The tags are good and I see a 1 on the motor running status but the accumulator is just sitting there. 

 

Any ideas?

1 person likes this

Share this post


Link to post
Share on other sites

Not really, can you send a screenshot of what you have?

Share this post


Link to post
Share on other sites

It must not be scanning that routine.  Is everything else, that was previously there, working correctly?  Did you add a "return" instruction at the end of your new subroutine?

Edited by hboyer90

Share this post


Link to post
Share on other sites

Also, did you make just a new routine in your main program?  Or did you make a new program or possibly a new task?

1 person likes this

Share this post


Link to post
Share on other sites

My bet is the JSR isn't in Main

Share this post


Link to post
Share on other sites

Everything else is working correctly.

Its function block.

I added the new subroutine under a task specific for odor control.

The JSR function block is in Main under Task Odor Control

Share this post


Link to post
Share on other sites

This is where I leave you, I have 0 experience with function block.  I'm sure someone else can help though.

Good luck!

Share this post


Link to post
Share on other sites
On 3/1/2016 at 3:56 PM, zach_zachary1@yahoo.com said:

Everything else is working correctly.

Its function block.

I added the new subroutine under a task specific for odor control.

The JSR function block is in Main under Task Odor Control

Lost my bet...

Ok... are you using an AOI that you or someone built or "factory blocks"

Are Enable In and Enable Out both true?

Under Program Properties of Task Odor Control (right click, Program Properties), Configuration tab, is Main selected? Inhibit not checked (doubt this is it because it sounds like other ligic is running)? Under the Monitor tab is the scan time "moving"

It's hard to troubleshoot without the program but those are my best guesses from looking at the function block stuff that I use

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