You are on page 1of 5

PROBLEMS TO SOLVE WITH SFC

USING MULTITOKEN AND MACROS

Problem 1: System to control a parking lot

Model the system that controls the automatic parking lot depicted in the following figure.

The parking has a separated entrance and exit, each one with an access controlled with
barriers activated with motors MEA and MEC (opening and closing motors for entrance
barrier) and MSA and MSC (opening and closing motors for the exit barrier). Presence sensors
are installed on both sides of each barrier: S1 and S2 at the entrance barrier and S3 and S4 at
the exit one. These sensors are activated when a vehicle passes by and those sensors
associated with a barrier never activate at the same time. Another sensor, S5, is used to detect
a ticket (payment confirmed) that opens the barrier. The parking can house up to 16 vehicles
and the automaton must control the following operations:
 A push button, M, activates the system. No vehicles can enter or leave the parking
until this button is pressed.
 Simultaneous entrance and exit of vehicles must be allowed.
 Barriers automatically open and close. Entrance barrier opens if there are less than 16
vehicles in the parking and a vehicle is detected close to the entrance (sensor S1
activated). That barrier closes 5 seconds after sensor S2 stops detecting the vehicle.
The exit barrier opens only if S5 is activated (valid ticket) and S3 detects a vehicle.
Same as in the entrance, the exit barrier closes 5 seconds after S4 stops detecting a
vehicle.
o The corresponding motors activate to open and close each barrier until some
limit sensors are activated:
 FCEA: End sensor to open the entrance barrier.
 FCEC: End sensor to close the entrance barrier.
 FCSA: End sensor to open the exit barrier
 FCSC: End sensor to close the exit barrier.
 Additionally, there is a traffic light at the entrance that informs of free spots with a
green light (LV). If there are no available spots, LV is deactivated and a red light, LR, is
activated.
 By pressing a push button P, the system goes back to the initial state but first allowing
entering or exiting vehicles if those processes are already started.
 Finally, there is a reset push button that, if the system is running, sets the vehicles
counter to zero.

Your task is to:


- Model the dynamics of the proposed system by means of an SFC using a macro for the
opening and closing of the entrance barrier and another macro for the exit barrier.
- Use multitoken to manage the lights and the R button
- Extra: Modeling with 3 SFC: one to manage the entry of vehicles; another to manage the
output; and another for lights and button R.
Problem 2: System to classify packages

The system you have to model uses the following signals:


 Three cylinders activated by control signals A (cilindro A); B (cilindro B) and C (cilindro
C, elevador). Cylinders A and B have a spring return, while C returns by gravity.
 Four limit switches to detect whether cylinder A is extended (A1) or retracted (A0) and
whether cylinder B is extended (B1) or retracted (B0).
 Two position sensors: C0 signals that cylinder C is down, and C1 signals that cylinder C
is up.
 A scale (bascula) classifies the packages.
 Four conveyor belts activated by control signals MC0 (cinta 0); MC1 (cinta 1); MC2
(cinta 2) and MC3 (cinta3).
 Two lights (LB and LS) indicate the kind of package that is being transported after
scaling.

The process starts pushing S1 switch. Then, belt 0 activates to take the first package to the
scale. When the package arrives at the scale, belt 0 stops. Sensor S2 detects that there is a
package on the scale. Once the package has been weighted, LB activates if the package is
heavy or, alternatively, LS activates if the package is light. The scale sends B or S signals
depending on the weight of the package.

After the weighting process, conveyor belt 1 takes the package to the elevator. Sensor S3
detects that there is a package on the elevator. Once the package has left the scale, another
one can be transported to the scale (and weighted) while the first one is being classified.
Cylinder C pulls up the packages.

Then, the classification process begins. If the package is heavy, cylinder A activates to place the
package on belt 2. When the package is on the belt, cylinder 2 retracts and belt 2 activates.
Once cylinder A is in the initial position, cylinder C moves down and belt 2 stops (we are
assuming that moving the box through belt 2 and retracting cylinder A take the same time).

If the package is light, cylinder B activates to place the package on belt 3. Then, the cylinder
retracts and belt 3 activates. When cylinder B is back at the initial position, cylinder C moves
down and belt 3 stops (same as with heavy packages).

Cylinder C only moves back to its initial position after A and B have reached their initial
positions.

Before activating belt 1 the system checks that cylinder C is at its initial position (sensor C0) to
allow placing the package on the elevator.
Your task is to:

- Model the system using SFC and multitoken: One SFC for the weighting of packages
and another one for the classification process.
- Note: 1 Keep in mind that the scale sends signals B and S when the package is being
weighted. After that, the signals deactivate. Thus, if they are needed later on, you
should implement a mechanism to store those values.
- Note 2: The scale can be seen as an independent system that interacts with the PLC.
Problem 3: Mixing process

The figure shows a facility for the mixing of a product with water. The mixing process starts
when button P is pressed, and works as described:
 Valve V1 opens in order to fill the first tank with water. It remains open until
reaching the level indicated by sensor N1.
 Next, mixer M starts running and stays active for 3 minutes; at the same time, the
product is added by the opening of valve V2 for 10 seconds.
 After that, valve V3 opens and pump B1 is activated in order to transfer the mix to a
second tank.
 Once the whole mix has been transferred, the final product must be cooled through
the circulation of cold water: valves VA and VB get opened and B2 activated 2
seconds after the first tank is empty. Cooling time is 2 minutes.
 Finally valve V4 is opened in order to empty the tank.

The process (mixing and cooling) is performed 20 times each time P is pressed. Whenever
possible, the mixing in one tank and the cooling in the other will be done simultaneously.

Note: sensors DV1 and DV2 supply a logic value 1 when there is liquid in the tank.

Se pide:

 SFC diagram using multitoken for mixing and cooling process.

You might also like