Functional Description

Device - <name device module>

The Device Module implements the device OsiSense XUW for EtherNet/IP. This device is added under the Industrial Ethernet manager with the name selected within the Add Function From Template dialog box.

The device is preconfigured. The configuration includes the connection Exclusive Owner with the assemblies 100 (output) and 101 (input). The Request Packet Interval (RPI) is selected with 50 ms.

Global Variable List - GVL_<name device module>

The Device Module implements a GVL. This GVL is added under the Application node within a folder with the name selected within the Add Function From Template dialog box. The GVL gets the same name as the folder and the device but with the prefix GVL_.

The GVL contains several groups of variables, some of which are universal, others are especially defined for purposes of this Device Module. The variables are grouped in:

oVariables which are linked to the program code for monitoring and control EtherNet/IP communication with the device.

oVariables which are mapped directly to the inputs and outputs of the device.

oVariables which present the data received from the sensor in the correct format and data-type.

oVariables which are used to control and monitor the processing of images over the fieldbus.

The variable definition in this Device Module is just an example and must be adjusted according to your own application. Despite the required modifications, the clear name of the GVL and the uniform naming of the variables facilitate a simple and structured implementation into the application.

Program - Prg_<name device module>

The Device Module implements a program. This program is added under the Application node within a folder with the name selected within the Add Function From Template dialog box. The program gets the same name as the folder and the device but with the prefix Prg_. Besides, the program-call is added automatically to the associated task.

The implementation of the OsiSense XUW vision sensor in your controller application is dependent from the configuration of the sensor and its utilization in your system. Especially the variables which represent the results of image processing are individual. The use case realized with this Device Module is just an example and must be adjusted according to your own application. This example application implements the following functions:

oMonitoring and control of the EtherNet/IP communication with the sensor

oConversion of the received data and mapping to the corresponding variables from the GVL

oMonitoring of the image counter and signaling if a new image has been processed by the sensor and new results are available

oTrigger the processing of a new image

The program is divided into several actions. These are described in the following table.

Name of the action

Description

A01_ComCtrl

Processes the functions to monitoring and control of the EtherNet/IP communication with the device.

A02_ConvertResults

In this action the input data which are provided in bytes are converted to the corresponding variables with the appropriated datatype.

A03_SensorCtrl

This action contains the program code to control the sensor over the fieldbus.

Further information about the control logic is available inside the program in terms of comments.