PLC5-30 Access Violation

Aabeck

Member
Join Date
Feb 2013
Location
Detroit
Posts
1,860
Something for anyone going online with a PLC5 to remember:

I just had an experience when trying to do some online edits to a PLC5-30 some edits handled themselves properly, but some reported an Access Violation and RSLogix went offline. To go back online I had to upload the program to be able to go online as it no longer matched. (I did have a full copy with all comments and descriptions) Once when I went back online after this happened the line I was trying to edit was no longer in the PLC!

I decided to make the edits offline then download the full program - and also to change the BAUD from 2400 to 19200 (big difference!)

When I verified the program I finally got the correct error: The PLC program consisted of 7 words more than the PLC memory. The PLC was absolutely full. (It is a large program running many pumps, heaters, 40 electroplating rectifiers and 2 hoists with an iFix HMI)

I went through the program looking for anything I could reduce and found contrary to what I thought, a branch uses more memory than another rung. Some rungs did unconditional math & moves every scan, up to 20 branches per rung, and each branch I split off to a new rung opened 2 words of memory. I was able to open almost 80 words, made the edits needed, now have some free memory and a lot faster Comm's.

I know there are still a lot of PLC5's out there so I thought I would pass along this experience.
 
When you edit rungs in the PLC-5 it copies the existing rung. If you don't have enough memory for the copy then you'll have these issues. The best thing it to either upgrade (easiest) or look for unnecessary memory wastage ala high program and/or data file numbers.

For example, If you need another integer file and create it at N100 you've just burned up 600 words (a little less actually) of memory because the controller uses 6 words per file (data or program) even if that file doesn't actually exist. Changing N100 to N9 will save all of those words. Yes, this is over simplified but you get the idea. How about posting screen prints of your program and data file lists so that we can see if there's something you can do to save memory this way.

Good luck,

Yosi
 
I may be remembering incorrectly, but in Logix 5, a Branch and a Rung use the same memory... the problem is usually with NESTED branches.
Nested branches are evil, and do use excess memory, and I've seen hundreds of programs where the branches are nested rather than just stacked.


Nested:
-----][-----------][------------()
| |
------][-----
| |
--][--

XIC BST XIC NXB BST XIC NXB XIC BND BND

Stacked:
-----][-----------][-------------()
| |
-------][-------
| |
-------][-------

XIC BST XIC NXB XIC NXB XIC BND

 
That (the rung nesting issue) will save memory but not a whole lot. From my experience people often tend to ignore the memory overhead that the controller eats up for unused files. I was able to reduce one customer's memory by about 1800 words simply by moving 1 integer word from N317 (and thereby eliminating the file) to N10.
 
rdrast,

A stacked rung when changed to a new rung of a single output command opened 2 words of memory with every stack deleted.

Even a rung with a XIC then a stack of outputs opened a word by creating new rungs with the same XIC on every new rung.

Yosi,
I checked to delete unused memory and there weren't any unused files or bloated files.
 
Aabeck. Regarding the unused memory. Even if the memory is used but can be moved further up in memory to free up that space then you can save space. I'd be glad to look at your program for you if you like.

Good luck,

Yosi
 
Yosi,

I will ask my customer if I can post their program for help, if they say yes I will zip it.
 
That brings back memories where every bits matters.

Now I see people going way over board, one OEM provided program put tags description,e tc as string tags so HMI can just take it out the PLC. While the practice does work, I'm not sure that's the best way to do it since it add a lot of HMI-PLC traffic.
 
Good morning,

I did a quick review of the code.
I could not find where N77 is used. That's 310 words of memory
I moved data files as follows:
* N77 -> N37
* N80 -> N30
* N81 -> N31
* N82 -> N32
* N84 -> N34

Furthermore I reduced the sizes the following files as follows:
* T44 from 201 timers to 120 timers.
* R6 from 144 control structures to 30 control structures

Finally I deleted BT23.

By doing so was able to increase free memory from 67 to 866 words.

There is also plenty of wastage in T4. If you move timers around you can also save memory.

I also noted that the program is storing data in F8:600 and upwards. I didn't go too much into detail but if this can be moved lower into memory F8's size can be reduced as well.

Bottom line, if you do the following and reduce the size of T4 as well I'm sure that you can scrape together at least an extra 1K of free memory.

Good luck,

Yosi


Because of legal issues I can't send you this code for downloading but the things that I did are relatively simple.
 

Similar Topics

I have been working within a file for several days and this morning I am getting a "Access Violation to Current Processor" error? I was just in...
Replies
1
Views
1,926
I am trying to connect to a PLC5E over a wireless connection using a wireless router and bridge. Using a standard LAN connection all is fine. I...
Replies
30
Views
7,257
I am using the following formula and I am getting error, Invalid Expression - too many closing parenthesis. when i copy the formula to notepad or...
Replies
4
Views
165
Preface: Kinda long, so I made section titles Intro: I just want to see if anyone here has seen anything similar. A PLC5-40 series C enhanced...
Replies
3
Views
381
Back
Top Bottom