1 / 17

ECT 464

ECT 464. Lecture 18 Interrupts. Today’s Quote: When God measures a man, He puts the tape around the heart instead of the head.

Download Presentation

ECT 464

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECT 464 Lecture 18 Interrupts

  2. Today’s Quote: When God measures a man, He puts the tape around the heart instead of the head. But the LORD said to Samuel, "Do not consider his appearance or his height, for I have rejected him. The LORD does not look at the things man looks at. Man looks at the outward appearance, but the LORD looks at the heart." 1 Samuel 16:7

  3. Interrupts • An interrupt is an event that causes the controller to suspend the task it is currently performing, perform a different task, and then return to the suspended task at the point where it suspended.

  4. Interrupt Types • User Fault Routine • Event Interrupts • High Speed Counter Interrupts • Selectable Timed Interrupt

  5. Interrupt Example

  6. Interrupt Priorities

  7. User Fault Routine • The user fault routine gives you the option of preventing a controller shutdown when a specific user fault occurs. The fault routine is executed when any recoverable or non-recoverable user fault occurs. The fault routine is not executed for non-user faults. • Faults are classified as recoverable, non-recoverable, and non-user faults.

  8. User Fault Routine Levels

  9. User Fault Routines • Create a subroutine file. (3-25) • Enter the file number in word S:29 • The occurrence of recoverable or non-recoverable faults causes the controller to read S:29 and execute the subroutine number identified by S:29. If the fault is recoverable, the routine can be used to correct the problem and clear the fault bit S:1/13. The controller then continues in its current executing mode. The routine does not execute for non-user faults.

  10. User Interrupt Instructions

  11. User Interrupt Instructions • The INT instruction is used as a label to identify a user interrupt service routine (ISR). This instruction is placed as the first instruction on a rung and is always evaluated as true. Use of the INT instruction is optional.

  12. Selectable Timed Start • The STS instruction can be used to start and stop the STI function or to change the time interval between STI user interrupts. The STI instruction has one value which is is the amount of time (in milliseconds) which must expire prior to executing the selectable timed user interrupt. A value of zero disables the STI function. The time range is from 0 to 65,535 milliseconds.

  13. Interrupt Levels

  14. User Interrupt Instructions • User Interrupt Enable (UIE) • User Interrupt Disable (UID) • User Interrupt Flush (UIF)

  15. Selectable Timed Interrupt • The Selectable Timed Interrupt (STI) provides a mechanism to solve time critical control requirements. The STI is a trigger mechanism that allows you to scan or solve control program logic that is time sensitive.

  16. Selectable Timed InterruptExamples • PID type applications, where a calculation must be performed at a specific time interval. • A motion application, where the motion instruction (PTO) needs to be scanned at a specific rate to guarantee a consistent acceleration/ deceleration profile. • A block of logic that needs to be scanned more often.

  17. Event Input Interrupt • The EII (event input interrupt) is a feature that allows the user to scan a specific program file (subroutine) when an input condition is detected. • Each EII can be configured to monitor any one of the first eight inputs (I1:0.0/0 to I1:0.0/7). • Each EII can be configured to detect rising edge or falling edge input signals. • When the configured input signal is detected at the input terminal, the controller immediately scans the configured subroutine.

More Related