Powershell … 在 AXC F 1152 上?
如果您对 Microsoft 不够了解,并且喜欢在 Windows 上使用 Powershell,那么您可能有兴趣知道 Powershell 也可以安装在 PLCnext Control 设备上。
请注意微软的警告,此版本的 Powershell 只是实验性的。
此演示适用于 AXC F 1152 或 2152,但类似的程序也适用于其他 PLCnext 控制设备。
程序
- 使用 ssh (Linux) 或 PuTTY (Windows),以“admin”身份登录 PLC。
- 下载最新的tar.gz文件:
wget https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/powershell-7.0.3-linux-arm32.tar.gz
- 解压目录下的tar.gz文件:
mkdir ~/powershell tar -xvf ./powershell-7.0.3-linux-arm32.tar.gz -C ~/powershell
- 打开文件
~/powershell/pwsh.runtimeconfig.json
在文本编辑器中。 - 将以下内容添加到
configProperties
配置文件部分:"System.Globalization.Invariant":true
(别忘了在上一行末尾加逗号)我的完整配置最终为:{ "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 } } }
- 启动 Powershell
~/powershell/pwsh
- 享受 Powershell 的强大功能。
参考:
- “在 Linux 上安装 Powershell”,https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7#raspbian,访问 31 2020 年 7 月。
工业技术