Skip to content

Tags and Addresses ​

Last updated

License feature: Ladder Logic

Every operand — a contact's Tag, a compare's Source A, a math block's Destination — has a source type chosen from a drop-down.

TypeWhat it isReadWrite
Device TagA tag on any device, including Local Tags. Click Browse to pick it; the box then shows Device #3 / Line1/SpeedThe value at the start of the scanCollected and written after the scan (see below)
Task TagInternal memory shared by every program in this taskImmediatelyImmediately
Program TagInternal memory private to this programImmediatelyImmediately
LiteralA constant typed in the box (Constant value), e.g. 450, 2.5, 1Always that valueCannot be written

A new contact or coil starts as Device Tag with Not set. An operand left unset reads as 0 / false and writes nowhere.

Task Tag and Program Tag addresses ​

Type an address in the box (e.g. B3:0/0, N7:0, F8:0). The first letter(s) decide the type; the rest is just a name, so you can use Allen-Bradley style addresses or readable names:

Starts withTypeExamplesStored as
BBitB3:0/0, B_Motor_Runon/off; writing 1 or true sets it
NIntegerN7:0, N_PartCountwhole number — writes are rounded
FFloatF8:0, F_TempCdecimal number
STStringST9:0, ST_Recipetext (only DTOS writes text)
Tn:nTimerT4:0, T4:0/DN, T4:0.ACCa timer given that address (see below)
Cn:nCounterC5:0, C5:0/DN, C5:0.ACCa counter given that address
anything else—Count, Tempnot stored — reads give 0

Warning: Apart from timer and counter addresses, only the first letter counts: a name like Flow is a float, Batch is a bit, and Count is ignored.

Timer and counter addresses ​

Give a TON, TOF, RTO, CTU or CTD an Address (a Task or Program Tag such as T4:0 or C5:0) and other elements can use its members:

MemberTimerCounterWritable
/DN (or the bare address)donedoneno
/TTtiming—no
/ENrung power into the timer—no
/CU, /CD—rung power into the counterno
.ACCaccumulated millisecondscountyes
.PREpreset (ms)presetyes — replaces the element's Preset; the written value is kept across Save, Stop/Run and restarts until written again
  • RES clears the addressed timer or counter.
  • Elements with the same address share one timer or counter, as on a PLC.
  • A Task Tag address is shared by all programs in the task; a Program Tag address is private to the program.

Internal tags are not visible outside the task: you can't show them on a dashboard or use them in a workflow. They start at 0 (or empty), and are saved every 10 s and when the task stops. Copy a value to a Local Tags tag when something else needs it.

How values are read ​

  • Contacts (XIC, XIO, OSR, OSF) treat true and 1 as on, false and 0 as off, any other number as on if it is not 0, and any other text as off.
  • Numeric operands convert the value to a number; text that isn't a number becomes 0.
  • Coils write 1 and 0, not true/false.

Where device-tag writes go ​

DeviceWhat happens
Local TagsThe tag is updated when the value changes; dashboards, workflows, scripts and alarms see it
SimulatorThe simulated value is updated when it changes
A real device (PLC, robot, drive…)The driver writes the device when the value changes. If the device still reads a different value two seconds later — another HMI changed it, or a write was lost — it is written again. It is never written every scan
  • The device needs Tag Write Access turned on (device settings). If it is off, nothing is sent and the task log gets a write_error entry naming the tag and device, at most once a minute per output.
  • A failed write (device offline, driver refused it) is logged the same way; the next change is sent as usual.
  • Writes are not permission-checked per user: the task acts as the system.

Examples ​

ElementSetting
XICTag: Device Tag Conveyor PLC Conveyor_Running — passes power while the conveyor runs
GRTSource A: Device Tag Furnace/Temp; Source B: Literal 450
MOVSource: Literal 0; Destination: Program Tag N_RecipeStep
OTETag: Device Tag Local Tags Line1/Ready — for the HMI

See also ​

Scada.Ink Help Center