PLC Programming
  • Home
  • PLC & HMI
  • Electric & Electronic
No Result
View All Result
PLC Programming
  • Home
  • PLC & HMI
  • Electric & Electronic
No Result
View All Result
PLC Programming
No Result
View All Result

PLC Controller Fault Routine

PLC Catch Fault and Create Fault Conditions

PLC Controller Fault Routine
Share on FacebookShare on Twitter

If there are software or hardware errors in the PLC, you may not want to catch the error or stop your whole system due to the error.
In these cases, you can use a fault routine to clear the fault and allow some part of your system to continue running. Failure routine runs the routines you specify in major or minor faults.

For example, in the indirect addressing type used due to overflow or incorrect addressing, the plc also occurs with the type 4 code 20 error.
Type 4 code 20 error :Array subscript too big, control structure .POS or .LEN is invalid error,  can be cleared with this method.

It is important where to place the fault routine to find the fault. So choose where to place the routine according to the table below.

Condition:Fault type:
The execution of an instruction faults4Create a Fault Routine for a Program15-2
Communication with an I/O module fails3Create a Routine for the Controller Fault Handler15-3
Watchdog time for a task expires6
While a project is downloading to the controller, the key switch is placed in RUN8
A motion axis faults11
The controller powers up in run/remote run mode1Create a Routine for the Power-Up Handler15-4

You can access the full list from the link below.

Allen-Bradley PLC I/O Faults Causes/Solutions

 Let’s develop logic to manage specific fault conditions.

And now let’s examine the logic of working with examples.

Create a Fault Routine for a Program

Create a new routine by right-clicking Main Program under the main task in Studio 5000.

plc programming plc fault routine create plc

Right-click Main Program to enter the properties menu.

plc programming MainTaskPro plc

Select the Fault Routine you created from the Fault tab in the Configuration section from the properties menu and click the Apply button.

plc programming SelectFaultRoutine plc

To clear a major fault that occurs during the execution of your project, complete these actions in the appropriate routine.

The error routine can be used for the following operations.

• Create a Data Type to Store Fault Information
• Get the Fault Type and Code
• Check for a Specific Fault
• Clear the Fault

Create a Data Type to Store Error Information

Logix5000 controllers store system information in objects. Unlike PLC-5 or SLC 500 controllers, there is no status file.

To access system information, you use the instruction Get System Value (GSV) or Set System Value (SSV).

Attribute:Data Type:InstructionDescription
MajorFaultRecord DINT[11]Records major faults for this program
GSV SSVSpecify the program name to determine which PROGRAM object you want. (Or specify THIS to access the PROGRAM object for the program that contains the GSV or SSV instruction.)

Specify the program name to determine which PROGRAM object you want. (Or specify THIS to access the PROGRAM object for the program that contains the GSV or SSV instruction.)

Create your own custom UDT data types with user-defined data types.

User Defined Datatype UDT Usage Examples in RSLogix 5000 PLC

RelatedPosts

Create Controller Fault Routine

DeviceNet Troubleshooting

Siemens PLC Programming, S7-300 and S7-400 (SIMATIC S5) PLC

Get the Fault Type and Code

Create a UDT as follows by reviewing the user-defined data type article. Just set the last tag style to Hex. Set the others to Decimal.

plc programming Fault UDT plc

Create the destination tag address in UDT type, and assign the first member of this tag.

plc programming FirstMajorrecord plcWith this command, we can catch the fault type and code when plc has a fault.

The continuation of the article is in the link below.

Create Controller Fault Routine

Tags: faultfault routineplc faultprogram
Previous Post

RSLogix Emulate 500 Usage

Next Post

Create Controller Fault Routine

Related Posts

Studio 5000 Logix Emulate (Virtual PLC)
PLC & HMI

How to create a project in studio 5000?

How to use Rockwell PLC Watch Window
PLC & HMI

How to use Rockwell PLC Watch Window

Control Logix PLC Ladder Troubleshooting
PLC & HMI

Control Logix PLC Ladder Troubleshooting

Siemens PLC Programming, S7-300 and S7-400 (SIMATIC S5) PLC
PLC & HMI

Allen Bradley Faults and Solutions

PLC Programming Example
PLC & HMI

PLC Programming Example

PLC AVE (Average) Instruction Example
PLC & HMI

PLC AVE (Average) Instruction Example

Next Post
Create Controller Fault Routine

Create Controller Fault Routine

Please login to join discussion
PLC Programming
PLC Programming & Automation

    About Us PLCtr

    • Privacy Policy
    • Terms of Use
    • Cookie Policy

    About Us PLCtr

    • Privacy Policy
    • Terms of Use
    • Cookie Policy
    • Home
    • PLC & HMI
    • Electric & Electronic

    © plctr.com PLC Programming | PLC Forum | PLC SiteMap

    No Result
    View All Result
    • Home
    • PLC & HMI
    • Electric & Electronic

    © plctr.com PLC Programming | PLC Forum | PLC SiteMap