Overview – Multitasking Basics

Slides:



Advertisements
Similar presentations
Operating System Support Focus on Architecture
Advertisements

PLC OPERATION & PROGRAMMING Dr. ONUR TOKER. What is a PLC ? PLC is a computer system controlling a process. inputs - the keyboard is analogous to a proximity.
The domestic refrigerator-An example A car door mechanism.
Presented by: Taking the Internet of Things to the Cloud April 20, 2015 Charles J. Lord, PE President, Consultant, Trainer Blue Ridge Advanced Design and.
PLC introduction1 Discrete Event Control Concept Representation DEC controller design DEC controller implementation.
PLC: Programmable Logical Controller
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
Nitro New Program Training December 1, Nitro bridges the gap between compact basic dispensers and large feature full dispensers too bulky for smaller.
4) Design the logic to control the motor on a simple remote control car. There are two buttons on the remote control for the motor. If neither button is.
PROGRAMMABLE LOGIC CONTROLLER
Discrete Control Logic
ENERGY METER TO INDICATE BILLING IN RUPEES FOR LOAD WISE OR DAY WISE
Introduction to the FPGA and Labs
SPiiPlus Training Class
Instant hot water. Long-term savings.
SUBMITTED BY EDGEFX TEAM
Introduction to the ARM mbed Platform– A Hands-on Course
AT91 Power Management This training module describes the Power Management options provided by the AT91 family of microcontrollers. These options address.
Chapter Objectives In this chapter, you will learn:
Clocks, I/O devices, Thin Clients, and Power Management
The Industrial Internet of Things (IIoT)
Introduction to the ARM mbed Platform– A Hands-on Course
Winsteon Automated Window.
The Industrial Internet of Things (IIoT)
Advanced OS Concepts (For OCR)
Microcontroller Based Digital Code Lock
PLC: Programmable Logical Controller
Introduction to Git and Github – A Hands-on Course
Overview Introduction General Register Organization Stack Organization
EET 2259 Unit 3 Editing and Debugging VIs
Programmable Logic Controllers
Chapter 1: Introduction
Everything You Ever Wanted to Know About Filters*
Digital Time Pieces by youpresent.co.uk
Operating Systems (CS 340 D)
Writing and Testing Your First RTOS Project with MQX
Chapter 1: Introduction
ET 438B Sequential Control and Data Acquisition
How to Fix HP BIOS Application Selected Is Corrupt or Missing Problem?
Lesson 16: State-Based Sequential Design
GSM door opener Model RTU5015 RTU5025 .Different appearance ,the same function.
CSCI1600: Embedded and Real Time Software
Industrial Electronics
Everything You Ever Wanted to Know About Filters*
Introduction to Medical Electronics
Introduction to Medical Electronics
Timer Instructions Overview
Everything You Ever Wanted to Know About Filters*
Everything You Ever Wanted to Know About Filters*
Programming Languages
Embedded C for 8051: Primer for CompEng 3150
CISC101 Reminders Assn 3 due Friday, this week. Quiz 3 next week.
Introduction to Medical Electronics
Operating Systems.
CSCI1600: Embedded and Real Time Software
Get Ready for the New Internet: IPv.6
Last Week Introduced operating systems Discussed the Kernel
Introduction to Sequential Circuits
COMPUTER PERIPHERALS AND INTERFACES
Get Ready for the New Internet: IPv.6
嵌入式微控制器编程 Embedded Microcontroller Programming
Everything You Ever Wanted to Know About Filters*
Input > Process > Output
CSCI1600: Embedded and Real Time Software
Get Ready for the New Internet: IPv.6
ACOE347 – Data Acquisition and Automation Systems
Get Ready for the New Internet: IPv.6
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
Logically, the output will be 1
IENG 475: Computer-Controlled Manufacturing Systems Ladder Logic
Presentation transcript:

Overview – Multitasking Basics Multitasking and RTOS Overview – Multitasking Basics August 26, 2013 Charles J. Lord, PE President, Consultant, Trainer Blue Ridge Advanced Design and Automation

