When you start the Logic Builder with user interface via LogicBuilder.exe, then the following two commands are available to open two views dedicated to scripting purposes:
Script execution in the EcoStruxure Machine Expert user interface via the command or via the view:
The Logic Builder Shell. It allows you to interact with EcoStruxure Machine Expert in a textual based interface in parallel to the user interface.
view is a host for the same REPL as you can use in theExecute the command
to open the view.The figure provides an example of how to open a project, find a device object and print its name in the
view.The Python statements and to execute them (using the REPL).
view allows you to enterTo run a Python script file, click the button or enter the script name into the prompt textbox and click the button.
Click the
button to reset the view and to clear the current scope.The Python variables you have defined.
view shows the content of theExecute the command
to open the view.Elements of the
view:
Element |
Description |
---|---|
button |
To add a watch expression, type the expression into the view prompt, and click the button. |
button |
To remove a watch expression, select an entry in the view, and click the button. |
option |
Select the option to enable the auto update function for expressions in the view.
NOTE: The process of refreshing values can lead to additional PC processor load.
|
button |
The view list is updated automatically each time a statement is executed in the view. To update the list manually, click the button. |
Enter and execute the following statement in the
view.projectName = "C:\\temp\\MyProject.project"
Proceed as follows:
Step |
Action |
---|---|
1 |
Enter |
2 |
Click the button in the view.
Result: The variable |
When you assign a different value to the variable projectName
, the changed content is displayed.