How to Connect an Aventics Air Valve Manifold to an Omron CJ PLC Over Ethernet IP

Hello this is Ray Marquiss, Senior Application Engineer with Valin Corporation. This video is going to show how to connect an Aventics AES Ethernet IP bus coupler with an Omron CJ PLC with Ethernet IP.

Before you start doing the work, we need to make sure you have everything you need. There are some parts from Aventics, parts from Omron, so from Aventics we need coupler of course. And the IO: your valves and your digital IO and analog IO. You need this browseconfig.exe program which comes from Aventics, and that is used to set your Ethernet address on the AES coupler. It's very difficult to do without that. There's also an EDS file.  The EDS file has configuration information about the hardware that you are connecting to your Ethernet IP network. And then you need an Ethernet cable and power cable, and I've given 2 examples of each here in this on this screen. These are the ones I used, so you can get the part numbers for those straight ones. There's also right angled ones and different configurations where you can have flying leads instead of a connector and so on. From Omron, of course, we need the CJ PLC system. That's the whole thing with power supply and IO modules plus an Ethernet IP interface, you can have either the built-in Ethernet IP interface or one added with the communication module. You'll use CX programmer which is installed with CXOne. You'll also use the network Configurator for Ethernet IP, which is installed with CXOne as well. And finally, you'll need an Internet browser so that you can connect to the web server on the AES coupler to get information from it that you'll use in your configuration.

I tried to go through the steps that you would use to configure this and…I put the 1st 2 steps up here, they're just…if you're teaching someone to make a peanut butter Jelly sandwich, you don't want to forget to tell him to take the lid off, so of course, power up the coupler and power up the PLC and notice on the coupler that there are two power connections in the same connector. One is for the coupler itself and one is for the IO or the valves that are connected to the coupler, so valve and IO power and then coupler power.  You want to connect the PLC, the coupler, and the PC to an Ethernet switch so that you can have Ethernet connected to all three. You connect the PC to the PLC with the USB cable.  You want to have both the USB connection and an Ethernet connection from your PC to the PLC so that once you get everything configured using the USB you can just use the Ethernet connection. The network configuration has to be done over USB. You'll use CX programmer to set the IP address of the PLC. Then you'll use browse config to set the coupler IP address. Then you'll use the network Configurator for Ethernet/IP to configure and download the Ethernet/IP network to the PLC. And then you'll use CX programmer to create a program that turns on the valves as you need.
Just an overview of the PLC. This is the CJ2M CPU3 type and the CPU3 type has an Ethernet/IP port built in. There's an Ethernet connection on it. And the most important thing here are the switches. There are three Rotary switches on the front of the CPU. This one at the top and the two at the bottom.  The one at the top is for the unit number, and you must set that unit number so that it's unique to any other communication units that you have on the system. So if you have serial module or another Ethernet module you want to make sure that all of them have a different unit number set by these switches. If you have special units like position control or analog output, or anything else that's considered a special IO module, those unit numbers are different than the communication units, and so you just need to make sure that this one sets the number unique for communication units only.  The bottom two switches are for the last octet of the IP address, and the common practice is to have those two switches set the same as the last octet of the IP address that you're going to set when you go in and do the software configuration of this using CX programmer. If you set these switches different than the last octet that’s set in the software, you'll get a little error light flashing, but everything will still work. And remember that those switches set a number in hex, so if the last octet of my IP address is 10, I would use the switch on the right, the node number switch on the right, to set to “A”.

This just shows the connections to the coupler on the left hand image. And in the right hand image are some LEDs that give status. The X7E2 and X7E1 connectors on the left image are the Ethernet connections. Ethernet/IP is Daisy chain, so when you connect to X7E2 that can come from the PLC for instance, and then X7E1 could go to the next node in the network. You just want to make sure that you don't end up setting up some network topography that is a ring or circular topography.  That will cause you problems. The LED's on the right are pretty self explanatory. Basically when you have everything working right, you want to see all the lights green, except LA1 and LA2 may be flashing between green and yellow. Those are just telling you that there is communication going on that connector. The X7E2 and X7E1.
And this is what the hardware looks like as an image as a picture. It could look different than this depending on how you've configured it with valves and IO.  The coupler is the part that's risen up with the connectors sticking out of it, the silver connectors.

