Communicate PLC and Boron 2G/3G using Ethernet FeatherWing


Just to put you in context: I would like to Read/Write some variables from a PLC (Siemens S7-1200 just to be more specific). These variables will be accessed through “Particle Cloud”.

My questions is: Could I use current libraries from particle to achieve this? or should I port Ethernet library from arduino?


Best regards,

Are you trying to access an Ethernet and TCP/IP equipped PLC (probably on an isolated network) from a Boron, to allow control via the Particle cloud via cellular?

If so, there are two potential issues:

One is that the Ethernet FeatherWing does not support static IP addressing. So the Ethernet network must have a DHCP server, or it won’t bring up the TCP/IP layer.

The second is that once you have a valid link layer and accessible gateway on a Boron with an Ethernet FeatherWing, by default it assumes that it will be the valid connection to the Internet and will not attempt to connect to the cloud via cellular anymore. If there is no link (you unplug Ethernet) it will automatically switch to cellular, but if there is a link it will not fall back.

The second problem should be possible to work around in user firmware, but the DHCP requirement cannot be worked around without modifying Device OS.

Hi Rick,

Thanks for your quick and detailed response.

The answer to your questions is YES

Is it worth porting the libraries for Ethernet from Arduino (so I could define a static IP and communicate via TCP)? or do you think Device OS won’t allow it at all? don’t want to waste time hehe (I would look for an alternative), can’t think about a DHCP server at this point.

The Boron is actually a HUB which collects data from some BLE sensors, but since it will be close to this PLC(machine), I was thinking about getting the data from it too ( two birds with one stone) in order to provide a cooler solution :grinning:

Best regards,

It’s hard to say for sure which would be easier. There’s also a third option, which is probably the one I would do:

Use the Particle Ethernet FeatherWing hardware, but not the Device OS support.

  • Leave the Ethernet detection feature flag off so Device OS won’t look for the port.
  • The Ethernet FeatherWing is just a Wiznet W5500. It has a simple AT interface with a socket implementation for TCP and UDP. There are some libraries available for it, I would just use one of those.
  • Since you have direct control over the Wiznet, you can do the IP address management yourself.
  • Since the Wiznet is not connected to the Boron’s IP stack, you preserve the gap between the isolated network and the Internet.

I’ll give it a try a come back to you with the outcome.

Thanks for your help and support.