|AutomationDirect Live Chat|
This video details the process of setting up the Ethernet/ IP communication between the Stride SE2 Managed Ethernet switch to a Productivity series PLC. Theis communication will allow for monitoring and controlling the managed switch.
Just to verify before we begin, these are the minimum requirements to able to use Ethernet/Ip with a Productivity series CPU. To set up Implicit Ethernet ip messaging you will need this assembly instance information. This information is what is used to point to the correct memory location and the amount of data that is contained there. Now, this data is split into the Input data block and the output data block. So the input data is what we are reading from the Stride Switch and the output data is what we are writing to the switch. These tables define the input and output data block mapping. All of this information can be found in appendix E of the Stride SE2 User manual and we will be referring to them later in this video. So to make this connection, Open up the Productivity project you will be using. Double click on the Hardware configuration and then select the Ethernet/IP Tab from the top. Now Drag the generic client, from the right, into the grey area. You can place an induvial tag for all of these elements or you can check the box Use Structure. This will create a structure of tags that can be used for this device making it a lot easier on the programmer to create, use and find the correct tags. It really will make your process easier. So, I am going to select the Use Structure and give it the following name. Now you will need to give your Device a name. Type in the Ip address of the Switch. The TCP port number for the switch valve will always be 44818. Click on the Green cross and select Select Add IO messaging. These tags will also be part of the original Structure created above. Now, this tag in particular will become important later. When it is enabled, It will start the Reads and write to the data blocks at the RPI that we select. Here you see that there are now 3 tabs. Lets’s start with the Input data block From this information we see the assembly instance should be 101. Now This array portion is a part that catches some. The data array data type that we use here must match the data size of the input data blocks. The size of the input data block is in bytes and there are 156 of them in total. So we need to create a data array of a 8 bit type, which matches the bytes, and has at least 156 columns. SO type in the name of the Data block you want to create and when you try to select the Number of elements you will then be asked to create this array. Change the Data type as 8 bit unsigned and increase the number columns to 156. Select ok. And then Increase the Number of elements to 156. Now select the output tab . The Assembly instance is 102. I am going to name my output data array as the following and when I select the number of elements I will be asked to create the array. Change the data type to 8 bit unsigned and the column size to 20. Click ok. Now Change the number of elements to be 20. On the Configuration word all we need do is uncheck this enable box. That completes the client setup to the switch. When we select Ok her we will be completing structure for the Ethernet/Ip Client. Since this communication is handled by the client there is no need for any ladder code. So transfer this project to the CPU, and with the PLC in Run, let’s open up the Dataview. Enter in the Enable tag from the Ethernet/IP Client Structure, check the Edit box and send the edit to the CPU. That is all you will need to do to get these devices to talk to one another. So, let’s check the status on the switch ports. So, place the input array into the Dataview, and this will need to be viewed as Binary to make sense. From the input map we see that port 1 status is the most 2 significant bits. The next 2 bits would be for port 2, the next 2 port 3 and so on. I have a device connected to port 1 and that shows correct as the bit pattern is zero 1. Now if I remove the cable to port 1, I get 1 zero. And if the port was disabled we would get 00. If you have any questions about using this Ethernet managed switch, or any of our products, please contact AutomationDirect’s free award winning support team during regular business hours. They will be happy to help. Click here to learn more about AutomationDirect’s many support options and click here to learn more or see more videos on the Stride Switches, and be sure to click here to subscribe to our YouTube channel.