Even though it's not in the steps that I listed, this is normal Ethernet stuff that you have to do no matter how you're connecting or what network you're connecting over Ethernet.  When you are using Ethernet, you need to make sure that all of your devices…normally you want to make sure that all your devices are on the same subnet, and so you would go to your Ethernet and change the properties of your IPV 4 connection. My network is going to be 172.21.90. network and so my PLC is on 172.21.90… I think it's 6. We’ll see in a minute.  I need to make sure that I'm on that same network.  If my PC isn't on that same network, then I'm not going to be able to communicate with the PLC even though the cable’s plugged in. I also want to make sure that my coupler is on the same network. But the first step get your PLC on the target network. In this case, for me it's 172.21.90, and I've set my last octet, or node number, to 101 for the PC. And then you'll just hit OK to accept all that. And now we're set.

Next I'm going to set up the coupler IP address. You don't have to do it in this order. You can do the PLC 1st and then a coupler, but you just want to make sure that before you start trying to make any network configuration that you've got the IP address is set correctly for your PC, the PLC and your node or nodes on the Ethernet/IP network. So we're going to start this “install_browseConfig” utility. I got this from Aventics. It's a little tough to come by, but Valin will have it so you can call us and we can help you out with it. Once you get that started, it's going to have you install it. I'm not going to go through the process of installing, but once it's installed then it's going to be in your program files, so I'll cancel this installation and browse to my C drive, and then program files X86.  And even though this is Aventics, it's in the Rexroth folder because Aventics was bought by Rexroth. I will just keep browsing until I get in there. And then run the browse config software.

If you remember back, I set my network card to 172.21.90.101, so will use that one. I'm going to search. OK, so it found this IP address out there for my coupler because I've already configured it. When you do this the first time, this will say 0.0.0.0. And what you want to do is go over to the device parameters. Also DHCP will be enabled, so you want to disable that and you can just either double click on it and say yes or no to enabling it. You want to set an IP address for that node, so I set mine to 172.21.90.100 to be on the same network as my PC and we’ll set the PLC in a minute.  Then your subnet mask. I left the local default gateway blank. And this device name: you can put whatever you want in here. You can create any name that you want just so that you have a name for it to reference back to. So no DHCP, set an IP address, set the subnet mask, local default gateway to zero, give it a name if you want, and then write to device. I'm not going to do that now, but it will write it out to the device and then you need to cycle power.  Once you cycle power, the couple will come up with this new IP address that you just put in it.

Next, we're going to start CX programmer and we can start a new project. We can give it any name we want to. This is shouldn't be new to experienced PLC programmers for Omron, but we're going to select the CJ2M; that's the type of PLC that I'm using in this example. If you're using any other type, of course you'd pick that. And I believe the CPU that I have is a CPU 31. If it's not, it's not a big deal. I can select any CPU model in here and then when I go to connect, it will tell me if I've got the wrong one.  But I think it's a CPU31.  We’ll start with that and I want to connect over USB so I'll select the USB from the list here. And then click on OK. Once I'm here, I can double check that I've got everything set correctly by going on line. I can click on this “work online” button, or I can go to the PLC menu and select “work online”. And we can see it says the PLC name of this project is different from the one in the PLC. Do you still want to go continue? It's just a warning in case you've got a bunch of PLC's in a group and you want to connect to one of them, but you accidentally connect to the wrong one. So anyway, I'm just going to say yes.

So I'm all connected. The background changes to this gray color. A few things show up that weren't there before. The first thing you're going to want to do, once you've powered up the PLC with your IO modules and your communication modules and so on is that you're going to go into the IO table and you want to go to the options and say, create the IO table, and you have to be in program mode to do it, and that's why it's grayed out here. So if I go to PLC-Operating mode, change it to program. And then go to options create. If this is a brand new PLC, this is the step that you'll go through and I'm just checking to keep doing whatever it is it wants me to do. And then it will give you this message and it seems silly, but it says it did all three of these things. Everything is fine. Yours will be different because you will have different IO modules and such attached to yours.