This Week’s Agenda 8/26 Multitasking Basics 8/27 State Machines I 8/28 State Machines II / Round Robin 8/29 Finishing it Up 8/30 An Example RTOS

This Week’s Agenda 8/26 Multitasking Basics 8/27 State Machines I 8/28 State Machines II / Round Robin 8/29 Finishing it Up 8/30 An Example RTOS

Multitasking, RTOS, and Real Life We hear a lot about the proliferation of RTOS on myriad processors, even some 8-bit machines, but when do we need a real-time operating system (RTOS)? Just how critical is timing and interoperation? Cost of chip size, power consumption “small ARM” vs 8/16 bit “Free” RTOS and many paid ones, plus alternatives (kernals, etc)

Distributed Processing 8-bit 8-bit Control / Data (typically i2c) 8-bit

Multitasking Approach 32-bit (typically)

Multitasking Dividing duties requires capability to: Switch tasks cleanly without corruption Determine priorities when conflicts occur Provide clean, independent storage for each task Provide communications between tasks when needed Accomplishing the above usually requires robust timing control

Simple Example – RTOS? Picture a simple digital alarm clock with hours and minutes display Primary task: update the counters every minute to display the current time Other tasks: set time, set alarm, determine if alarm should sound, enable snooze, other possible operator interaction. RTOS not necessary – a few simple interrupts State machine?

A little more realistic example We will look at an industrial washer (similar to a dishwasher) – simplified The I/O is simple: start button, a door switch, a two digit minutes countdown display, two LEDs, a water valve solenoid, a motor on/off, and a motor direction (wash / drain), and a ‘water level full’ input. Please note for simplicity that we are ignoring many real-world features like error sense and recovery!

Our Washer CPU Motor Run Motor Direction Water On Door Lock Water Level Full Wash Rinse

Our States Idle – unit is not operating Filling to wash Wash cycle (10 minutes) Drain from wash Fill to rinse Rinse cycle (10 minutes) Drain from rinse

Our States IDLE: Motor, water, all LEDs and display off Door Locked and start button pressed, go to FILL-TO-WASH FILL-TO-WASH: Water on, motor off, counter “FF” If door locked = FALSE, go to IDLE If water level full, go to WASH

Our States WASH: Water off, motor on, motor direction = wash Start countdown timer from 10 minutes on entry Display time Turn on Wash LED If door unlocked, go to IDLE On time = 00, go to DRAIN-FROM-WASH

Our States DRAIN-FROM-WASH: Motor on, Motor direction = drain, water off Counter display = “dr”, LEDs off Set timer for one minute If door unlocked, go to IDLE If timer = 00, go to FILL-TO-RINSE

Our States FILL-TO-RINSE: Water on, motor off, counter “FF” If door locked = FALSE, go to IDLE If water level full, go to RINSE

Our States RINSE: Water off, motor on, motor direction = wash Start countdown timer from 10 minutes on entry Display time Turn on Wash LED If door unlocked, go to IDLE On time = 00, go to DRAIN-FROM-RINSE

Our States DRAIN-FROM-RINSE: Motor on, Motor direction = drain, water off Counter display = “dr”, LEDs off Set timer for one minute If door unlocked, go to IDLE If timer = 00, go to IDLE

What’s Next? As we have described the project in “states”, we will first build the project as a simple state machine over the next two days. We will look at how to initialize each state, and may add other states as needed. Later this week, we will look at another approach – the round robin – and re-define our states as “tasks” On Friday we will look at an RTOS implementation

This Week’s Agenda 8/26 Multitasking Basics 8/27 State Machines I 8/28 State Machines II / Round Robin 8/29 Finishing it Up 8/30 An Example RTOS

Please stick around as I answer your questions! Please give me a moment to scroll back through the chat window to find your questions I will stay on chat as long as it takes to answer! I am available to answer simple questions or to consult (or offer in-house training for your company) c.j.lord@ieee.org http://www.blueridgetechnc.com