Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Home
  • Knowledge base
  • Contact Us
  • Home
  • Scripting & Variables

Item variables

Written by Mads Mikkelsen

Updated at June 7th, 2024

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Installation & Technical information
    Introduction SIA Connect Standalone SIA Connect ANY-Ware Cellular & WiFi connectivity
  • Configuration in the Web UI
    Getting started with the UI Connectors Instances Items Mapping Data System Network Tools & Add-ons DigiCert IoT Trust Manager
  • Connectors
    Siemens S7 Azure IoT Ethernet/IP Mitsubishi MELSEC OPC-UA Server SQL MQTT Omron Host Link REST API Omron FINS Keyence Beckhoff TwinCAT BACnet Virtual OPC-UA Client MS SQL File M-Bus Modbus
  • Scripting & Variables
    Data formatting
  • Developers
    API documentation Shadow API
  • Tutorials & Guides
    InfluxDB AWS IoT Core - Amazon Web Services Microsoft Power BI KaaIoT Siemens S7 AVEVA Insight SIA Connect Demo Rack Grafana Azure
  • General
+ More

Articles in this section:

  • System variables
  • Instance variables
  • Item variables
  • Post processing of data
  • Using payloads & wrapping out JSON parameters

Item variables can be used to fetch any parameters and data linked to an item such as its name or its connector specific parameters. These can be very handy to use when customizing a payload in a mapping or doing logic.

This articles contains all the accessible item variables that can be used when scripting and processing in SIA.

System variables‍ describes how to reference variables to an item by calling it by its name or UID so instead of %ITEM% the UID or name of a item can be used.

To identify variables they need to be wrapped in % e.g. %BOTTLE_COUNT%.
Variables are case-insensitive

 

Using %ITEM% without any additional parameters, will return its own NAME.

 

 

All the parameters and information that can be accessed from an item are described in the table:

%VARIABLE% Description Example
ID The auto-generated ID of the item assigned by SIA %ITEM.ID% » 5
NAME Name of the item %ITEM.NAME%  » Bottle machine
DESCRIPTION Description of the item %ITEM.DESCRIPTION%  » "Machine for bottle handling"
ENABLED True for enabled instances & false for disabled %ITEM.ENABLED%  » true
UID UID of the item %ITEM.UID%  » BOTTLE_MACHINE
VALUE Last stored value for the item %ITEM.VALUE% »  33

VALUE_HIST[index]

Available from version 1.0.5

 
Get a historical value for the item. Length of history is defined by the setting historical_data_length (default = 5)

%ITEM.VALUE_HIST[0]% »  33 (same as %VALUE%)
%ITEM.VALUE_HIST[1]% »  32 (previous value)

%ITEM.VALUE_HIST[2]% »  31 (previous value)

VALUE.TIME Timestamp of the data sample.
Check Time variables for all the different time variables.

Default format:
yyyy-MM-ddTHH:mm:ss
 
%ITEM.VALUE.TIME% » 2021-12-31T14:00:00
 
VALUE.TIME.FORMAT
 
Timestamp of the data samples in a specified format.
Check Time formats for formats
%ITEM.VALUE.TIME.FORMAT("yyyy-MM-dd HH:mm:ss.zzz") » 2021-12-31 14:00:00.123
STORE_TIME Default store time for the items data under the device given in minutes %ITEM.STORE_TIME%  » 1440
STORE_SAMPLES Default samples to store for the items data under the device %ITEM.STORE_SAMPLES%  » 1000
CONNECTOR_SPECIFIC parameters Specific values for Connectors. E.g. "Address" (DB2.DBW10) & "Type" (WORD, BOOL, ..) for a Siemens Connector.
Please refer to the Connectors guides for their parameters
%ITEM.ADDRESS% » DB2.DBW10
%ITEM.TYPE% » WORD


 

 

object factors product attributes

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Instance variables
  • System variables
  • Post processing of data
  • Using payloads & wrapping out JSON parameters

0
0
Expand