Set up the runtime on the PLC
- Download the Dotnetcore Runtime Binaries - Microsoft .NET Core download site - for the AXC F 2152 it is
Linux ARM 32bit
. Note: You may also use a newer version, e.g. 3.0 - Unzip the Runtime .zip file
- Unzip the
Data
folder - Copy the unzipped files (host, shared and dotnet binary) to the controller at
/opt/DotnetRT
- Create a symlink to the binary (as root user)
ln -s /opt/DotnetRT/dotnet /usr/local/bin/dotnet
- Check if the link is setup correctly:
lrwxrwxrwx 1 admin plcnext 20 Nov 27 12:50 dotnet -> /opt/DotnetRT/dotnet
- Check if installation was succesfull:
dotnet --info
Do you have an idea, what I need to do?
Thanks.
Alex
Comments
Hi Alex,
Is there an executable named
dotnet
in the directory/opt/DotnetRT/
?Does this have execute privileges?
What happens when you run the command
/opt/DotnetRT/dotnet --info
?Is there a symbolic link named
dotnet
in the directory/usr/local/bin/
?Is this symbolic link pointing to the
dotnet
executable in the directory/opt/DotnetRT/
?Hopefully one of these checks will reveal the problem.
Regards,
Martin.
Hi Martin, I found a second example
https://www.plcnext-community.net/en/hn-makers-blog/424-install-the-net-core-runtime-3-0-0-on-the-axc-f-2152.html
This works also not exactly as described. I had some challenges to expand the files and copy to the PLC folders.
After some loops I got it running,
Putty:
admin@axcf2152:~$ dotnet --info
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
Host (useful for support):
Version: 3.0.0
Commit: 95a0a61858
.NET Core SDKs installed:
No SDKs were found.
.NET Core runtimes installed:
Microsoft.NETCore.App 3.0.0 [/opt/dotnet-runtime-3.0.0-linux-arm/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Now I will check, if I can work with TCPIP Socket (c#) on my PLCnext device
Thanks a lot.
Alex
Hello Alex,
the thing with Linux File Systems is that they are not supported by Windows so the moment you unzip it on a Windows OS lots of Linux file information go missing.
like the permissions , Exectuion property or Symlinks.
So after copying you need to restore those or unzip directly on the PLC.
chmod +x File -> to make it executeabled.
ln -s to restore symlinks...
You do not need the SDK on the PLC.
It also takes way to long to compile on target.
For running code the runtime is enough...
So I recommend you downloading the sdk to your PC only and set in the project properties that you are building for Arm32 Bit.
kind regards,
Oliver Warneke
My c# TCPClient is running on PLCnext controller, now.
Thanks a lot and Merry Christmas.
Alex