Scripts

Use Scripts in FactoryTalk View SE to manage PowerShell script files and trigger with the ScriptExecute command. Scripts are graphic-independent and all HMI servers share script files under the same application. When executing the script, it runs on the HMI server that triggered the script. The execution supports synchronous and asynchronous waiting modes.
Scripts can read tag's values and write values to tags. You can edit the script files in any script editor and they are stored in the FactoryTalk Directory. You can also import or export multiple script files at a time.
Supported script types include script files (.ps1), script modules (.psm1), and module manifest files (.psd1).
Because the script runs on the HMI server side, you may want to consider:
  • Who can configure the script at design time.
  • Who can run the ScriptExecute command that triggers the script.
To decide who can configure the script at design time, secure the resources in the explorer of FactoryTalk View Studio with common actions such as Write or List Children.
To secure the ScriptExecute command at runtime, do one of the following:
  • Assign a security code to the ScriptExecute command via
    Settings > Runtime Secured Commands
    in FactoryTalk View Studio, so that only user groups with the same security code are allowed to run the command.
  • Configure the disabled state or visibility of the button that triggers the ScriptExecute command, so that the button is only visible or enabled to user groups that are allowed to run the command.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal