RSLogix 500 program

taib1800

Member
Join Date
Sep 2004
Location
Louisville,ky
Posts
8
I have written my first RSLogix 500 program. When the PLC processor is powered up, bit S:1/15 is suposed to be turn on for only the first program scan.
:rolleyes: In my case it is turned on all the time and I am not able to run the rest of my program because it deletes internal memory files all the time. Can anybody please tell me what is wrong.
 
First start with the obvious

Do a cross-reference on S:1/15.
- Are you writing to it anywhere (OTE, OTL, even OSR)?
- What about the word S:1? Any MOV's, COP's or anything like that?

And, just to start looking for the weird stuff, is S:2/3 set?
 
please help

As you can see, I don't have a lot experience. During my first scan I am doing FLL command which erases anything what I had in my B3:0 word.The problem is that it keeps erasing all the time. It looks like the processor doesn't recognize it as command for the first scan. My cross-reference on S:1/15 shows just a 0 for a value.
How do you set S:2/3.

thanks
 
Try to look at the cross reference for both S:1/15 and S:1.
There should be no WRITES to any of these two addresses.

Why do you want to set S:2/3 "allow indexing accros files" ?

You could zip and attach the .rss file and let us have a look at it.
 
Re: please help

taib1800 said:
During my first scan I am doing FLL command which erases anything what I had in my B3:0 word.The problem is that it keeps erasing all the time.

So your logic looks like this:


S:1/15 +--- FLL ------+
----| |-------| Source: 0 |
| Dest: #B3:0 |
| Length: 1 | <<-- May be different
+--------------+


If not (for example, you have -|/|- S:1/15), then you may have a problem with your logic, not the PLC.

My cross-reference on S:1/15 shows just a 0 for a value.

That doesn't sound like a cross-reference, that sounds like a "View Data Table". A cross-reference will show you where in the program S:1/15 is used. (Unless it is only used on Rung 0 of LAD 2, then it may say "0")


How do you set S:2/3.
Don't. Just check under the Main Tab of Processor Status and see if "Index across Data Files" is "No" (should be) or "Yes".
 
Last edited:
Either jump to a different subroutine on the first scan (jsr) or do what Allen said.
The LBL will get processed every scan, not just when you jump to it.

pp
 
Your initialize subroutine still gets called and zeros the files whenever the processor gets around to scanning file 2 rung 6 (IE, every program scan).

Why not just use a rung like XIC S:1/15 JSR 15 instead of the JMP and LBL combinations?

*Edit: just one minute too slow, PP beat me to it
 
Well, that's easy.

So here's what you've got:

S:1/15 Q2:0
-----| |--------[JMP]

<snip>
Q2:0 U:15
---[LBL]-------{JSR]



So on the first scan, the all the code between the [JMP] and the {LBL} won't execute, and you'll do your "Clean B3 file" subroutine.

But on the next scan, there's nothing that's going to stop you from re-executing the JSR instruction. The [LBL] is only a label, it doesn't have any logic behind it.

A more effective method would be to remove the JMP/LBL pair, and write you first rung like so:

S:1/15 U:15
-----| |--------{JSR]




That will do what you want.


Slow. Too slow. Got beaten twice.
 

Similar Topics

Hi I have a machine which has recipes in the plc ,using indirect addressing, we have a screen where we enter the recipes and then save the recipe...
Replies
23
Views
4,136
Hi guys I have a machine that works fine, but today we had an issue where the operator speeds the line up to 20cpm the feeder but didnt adjust...
Replies
11
Views
3,163
Is there a way to do a mass copy of comments and tag names from one program to another? They are 100% identical, one goes online (uploaded from...
Replies
1
Views
3,141
I was trying to modify a program online the other day using RSLogix 500 . The PLC is a SLC5/05. I was online with the PLC, and could change...
Replies
2
Views
5,477
I had an idea to improve some of my standard programs, and make them easier to modify/expand in the future. Is there a way to address the current...
Replies
9
Views
3,669
Back
Top Bottom