Script Files

Overview

The following describes how to write script files (default script file or dynamic script file) to be executed from an SD card or by an application using the ExecScript function block.

Script files can be used to:

  • Configure the Ethernet firewall.

  • Perform file transfer operations. The script files for these commands can be generated automatically and the necessary files copied to the SD card using the Mass Storage (USB or SD Card) command.

  • Change the Modbus slave port for Modbus TCP data exchanges.

Script Syntax Guidelines

The following describes the script syntax guidelines:

  • End every line of a command in the script with a ";".

  • If the line begins with a ";", the line is a comment.

  • The maximum number of lines in a script file is 50.

  • The syntax is not case-sensitive.

  • If the syntax is not respected in the script file, the script file is not executed. This means, for example, that the firewall configuration remains in the previous state.

NOTE: If the script file is not executed, a log file is generated. The log file location in the controller is /usr/Syslog/FWLog.txt.