# Appendix 6 – Setting up a digital trigger in ReXgen

Create a new configuration as per your requirement

Add a Digital channel to the configuration.

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2F9a0XeVismETXClYYIH9E%2Fimage.png?alt=media&#x26;token=31760772-7969-4d01-a85e-065c8e347ec3" alt=""><figcaption></figcaption></figure>

Configure the trigger.

Click on Triggers >> New Trigger, Select Trigger Action as Start Logging, and click Next.

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FaXO4IBQ0Bg3W9VzgCNvM%2Fimage.png?alt=media&#x26;token=22ce3321-a0ce-4b6e-9394-9d4dde670fe7" alt=""><figcaption></figcaption></figure>

Enter the trigger action settings;

Log time (If required), Pre-trigger time and Debounce, then click Next

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FuvZp4dFVzqb1JXG1u62I%2Fimage.png?alt=media&#x26;token=ccfc6188-0b33-49b1-97d1-e09cc7c1cf7f" alt=""><figcaption></figcaption></figure>

Choose Trigger Type as Digital Channel

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FyJ1oV4u4CSB4vJww7uNM%2Fimage.png?alt=media&#x26;token=501743a9-2da7-435f-8d64-9e3b09dac54a" alt=""><figcaption></figcaption></figure>

By default, Digital Channels will be 1, and you need to wire the switch between Digital PIN and the GND and choose the condition as falls or changes.

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FEmLFENjQTTzZkv4tEPCX%2Fimage.png?alt=media&#x26;token=e67e3cb6-536f-48b5-bdd5-10769eb9904d" alt=""><figcaption></figcaption></figure>

Click Next, and save the trigger.

Send the configuration to the logger.

The logger will start buffering the data for the duration of the pre-log time given; when the trigger becomes true, it starts writing the data for the given log duration or continuously as per your settings.

### The Digital and Analog Port:

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2Ff1vVxIPh04Slc08IzYCE%2Fimage.png?alt=media&#x26;token=f38baded-7ee0-4db6-ac7f-ac52d49b5585" alt=""><figcaption></figcaption></figure>

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FursQwSESWUHOyjQ9XR8k%2Fimage.png?alt=media&#x26;token=4dc9777e-cda0-4010-9474-7598e240f8a6" alt=""><figcaption></figcaption></figure>
