- Open the library project in the cloud workspace.
- Start the agent connected to the PLC.
-
Configure the
launch.jsonfile (one-time action)- Click the debug icon
- Click "create launch.json file"
-
Adapt the newly opened
launch.jsonfile to your needs (for example certificate, PLC ID). Add the "symbolsPath" parameter, which must point to your library file.- Copy PLC ID: Open PLC Explorer, right-click on the PLC and choose Copy PLC ID
Example launch.json file
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug live on PLC",
"type": "plc-debug",
"request": "launch",
"program": "${workspaceFolder}",
"plcId": "09d14ab1-7848-4048-94e5-f3d6e813c20b",
"password": "",
"symbolsPath": "${workspaceFolder}/bin/plcsim/tiax.lib"
}
]
}
-
Add logpoints to your code in the locations you want to look at more closely
- By right-clicking a variable name and selecting "Add to logpoint"
- By right-clicking on the left next to the line number, selecting "Add Logpoint ..." and entering the variable you want to debug in curly braces, for example {myVariable}
The values are always retrieved and shown before executing the line of code in which the logpoint is located.
-
Start debugging by either opening PLC Explorer and right-clicking on the PLC or pressing the Play button.
-
Observe values
Note
Debugging the library in SIMATIC AX with SINUMERIK ONE is only possible via one of the PROFINET ports (x150, x160) present on the PLC module of the device. Debugging is not supported via CP.