API. DEVICE

The API.DEVICE class provides a set of interfaces for managing and interacting with devices connected to the controller. It includes methods for searching available devices, retrieving device attributes, and mapping signals to devices. This class simplifies the process of managing device configurations and ensures seamless integration with the controller's ecosystem.

Methods

find(attr) → {Promise.<(object|undefined)>}

Finds the signal that owns the attributes

Parameters:
NameTypeDescription
attrAPI.DEVICE.SignalAttributesProp

An object with the following information:
 (string) name: signal name
 (string) device: device name
 (string) map: device map name
 (string) type: signal type: : 'DI' | 'DO' | 'AI' | 'AO' | 'GI' | 'GO'

Returns:

API.Signal instance if found; otherwise undefined.

Type: 
Promise.<(object|undefined)>

searchEthernetIPDevices() → {Promise.<Array.<string>>}

Search for the available Ethernet/IP devices

Returns:

List of device names

Type: 
Promise.<Array.<string>>
Example
let devices = await API.DEVICE.searchEthernetIPDevices()

Type Definitions

SignalAttributesProp

Properties
NameTypeAttributesDescription
namestring<optional>

Name of the signal

devicestring<optional>

Device to which the signal is assigned

mapstring<optional>

Mapping number

typestring<optional>

Type of signal: 'DI' | 'DO' | 'AI' | 'AO' | 'GI' | 'GO'