Coder Social home page Coder Social logo

heisenzerga / sewprofinetlabview Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 25.18 MB

A quick and dirty way to use PROFINET with LabVIEW without additional hardware. Example: SEW Eurodrive MOVIKIT Positioning / Velocity Drive with SIEMENS TIA Profinet Driver

License: MIT License

labview profinet siemens sew

sewprofinetlabview's Introduction

Control SEW eurodrive MOVIKIT via Profinet and LabVIEW

Siemens provides an easy guide on how to use Siemens devices with Profinet and LabVIEW. But in fact, you can use TIA and the .dll to implement other devices into your system. You will REQUIRE the 32-bit version of LabVIEW! Here I will show you how to impement an SEW eurodrive frequency converter DFC20A with MOVIKIT Positioning / Velocity Drive (used for a pump) into the system. For a full picture, here are the technical details of the converter: DFC20A-0025-503-A-T00-001

And a picture of our pump: witte_pump_with_sew_DFC20A

Basically, you will need to follow the instructions of the Siemens guide for their "SINAMICS G/S: PROFINET Connection with LabVIEW" with some twists at the end, so please register there to download the .dll required in this project! siemens_website_labview https://support.industry.siemens.com/cs/document/99684399/sinamics-g-s%3A-profinet-connection-with-labview?dti=0&lc=en-WW The documentation is marked in blue. Download it as well as the Library marked in yellow. Unzip the library into your user.lib folder to create e.g. C:\Program Files (x86)\National Instruments\LabVIEW 2018\user.lib\PNIO

Now you will need follow some parts of the Siemens guide:

  1. Find MAC adress of your ethernet connection find_physical_adress_ethernet

By the way: No need to switch of all connections as described by the Siemens guide. 2) Download and install TIA (https://support.industry.siemens.com/cs/document/109772803/simatic-step-7-incl-safety-and-wincc-v16-trial-download?dti=0&lc=en-WW) 3) Download the GSDML file of the frequency converter to be used in the TIA portal. This can be done either by downloading it from the repo, where there is the data of the DFC20A, or by directly finding your appropriate file in the SEW documentation: https://www.sew-eurodrive.de/os/dud/?tab=software&country=DE&language=de_de&search=TIA 4) Install the GSDML file into TIA. Here is a quick video: https://user-images.githubusercontent.com/60081398/124129198-d8eb5280-da7d-11eb-9499-e7d77ef0a319.mp4

  1. Find pump in the TIA portal: pump_in_TIA_portal Please mind the device type of your pump (5) and the IP adress (6). You can change the device adress later on, but it always has to match the adress of the driver in the first 3 numbers (e.g. 192.168.30.3 for the pump and 192.168.30.4 for the driver). The device name can be changed as well.

  2. Configure communication Drag and drop the PROFINET Driver as described in the Siemens guide: Siemens_TIA_Profinet_Driver

  3. Adjust the IP adress to match the pump in the first 3 numbers: Configure_profinet_driver_IP

  4. Drag and drop the device type of your pump and connect it to the driver using the port. The configuration has to match your physical configuration! If you are using the X1 Port 1 on your pump, you have to connect it to Port 1 in TIA! connect_pump_to_profinet

  5. Now for the telegram module of the SEW converter: Click on the converter and go to network view and connect the driver to the converter: connect_pump_to_profinet_network Next, click on the converter and switch to the Device view.

  6. Assign the communcation modules (drag and drop) as well as the E-Adress and A-Adress (this will be the adresses, where the information will be sent or received, e.g. 0 to 31) device_view

  7. Create XML-File and copy it into your Labview project folder: export_xml

  8. Open SEW.vi

  9. Paste location of the .XML file and E-Adress and A-Adress into the VI, as well as the MAC adress of the ethernet connection (SMALL LETTERS ONLY!!! NO CAPITAL ONES!!!)

  10. Use .VI provided to communicate with the converter. In the example, we use the converter with a pump. The .VI is supposed to control the speed of the pump, so here is the actual process data used: first_process_word speed_control

You can find the codes for the communication here: 25871137.pdf In chapter 8 you will find all process data that can be used. The process data can either be statuses in bits that are combined into a single number, e.g.: 1100010111 will lead to 1817 (example from the status word of the running pump -> PI 1) or a number like PI2 that represents the actual speed: Interface

Behind all that is the PNIO.dll that is fed like a function in a real programming language: Block_diagram In our .VI we use the following process input data from chapter 8.2 (the data that comes out of the converter... I know....) Process_input_data

Troubleshooting

The main deal is to get the profinet connection established, then the profinet on the pump will switch from red to green. profinet_failed profinet_established If you have problems with my .VI upgrade to LabVIEW 18 or build your own.

Using a secondary network and what to do, when the pump cannot be found?

You must turn off DHCP on the network you are using (a secondary one in this case) and add the IP address of your Ethernet to an address that matches that of your pump in the first 3 numbers ip_config

Communication Error

Should you get an error like PNIO_ERR_NO_CONNECTION shown as 0x00000301 or 301, there is a chance that you have to reinstall WinPcap v4.1.3 (https://www.winpcap.org/install/). Look if npcap is installed, you might have to uninstall it.

PNIO.dll not working

PNIO.dll requires two more dlls that may be missing or were not installed: Packet.dll and wpcap.dll. In this case you need to reinstall WinPcap v4.1.3.

Manual Control and Configuration

You can download MOVISUITE to control and set up SEW products: https://www.sew-eurodrive.de/os/dud/?tab=software&country=de&language=en_us&search=movisuite

Alternative

Prior to this rapid adaptation of Profinet for LabVIEW, one of the ways you could use Profinet was through the NI hardware and software package: https://www.ni.com/de-de/shop/hardware/products/pxi-profinet-interface-module.html manufactured by KUNBUS: https://www.kunbus.de/df-profinet-io.html This method is still valid if your are planning to use industrial ethernet and cannot use a normal ethernet switch. On the other hand, academic applications do not require this fast and stable method of communication, so if your goal is to just get a pump or motor running, we recommend our method.

sewprofinetlabview's People

Contributors

heisenzerga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.