Next step is to go into the inner board, “built-in Port/Inner Board” because this has a built in Ethernet/IP port. Then right click and you can go to unit set up. When I created my IO table, it transferred settings from the hardware that was there. So since I've been playing around with this unit, it already had settings in it. But when you do this. For the first time, this will all be zeros. And so this is where you go in and set your IP address for your PLC. And remember to make this last octet match with the node number switches on the front of the CPU.  My node number or my last octet is 6 in my node number setting on the PLC has the right switch at 6. Once you've done all of this and you set your IP address and your subnet mask, then you can transfer from PC to unit. And you have to be in program mode for that. I'll just do it again. Transfer PC to unit. Transfer successful. But then it tells you that in order for that to take the new setting, it has to be restarted. So it says, “do you want to restart the unit?” I'm going to click on yes to restart it. And then it will tell me that it was restarted. If you want to double check that everything is OK, because remember I said at the beginning to plug this into an Ethernet port on a switch and then your PC to the Ethernet port. We can ping it. And we got a reply back from the PLC, so we have successfully changed the IP address to the one that we wanted.

Once we're done, we can just X out. And really, right now we don't need to be connected to the PLC anymore, but I want to make sure to put it back into a running mode and I choose monitor mode. Monitor mode and Run mode or the same thing. It's just that monitor mode allows you to have access to the PLC a little more. Then I'll go offline.

We've powered up everything we've connected everything to the to the Ethernet switch, and we've set the IP address of our coupler and we set the IP address of our PLC. So the next thing to do is to configure the network for the Ethernet IP with this new coupler on it. The way that we do that is we’ll go to CXOne with Omron. And when you're in Windows 10 and depending on how you've installed it, it comes up as a folder and when I click on that folder it opens the File Explorer and lets me see everything that's in there. The software that we want to use is the “Network Configurator for Ethernet/IP”. And there it is there. There's another way to do this, but I will start with this way it's always easier to use USB when you're doing the network Configurator. In fact, in order to configure the network, you have to do it through USB. Let's start that.

The next step is to go in here and add the EDS file that we downloaded from Aventics or Emerson. I'm going to install an EDS file. Browse to wherever I kept it. And I want this one, so I'll open it. And you can see it added it in under generic devices. So now I have an icon that I can drag over to my network to say that I have this device on my network. I’m not going to do that yet. I'm just going to delete it for now. The next thing that we want to do is go to this option interface, and we need to select the interface for communicating with the PLC when we use this software. Remember in the CX programmer I selected USB because that's the way I wanted to communicate to it to set the IP address and I'm going to do the same thing here. Make sure that USB/serial port is selected. Next we can go to the Network Tab menu option and Select Connect. And it says it wants to go to USB. This part is a little confusing and you just have to watch what I do and do the same thing. Shows this backplane. I'm going to click on the plus sign. And then I'm going to click on the plus sign again and I want to select this TCP2. Funny thing I've asked Omron about this and haven't really got a good explanation as to why that is, but that's the way you connect using USB in the network Configurator.

I'm going to use this existing network that I have here. I've created this even when I started the project that created Ethernet/IP_1.  I'll say OK. And then next thing I'm going to do is I could transfer from the PLC. To see what's out there. Occasionally when using third party devices with Omron, you'll get these warnings and basically what this means is that there's listed parameters for the Aventics unit, but there aren't really parameters that you can set and so it's just saying you can't set any parameters for that node. If you have this brand new, normally you would not get this Aventics unit up but you will get the PLC so let's just delete that. This is the way it will happen when it's brand new. You'll just come up with the PLC and no other nodes on there. And the nice thing about doing it this way and uploading the network before you start is if you look over on the left you can see there's a whole slew of different CJ type adapters on here. And so when you upload it, it automatically uploads and puts the correct hardware on the network.

