If you can’t get enough Microsoft, and if you like using Powershell on Windows, then you might be interested to know that Powershell can also be installed on PLCnext Control devices.
Please note the warning from Microsoft that this version of Powershell is only experimental.
This demonstration is for an AXC F 1152 or 2152, but a similar procedure should work for other PLCnext Control devices.
Procedure
- Using ssh (Linux) or PuTTY (Windows), log in to the PLC as “admin”.
- Download the latest tar.gz file:
wget https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/powershell-7.0.3-linux-arm32.tar.gz
- Unpack the tar.gz file in a directory:
mkdir ~/powershell tar -xvf ./powershell-7.0.3-linux-arm32.tar.gz -C ~/powershell
- Open the file
~/powershell/pwsh.runtimeconfig.json
in a text editor. - Add the following to the
configProperties
section of the configuration file:"System.Globalization.Invariant":true
(don’t forget to add a comma to the end of the previous line)My complete configuration ended up as:{ "runtimeOptions": { "tfm": "netcoreapp3.1", "includedFrameworks": [ { "name": "Microsoft.NETCore.App", "version": "3.1.6" } ], "rollForwardOnNoCandidateFx": 2, "configProperties": { "System.Runtime.TieredCompilation": true, "System.Runtime.TieredCompilation.QuickJit": true, "System.Runtime.TieredCompilation.QuickJitForLoops": true, "System.Globalization.Invariant":true } } }
- Start Powershell
~/powershell/pwsh
- Enjoy the power of Powershell.
Reference:
- “Installing Powershell on Linux”, https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7#raspbian, accessed 31 July 2020.
Leave a Reply
You must be logged in to post a comment.