# Function

## Overview

![The Function Node.](https://3009747178-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MIspkFTPkuGkv4UgQGs-1330240639%2Fuploads%2Fgit-blob-f3320e1c2cf7cf29f50840cae84a39321f158189%2Fnode-function.png?alt=media)

The **Function** **Node** is customized by the user. The number and **Data Types** of the **Input** and **Output** **Sockets** and the functionality are defined in the **Node's** own **Logic**, which is accessed by either double-clicking the **Node's** or the **Function** on the **Function's** list.

The **Node's** **Logic** has two special **Nodes**: [**Function Input**](https://docs.incari.com/incari-studio/2021.1/toolbox/functions/function/function-input) and [**Function Output**](https://docs.incari.com/incari-studio/2021.1/toolbox/functions/function/function-output).

**Functions** can be exported and then imported in a different **Project**.

## Inputs

| Input                 | Type                                           | Description                                                           |
| --------------------- | ---------------------------------------------- | --------------------------------------------------------------------- |
| *Pulse Input* (►)     | **Pulse**                                      | A standard **Input Pulse**, to trigger the execution of the **Node**. |
| `Input Parameter [n]` | *Defined in the **Function Input*** ***Node*** | Parameter received by the **Function**.                               |

## Outputs

| Output                 | Type                                            | Description                                                                                                                            |
| ---------------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►)     | **Pulse**                                       | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution. |
| `Output Parameter [n]` | *Defined in the **Function Output*** ***Node*** | Parameter returned by the **Function**.                                                                                                |

## Creating a Function

To add a **Function**, click on the add icon on the top left of the **Functions** tab on the left panel of the **Logic Editor** and type in the desired name of the **Function**. Then, to open the **Function's** **Logic Graph**, double-click on the **Function** **Node**. There, the **Logic** of the **Function** can be defined.

See an example in the image below.

![](https://3009747178-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MIspkFTPkuGkv4UgQGs-1330240639%2Fuploads%2Fgit-blob-5ca4891f7f2f4b91731ff8a5fe0e353588a55a61%2FaddFunctions.gif?alt=media)

## Exporting and Importing a **Function**

For exporting a **Function**, right-click it on the **Function's** list or on the **Node**, select Export and save the **Blueprints** file.

![](https://3009747178-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MIspkFTPkuGkv4UgQGs-1330240639%2Fuploads%2Fgit-blob-b54f0a165fd67e6807f3658d60011b21890b182d%2Fexport-function.png?alt=media)

![](https://3009747178-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MIspkFTPkuGkv4UgQGs-1330240639%2Fuploads%2Fgit-blob-af925a0bd50d84df43ab89e4bfa7f33c5ee40383%2Fexport-function2.png?alt=media)

For importing a **Function**, right-click on the **Function's** list or on the **Logic Graph**, select Import, and find the **Blueprints** file.

## See Also

* [**Logic Editor**](https://docs.incari.com/incari-studio/2021.1/modules/logic-editor)
* [**Function Input**](https://docs.incari.com/incari-studio/2021.1/toolbox/functions/function/function-input)
* [**Function Output**](https://docs.incari.com/incari-studio/2021.1/toolbox/functions/function/function-output)
