# Configure FEN-20 PNP Sensor

### SOFTWARE LINKS:

Download and install Turck Service Tool

<https://www.turck.com.au/attachment/SW_Turck_Service_Tool.zip>

Download and install ARGEE programming environment

<https://www.turck.com.au/attachment/SW_ARGEE_Environment_v3.zip>

Download the Project File for AGREE

{% file src="<https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-ee6dcd369f87eb7d6a8724e2600ed50921e10823%2FFEN-20-Count-SIgnal.arg?alt=media>" %}

## Turck Service Tool

The Turck Service Tool is used to find the IP Address of the FEN-20 device on the wired network. With the device connected via ethernet, click search to discover all FEN-20 devices on the network. Record down the IP Address and the machine/asset the FEN-20 is on for later reference.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-c5e3ad37f35bc9db80e08a8f58a0145a1036e699%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## AGREE Programming Environment

The AGREE programming environment is used to program the FEN-20. For our use-case, we use it to turn the input signal into a counter and make this available via Modbus TCP in its registers. All that needs to be done is to import the project file at the top of this page by performing the following steps.

* Open the AGREE Programming Environment in the extracted folder

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-c3bd1e48d55e9638694e13c9aea10d797829b74b%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* Enter in the IP Address you found from the Turck Service Tool

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-4933154499c29444dc40ff2a6f575b6513940e54%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* Click Project in the title bar

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-0709d71c6b0c5fb2831c3f30b9aad8fc5ec1bab0%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* Open a Project and select the FEN-20-Count-Signal.arg file

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-03ef56c63cb9a8df553f69d62501a8c06df200fc%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* You’ll now see the program. Click Run to send the project to the device

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-c447f7ff3a04e0e51b194f4568e6c590504e568c%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* Now the program is running on the device, we can see count signal input on AGREE\_TO\_PLC Register 0

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-d11c5638f405daebeadc560e5bfe96aa5578286a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* You can now safely exit the window, this can be either closing the tab or closing the browser window.
* Lastly, you can connect TilliT to read this count by configuring a Modbus TCP datasource and an edge data tag for register 16384
