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

Instance variables

Written by Mads Mikkelsen

Updated at June 4th, 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

Table of Contents

Instance referencing Parameters list

Articles in this section:

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

Instance variables are variables that are linked to an instance such as its name and address. These can be very handy to use when customizing a payload in a mapping or doing logic.

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

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

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

 

 

Instance referencing

An Instance can be referenced in various ways depending on their use, as it can be seen in the table below.

Using one of the below references without any additional parameters, will return its own NAME.

 
Identifier Description Example
INSTANCE Reference the Instance itself where it's been used from %INSTANCE.NAME%
MyPLC
INSTANCE_MASTER Reference the Master Instance in a mapping %INSTANCE_MASTER.UID%
PLC_001
INSTANCE_SLAVE
INSTANCE_RECEIVER
Reference the Slave Instance in a mapping %INSTANCE_SLAVE.UID%
MQTT_BROKER_001

 

Parameters list

All the parameters and information that can be accessed from an instance is described in the table:

%VARIABLE% Description Example
ID The auto-generated ID of the instance assigned by SIA %INSTANCE.ID%
5
NAME Name of the instance %INSTANCE.NAME%
Bottle machine
ADDRESS Address of the instance (IP address, Connection String, node number, ...) %INSTANCE.ADDRESS%
10.20.30.55
DESCRIPTION Description of the instance %INSTANCE.DESCRIPTION%
"Machine for bottle handling"
AVAILABLE Availability for the device. Given in true (available) or false (unavailable) %INSTANCE.AVAILABLE%
true
ERROR
LAST_ERROR
The text of the current error on the instance %INSTANCE.LAST_ERROR%
%INSTANCE.ERROR%
"PLC unreachable"
ENABLED True for enabled instances & false for disabled %INSTANCE.ENABLED%
true
UID UID of the instance %INSTANCE.UID%
BOTTLE_MACHINE
STORE_TIME Default store time for the items data under the device given in minutes %INSTANCE.STORE_TIME%
1440
STORE_SAMPLES Default samples to store for the items data under the device %INSTANCE.STORE_SAMPLES%
1000
CONNECTOR_SPECIFIC parameters Specific values for Connectors. E.g. "Rack" & "Slot" for a Siemens Connector.
Please refer to the Connectors guides for their parameters
%INSTANCE.RACK%
0
%INSTANCE.SLOT%
1

 

variables instance variable device variable scripting variable

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • System variables
  • Item variables
  • Post processing of data

0
0
Expand