Create a ladder diagram and add variables

Create a ladder diagram and then add local variables to the rung. This sample program uses a 2080-L50E-24QVB controller. The HSC is supported in all L50E controllers.
Prerequisites
  • Create a
    Micro800
    controller project and add a controller that supports HSC.
  • The controller is offline.
To create a ladder diagram and add variables
  1. In
    Project Organizer
    , right-click
    Programs
    , and then select
    New program
    .
  2. In
    New program
    , enter the program name, verify that the type is
    Ladder diagram
    , and then select
    Create
    .
  3. Open the program by doing one of the following:
    • Double-click the program.
    • Select the program, and then select the
      Enter
      key.
  4. Add a direct contact to the first ladder rung by doing one of the following:
    • In
      Toolbox
      , in
      Search
      , enter
      XIC
      , and then drag it to the first rung in the language editor.
    • In
      Toolbox
      , double-click
      XIC
      to add it to the first ladder rung.
  5. Assign a variable to the direct contact.
    • Right-click the
      XIC
      instruction, and then select
      Select variable
      .
    • In the variable selector, select the
      <controller-name>
      navigation tab, and then double-click
      Global Variables
      .
    • In the global variable selector, select
      _IO_EM_DI_05
      , and then select
      Select
      .
  6. Add an HSC instruction by doing one of the following:
    1. In
      Toolbox
      , in
      Search
      , enter
      HSC
      , and then drag it to the right of the XIC instruction in the language editor.
    2. In
      Toolbox
      , double-click
      HSC
      , and then drag the added HSC instruction to the right of the XIC instruction in the language editor.
  7. In
    Project Organizer
    , under the program you created, double-click
    Local Variables
    .
  8. In the local variable gird, add the following variables:
    Local variables
    Variable Name
    Data Type
    MyCommand
    USINT
    MyAppData
    HSCAPP
    MyInfo
    HSCSTS
    MyPLS
    PLS
    MyStatus
    UINT
    The local variable grid looks similar to the following image:
    HSC example local variable grid
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal