# Setup FujiNexim ## Overview This feature is responsible for handling the connection to FujiNexim equipment. ## How To Configure You can configure the Host IP and Port. ### Relevant Artifacts The table below describes the properties for this entity type: | Name | Type | Is Mandatory | Data Type | Description | | :-------------------- | :--------- | :----------: | :-------- | :----------------------------------------------- | | IoTMetadataDefinition | SmartTable | Yes | | Metadata configuration for equipment integration | ## How It Works You can configure the Fuji Nexim connection using the `IoTMetadataDefinition`. !!! Warning "Every time you change these values you must restart the Automation Controller." ### IoTMetadataDefinition Area Level Configuration | Resource | Resource Type | Area | Name | Value | Description | | -------- | ------------- | -------------- | ---------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | | Fuji Line Area | FUJINEXIM_address | Host IP Address | Address where the Fuji Host Interface is listening. | | | | Fuji Line Area | FUJINEXIM_port | Host IP Port | Port where the Fuji Host Interface is listening. | | | | Fuji Line Area | FUJINEXIM_autoConfigure | True / False | Enables the automatic handshake sequence (`SETEV` followed by `STARTEV`) during the initial connection. | | | | Fuji Line Area | FUJINEXIM_machineNames | Machine names | Machine names used during the automatic configuration. Multiple machine names must be separated by commas. If empty, the commands are sent to all connected machines. | | | | Fuji Line Area | FUJINEXIM_eventsToSubscrive | Event list | List of events to subscribe to when using the custom `SETEV` workflow. Format: `EventName,Ack;EventName,Ack;...` | | | | Fuji Line Area | FUJINEXIM_maxNumberOfRetries | Number of retries | Number of retries for asynchronous messages. Each retry is performed every 1000 ms. The default value is **15**. | ## Automatic Configuration When `FUJINEXIM_autoConfigure=true`, the driver automatically performs the necessary subscriptions after establishing connection: 1. Sends `SETEV`. 2. Waits for `SETEV_ACK`. 3. Sends `STARTEV`. 4. Waits for `STARTEV_ACK`. The list of machines used during this process is taken from `FUJINEXIM_machineNames`. If no machine names are configured, the commands are sent to all connected machines. ## Custom SETEV Configuration If more control over the subscribed events is required, the automatic configuration can be disabled. Set: `FUJINEXIM_autoConfigure=false` Then configure the events to subscribe to using: `FUJINEXIM_eventsToSubscrive` The value consists of one or more entries separated by semicolons using the following format: `EventName,Ack;EventName,Ack;...` Where: - **EventName** is the Fuji Nexim event name. - **Ack** specifies whether the event requires an acknowledgement. - `1` = Acknowledge the event. - `0` = Do not acknowledge the event. !!! Warning "Please always use ACK `1`, since the option to not acknowledge the event is currently not implemented, if the event is not required it should be removed." ### Example `BOMLIST,1;LOADCOMP,1;MCSTATECHANGE,1;PCBCHECKIN,1;PCBCHECKOUTV,1;PGCHANGEII,1;UNLOADCOMP,1` This configuration generates a custom `SETEV` command subscribing only to the specified events and using the configured acknowledgement flag for each event. !!! Warning "If `FUJINEXIM_eventsToSubscrive` is not defined but `FUJINEXIM_autoConfigure` is set to `false`, the default values set on the workflow `ConfigurableSetEv` will be used."