Beruflich Dokumente
Kultur Dokumente
Check:
CTL
PLC Experiment
VPL 01/07
No.12
No.7
No.2
No.11 No.10
No.9
Figure 1:
The main operating mode of the traffic light is a cyclic operation running at daylight; its light signal plan is given in figure 2. The second operating mode is the operation at night. The controlled change and switch between the two operating modes, namely ON and OFF status, has also to be realized.
1/6
Green Lights on Yellow Lights on Red Lights on Red and Yellow Lights on No Lights on
Figure 2: Day Service Traffic Signal Plan Structure for Petri Network and Operating Modes
The control program is to be organized in hierarchical and modular structure shown in figure 3. The 1 Hz-blinking-generator with a clock ratio 1:1 is used by both service modes.
Device Off
On
DayService
NightService
2/6
It is the same behavior for switch-off of the night service which can take effect not before 15 s of running in night mode. The OFF command has a higher priority than the daylight command. Hints: the 15 s blocking of switching commands depends on the duration of the night service and not on the instant of the switching command. That means, the change command from night to daylight service has to take effect instantaneously after a longer night service operation.
Daylight Service
One 1-Bit (label) in a Bit-rotational register cyclically switches 24 clocks, each has a duration of 2.5 s duration. Figure 4 gives some hints for the programming and the integration of the shift register in the control program. The daylight service always starts with clock No. 0 and can only be activated from the night service. The day service can only be left at the clock No. 9. OFF has the higher priority compared to the change command Day -> Night and Day -> OFF.
FC1:
A M13.0 = M50.0 L MW 12 SRW1 T MW 12 A M11.0 = M12.7 L MB 11 SRW1 T MB 11 A M50.0 = M11.7 BE
3/6
For preparing the programming please draw first the Petri Network of your logical solution!
Signal Setup To be sure that your solution fits with the given hardware please define your I/O signals as follows: Control Signal: Switch ON/OFF (1/0): Switch Day/Night (1/0): 3-R + 9-R: 3-Y + 9-Y: 3-G + 9-G: 2-R + 5-R: 2-Y + 5-Y: 2-G + 5-G: 4-R + 11-R: 4-G + 11-G: 7-R + 12-R: 7-G + 12-G: 10-Y-1Hz: Program Hint: The program may consist out of 3 blocks: OB1, OB100 and FC1. Parts of the code are given. Your task is to complete the code and to make it run in the S7-PLCSIM and in the given hardware Simatic S7-300. (The syntax only supports English Version of Step 7). The traffic light equipment is simulated graphically. OB1:
Network1: // Day-Night Service Control (Your Task) Network2: //1Hz-Blink-Generator A( O M 0.1 O M 0.2 O M 0.3 ) A M 6.0 L S5T#1000MS SD T 1 A T 1 R M 6.0 //Please continue here
I0.6 I0.7
Output Signal:
Q0.0 Q0.1 Q0.2 Q0.3 Q0.4 Q0.5 Q0.6 Q0.7 Q1.1 Q1.2 Q1.0
//If in NS(B),NS,DS
//If M6.0 is set //Load timer value //Set Timer 1 //If Timer 1runs out //Reset M6.0
4/6
S A( O O O ) A L SD A R S
6.1
M M M
0.1 0.2 0.3 //If M6.1 is set //Load Timer value //Set Timer 2 //If Timer 2 runs out //Reset M6.1 //Set M6.0
M 7.1 S5T#2S500MS T 3
Network4: //Call Shift-Right-Register A M 7.0 CC FC 1 Network5: //Output Signal Control (Your task) O M 11.7 O M 11.6 O M 11.5 O M 11.4 O M 11.3 O M 11.2 O M 11.1 O M 11.0 O M 12.7 O M 12.6 O M 12.5 O M 12.4 O M 13.1 O M 13.0 = Q 0.0 //3-Red + 9-Red On //Please continue here
FC1:
Network1: //Shift-Right-Register A M 13.0 = M 50.0
5/6
L SRW T A = L SRW T A = BE
MW 1 MW M M
12 12 11.0 12.7
OB100:
Network1: //Startup Setup L 1 T MB T MB T MB L T T T SET S 0 MB MB MB M
0 6 7
11 12 13 11.7
6/6