Is it possible to add multiple Ethernet adapters in rpi? I would like to use a vlan for modbus tcp. rpi allows me to create a vlan but how do I add that ethernet adapter in codesys. This would also apply to a usb or wireless network adapter as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am sorry but my original post was not clear enough. I have been able to add a vlan interface eth0.4 by loging in with ssh. Now I would like to configure it in codesys to use that interface for a modbus tcp master. When I right click and choose add a device and add an ethernet adapter it just says (Device uses operating system settings) in the configuration window. Is there some way to tell codesys which ethernet adapter to use?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
yes should work!
It is not needed to setup in CODESYS,
CODESYS takes the System settings.. means if you have a route to your modbus slave this
will work even with your vlan config.
Could you try it and give us the feedback?
BR Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it possible to add multiple Ethernet adapters in rpi? I would like to use a vlan for modbus tcp. rpi allows me to create a vlan but how do I add that ethernet adapter in codesys. This would also apply to a usb or wireless network adapter as well.
yes...most usb ethernet adapters work out of the box...Wifi need to connect and authenticate. If you have a second adapter you have to enable it
###Use putty SSH to connect to PI user:pi password:raspberry
###Check if USB adapter was found
lsusb
dmesg
###Setup enable second network interface to have DHCP
sudo nano /etc/network/interfaces
####Modify/Add the following lines
auto lo
auto eth0
auto eth1
iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet dhcp
allow-hotplug eth0
allow-hotplug eth1
###(ctrl-x Save exit)
sudo reboot
###Use putty SSH to connect to PI user:pi password:raspberry
###Check if second ethernet USB adapter was initialized
ifconifg
if you want to get WLAN adapter to work follow the following steps
http://pingbin.com/2012/12/setup-wifi-raspberry-pi/ m
I am sorry but my original post was not clear enough. I have been able to add a vlan interface eth0.4 by loging in with ssh. Now I would like to configure it in codesys to use that interface for a modbus tcp master. When I right click and choose add a device and add an ethernet adapter it just says (Device uses operating system settings) in the configuration window. Is there some way to tell codesys which ethernet adapter to use?
Hi,
yes should work!
It is not needed to setup in CODESYS,
CODESYS takes the System settings.. means if you have a route to your modbus slave this
will work even with your vlan config.
Could you try it and give us the feedback?
BR Edwin