You are on page 1of 1

First-Call-First-Served Logic with chronological control Starting from the definition of the simple First-Call-First-Served logic, it has been

developed a control system that stores in the physical memory of the PLC all the information about calls made by customers pushing the buttons located at every floor. The focus of this system is to order the elevator to reach different floors attending the chronological order of the calls, using the information stored in memory. The implementation of this system has been made using the PLC programming language CXProgrammer, and it has been necessary to use information structures that typically can be managed by low-level languages, such as binary words composed by 16 bits. Considering that the experimental model of lift is realized to serve 4 floors, it is necessary to use only one word divided into 4 groups composed by 4 bits: every group contains all the information of a single call, and in the worst case, where in the same moment the 4 floors are booked, 16 bits are required. The structure of the word is illustrated in Figure 1.

1st Call

2nd Call

3rd Call

4th Call

Figure 1 The word has been divided into four groups, in order to store till four calls at the same moment.

The meaning of the four bits that constitute every group is summarized in Table 1. Bit 1 2 3/4 Meaning 0 Call disabled 1 Call enabled 0 Call not in use 1 Call in use Different combinations means different destination floors: 0 0 => Floor 0 0 1 => Floor 1 1 0 => Floor 2 1 1 => Floor 3
Table 1 Meaning of different bits of a group.

When the cabin is engaged and, for example, a person calls the elevator at floor 1, in the first group of bits the string 1 0 1 0 is memorized, which indicates to the system that a call has been made from floor 0 and has not been served. If while the lift is engaged another customer at another floor call it, the second group of bit is activated to memorize the call, and so on: as is said before, the worst condition can be managed with only one word in this case. When the lift ends its present trip, the system gains control of it and sends it to the destination floor of the first call (bits 3 and 4), activating the bit number 2 which means that the lift is answering to that call. After reaching the correct floor, the first group of bits contains useless information and so the algorithm overwrites the memory with the information contained in the second group, equivalent to the second call in chronological order. The switch is made for all groups of bits, obtaining a sort of circular buffer which cannot become full and is always ready to decide the destination floor for the elevator, basing on the information contained in the first group of bits.

You might also like