G_DeMark

Major Fault

6 posts in this topic

I have a compact logix with a major fault.

Please see my attached file for the complete fault message. 

Code 20 array subscript too large. or control data type to large or invalid.

Has anyone observed this issue before.  The PLC is a compact logix model.  Every time, the controller is switched from program to run the major fault occurs within 5 seconds.  The fault can be cleared but then it comes back in a few seconds.  I have been told by my tech that no program changes have been made.  Could there be a hardware/wiring issue?

Thanks much

Document_1234.pdf

Share this post


Link to post
Share on other sites

What is the size of the arrays used in your message instruction?

2 people like this

Share this post


Link to post
Share on other sites

Hi,

Please check that your "MESSAGE_WORD_RESULTS" array is at least 32 elements. This array will hold the bit numbers that are different. If you have, for example, a result array length of 5, but there are 6 or more bits that differ (between the Source and Reference words), the Major fault code you described will be raised.

see page 626 onwards: http://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1756-rm003_-en-p.pdf

good luck,

vds

Edited by vds
1 person likes this

Share this post


Link to post
Share on other sites

Yes, you gentlemen were correct.  I increased the "MESSAGE_WORD_RESULTS" array to 32 elements and all is good.  Thanks very much for your help.  I would have had no idea without your help.

Share this post


Link to post
Share on other sites

Thanks for letting us know what you found. I would recommend adding a ring of code so that that array index ends up being greater than the array size, it moves the safest possible value back into it and sets some alarm.

Share this post


Link to post
Share on other sites

Hi,

A few days ago I started working on CompactLogix L30ER PLC.
I need to establish master / slave modbus TCP / IP communication with one device. The PLC in this case would be the master and the other device a slave in this modbus communication. To do this, I implemented your Modbus TCP Master Sample Application Revision 1.02, and I followed the instructions in the documentation(which I have attached). Everything worked perfectly on the basic settings. The problem came up when I wanted to increase the number of transactions. In the documentation says, I quote: "The change is relatively simple if increasing the number of transactions, first resize the array of transactions for that connection. Say if increasing the number from 5 to 10 for the second connection, resize the controller scoped tag MBTU_Transactions_01 from 5 to 10 elements, then modify the value controller tag MBTU_Connections [1] .MBTI_NumberOfTransactions from 4 to 9 (it is always set to one less than the actual number), in this case MBTU_Connections [1] .MBTI_NumberOfTransactions = 9. "

After doing all this (only I increased it from 5 to 13 transactions), a Major Fault came up, and I quote, "(Type 04) Program Fault (can be trapped by a fault routine)
(Code 20) Array subscript too large, or CONTROL data type POS or LEN disabled. ".

I believe it is necessary to change the length of one of the MBTI_ data, but I do not know which one exactly. I assumed this because in the documentation says, I quote: "Note that tags start with MBTI_ are NOT changed unless the extents of the program have changed. i.e. the number of possible connections or the number of transactions on a connection. "

Please help :D 

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