Simulate an application

Simulating the running of an application signifies that virtual machines execute the code of individual controllers on the
Windows®
platform. Virtual machines disregard inputs and outputs.
The compiler generates different code for simulation than for online.
Build the code for the project and controllers to simulate an application. Start all controllers or start individual controllers for simulation.
The
Windows
platform executes all tasks such as binding exchanges and execution of program organization units (POUs). A virtual machine on the computer running the
AADvance-Trusted SIS Workstation software®
executes one controller.
During simulation, execute controller code with one of these execution modes:
  • Real-time, the run time normal execution mode where the programmed cycle timing triggers target cycles. Switch to cycle-to-cycle mode while in real-time mode.
  • Cycle-to-cycle, a cyclical execution mode where the virtual machine loads the code but only executes the code after executing one cycle or activating real-time mode.
    TIP: Breakpoints, cycle-to-cycle, and step-by-step execution are only available while simulating an application.
The simulation of an application follows this process:
  1. Start simulation.
  2. AADvance-Trusted SIS Workstation software
    connects to the simulator.
  3. The simulator starts execution.
  4. AADvance-Trusted SIS Workstation software
    sends the list of breakpoints to the simulator.
  5. Execution stops when the application encounters the next breakpoint.
    TIP: For applications with breakpoints, execution stops at the next breakpoint after receiving the list of breakpoints.
  6. The controller switches to step-by-step execution.
  7. Step into or step over the next code.
Set breakpoints for Ladder Diagram (LD) and Structured Text (ST) programs set to generate debug information.
To simulate an application
  1. For each controller to simulate, set these properties in the
    Properties
    window:
    • Set the
      Code for Simulation
      property to
      True
      .
    • Set the
      Start Simulation Mode
      to
      Real Time
      or
      Cycle to Cycle
      .
      TIP: Set the controllers to
      Cycle to Cycle
      mode to apply breakpoints to the first cycle.
  2. For the applicable programs and function blocks, set these properties in the
    Properties
    window:
    • Set
      Generate Monitoring Symbols
      to
      True
      to monitor the values for operators and functions.
    • Set
      Generate Debug Info
      to
      True
      to set breakpoints for programs and function blocks.
  3. From the
    Project
    menu, point to
    Connect Mode
    , and then click
    Simulation
    to set the connection mode for the project.
    The
    Simulation
    menu category appears with the simulation command options.
  4. Build the project code.
  5. In the
    Application View
    , select the project, then select one of these options from the
    Simulation
    menu:
    • Click
      Start Simulation Now
      to start the simulation of all controllers in the project.
    • Click
      Start Simulation
      , then in the
      Simulate
      dialog box, select the controllers for which to start simulation, and then click
      Simulate
      to start the simulation of some controllers in the project.
      TIP: Simulate one controller by right-clicking the required controller in the
      Application View
      , and then clicking
      Start Simulation
      .
  6. (optional) Set breakpoints for the applicable programs and function blocks, and then set
    Start Simulation Mode
    to
    Real Time
    for each controller to simulate.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal