Hello,
Today I am able to test ma industrial computer in my test bench.
I am able to do all the configuration throught my VPN, 100% remote.
I can see the gateway & the Virtual PLC.
Now I would like to do some Modbus TCP Client & Modbus RS485.
But I am lost due to docker !
When I go to modbus TCP it only gave me the docker network, but not my eth0 & eth01
When I go to modbus rtu, how can I create the link between Com number & my /dev/ttyRS485
RS485 doesn't seem very logical to use in VPLC's in my opinion. I also don't know if this is supported....
But for TCP/IP, I think you still need to configure the Nic settings. See the attached png. In my case enp6s0.
When changing this setting, restart the VPLC.
What is really nice, is that you don't have to configure the IP address setting in Linux. By setting the Nic to a certain IP address in the CODESYS instance configuration, this is automatically done for you.
I only tested this with EtherCAT, but I guess this works the same for Modbus TCP/IP.
For small project, I would like to use my industrial computer as a PLC + Industrial Computer.
Like that I can save the cost of one PLC.
That why I am using Codesys on Linux.
With the nic it is not working.
I already set the IP adress with /etc/network/interfaces. Can it comes from there ?
looking to "Control Linux SL" docuemntation it should work with rtu.
It seems you have 2 network interfaces. Did you try eth1?
Did you already configure the IP address for this interface in Linux? If yes, then maybe undo this.
- or only set eth0 in the Nic configuration without anything else (so no IP address, because this is already set in Linux).
PS, if you only want to run CODESYS Control SL, you don't necessarily need the Virtual PLC variant. You could also install and run the CODESYS Control SL Runtime in the Host operating system. This way you should also be able to access the serial port and directly access all ethernet ports. Maybe this is easier?
Last edit: TimvH 2024-10-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Most likely your IP address is set to 172.... because you use a VPN connection to your device. Probably best to use the other Ethernet interface for your modbus communication.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Today I am able to test ma industrial computer in my test bench.
I am able to do all the configuration throught my VPN, 100% remote.
I can see the gateway & the Virtual PLC.
Now I would like to do some Modbus TCP Client & Modbus RS485.
But I am lost due to docker !
When I go to modbus TCP it only gave me the docker network, but not my eth0 & eth01
When I go to modbus rtu, how can I create the link between Com number & my /dev/ttyRS485
Loic,
RS485 doesn't seem very logical to use in VPLC's in my opinion. I also don't know if this is supported....
But for TCP/IP, I think you still need to configure the Nic settings. See the attached png. In my case enp6s0.
When changing this setting, restart the VPLC.
What is really nice, is that you don't have to configure the IP address setting in Linux. By setting the Nic to a certain IP address in the CODESYS instance configuration, this is automatically done for you.
I only tested this with EtherCAT, but I guess this works the same for Modbus TCP/IP.
For small project, I would like to use my industrial computer as a PLC + Industrial Computer.
Like that I can save the cost of one PLC.
That why I am using Codesys on Linux.
With the nic it is not working.
I already set the IP adress with /etc/network/interfaces. Can it comes from there ?
looking to "Control Linux SL" docuemntation it should work with rtu.
Last edit: winki 2024-10-23
I made a mistake it is not end0 but eth0. But I have the same error.
It seems you have 2 network interfaces. Did you try eth1?
Did you already configure the IP address for this interface in Linux? If yes, then maybe undo this.
- or only set eth0 in the Nic configuration without anything else (so no IP address, because this is already set in Linux).
For more information about the Nic settings, see (probably already read it?):
https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_obj_deploy_control_sl_configuration.html
PS, if you only want to run CODESYS Control SL, you don't necessarily need the Virtual PLC variant. You could also install and run the CODESYS Control SL Runtime in the Host operating system. This way you should also be able to access the serial port and directly access all ethernet ports. Maybe this is easier?
Last edit: TimvH 2024-10-23
Maybe I don't know.
**Maybe if someone know it can help me. **
I will try Constrol SL runtime in the Host.
I will try to but only Nic without IP
I do not have error anymore using nic with eth0 value.
But my network it still 172.17.0.3 like the first picture.
Most likely your IP address is set to 172.... because you use a VPN connection to your device. Probably best to use the other Ethernet interface for your modbus communication.
No, my vpn is 10.0.0.12.
The docker interface is 172.17.0.1.
Your right, much easier with Linux control SL ARM.
Everything is working.