Libraries_BA Libraries for Building Automation This Zip-File contains WAGO I/O PRO libraries for Building Automation The following applications are supported. Editorial archive; Eaton Unveils Highest Performing Modular Surge Protection Device for Complete Process Reliability 12/09/2017 Power management company Eaton. Hi, Actually, here is some info. I used toolbox from software toolbox. Now I want it to be connected to my OPC server name which is "CoDeSys.OPC.02". ![]() Programming Raspberry Pi With CODESYS: 8 Steps. Now for this step we will need the additional parts as detailed in Step 1. Wiring the system: - Slide the industrial IO modules together. Connect the industrial IO module to your 2. V power supply. (see picture) ( All the wires I am holding out the way are just looping the digital outputs to the digital inputs for testing)- Power the IO on. We will also need to connect the Pi up slightly differently. You will need to connect the Pi to your network connection through your USB to Ethernet adapter. ![]() General. B. Vogel-Heuser/A. Wannagat (2008) Modulares Engineering und Wiederverwendung mit CoDeSys V3, Oldenbourg Industrieverlag; Herbert Bernstein (2007) SPS. ![]() Bare in mind this will probably give us a different IP address to earlier and will appear next to device "eth. Pi when using the command "ifconfig".- Connect the Pi to your network through the adapter using one Ethernet cable.- Connect the IO (using the top port) to the Pi's Ethernet port using the other Ethernet cable. Power on the Pi. Before we can connect the IO, we will now need to make sure you have the device description XML files from the industrial IO manufacturer and these are added to CODESYS. If you are using Beckhoff the XML files can be found here: http: //www. Download and unzip the zip file somewhere safe.- Open CODESYS, from the toolbar select Tools > Device Repository..- Click "Install.." - Navigate to the folder you just unzipped and select the XML file "EKxxxx" and click open, CODESYS will automatically install the device.- Repeat the above 2 steps for all other devices you brought, in my case for EL1. EL2. 00. 8 I install "EL1xxx" and "EL2xxx". Now to connect to the industrial IO using CODESYS: - Start a new project in CODESYS and connect to the Pi the same way as shown in Step 3.- Right click on "Device" on your device tree and select "Add Device..".- From the new window (see picture) select "Ether. CAT Master" and click "Add Device".- Close the window.- Right click on "Ether. Cat_Master" on your device tree and select "Add Device..".- Select "EK1. Ether. Cat > Slave > Beckhoff Automation System Couplers and click "Add Device..".- Close the window.- Right click on "EK1. Add Device..".- Select the first of your IO modules, in my case the "EL1. Ether. Cat > Slave > Beckhoff Automation Digital Input Terminals and click "Add Device..".- Repeat the above step for all additional IO in order of how they are connected to the system coupler. There is a scan feature you can use to automatically add all IO but I will not cover that in this instructable as it is good to understand how CODESYS builds up the IO. We will now need to find out the hardware (MAC) address of the Pi's Ethernet port to tell CODESYS where to look for the IO, to do this either plug the pi into a monitor or SSH and use the command "ifconfig" in the terminal. You are looking for the code next to HWaddr from the port eth. Once you have the address we need to add it to CODESYS: - From the device tree, double click on "Ether. CAT_Master".- Enter the hardware address from earlier into the text entry field "Source Address (MAC)". All the hardware is now setup and we are now ready to create our first program to control the industrial IO.- Double Click on "PLC_PRG (PRG)" in the device tree.- Now copy the text from my screenshot ( I have attached . This is essentially a blinking routine based on two timers to blink the output 1 LED from The Beckhoff IO. We now need to link our Variable "Output. Beckhoff IO, to do this: - Double click on "EL2. Go to the "Ether. CAT I/O Mapping" tab.- Double click on the first variable box. Click on the ".." which has now appeared in the box. Now we need to select the variable Output. Application > PLC_PRG then double click on "Output. That output is now mapped to that variable. To run the program: - Press "F1. Also found under "Build" on the toolbar.- Once the code has compiled, press "Alt + F8" on your keyboard to login to the Pi (or the PLC to now give it it's correct name). Also found under "Online" on the toolbar.- Click "Yes" on the pop up to download the program. Once the program had downloaded, press "F5" to run the program. Also found under "Debug" on the toolbar. You should now see the output 1 LED on the Beckhoff Terminal blink at a 1 second interval. To see the code working, double click on "PLC_PRG" from the device tree and you should see a live feed of the status' of the variables. To stop the code press " Shift + F8" on your keyboard. Also found under "Debug" on the toolbar. Linking Inputs from EL1. Try wiring the output 1 into input 1 and adding a variable to see the variable also switch between false and true. You can now control Industrial grade IO using a raspberry Pi, think of the possibilities. Some examples could include using Analog Inputs to monitor different sensors, PWM outputs to control motors etc. If you encounter any issues, I have added my Codesys program file to the Instructable for comparison.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
October 2017
Categories |