Datasource Addressing
Last updated
Last updated
The source address value pattern will depend on the data source type. It is expected that you are already familiar with how each data-source works and can already understand the required information to read a tag. This document shows what formats TilliT Edge will accept.
tagName - Symbol name of tag within the PLC.
tagScope - Optional, specifying will use the tag scope of the specific program within the PLC, leaving blank will use the controller scope for the tag.
e.g. "cartonCount" or "cartonCount,cartonCountProgram"
register- The location of the tag in the holding register.
e.g. "452" or "12"
Modbus Also accepts the following fields as options
scale - multiply the read value to scale the intial read value
functionCode - Modbus hold registers in different areas as described by a function code
3 - Input Registers
4 - Holding Registers
bytesToRead - the number of bytes to read
dataType - the data type we should convert the read data to (defaults to UInt16)
can be any of the following
endianness - Use either big (BE) or little (LE) endianness on the value. (default to BE)
deciamls - if using a float data type, then due to precision errors you may numbers with lots of decimal places. This helps round the number.
e.g. {"scale":0.0001,"functionCode":3,"bytesToRead":2,"dataType": "int32","endianness":"BE"}
namespace - The namespace for which the tag belongs to.
addressToTag - The identifier for the tag desired.
e.g. ns=2;s=TilliTDO-Demo.Line1.EquipmentStatusStopped
dataType - The type of the data to be read
Address - The address to begin reading from the plc
e.g. "MR4" - Memory Real at MD4, "M32.2" - Bit at M32.2
dataType - The data type to be used when reading from the plc
address - The location to begin reading from the plc
e.g. "BOOL/0.0" or "BOOL/145.6" or "INT/1" or "DINT/10" or "REAL/20"
dataType - The data type to be used when reading from the plc
address - The location to begin reading from the plc
e.g. "BOOL/0.0" or "BOOL/145.6" or "INT/1" or "DINT/10" or "REAL/20"
RATE - The number of minutes it takes to increment the value
LOWER_LIMIT - The lower limit of the value being incremented
HIGHER_LIMIT - The upper limit of the value being incremented
INCREMENT - The amount with which the ramp should increase each increment
e.g. RAMP(12,10,150,7) - this creates a value that ramps up from 10 to 150, in increments of 7, every 12 minutes.
LOWER_LIMIT - The lower limit of the value being changed
HIGHER_LIMIT - The upper limit of the value being changed
FREQUENCY - The time, in minutes, taken for the sine function to cycle
PHASE - The offset in terms of frequency from the start of the oscillations. It is a value in the range of 0 to 1 where the value 0.5 move the wave forward in time by half its frequency. A value of 0 or 1 makes no change
e.g. SIN(-20,50,1,0) - this produces a sin wave with with minimum of -20, and maximum of 50, at a frequency of 1/60Hz, and no phase.
LOWER_LIMIT - The lower limit of the value being changed
HIGHER_LIMIT - The upper limit of the value being changed
e.g. RANDOM(1,45) - a number will be randomly generated between 1 and 45 every minute.
RATE - The number of minutes it takes for the value to increment by one. If no rate is provided, the default is 1 minute
INCREMENT - The number of products to count each rate. The product count will vary +- 5% of the increment every time it is updated.
e.g. PRODUCT_COUNT(5, 10) - the product count will increase by 10, every 5 minutes.
RATE - the time in minutes until the boolean swaps. If no rate is provided, the default is 1 minute.
e.g. BOOLEAN(5) - the boolean value will switch between true and false every 5 minutes.
EQUIPMENT_STATUS_TYPE - replace with the status to track from the following options:
EQUIPMENT_STATUS_RUNNING
EQUIPMENT_STATUS_STOPPED
EQUIPMENT_STATUS_BLOCKED
EQUIPMENT_STATUS_COMPLETE
EQUIPMENT_STATUS_READY
EQUIPMENT_STATUS_STARVED
EQUIPMENT_STATUS_SUSPENDED
RATE - the time in minutes until the Equipment Status changes from STOPPED to RUNNING to READY etc. Only one can be true at a time.
e.g. EQUIPMENT_STATUS_RUNNING(5) - the "running" status will be checked to see if it is true, and the equipment status will change every 5 minutes.
EXPRESSION - A string expression that can be evaluate to a result. Expressions can reference other tags current or previous value. The result can be of any type(string, number, boolean, null, etc).
e.g. EVALUATE('5 + 5') - the value of this tag will always be 10.
e.g. EVALUATE('tag['5'] * 100') - take the value of whatever the value of tag with id 5 is and multiply by 100.