So now we've got our CPU there. This is the way you would normally see it with a brand new unit or brand new system. Next, you would take your AES coupler EDS file icon and drag it over to the network and just drop it in there. And you can see we've got the IP address of the PLC, but not the IP address of the coupler set correctly. If I right click on the coupler here, I can go down to “Change node address”. 172.21.90.100 That's the address that we set with the browse and config tool. Next I need to double click on this, and I need to know what do I set the input size and the output size. In order to figure that out, I could go through and look at the documentation and they tell us how to configure or how to calculate the size in bytes based on all the hardware that's there. But that's so easy to make a mistake.

There's another way to do it, and this is where we need to use our browser. And I'm just going to go here and type in 172.21. And it's filled in already for me .90 and 100. And you can see that it went out to the web server on the AES coupler and gave me some information about it that might be handy for troubleshooting if you ever going back to Aventics or to me at Valin for troubleshooting. If I click on this system configuration here, you can see that it tells me which components are installed. You can see them listed here and then it tells me how many bytes are used for the input data size of the configuration and output data size of the configuration, and then down here is this checkbox. For the “Active stuff bytes for even data size”.  If I uncheck that, it makes the data size in my example 3 for the output data size and Omron’s network configurator doesn't like odd numbered bytes. It likes to see even numbered bytes, so I'm having the coupler add an extra byte to make sure that we have an even number of bytes for the configuration.
Using this information, I can go back, double click on the coupler and say the output size is 4 and the input size is 8. So I've got 4 bytes for output data, 8 bytes for input data, and that is input from the coupler and output to the couple.  Yours may be different depending on how you've got your hardware configured. I'm going to say OK to that by clicking on it.

Before I can assign this coupler to the CJ Master here, the Ethernet/IP Master, I need to create tags and tag sets which are ways that the PLC and the coupler exchange information. There's going to be input and output data from the coupler that goes to the PLC so that the PLC can write to the coupler to turn on the valves, for example. In order to create those tags, I'll just double click on the CPU. And I need to create an input set in an output set. It's going to be a few steps here.

First, I need to create a tag in the tag set. A tag set can have multiple tags in it, but I'll start with a tag set that has one tag in it. I'll click on edit tags, then click on new. When I click on new, I'm going to give it a name, and the name has to do with what area in memory you want the PLC to exchange information with the coupler, so I'm not going to go through the whole memory map and explaining that. I'm going to use an area that does not normally get assigned to any real-world hardware.  There are a bunch of areas in the PLC that are just sort of virtual and not really used for anything but internal bits, and one of the areas is the W, so I'll make this W.  Let's say this is W11. And since this is the input, we saw before that the input uses 8 bytes. Next step is just to register. It's registered, and you can see it up here, but it brought the window back up to register another one, because maybe I want to register a bunch of tags in that tag set, but I'm just going to register one tag, so I'll close this tool for now. Then I'll select OK to register this tag. And it's going to tell me that the tag I created is going to be added to a tag set and the tag set is going to have the same name. I don't need to keep it at that same name, and so I can edit the tag and go up here and say this is my “Input Data”, and this is for node 100, so I'll just add a “100” at the end.  That's just going to change the name of that tag set and this tag that's in there is W11.  We'll see how we use those in a minute.

Next, I need to do the same thing for the output, so I'll create a tag…”New”, and let's just say this is W101. And that's going to be 4 bytes. I'll click on register. Once again, the tool is there for me to make more, but I don't need it, so I'll close that tool and then say OK or click on OK to this to create that tag and it's going to create another tag set for this output data. So I'll click on yes here to accept that it's going to create a tag set for that one tag. Then I can edit the tag and call this “Output100” so that tells me when I'm looking at the data sets here that this is for node number 100. If I had multiple nodes, I might create A tag set for each one and I would have output 100, output 101 and so on.

Now that I've created those, I can just click on OK for the device editor. If I click and drag this icon or this graphic over to the CPU, that means I want this CPU to control it. The software pops up and asked me how I want to exchange information for that node with that CPU and it gives me the choice for my input tag set. I can select from here, and there's that input data that I selected. And then here's the output data that I created. Sorry, I said selected up above and I meant created. I created that tag set. Created this tag set. Now I'm going to register it. The tool comes back because maybe I have multiple nodes on here and I want to register them all and then go on, but I'm going to close this. And now I can see this little arrow here, and the last two octets of the IP address 90.6, which means that this node is being controlled by this PLC up here 172.21.90.6.

