PLCSIM Advanced: Simulate & Test PLCs
On this page
The PLCSim Advanced panel lets you create and control PLCSim Advanced simulation instances and read, write, and watch their live tags, so PLC logic can be exercised without physical hardware. This panel is included from the Pro plan; on the Basic tier the Activity Bar icon and the open command show an upgrade notice and the panel does not open. Letting the AI assistant operate the instances for you (see Working with the AI Assistant) is part of the Pro+ plan. The separate Hardware Simulation pane, which drives simulated values with signal generators, force overrides and linker rules, is included from the Pro+ plan.
Opening
The panel opens as a full-page dashboard editor in the center editor area. Reach it in any of these ways, all of which open the same dashboard:
- Select the PLCSim Advanced icon in the Activity Bar (the icon strip on the far left). The dashboard opens straight away, and the Side Bar stays as it is.
- Pick PLC Sim in the View menu.
- Run PLCSim Advanced from the Command Palette (
Ctrl+Shift+P). - Click the PLCSim entry in the Status Bar at the bottom.
Opening it again brings the same dashboard to the front.
If PLCSIM Advanced is not installed on the machine, the dashboard shows a branded empty state with a Download PLCSIM Advanced link instead of an unusable dashboard.
Runtime Manager
The Runtime Manager row controls the PLCSIM Advanced runtime:
- Access mode: choose PLCSIM (Softbus), TCP/IP Single Adapter, or TCP/IP Multiple Adapters.
- Strict motion timing: toggle the global setting (editable only when no instance is registered).
- Communication port: enter a port between 1024 and 65535 and use the button to open or close it.
- API version: the reported PLCSIM Advanced API version (read-only).
The access mode and port controls are disabled while any instance is running, stopped, or booting.
Virtual Ethernet Adapter
The adapter row shows the health of the PLCSIM Advanced virtual Ethernet adapter: a status pill (OK, APIPA, Down, No IPv4, or Not found), the adapter IP address, and a plain-language hint when the adapter is misconfigured (for example, "no DHCP lease, set a static IP" or "adapter disabled, enable it in Windows network adapters"). A Reload button re-reads the health. These warnings resolve most cases where a TCP/IP instance will not start.
Simulation Instances
Each registered simulation instance appears as a card. The New Instance button opens a dialog to create one: pick the CPU type (S7-1500 family: S7-1500 (unspecified), CPU 1511 / 1513 / 1515 / 1516 / 1517 / 1518), then enter the name, IP address, subnet mask, and gateway.
Each card shows the instance name, a state pill (Run / Stop / Booting / Off), the CPU type and IP, a TIA PLC selector (map the instance to a TIA Portal PLC, or leave it on "Auto (match by name)"), a Simulation speed list that runs the simulated clock from 0.1x to 100x real time (1x is real time), and a compact row of action buttons:
- Power On / Off
- Run / Stop
- Memory Reset (available when stopped)
- Network: opens the Network dialog to set the IP, subnet, and gateway per hardware interface (available when the instance is off)
- Tag Browser: toggles the embedded tag browser into the card
- Delete: unregisters the instance (available when off)
Each button is enabled only when its action is valid for the instance's current state.
Saved Instances
The Saved Instances row lists instances that are registered but not loaded. Each row has a Load button to bring the instance up and a Delete button to remove it.
Tag Browser
Toggling Tag Browser on a running instance connects to it and shows its tags as an expandable tree (structures and arrays drill down). The browser covers hardware-channel tags, marker tags, system tags, and data-block variables. Per tag you can:
- Read: show the current value inline.
- Write: a prompt suited to the tag's data type (TRUE/FALSE for Bool, a number for numeric types, free text otherwise), then the value is written and re-read.
- Watch: add the tag to a cyclic watch list that refreshes its value once per second while watched.
Only one card hosts the tag browser at a time; toggling it on another card disconnects the first.
In a very large project the browser lists the first 10,000 tags and says so above the tree, for example "Showing the first 10000 of 25000 tags of this instance." Unit tests and the AI assistant still reach every tag of the instance.
Working with the AI Assistant
From the Pro+ plan, the assistant in the AI chat can do everything the dashboard offers; the free trial unlocks it. With the Pro plan you operate the dashboard yourself, and the chat does not offer the PLCSIM tools. Ask it in plain words, for example "create an instance PLC_Test with a CPU 1516 at 192.168.0.20 and start it", "set PLC_Test to RUN", "run the simulation of PLC_Test ten times faster" or "set the start button of the conveyor to TRUE and read the motor output".
The assistant can:
- tell you whether PLCSIM Advanced is installed, which instances are registered or saved, and their state, address and speed;
- create an instance with its CPU type and address, load or delete a saved instance, and remove an instance from PLCSIM Advanced;
- power an instance on and off, set it to RUN or STOP and reset its memory;
- change the address of an interface, the online access, strict motion timing and the simulation speed of one or all instances, and open or close the communication port;
- choose the TIA PLC whose tags an instance shows, or set it back to the match by name;
- list the tags of an instance, read their values, also several times in a row, and write new values.
Reading never asks. Every change first shows a confirmation card in the chat that names the instance and what will happen, for example that a memory reset resets retentive values or that deleting a saved instance loses the program on it. Nothing changes until you click Allow, and the dashboard shows the change right away.
A few rules apply:
- While a unit test is running, the assistant changes nothing in PLCSIM Advanced; it only reads.
- The online access and the strict motion timing for new instances can change only while no instance is registered, and the strict motion timing of one instance only while it is powered off. The assistant tells you what to do first.
- While the Tag Browser of a card or a unit-test run is connected to another instance, the assistant cannot read tags. Close the Tag Browser or wait for the run to end.
- The assistant uses these tools in the chat of the main Studio window.
Together with the unit test tools, the assistant can prepare an instance for a test suite on its own and point the suite at it, see Letting the assistant set up the connection.
Hardware Simulation with PLCSIM Advanced
In the Hardware Simulation pane, click Connect and choose PLCSIM to connect the simulation to a running PLCSIM Advanced instance, then enter the name of the instance.
The simulation needs to know which PLC of your TIA Portal project runs on that instance, so it can load the hardware and write values. It uses the TIA PLC selected for the instance on its card in the PLCSim Advanced panel. When none is selected, Studio lists the PLCs of the open project under Select the TIA Portal PLC, with the PLC of the same name as the instance preselected when there is one. The PLC you pick is stored as the instance's TIA PLC, so the next connection and the PLCSim Advanced panel use it too. Press Escape to cancel without connecting.
When no TIA Portal project with a PLC is open, Studio connects with the name of the instance as the PLC name. If no PLC has that name, a message says that the hardware could not be loaded: open the project and connect again.
Hardware Simulation over OPC UA
In the Hardware Simulation pane, the Devices & Channels view connects the simulation to a controller. Click Connect with OPC UA as the transport, or click Add Source and choose OPC UA to add a further controller as a source. Both ask the same questions, one after the other:
- Endpoint URL: enter the address of the OPC UA server, for example
opc.tcp://192.168.0.1:4840. The last address you used is filled in. - Select Endpoint: the list shows the endpoints the server offers, the most secure first. Each entry names its security mode and security policy, for example "SignAndEncrypt, Basic256Sha256", together with the server name, the endpoint address and its security level. The endpoint you used last time is preselected. If the server cannot be reached, a message names the address and the reason, and nothing is connected.
- Authentication: choose Anonymous, or Username and Password when the server requires a login.
- With Username and Password, enter the User Name and then the Password configured on the controller.
Press Escape at any step to cancel without connecting.
Studio remembers the endpoint address, the chosen security mode and policy, the type of login and the user name for the next time. The password is kept only while Studio is running: after a restart, Studio asks for it again.
If the server presents a certificate that is not yet trusted, Studio asks whether to connect anyway and trust it for this session. This also applies to endpoints with the security modes Sign and SignAndEncrypt.
EPLAN Device and Page of a Channel
When an EPLAN project is open in Studio, the channel list of the Devices & Channels view shows two more columns at its right end: EPLAN Device with the device tag of the signal in EPLAN (the field device, or the PLC card when EPLAN names no field device for the signal), and EPLAN Page with the schematic page of the PLC terminal. Click the page, or press Enter on it, to open it in the EPLAN page preview. Hover over the device to see its mounting location and the symbolic address in EPLAN. When EPLAN uses the same address twice, the first entry is shown and the hover says how often the address is used.
The columns appear only for channels that EPLAN knows, and only with an EPLAN licence (Pro+ or Enterprise). They update by themselves when the EPLAN project changes, when you connect to EPLAN or when you open another EPLAN project. See EPLAN Signals to TIA Tag Tables for how addresses in EPLAN and TIA Portal are matched.
Saving and Opening a Simulation
You can save the simulation you built as a file and open it again later. This way you keep several setups side by side, share them with colleagues or keep them in the repository of your project.
Save Simulation As... writes the simulation functions, linker rules, forces and watch entries, the cycle time of the engine and the connections they use to a file ending in .hwsim.json. You find the command in the title bar of the Hardware Simulation editor (in the ... menu), in the title bar of the Devices & Channels view and in the Command Palette. Studio suggests the folder of the open file, otherwise the folder of your TIA Portal project. Save Simulation writes back to the open file; when no file is open yet, it asks for a name like Save Simulation As....
The file holds no passwords, no user names and no acknowledgment of the fail-safe I/O. After opening a file, you sign in to the controllers and acknowledge the fail-safe I/O as usual.
Open Simulation... loads a file and replaces the current simulation as a whole:
- When the current simulation already holds entries, Studio first shows what the file holds and what the current simulation holds. Forces that are not in the file are removed, and their tags keep the last forced value.
- When the engine is running or paused, Studio offers Stop and Open. The engine then stays stopped; start it again to apply the simulation.
- When the file was saved for another primary connection than the one connected now, Studio says so. You can still open the file.
- For each connection the file needs that is not connected, Studio asks what to do: Connect connects it with the settings from the file (you type the password), Use with the name of one of your connected sources of the same type takes that source instead, and Keep Unassigned opens the entries without a connection; they then show that their source is missing. Press Escape to cancel without changing anything.
- A damaged file, a file that holds a password or a file saved by a newer version of Studio is not opened, and nothing changes. A file is opened completely or not at all.
After opening, the four tables and the cycle time show the content of the file. While the simulation is connected, Studio also lists the entries whose tags the connected controller does not have; these entries are kept. You can also open a file while the simulation is not connected; the tables fill when you connect.
The editor tab shows the name of the open file next to Hardware Simulation, followed by (modified) after a change you have not saved yet. Studio never asks you to save when you close it, because the current simulation is kept between sessions anyway.
Hardware Simulation with the AI Assistant
From the Pro+ plan, the assistant in the AI chat can operate the Hardware Simulation pane completely. Ask it in plain words, for example "connect the simulation to PLC_SIM1 and start it", "simulate the tank level as a ramp from 0 to 100 in ten seconds", "when the start button is TRUE, set the motor feedback to TRUE after 500 ms" or "force the emergency stop input to FALSE and watch the motor outputs".
The assistant can:
- connect the simulation to a simulated PLC or an OPC UA server, add and remove further sources, and disconnect;
- start, pause, resume and stop the engine and change its cycle time;
- list the modules and channels of the hardware (with the EPLAN device and page of each channel when an EPLAN project is open), search tags, browse an OPC UA server, and read and write values;
- add, change, switch on and off and remove forces, simulation functions and linker rules, and check a linker rule before it is saved;
- manage the watch list and read its current values;
- save the simulation to a file and open a simulation file, each after a confirmation card that names the file and says what is replaced;
- acknowledge the fail-safe I/O simulation and withdraw the acknowledgment;
- tell you which writes of the engine failed and why.
Reading never asks. Every change first shows a confirmation card in the chat, and nothing changes until you click Allow. The open Hardware Simulation pane and Devices & Channels view show the change right away. Loading the hardware of the project again and choosing which source the views show need no confirmation, because they change only what you see.
A few things to know:
- When a server asks for a user name and password, Studio asks you in the same prompt as the Connect button, or uses the password you entered for that server earlier in this session. The assistant never sees the password.
- When a server presents a certificate that is not yet trusted, the assistant tells you, and connects only after you allow a card that says the certificate is accepted without verification.
- The simulation writes only after the hardware of the connected PLC is loaded. The assistant loads it when it connects, with the TIA PLC selected for the instance in the PLCSim Advanced panel or the PLC of the same name. When neither exists, it asks you which PLC of the open project to use.
- On a simulated PLC, you can name a data block value the way TIA Portal writes it, for example
"Motor_DB"."Speed". The assistant finds it, also in linker rules, and tells you when the PLC has no such value. - When a tag already has a force or a simulation function, the assistant tells you so right away instead of showing a card.
- The assistant uses these tools in the chat of the main Studio window.