https://www.automationdirect.com/productivity (VID-P2-0013)
Learn how to use Port Forwarding to connect to a Productivity Series Controller that is behind a router in this brief step by step tutorial!
Our FREE Practical Guide to Programmable Logic Controllers eBook: https://www.automationdirect.com/ebooks/plc-handbook
Port forwarding is an easy way to access Productivity Series Controllers that are on their own network behind a router from the Productivity Suite Software. BUT it's not a very secure way to access those controllers. So if network security is a concern for you, then you'll want to use a VPN to access your Productivity Controllers. We'll cover VPN's in a separate video. In this port forwarding demo we'll be using a PC at this IP address going to a router on the same subnet but at dot 57. The Productivity 2000's that we'll be using will be behind that router on their own local 192 dot 168 network at these addresses. The port number that the Productivity Series controllers use to listen to Ethernet messages is Port is four 9's. To get the Productivity Suite Software to communicate the Productivity controllers, we'll send all of our messages to the router at address 172.31.51.57, but we'll append a unique port number to tell the router which Productivity Controller we want to talk to. You can use anything you want as long as it isn't already used on your network for something else. I'll use four 1's for controller number 1 and four 2's for controller number 2 just so it's easy to remember. Nothing special about those numbers I just made 'em up because I don't have any other devices on this network to worry about. Inside the router, we'll setup a table to cross reference those port numbers to the IP Addresses of the local Productivity controllers. So when the Productivity Suite Software sends a message to this IP address and this port number, the router will look in the table and see that all messages with this port number are supposed to be forwarded to this controller. And all messages sent to this port number should be forwarded to this IP Address. Hence the name port forwarding. We're using a Cisco Linksys E1000 router and it has a dedicated port to connect to the external network and four ports for the local area network or LAN. Let's connect the external network port on the router to the PC using this USB to Ethernet Adapter. I've already set up that adapters IP address to the 172.31.51.60 that we'll be using in this demo your network will have a different IP Address, of course. That takes care of this connection. I'll connect a laptop to one of the four LAN ports on the router and set it to this IP address so we can configure the router using it's default 192.168.1.1 IP Address using its built-in configuration utility. Finally we'll add the Productivity Controlelr's Ethernet connections to the LAN Side of the router. I setup the Productivity Controller's Ethernet IP Addresses before I started this video. If you need to see how to configure the Ethernet port on a Productivity Series Controller, check out the Productivity Ethernet Quick Start Video. It shows you how to connect to the Productivity Series controllers over Ethernet. OK, we're all wired up and the networking around the router is configured so now we just need to setup the stuff inside the router. We configure the router from the laptop, which you can't see on this computers screen, so I'm going to just show you screen shots of what that looks like. From the laptop, I logged into the router using its default LAN IP Address which for this router is 192.168.1.1. There was a login screen which for this Linksys E1000 router the user and password were admin, admin. In the Basic Setup Menu, this router was setup for DHCP so it would get its IP address automatically from the network. I changed it to this static IP address to ensure the router is on the same subnet as the PC with the Productivity Suite software which was at 172.31.51 dot 60. So I just set the router at dot 57 so it would be different than the dot 60. And even though we don't have a gateway in our simple little demo here, this router required I enter something so I used this. If you ARE going through another router then you will want to add its IP Address here as the gateway. I also had to go over to the security page and turn off this filter internet requests so I could ping the router and test my connection. Great, that takes care of the connection to the external world where our Productivity Suite Software is. If I ping the router from the PC, sure enough I get a response. Perfect. This side of the router is ready to go. Now let's do the LAN side of the Router. Back on the Basic Setup Menu, we're using the routers default LAN IP Address here with this subnet mask and we don't need the DCHP since we are only talking to our Productivity Series Controllers which all have fixed IP Addresses. I pinged the Productivity Series Controllers from the laptop and sure enough I could reach both of them. So all the networking on this side of the router is working now. Great. I should mention I also turned off the wireless functionality of this router. The IT guys here hate it when we bring up extraneous Wi-Fi signals OK, now it's time to connect this side of the router to this side. We do that with Port Forwarding - which on this router is under Applications and Gaming you can see I gave each Productivity Controller name, specified the port numbers that will come from the Productivity Suite Software on the PC, the local IP address of each Productivity Controller and the Productivity Controllers port number. That's the same fixed port number on every Productivity Controller. So any messages that come into the router on this port number will be forwarded to this IP Address and this port number. Any message that comes in with this port number will be set to this port number and IP Address. Here's a key point the router you use has to have the ability to specify the Productivity Controller's port number like this. Some of the routers I tested wouldn't let me specify the Productivity Controller's port number so I couldn't use those routers for port forwarding to a Productivity Controller. This NETGEAR router's port forwarding is a good example I can specify a range of external ports coming into the router, but there is no place to put the Productivity Controller's Port number or what some routers call the internal port number - so watch out for that. Ok, we've spent a lot of time talking about how to setup the network for port forwarding. But if you think about it, all we really did was wire the PC and Productivity Controllers to the router, setup our network addressing and configured the router to talk to the PC and the Productivity Controllers and to forward messages. That's it. The bottom line is all this stuff we have done so far is stuff you need to do with your network, you're your router, and your IT guys. And while your router and your network will be different from this, hopefully you now have a better idea of what to look for and what you need to do. Ok, given all that networking and router stuff, setting up the Productivity Suite Software to talk to the PLC's on the other side of the router is easy. Start the Productivity Suite Software and start a new project. This is the CPU we are suing so hit Continue. Let's connect to this Productivity Controller on the other side of the router. CPU, Choose CPU. The Productivity Suite scans the network looking for compatible Productivity Hardware. There are a bunch of compatible controllers out there, but we don't see the ones we want that are on the other side of the router. Why not? Well, because the Productivity Suite can't see what's behind a router so it can't automatically detect those PLCs. So what we need to do is setup a connection to that Productivity Controller by hitting this Add connection button. Now we know the addressing information of those Productivity Controllers so all we have to do is hit this add connection button and set it up. Here we type in the IP Address of the ROUTER not the Productivity Controllers - and the port number that identifies which Productivity Controller we want to talk to. When we hit OK, just like always, the Productivity Suite Software automatically scans the network and it finds the controller. Exactly what we expect. Now we just select that controller and hit connect. And just like that, we are now looking at a Productivity controller on the other side of the router. And are ready to start coding our project. To look at the other controller, go off line, CPU, choose CPU. Add a connection to the router's IP Address, and add the port number that will tell the router which Productivity controller to send messages to. The Productivity Suite scans the network and there it is. Highlight it and connect. Now we're talking to this Productivity controller. So once you get your networking stuff all setup to do port forwarding, using it from Productivity Suite Software is simple. Just add a connection to the router and specify which port number. Easy. If you need any help with the Productivity Series Controllers or any of AutomationDirect's ten's of thousands of parts please contact AutomationDirect's Free Award Winning Tech Support during regular business hours. They will be happy to help. But please, don't call them looking for help on your router or your network setup they aren't setup or trained to do that. And of course, don't forget the forums there are lots of folks there that love to share their years of experience. Just don't post any questions directed at AutomationDirect's support team there, they don't monitor the forums on a regular basis.
Voted #1 mid-sized employer in Atlanta
Check out our
job openings