Finally, we can download that configuration to the PLC by clicking on the download button here. It tells me that I can't download unless I change to program mode, which is perfectly fine.  Change to program mode.  Then a warning that it's going to program mode. In case you're PLC's operating a machine you don't want to suddenly put it into program mode. And then it tells me that it's got a state conflict with that node 100, and that's OK, because that device really only has one state and that's run, and it's nothing really to download to it, but it's checking, so we'll just say continue on that. It's just going to basically skip over that, doesn't need to do anything to it. Some nodes have things that need to be done, and that's fine, but this one doesn't. And now it's going to turn the PLC back into a running mode because it had to put it into program mode to download this Ethernet IP network configuration. So I'll click on yes here. Once again, we see this object state conflict or a warning error here, rather, and in this case if you see this while you're using this tool and with this coupler, then this means nothing and you could just say “OK” and close.

By looking over at the PLC and the coupler you'll see that there are no error lights on there. Everything seems to be working OK. We're done with the configuration tool here, so we can either close it or keep it open. It's OK to do that. I'll show you why it might be nice to keep it open in a minute. And we're going to go back to the PLC programming software and we're going to create a really simple program that doesn't really do much. And the first thing I want to do is be able to turn on the valves. This is why you might want to keep the configuration software open. If you forgotten what you did, you can double click on. The PLC and go in here and look at the output and say, “oh that's right, I used W101 for my outputs to go to the coupler”. So click on close, then go back here and just create some simple program that says W101.0. For another one in W101.1. And I'll put the one farther down the line just to make sure that it's alright. I'll say W101.07.  It's going to be the 8th one to turn on the 8th valve.  And then I just need to complete the rung, so I put in some junk here. We’ll just put in junk that means nothing. This rung is not functional except for troubleshooting.
And then I want to monitor to make sure that the status of the coupler is being fed back to me correctly. So if I go back to the configuration software, double click on it and look at the input. I can see, oh that's right, I use W11 for the input data and it's going to be 8 bytes, which is 4 words in Omron PLCs.  So I'll go back to the program here, make this W11, W12, W13 and W14.  There's really nothing in anything except for the first word, but I'll put them all in there just to show. Then we download this to the PLC by going online first like we saw before. Once I'm online, I can go to this button that you can find in your toolbar up here and say transfer to PLC. …It's done. It's going to put it back into a run mode and there we go. So now if I turn this bit on. Once again, this is no logic; this is just a way to put some bits up here so that it can turn on and off easily. But if you listen, you can hear the valves turning on and off when I turn this bit on. And that one is definitely the 7th one [8th one]. You can hear it. Doesn't sound any different. No, that's a good thing. OK, and then down here there's not really a lot of status that we get back from the coupler other than if the power becomes disconnected for the valves. If I disconnect the power here on that, you can see that those first 2 bits in the first channel turned on. And those just tell me that somehow the power came loose for the valves in the coupler, and there's a flashing red lights and a solid red light on that power indicator that we saw earlier in the in the video. If I connect it back up again, you can see those bits go off, meaning that the power is OK for the valves on the coupler. Just to close the loop on that last bit, here is the documentation from the Aventics manual that shows that that byte 0 is going to give us the 1st 2 bits as an indicator of the voltage to the UA supply, which the UA supply is the actuator power supply, one of the bits means that the voltage is less than 21.6, so that's kind of a warning, and then the other one is that there's the voltage is off completely. That's bit one.

Thanks for watching. I hope you found this video helpful and that it gets you up and running faster than you would have without it. Otherwise my dad was right all along and I should have never given up that sweet job flipping burgers at Burger King. If you need help or information about either the Omron or the Aventics products, you can reach us using the contact information on the screen now. Thanks a lot, and have a great day. If you have questions you can call Valin at (855) 737-4716 or fill out our online form.