Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Control and Monitoring Today we will look at: What we mean by computer control Examples of computer control Sensors – analogue and digital Sampling.

Similar presentations


Presentation on theme: "Computer Control and Monitoring Today we will look at: What we mean by computer control Examples of computer control Sensors – analogue and digital Sampling."— Presentation transcript:

1 Computer Control and Monitoring Today we will look at: What we mean by computer control Examples of computer control Sensors – analogue and digital Sampling data Making a decision and other techniques

2 What is a computer system? You probably hear the word system all the time – stereo system, computer system, etc. - but what does it mean? A system… –Has two or more parts –Has inputs, processing and outputs –Has parts working together to do something useful Input Output Processing

3 What is a control? You also hear the word control in everyday use - volume control, heating controls, etc. – but what does that mean? A control… –Is an input –Changes the way the system behaves – e.g. if you turn up the volume control it gets louder, or your heating controls change the time at which the heating turns on. Computer control is just using a computer to change what a system is doing.

4 Examples of Computer Control? Things that could be controlled by computers: Car park barriers and signs Burglar alarm systems Anything that is thermostatically controlled: –Fridge –Oven –Greenhouse Anything that needs to be timed: –Central heating and air-conditioning –Video recorders (such as Sky+) Plus many more!

5 Sensors A sensor is a special type of input used to measure the outside environment. There are two types, analogue and digital A digital sensor can only tell the difference between two opposites, such as on/off or open/closed. An example of a digital sensor might be the sort of contact switch you'd have on a window or door in a burglar alarm system, or simply a button to press. An analogue sensor is one that can detect a range of values, such as speed or temperature. Sensors such as these are used in all sorts of devices such as thermostats in greenhouses and central heating systems - or a joystick controller for a computer game.

6 Sampling When a sensor takes a measurement it’s called a sample How often the samples are taken is called the frequency (or sampling frequency) How often you need to take measurements will depend on the situation. How often would you need to see: –What the temperature of your greenhouse is? –Whether a patient in a hospital is still breathing? –Whether there’s someone in your house? –The position of aeroplanes above an airport?

7 Making a Decision Systems will use the information from their sensors to make decisions Computers usually make decisions using the if instruction If [something happens] then [do one thing] else [do another thing] For example, in a car park… if [the number of spaces is zero] then [display “Full”] else [display “Spaces”] What about the alarm? Or the greenhouse?

8 Feedback When sensor is part of the system, and the input from the sensor forms a control, this is known as feedback or a feedback loop. For example, the temperature sensor inside an electric oven controls how it behaves… –if the temperature is greater than or equal to the desire temperature, the oven is switched off –if the temperature is less than the required temperature then the oven is switched on This is also known as automatic control.

9 Why use computer control? Computer control is used for lots of reasons: It can be left unattended – e.g. in traffic lights – so people aren’t needed in boring jobs It’s reliable and consistent – it doesn’t fall asleep or get bored It doesn’t need to be paid, so can run all night at no extra cost It can be used in dangerous places where it wouldn’t be safe for people to go – e.g. in satellites, furnaces and nuclear power stations

10 Computer Control We use the key ideas from programming to create automatically controlled systems: Variables Events Decisions Repeating things Commands/instructions

11 Variables Variables are used to store information In some programming languages you need to say what type they are – e.g. text, number The value of a variable might come from… –A value entered by the user –The computer – e.g. the date, amount of free disc space –An input device, e.g. from a sensor or control

12 Events Events are things that can happen to your program, e.g. –Button presses –Adjustment of the controls –Inputs from sensors –Plus standard computer user interface events such as mouse clicks and key presses

13 Decision Sometimes your program will need to make decisions based on: –What the user does –What happens in the program –The values of particular variables –Input from the sensors or controls as part of the feedback loop

14 Program Flow Sometimes you might want to repeat a section of your program… –A fixed number of times –Until an event happens –While a particular variable has a particular value –Forever!


Download ppt "Computer Control and Monitoring Today we will look at: What we mean by computer control Examples of computer control Sensors – analogue and digital Sampling."

Similar presentations


Ads by Google