Configuration Details
native
: Produces output in OSI-PI JSON formattime_series
: Produces output in Predix Time Series JSON formatflat_json
: Produces flat JSON output
Field | Type | Required | Default |
---|---|---|---|
transport_addr | String | Yes | |
data_map | Array | Yes | |
log_level | String | No | 'off' |
interval_ms | Int | No | 1000 |
username | String | No | |
password | String | No | |
proxy_url | String | No | $https_proxy |
validate_certs | Bool | No | True |
output_format | String | No | flat_json |
digital_output_type | String | No | uint64 |
transport_addr
The transport_addr
field determines the location of the OPC-UA endpoint the block will communicate with. this can be any valid web URL.
data_map
data_map
field defines the registers to retrieve data from on the Modbus endpoint and how to convert that data to flat JSON format. The data_map
is an array of objects of the following structure:Field | Type | Required |
---|---|---|
alias | String | yes |
webid | String | yes |
piPointName | String | yes |
The alias
field of the data_map
determines the name of the requested value that should mean something to the target application. Examples are “temperature” and “pressure”.
The webid
field of the data_map
is the id of the data tag you are trying to read in the server.
The piPointName
field of the data_map
is the human readable name of the data tag you are trying to read in the server.
Either the webid
or the piPointName
must be specified in the configuration along with the alias
. If both webid
and the piPointName
are specified, the piPointName
is ignored.
log_level
and log_name
For details about the log_level
and log_name
fields, see the Generic CDP Blocks section of the Protocol Adapters documentation page.
interval_ms
The interval_ms
field determines the interval (in milliseconds) at which the block will poll its endpoint for data. The default is 1000.
username
The username
field is the username for the PiWebApi endpoint. The default is none.
password
The password
field is the username for the PiWebApi endpoint. The default is none.
proxy_url
The proxy_url
field determines the proxy address used to connect to the PiWebApi endpoint. The default is the environment variable $https_proxy
.
validate_certs
The validate_certs
field determines whether the adapter will validate the certificates of the PiWebApi endpoint. Use this field if your PiWebApi does not have a valid ceritificate. The default is an empty string.
output_format
output_format
field determines the output format of the data retrieved from the PiWebApi.flat_json
will return the data in flat JSON format.time_series
will return the data in Predix Time Series format.native
will return the data in the native PiWebApi JSON format.
digital_output_type
bool
: A JSON true/false value is used to report 0, or non-zero values.string
: The name of the value is reported.uint64
: The ordinal value is left as-is (this is the default).