7.traffic Light PDF
7.traffic Light PDF
7.traffic Light PDF
Sequence structures can be used to force code to execute in a specific sequence. The code
to be executed sequentially is entered on sub diagrams called frames.
PROCEDURE:
1. Create a new VI.Right-click on the front panel to display the Controls palette.
2. On the Controls palette, navigate to Modern »Boolean and drag the 3 Boolean
onto the front panel.
3. Place a flat sequence structure by select Programming→Structure→Flat
Sequence.
4. Add frames to the existing frame by right clicking on frame → Add Frame.
5. After 3 frames are created, place 3 LED lights (Go in front panel, right click and
select Boolean and select 3 round LED indicators) in each frame. The colors of
LEDs can be changed by going in its respective properties. Select appropriate
colors for each LED.
6. Use local variables to make the LED glows till a certain time per second.
7. To create a local variable, right-click the desired front panel object and select
Create >> Local Variable.
8. Appropriate time delays are used to see step by step response.