Using the ADAM-6060 Module

The Advantech Adam-6060 remote I/O module is a Modbus TCP device that has 6 digital input channels and 6 relays.



Witness can support more than one Adam unit, giving the option of a very large number of relay outputs and digital inputs. The software intelligently handles the indexing of relays and inputs so that the complexity of a multi-module setup is hidden from the user. The Adam unit provides the ability for the Witness software to communicate with external systems through the use of relays and in the other direction, external systems can provide useful triggers to Witness through the use of the digital inputs.



Technical Overview

When Witness generates events, such as alarms, or processes targets, it passes all this information to Witness Canary. Witness Canary then converts this information into appropriate relay triggers. This could be in response to alarms being activated, including health alerts, or cameras being controlled. Canary monitors the digital inputs on all the attached modules and passes any triggers into Witness software. These can be used to change system behaviour, such as switching system profiles, or deactivating alarms.





On this page:



Canary uses the Advantech SDK to provide seamless integration with Adam-6060 unit.

TheĀ ADAM-6060 Plugin

Witness Canary supports integration with many different types of external systems through the use of plugins. These are stand-alone software libraries which are dynamically loaded by Canary and contain code which knows how to convert the Witness data into the required format for the external system. In this case the Adam-6060 plugin uses the Advantech SDK to convert Witness data into relay triggers and to listen for externalĀ digital inputs.

TheĀ Adam-6060 plugin file is entitled Witness.Plugin.Adam6060.dll and must be present in the Witness Plugin folder which is inside the main application folder.

The plugin uses the Advantech SDK therefore 3 additional files must also be present in the same plugin folder; Advantech.Adam.dll, Advantech.Common.dll, Advantech.Protocol.dll



The pluginĀ can be selectedĀ during setup and will be automatically installed in the correct location along with the required SDK files.

Configuring the ADAM-6060 Plugin

When the plugin is installed and Canary starts, the plugin configuration settings are saved to the PluginConfiguration.xml file. This file is located in the Witness main application folder. To change the settings this file should be opened in a text editor, such as Notepad, however we would recommend an editor which is XML aware, such as Notepad++.

Once the file is open, locate the Adam6060Controller section, as illustrated below:

Example of ADAM-6060 Plugin Configuration
<?xml version="1.0" encoding="utf-8"?> <Config> <Plugins> <Adam6060Controller> <PluginConfig> <Relays> <AdamRelayUnit ModuleName="Unit1" IndexId="1" Port="502" IPAddress="10.0.2.200" ConnectionTimeout="250" ReadWriteTimeout="200" UniqueId="36099ff9-e158-48fa-8d4b-a3d95dbdad63" /> </Relays> <RelayMode>InputOnly</RelayMode> <CameraRelayTimeOut>10</CameraRelayTimeOut> <InputActiveState>False</InputActiveState> <MaxConnectionRetries>120</MaxConnectionRetries> <FailSafeMode>False</FailSafeMode> <HeartbeatInterval>0</HeartbeatInterval> </PluginConfig> </Adam6060Controller> </Plugins> </Config>



Once you have made changes to the plugin configuration file then you must restart the Canary application / service for the new settings to be applied. No other modules need to be restarted.

The setting options are as follows:

Relays

A list of each Adam relay unit to be controlled by the plugin.

The settings for each relay are:

  • ModuleName - A user friendly name for the Adam module

  • Index - The unique index of each unit. The index sets the position of this module realtive to others when there are more than one in use. For example, the Adam module with an index of 1 will handle relay ids 1 - 6, the device with an index of 2 will handle relays 7 - 12 and so on.

  • Port - The port used to access the unit. By default this is the default Modbus port which is 502.

  • IPAddress - The IP address of the Adam unit. This can be set using the Adam utility.

  • ConnectionTimeout - The amount of time, in milliseconds,Ā the communication protocol will wait before timing out on each connection. The default is 250ms.

  • ReadWriteTimeout - The amount of time, in milliseconds,Ā the communication protocol will wait before timing out on each read and write. The default is 200ms.

  • UniqueId - The internal unique id of this device. This is system generated and must not be changed.

To add more than one relay, the entire relay element should be duplicated, the following code demonstrates 2 configured units:

Example configuration of 2 ADAM Modules
<Relays> <AdamRelayUnit ModuleName="Unit1" IndexId="1" Port="502" IPAddress="10.0.2.200" ConnectionTimeout="250" ReadWriteTimeout="200" UniqueId="36099ff9-e158-48fa-8d4b-a3d95dbdad63" /> <AdamRelayUnit ModuleName="Unit2" IndexId="2" Port="502" IPAddress="10.0.2.201" ConnectionTimeout="250" ReadWriteTimeout="200" UniqueId="cf39344c-398e-4973-a754-3ce5870415f0" /> </Relays>



RelayMode

  • None - The module will do nothing - it will connect and be monitored but will not respond to Witness events.

  • InputOnly - The module will only monitor the digital inputs.

  • Alarm - The module will monitor digital inputs and respond to alarm events, if configured.

  • Camera - The module will monitor digital inputs and respond to camera events, if configured.

  • AlarmAndCamera - The module will monitor digital inputs and respond to both alarm and camera events, if configured.

CameraRelayTimeout

This is the time, in seconds,Ā that the plugin will wait without receiving any camera commands before it opens the relay associated with a camera. If using relay triggers with cameras, the relay will be closed when the camera starts moving, each camera movement will reset this timeout. Once the camera has been idle for longer than this timeout period then the relay will be opened. The default is 10 seconds.

InputActiveState

This specifies the Boolean flag used when a digital input is closed. By default the inputs are flagged as True and switch to False when active. This behaviour can be changed on the ADAM module in which case this setting should be updated to match.

MaxConnectionRetries

This is the number of times the plugin will try to connect to the ADAM module. It will pause after each retry before attempting a further connection. Once this limit has been reached the software will stop trying to connect. All connection attempts, successful and unsuccessful, are logged in the Canary log files.

FailSafeMode

Fail safe mode reverses the behaviour of the relays. By default an ADAM module will close relays on activation and open when idle. For critical installations this behaviour is often reversed so that by default all relays are closed but opened on activation. This means that should anything happen to the module (i.e. lose power) then all the relays open putting everything into an alarm state. This setting must match whatever the configuration is on the ADAM module.

HeartbeatInterval

This setting is not usedĀ for the ADAM-6060 plugin.

Related information