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.

  1. 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.

  2. Click button af560f1ddec8b9d6c0a8640e01881c1a_1c1810501108e68bc0a8640e01b2d0e8 .

    The Insert standard command dialog appears with a list of commands.

  3. 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.

  4. Click again af560f1ddec8b9d6c0a8640e01881c1a_1c1810501108e68bc0a8640e01b2d0e8 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

  5. Click button af560f1ddec8b9d6c0a8640e01881c1a_379d3b8945773148c0a8640e0139d9cb in the command line.

    Command pid App1 is added to the history of already entered commands.

See also