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:
- Start simulation.
- AADvance-Trusted SIS Workstation softwareconnects to the simulator.
- The simulator starts execution.
- AADvance-Trusted SIS Workstation softwaresends the list of breakpoints to the simulator.
- 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.
- The controller switches to step-by-step execution.
- 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
- For each controller to simulate, set these properties in thePropertieswindow:
- Set theCode for Simulationproperty toTrue.
- Set theStart Simulation ModetoReal TimeorCycle to Cycle.TIP: Set the controllers toCycle to Cyclemode to apply breakpoints to the first cycle.
- For the applicable programs and function blocks, set these properties in thePropertieswindow:
- SetGenerate Monitoring SymbolstoTrueto monitor the values for operators and functions.
- SetGenerate Debug InfotoTrueto set breakpoints for programs and function blocks.
- From theProjectmenu, point toConnect Mode, and then clickSimulationto set the connection mode for the project.TheSimulationmenu category appears with the simulation command options.
- Build the project code.
- In theApplication View, select the project, then select one of these options from theSimulationmenu:
- ClickStart Simulation Nowto start the simulation of all controllers in the project.
- ClickStart Simulation, then in theSimulatedialog box, select the controllers for which to start simulation, and then clickSimulateto start the simulation of some controllers in the project.TIP: Simulate one controller by right-clicking the required controller in theApplication View, and then clickingStart Simulation.
- (optional) Set breakpoints for the applicable programs and function blocks, and then setStart Simulation ModetoReal Timefor each controller to simulate.
Provide Feedback