-

Controller Simulation

This topic contains the following sections:

Note
  • The controller simulation is available for PLCnext Technology targets with a firmware version 2022.0 or newer.
  • For some controller types the simulation must be unlocked by license.

    For any other controller type than the AXC F 1152, activate the simulation license as usual in the Phoenix Contact Activation Wizard.

  • For particular controller types, the simulation may not be supported.

Further Info
Information on how to install the simulation application and install/select different simulation images (i.e. versions) is available online in the PLCnext Community.

Note
This topic only applies to the standard (non-safety-related) controller. The steps for simulating the Safety PLC are described in the help chapter "Safety PLC Commissioning: From Compiling to Debugging ‣ Safety PLC Commissioning: From Compiling to Debugging
×‣ Connecting vs. Monitoring Mode vs. Debug Mode
×‣ Safety Cockpit: Controlling the Safety Application
×‣ Safety PLC Diagnostics out of the Safety Cockpit
×‣ Monitoring/Debugging the Safety PLC
×‣ Monitoring Mode: Displaying Online Values
×‣ Debugging Safety-Related Code: Forcing/Overwriting
×‣ WATCHES: Monitoring/Debugging the Safety-Related Application
×‣ Safety PLC Simulation
×
".

General information on the Controller Simulation

PLCnext Engineer includes a controller simulation which you can use to simulate the execution of the application logic. This is useful,

Note
The simulation of the application may not replace the proper function test using I/O devices/sensors/actuators under any circumstances. The simulated test may only be performed in addition to the standard function test, as a preliminary test, for example.

The PLCnext controller simulation is a separate application which actually emulates the CPU of the controller set as target your project.

It is able to simulate the entire controller behavior and it processes the identical machine code as generated for the controller involved. Therefore, no rebuild is necessary when switching between real hardware and simulation in the Cockpit (see below).

Starting with PLCnext Technology firmware versions 2024.0, communication between PLCnext Engineer and the simulation is handled via TLS and secured with a self-signed certificate. For firmware versions up to 2023.9 this is not the case.

When working with the controller simulation ...

Setting the controller simulation as target system

  1. In the PLANT, double-click the controller node and open the Cockpit.
  2. On the 'Cockpit' toolbar, select 'Simulation' from the drop-down list.
    If the 'Simulation' entry cannot be selected, no simulation is available for the controller type used.

The simulation is started automatically when establishing a communication connection from PLCnext Engineer (see section below). This can be done, for example by selecting the 'Connect...' command in the Cockpit or by writing and starting the project:

While the simulation is started and connected, a dialog with a progress bar is visible. (For firmware versions as of 2024.0, some additional information of the simulation boot process may be shown in the startup dialog.) Clicking 'Cancel' in this dialog, terminates the simulation and the connection establishment.

The simulation may request a user name and password when starting up.

After having connected the simulation, the PLANT shows the controller node as simulation node. The shield icon beside the node is different from the shield icon which indicates a controller connection:

All commands and debug operations now relate to the simulation. This includes the commands in the context menu of the controller in the PLANT and in the ONLINE STATE window (which is located in the Cross Functions Area at the screen bottom).

Once the simulation has been started it stays active until...

A simulation for a FW version as of 2024.0 is able to save its current state before shutting down. When exiting the simulation, a dialog appears where you can decide to save or discard the current state. The state is saved with the project data and the next start up of the simulation will be accelerated.

Simulation credentials

The logon data for the simulation is as follows:

Possible operations with the simulation