Add contacts to the first ladder rung

Use the steps to add ladder diagram (LD) contact elements to the first ladder rung, and then assign variables to the contacts. After you complete the steps, rung 0 of the program will operate as follows:
If the North-South red traffic lights and the East-West green traffic lights are on, and a car trips either the North sensor or the South sensor for at least five seconds, then change the East-West traffic lights from green to yellow.
To add contacts to the first ladder rung
  1. In
    Project Organizer
    , double-click
    Traffic_Controller_FB
    to open the language editor.
  2. Create an XIC for the North-South red traffic light.
    1. In
      Toolbox
      , locate and drag the
      XIC
      to the first rung.
    2. In the variable selector, select
      NS_RED_LIGHTS
      , and then select
      Select
      .
  3. Repeat step 2 to create an XIC for
    EW_GREEN_LIGHTS
    .
  4. Create the XIC for the North car sensor.
    Two XICs are to be created for the North car sensor and South car sensor. The two XICs are created in parallel because there is either a North car sensor or a South car sensor.
    1. From
      Toolbox
      , drag Branch button to the end of the first rung.
    2. From
      Toolbox
      , locate and drag
      XIC
      to the upper branch.
    3. In the variable selector, select
      N_CAR_SENSOR
      , and then select
      Select
      .
  5. Create an XIC for the south car sensor.
    1. From
      Toolbox
      , locate and drag the
      XIC
      to the lower branch.
    2. In the variable selector, select
      S_CAR_SENSOR
      , and then select
      Select
      .
  6. Save the project by doing one of the following:
    • From the menu bar, select save button.
    • From the
      File
      menu, select
      Save
      .
The rung looks similar to the following image:
Step result
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal