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.
- Source
Methods
find(attr) → {Promise.<(object|undefined)>}
Finds the signal that owns the attributes
| Name | Type | Description |
|---|---|---|
attr | API. | An object with the following information: |
- Source
API.Signal instance if found; otherwise undefined.
- Type:
- Promise.<(object|undefined)>
searchEthernetIPDevices() → {Promise.<Array.<string>>}
Search for the available Ethernet/IP devices
- Source
List of device names
- Type:
- Promise.<Array.<string>>
let devices = await API.DEVICE.searchEthernetIPDevices()Type Definitions
SignalAttributesProp
Properties| Name | Type | Attributes | Description |
|---|---|---|---|
name | string | <optional> | Name of the signal |
device | string | <optional> | Device to which the signal is assigned |
map | string | <optional> | Mapping number |
type | string | <optional> | Type of signal: 'DI' | 'DO' | 'AI' | 'AO' | 'GI' | 'GO' |
- Source