Using PLC Shell for requesting Information¶
The “PLC shell” in CODESYS iis a text-based control monitor (terminal) on a tab of the device editor. There you can enter commands for the request of specific information from the controller, as well as execute actions like starting, stopping or downloading applications. Also a description on the meaning and syntax of the possible commands you can get directly via the PLC shell.
The list of available commands depends on the PLC manufacturer. It can be extended via the so-called SPS Shell Command Handler
interface, either in a C-component of the runtime system, or as a function block in an IEC library or project.
The response from the PLC will be shown as a string in an output data window within the tab.
Requesting information about the application on the controller
Requirement: Your project is connected with a controller; Example: CODESYS Control Win V3, on which an application App1
is running.
Open the device editor double-clicking on the object CODESYS Control Win V3 in the device tree, and activate tab PLC shell.
- ⇒
The tab shows an empty output data window. Below there is an entry field for a command.
Click button
.
- ⇒
The Insert standard command dialog appears with a list of commands.
Choose command ? and click button Execute.
- ⇒
The dialog closes and in the output data window you see a list of the supported commands and their possible parameters. Each the syntax for how to enter the command is displayed.
Click again
and choose command pid. In the input assistant supplement the command as follows:
pid App1
. Press the Enter key.- ⇒
In the output data window the following gets displayed (the GUIDs are just exmples):
pid App1
Project Identification
Application: App1
Code GUID:0x08a893c0
Data GUID:0x762d0e90
Click button
in the command line.
- ⇒
Command
pid App1
is added to the history of already entered commands.
See also