gertsc
Nov 18 2008, 01:02 PM
Hello,
I have had the same program running for 10 month in a Micrologix 1500 with a couple of input and output modules and a HMI attacted.
Suddenly I get an errorcode 29h (An instruction attemted to perform an indirection outside the User Data file space). As soon I clear the error and setting the micrologix to run mode, the error appear right away.
I have tryed to look at the data and addresses related to my indirect address instructions, but I can't see anything wrong.
Any suggestions, how to figure out where in the program the error occour?
Thanks,
gert
b_carlton
Nov 18 2008, 01:55 PM
All you can do is post your file here and let other eyes look. It may be a ;'forest for the trees' situation.
Mark-
Nov 18 2008, 04:21 PM
Hello,
Not much data to go on.
#1 Put limit checks in before the address is referenced. I assume you have a finite range of addresses you wish to r/w using indirect addressing.
#2 Jump around parts of the code to try and isolate the offending rung(s).
#3 Find a way to log each address before it is referenced.
#4 I do not recall if possible on the ML but try single scan testing. If not set up a switch to jump to the offending code under your control.
Of course this all depends on being able to execute the program/make debugging changes without harm to the machinery or people.
Good luck,
Mark
http://www.peakhmi.com/
BobLfoot
Nov 18 2008, 05:45 PM
Certain Flavors of Controllogix have shown what I consider a wierd problem when it comes to indirect addresing. A variable is used as the indirect reference in Subroutine A and needs to be between 0 an 15. In Subroutine A it is limit checked and never used if the value is greater than 15. However in Subroutine B it gets loaded with a 32 as a temporary register. The firs thing Sub A is reset it to zero. Guess what this faults the CLGX.
I agree that you check limits on all addresses.
b_carlton
Nov 18 2008, 06:59 PM
The Micrologix (and others) during the prescan check for these incompatibilities, even if the actual logic would have prevented the call by bounds checking. For example, if you have a rung
If N7:10 < 20 then MOV 10 N20:[N7:10]
With the test because N20 only has 20 elements
But N7:10 = 21 then, on prescan, this error will be generated. You have to prevent even the possibility that a number which will be used as an indirect reference could be set out of the bounds of its intended target.
Mickey
Nov 18 2008, 07:05 PM
QUOTE(gertsc @ Nov 18 2008, 01:02 PM) [snapback]75884[/snapback]
Hello,
I have had the same program running for 10 month in a Micrologix 1500 with a couple of input and output modules and a HMI attacted.
Suddenly I get an errorcode 29h (An instruction attemted to perform an indirection outside the User Data file space). As soon I clear the error and setting the micrologix to run mode, the error appear right away.
I have tryed to look at the data and addresses related to my indirect address instructions, but I can't see anything wrong.
Any suggestions, how to figure out where in the program the error occour?
Thanks,
gert
Is the HMI writing to the addresses in question?
gertsc
Nov 19 2008, 08:43 AM
Thanks for all the replyes.
I started to eliminate program files untill the error dissapeared, and I found a where it happend. It seems to be a prescan check problem as mentioned in the sugestions. The error would not dissaper before I run all the program files without the pecific one, and then run that one at the end.
Initially I used the search/Find "[" to locate my indirect adresses, but it only indicated that I had 17 indirect addresses in one program file. That was not the case, I had two more in another program file, that the search/find function did not find, and that was where the problem was.
thanks for the help
gert
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.