Ethernet based bus systems spread very quickly at the moment. Well-known examples are EtherCAT, EtherNet/IP, Open Modbus/TCP, POWERLINK, PROFINET, sercos and VARAN.
The standard ethernet interfaces in any PC systems are not suitable adapter for this bus, because the reaction times of the Windows operating system do not meet the real-time requirements. Remedy a "smart" interface card such as the CIFX 50E-RE of company Hilscher ( www.hilscher.com). Describes how you can communicate with the help of this map of LabVIEW® via PROFINET with linear motor LinMot ( www.linmot.com) company.
1. configuration of the map
The interface of the CIFX card can be used for all buses listed in the introduction, in many cases even as master or as slave. The configuration is done by the fact that the corresponding firmware in the map is loaded. In our example, the PC with LabVIEW® as a PROFINET master is to operate and the linear motor is a slave in the system. The appropriate firmware for this application is called cifxpnm.nxf (P rofi N et M aster).
2. configuration of the linear motor
The first communication with the drive is not possible of course still interface on the PROFINET, because this is first configured. LinMot delivers a program LinMot_Talk, which allows the configuration of the controller via a serial interface. So the device as a PROFINET is found by our master participants, only the device name must be entered, this is done with the help of a tool:
Figure 1: configuration utility by Hilscher device name and IP address
For this configuration the PROFINET is connected to interface of the operator interface of the CP of normal Ethernet (and not with the CIFX card), after the configuration is then on PC side to the
Re-plugged PROFINET interface!
3. description file for the drive in the Hilscher software download
A PROFINET participant describes the design of its interface (number and grouping of bytes to be transferred) using a GSDML file (XML format), this file is for the configuration of a PLC as used as for the CIFX card. The file supplied by LinMot GSDML V2. 2-NTI_2348-PN_IO-V1. 1-20140219.xml can be imported by the Hilscher SYCON.net software, the drive is available in the library of known devices are available and can be used to configure our bus:
Figure 2: definition of our PROFINET bus with CIFX LinMot as slave and master
This configuration remains stored in the card, which means that immediately after switching on the PC the PROFINET interface and cyclically transmit data. The control LEDs for the bus on the
Card and switch on the drive to green = "Operation", without that we had programmed a single line. The API of the map you can also, making the entire configuration from the application software out, which is much more complex and unnecessary, because the card stores all the settings until further notice.
4 LabVIEW® interface for the CIFX card
To LabVIEW® out on the map, and so the drive can be accessed, the Hilscher DLL cifx32dll.dll must get a LabVIEW® interface. The DLL is this suitable, also functions that provide complex structures as a result get passed, the corresponding space as input parameters so that the memory management can be done completely by LabVIEW® from.
Figure 3: LabVIEW® VI for the DLL function xChannelIORead
Something more work you have to spend, to convert to C data structures in LabVIEW® cluster (and vice versa):
Figure 4: convert the structure read as a byte array BOARD_INFORMATION into a cluster of LabVIEW®
5 LabVIEW® interface for the LinMot drive
The actual communication between the CIFX card or will the drive automatically in the background, the map provides the user a process image available, the magnitude of which file defined by the GSDML
is. The next step is to fill the output side of the process image data and to interpret the input page, here are to write that assemble the contents according to the device manufacturer's interface description and break down again into LabVIEW® cluster similar to the features of the card driver before all VI.
Figure 5: VI to communicate with the LinMot drive
Our Musterapplikation consists of "Open interface", "Prozesbild read", "Write process image" and "Interface again close". In the event case in the middle of inputs can be treated, by reading its parameters from the user interface and builds output process image in the.
Figure 6: data of the telegram "Move to position" mount
Because the data is transmitted continuously and cyclically it is not easy to determine whether data was altered. The LinMot control used for a counter which must, adjustment of 4 bits, so that
Command is executed. The number format of the controller is also configurable, the default is "Bytes words not exchanged, but", the used here (unusual) neither "big-endian"
even "little-endian >".
With a map is the LabVIEW® programmers access to a large number of industrial Ethernet interfaces and act as master or as slave. For use as a master a paid license is required, the software of the master very much complex is, so a slave (has the much tougher but generally its timing requirements, but it dominated just sure the card with an own processor). With the license for such a map operation as bus master will cost around 450€.