PlcTool is a standalone command-line utility capable of performing many functions available in the Mervis IDE.
The main advantage of PlcTool over the standard IDE is its ability to be automated via scripts or external programs. It is ideal for batch management of controllers.
Please download the appropriate version for your operating system and architecture below:
PlcTool can perform the following actions on controllers running Mervis RT:
The tool is distributed as an archive that must be unpacked after downloading.
.\PlcTool.exe --help
sudo apt install icu-devtools libssl-dev libssl1.1
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 export DOTNET_BUNDLE_EXTRACT_BASE_DIR=/tmp/
./PlcTool --help
Note: Most subcommands (except `scan`) accept mDNS names, proxy addresses, or domain names instead of IP addresses.
./PlcTool scan
./PlcTool scan -ia 192.168.2.1
Sends a request to verify controller status, license, and RT version.
./PlcTool wait -h <host_address> -u admin -p rw-lok
Uploads a license code to the controller. Use `-up` if the license was already used previously.
./PlcTool license -h <host_address> -u admin -p rw -l <LICENSE_KEY> -up
Uploads a compiled program (`.exs` file found in the project's `bin` directory).
./PlcTool upload-image -h <host_address> -u admin -p rw -f <solution_guid>
Uploads the web interface files. You must restart the controller after uploading.
./PlcTool upload-web -h <host_address> -u admin -p rw -w <web_folder>/ ./PlcTool reboot -h <host_address> -u admin -p rw
Configuration is stored in XML format. You can download it, edit manually, and upload it back.
# Download ./PlcTool download-config -h <host_address> -u admin -p rw -f ./config.xml # Upload ./PlcTool upload-config -h <host_address> -u admin -p rw -f ./config.xml
PlcTool is designed for use in scripts. Below is an example Bash script that runs a scan and writes the output to a text file.
#!/bin/bash # Navigate to script directory cd "$(dirname "$0")" # Set required environment variables export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 DOTNET_BUNDLE_EXTRACT_BASE_DIR=/tmp/ # Run scan and pipe output to file script -q -c "./PlcTool scan -o text | tee PlcTool.txt"