Introductions of PLC and MCU
A PLC is a device that was invented to replace the necessaryquential relay circuits for machine control. The PLC works by looking at its inputs and depending upon their state, turning on/off its outputs .The ur enters a program, usually via software or programmer thatgivesthedesiredresults.
dilemma什么意思
PLC are ud in many “ realworld ”applications. If there is industry prent, chances are good that there is a PLC prent. If you are involved in machining, packaging, material handling, automated asmblyor countless other industries, you are probably already using them. If you are not, you are wasting money and time. Almost any application that needssome typeof electrical control has needfor PLC.
For example, let 'asssumethat when a switch turns on we want to turn a solenoid on for 5 conds and then turn it off regardless of how long the switch is on for. We can do this with a simple external timer. What if the processalso neededto count how many times the switch individually turned on? We needa lot of external counters.启德出国留学
iicl
As you can e,the bigger the process the moreof a need wehave for a PLC. We can simply program the PLC to count its inputs and turn the solenoids on for the specified time.
We will take a look at what is consideredto be the “ top20”PLC instructions. It can be safely estimated that with a firm understandingof there instructions one can solve more than 80%of the applications in existence.
That‘sright, more than 80%! Of cour we' ll learn more than just the instructions to help you solve almost ALL your potential PLC applications.
The PLC mainly consists of a CPU, memory areas, and appropriate circuits to receive input/output data, as shown in Fig. 19.1 We can actually consider the PLC to be a box full of hundreds or thousands of paraterelays, counters, timer and date storage locations. Do the counters, timers, etc. really exist? No, they don't “ physicall”y exist but rather they are simulated and can be considered software counters, timers, etc. Theinternal relays are simulated through bit locations不要说爱我
英语课
in registers.
What does eachpart do?
INPUT RELAYS-(contacts) The are connected to the outside world. They physically exist and receive signals from switches, nsors, Typically they are not relays but rather they are transistors.
INTERNAL UTILITY RELAYS-(contacts) Thedo not receive signals from the outside world nor do they physically exist. They are simulated relays and are what enablesa PLC to eliminate external relays. There are also some special relays that are dedicatedto performing only one task. Some are always on while some are always off. Some are on only once during power-on and are typically ur for initializing data what was stored.
COUNTERS The again do not physically exist. They are simulated counters and they can be programmedto count puls. Typically the counters can count up, down or both up and down. Since there are simulated, they are limited in their counting speed. Some m
anufacturers also include high-speed counters that are hardware bad. We can think of the as physically existing. Most timers the counterscan count up, down or upand down.学徒第一季
国庆 英语TIMERS The also do not physically exist. They come in many varieties and increments.The most common type is an on-delay type. Other include off-delay and both retentive and non-retentive types. Incrementsvary from 1ms through 1s.
OUTPUT RELAYS-(coil) The are connected to the outside world. They physically exist and nd on/off sig nals to sole no ids, lights, etc …They can be transistors,relays, or triacs depending uponthe modelchon.
DATA STORAGE-Typically there are registers assignedto simply store data. There are usually ud astemporary storage for math or data manipulation. They can also typically be ur power-up they will still have the same contents as before power war removed.Very convenientand necessary!
lamprey
A PLC works by continually scanninga program. We can think of this scan cycle as consisting of 3 important steps, as shown in Fig.19.2 There are typically more than 3 but we can focus on the important parts and not worry about the others. Typically the others are checking the system and updating the current and timer values.
via是什么意思Step 1-CHECK INPUT STATUS-First the PLC takes a look at each input to determine if it is on or off. In otherwords, isthensorconnected tothefirst inputon? How about the c ond in put? How about the third …It records this data into its memory to beudduring thenextstep.
Step 2-EXECUTE PROGRAM-Next the PLC executes your program one instruction at a time. Maybe your program said that if the first input was on then it should turn on the first output. Since is already knows which inputs are on/off from the previousstep, it will be able to decidewhether the first output should be turned on bad on the state of the first input. It will store the execution results for u later during the next step.
Step 3-UPDATE OUTPUT STSTUS-Finally the PLC updates the status of outputs. It upd
atesthe outputs badon which inputs were on during the first step and the results of executing your program during the cond step.Badon the example in step 2 it would now turn on the first output becau the first input was on and your program said to turn on the first output when this condition is true.