1 / 9

Programming for Control Systems

Programming for Control Systems. Chapter 17 Letts Study Guide “Information Systems-IT”. Controlling a turtle with LOGO. A floor turtle is a simple robot which can move around the floor and respond to LOGO instructions.

ion
Download Presentation

Programming for Control Systems

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. Programming for Control Systems Chapter 17 Letts Study Guide “Information Systems-IT”

  2. Controlling a turtle with LOGO • A floor turtle is a simple robot which can move around the floor and respond to LOGO instructions. • A screen turtle is a shape on the screen which can carry out the same instructions as the floor turtle. • A turtle can usually obey: PEN DOWN, PEN UP, FORWARD n, BACKWARD n, LEFT b, RIGHT b. • A set of instructions can be repeated using REPEAT n [...].

  3. Programming control systems • The user can define a new instruction [or procedure] by putting together a group of existing instructions. • One way to express a control algorithms in simple English. • The language used needs to be: precise, using clear language; set out so that it is easy to read.

  4. Examples of a control algorithm A Burglar Alarm • 2 sensor systems, using touch sensors in the doors and windows and the other using infra-red beams inside. • Both sensors are on all the time the burglar alarm is on. • If either of these sensors is off the processor switches on the alarm an alarm and also switches on the outside lights.

  5. The program to do this could be represented as: REPEAT CHECK touch sensor CHECK infra-red sensor IF touch sensor OFF OR infra-red SENSOR OFF THEN SWITCH ON alarm SWITCH ON lights UNTIL alarm system switch OFF

  6. The language is English but is precise • To emphasise regularly used words they have been written in capital letters • Every time the same operation is done the same words are used (e.g. SWITCH ON) • Where statements should be grouped together they have been indented from the margin • SWITCH ON alarm and SWITCH ON lights have been indented together to make it clear that they are governed by the IF condition • all statements between REPEAT and UNTIL have been indented to make it clear they are all to be repeated

  7. Actual control equipment will have a control language with instructions for: • switching outputs on and off • receiving input from sensors

  8. Solving control problems A project on control work involves: • finding a problem to solve; • producing a project proposal and having it accepted; • investigating the problem further; • producing a design for a solution including a diagram of the hardware, a description of what the system will do and a program flowchart or structure diagram; • constructing the hardware but not spending too long on it;

  9. Solving control problems cont. • writing the program in a way that it is easy to understand; • testing the interface, the rest of the hardware and then the whole system including the program; • evaluating the project.

More Related