EcoStruxure Machine Expert can be automated with the Python script language.
The Python scripting capabilities in EcoStruxure Machine Expert are exposed in various ways. The table lists different entry points:
Where |
Input type |
Description / Use case |
How to open |
---|---|---|---|
Logic Builder user interface |
Interactive (REPL) |
Interactive Python shell with a command-line interface, embedded in the user interface of EcoStruxure Machine Expert. |
Menu command Logic Builder (also refer to the chapter Using the Logic Builder Scripting Immediate View). in the |
Python file (*.py) |
Select a script file to be executed from within the user interface of EcoStruxure Machine Expert. |
Menu command Logic Builder (also refer to the chapter Using the Logic Builder Scripting Immediate View. command in the |
|
Stand-alone shell |
REPL |
Interactive Python shell with a command-line interface, running stand-alone (without the graphical user interface of EcoStruxure Machine Expert). |
Open LogicBuilderShell.exe without command-line arguments (refer to the chapter Using the Logic Builder Shell). |
Python file (*.py) |
Executes a Python script from the Windows command-line, from a batch file, or similar ways. |
Open LogicBuilderShell.exe with a script file as a command-line argument (refer to the chapter Using the Logic Builder Shell). |
The following sections provide an overview of how Python scripting integrates in EcoStruxure Machine Expert for different use cases.
The Logic Builder user interface allows you to execute script files via the command or executes scripting statements via the view
The Python) interpreter integrated in EcoStruxure Machine Expert allowing you, for example, to start functions.
view is a (The
view hosts an interpreter and is based on REPL principles.The block diagram shows how the EcoStruxure Machine Expert user interface is using the script engine to execute Python commands: