Technical Reference > CitectSCADA Reference Information > Specifications > Predefined Labels

Predefined Labels

This section describes the labels that are predefined in the Include Project.

Labels database

The table below defines the names, expressions predefined in the Include Project.

Name

Expr

Comment

__DATE__

$1

Date of compilation

__DB__

$4

Compiler database name

__FIELD__

$6

Compiler field name

__FILE__

$2

Compiler file name

__LINE__

$3

Compiler line number

__RECORD__

$5

Compiler record number

__TIME__

$0

Time of compilation

_BLANK_

NULL Definition

AlarmFirstCatRec(hCat,nType,hArea=-1)

_AlarmQueryFirstRec
(hCat,nType,hArea,0)

Get Alarm Cat Rec with Area

AlarmFirstPriRec(hPri,nType,hArea=-1)

_AlarmQueryFirstRec
(hPri,nType,hArea,1)

Get Alarm Pri Rec with Area

AlarmNextCatRec(hRec,hCat,nType,hArea=-1)

_AlarmQueryNextRec
(hRec,hCat,nType,hArea,0)

Get Alarm Cat Rec with Area

AlarmNextPriRec(hRec,hPri,nType,hArea=-1)

_AlarmQueryNextRec
(hRec,hPri,nType,hArea,1)

Get Alarm Pri Rec with Area

ANIMATE

2

Display mode 2

ANM_ARRAY

16

Animated symbols in array mode

ANSI_CHARSET

0

ANSI character set

Arg1

GetGlbStr(0)

keyboard argument 1

Arg2

GetGlbStr(1)

keyboard argument 2

Arg3

GetGlbStr(2)

keyboard argument 3

Arg4

GetGlbStr(3)

keyboard argument 4

Arg5

GetGlbStr(4)

keyboard argument 5

Arg6

GetGlbStr(5)

keyboard argument 6

Arg7

GetGlbStr(6)

keyboard argument 7

Arg8

GetGlbStr(7)

keyboard argument 8

ArgValue1

StrToValue(Arg1)

Get the value of argument 1

Assert(arg)

IF NOT (arg) THEN _Assert
(#arg, __FILE__, __LINE__); END

Process an assertion

BAD_HANDLE

-1

Bad Handle

BORDER

2

Border Only

BORDER_3D

1

3D Transparent Button

CreateControlObject
(sCls,sName,x1,y1,x2,y2,sEventCls="")

_CreateControlObject
(sCls,sName,x1,y1,x2,y2,
sEventCls)

CreateControlObject default event class

DateDay(time)

_TimeSub(time,3)

Get days from time

DateDayMonth(time)

_TimeSub(time,10)

Get the last day of the month

DateMonth(time)

_TimeSub(time,5)

Get month from time

DateWeekDay(time)

_TimeSub(time,4)

Get weekday from time

DELETE_ANM

000

Delete animation

DevFirst(hDev)

DevSeek(hDev,0)

DevSeek with Offset=0

DspButton(hAn,UK=0,sText,hFont=0,nW=0,
nH=0,DK=0,RK=0,nM=0)

_DspButton(hAn,UK,sText,
hFont,nW,nH,DK,RK,nM)

Display button

DspButtonFn(hAn,UF=0,sText,hFont=0,
nW=0,nH=0,DF=0,RF=0,nM=0)

_DspButtonFn(hAn,UF,sText,
hFont,nW,nH,DF,RF,nM)

Display a button

DspSym(hAn,sSym,mode=0)

_DspSym(hAn,sSym,mode)

Display symbol

DspSymAnm(hAn,s1,s2=0,s3=0,s4=0,
s5=0,s6=0,s7=0,s8=0)

_DspSymAnm
(hAn,s1,s2,s3,s4,s5,s6,s7,s8,0,"")

Display multi symbols

DspSymAnmEx(hAn,mode,s1,s2=0,
s3=0,s4=0,
s5=0,s6=0,s7=0,s8=0,s9=0)

_DspSymAnm(hAn,s1,s2,s3,s4,
s5,s6,s7,s8,mode,s9)

DspSymAnm with mode

EVEN_P

2

Even Parity

Exec(sText,mode=1)

_Exec(sText,mode)

Exec program, default to normal

FALSE

0

Boolean False

FlashColourState()

StrToInt(PageInfo(18))

Flashing Color State as a boolean

GetBlueValue(PackedRGB)

((PackedRGB / 65536) BITAND 255)

Get the blue component of a packed RGB color

GetGreenValue(PackedRGB)

((PackedRGB / 256) BITAND 255)

Get the green component of a packed RGB color

GetRedValue(PackedRGB)

(PackedRGB BITAND 255)

Get the red component of a packed RGB color

GetVar(sTag,sField)

$7

Get variable field data

GetVarDef(sTag,sField,sDefault)

$10

Get variable field data if defined

GetVarStr(sTag,sField)

$8

Get variable field data as str

GetVarStrDef(sTag,sField,sDefault)

$11

Get variable field data as a str if defined

GRAY_ALL

3

Gray the entire button

GRAY_HIDE

4

Hide object when grayed

GRAY_PART

2

Sink and gray the text / symbol

GRAY_SUNK

1

Sink the text / symbol

IFDEF(sTag,sTrue,sFalse)

$9

Inline IF defined macro

InAnimationCycle()

StrToInt(PageInfo(19))

In Animation Cycle as a boolean

InCommunicationsCycle()

StrToInt(PageInfo(20))

In Communications Cycle as a boolean

KeyDown()

KeyMove(4)

Move Cursor down

KeyLeft()

KeyMove(1)

Move Cursor left

KeyReplay()

_KeyReplay(1)

Key Replay - last key

KeyReplayAll()

_KeyReplay(0)

Key Replay All

KeyRight()

KeyMove(2)

Move Cursor right

KeyUp()

KeyMove(3)

Move Cursor up

NONE

0

No Parity

NORMAL

0

Normal Button

ODD_P

1

Odd Parity

OVERLAP

1

Display mode 1

PackedRGB(Red,Green,Blue)

(Red + Green * 256 + Blue * 65536)

Make a packed RGB color from its components

PlotInfo(hPlot,nType,sInput="")

_PlotInfo(hPlot,nType,sInput)

Get information about a plot system

Print(sText,nMode=0)

DevPrint(DevCurr(),sText,nMode)

Print output to device

PrintLn(sText)

DevPrint(DevCurr(),sText,1)

Print output to device, newline

Pulse(arg)

arg = TRUE; Sleep(2); arg = FALSE;

Pulse the variable

RAboveUCL

8192

RBelowLCL

16384

ROutsideCL

4096

Shutdown(sDest="",sProject="",nMode=1)

_Shutdown(sDest,sProject,nMode)

Shutdown macro

SOFT

0

Display mode 0

TableMath(Table, Size, Command, mode=0)

_TableMath(Table, Size, Command,mode)

mathematical operations on a tab

TARGET

3

Screen Target

TestRandomWave(p=60,lo=0,hi=100,off=0)

_Wave(4,p,lo,hi,off)

Test random wave

TestSawWave(p=60,lo=0,hi=100,off=0)

_Wave(3,p,lo,hi,off)

Test Saw wave

TestSinWave(p=60,lo=0,hi=100,off=0)

_Wave(0,p,lo,hi,off)

Test sin wave

TestSquareWave(p=60,lo=0,hi=100,off=0)

_Wave(1,p,lo,hi,off)

Test square wave

TestTriangWave(p=60,lo=0,hi=100,off=0)

_Wave(2,p,lo,hi,off)

Test Triag wave

TimeHour(time)

_TimeSub(time,0)

Get hours from time

TimeMidNight(time)

_TimeSub(time, 7)

Extract time at midnight

TimeMin(time)

_TimeSub(time,1)

Get minutes from time

TimeSec(time)

_TimeSub(time,2)

Get seconds from time

TimeSecond(time)

_TimeSub(time, 2)

Get seconds from time

TimeYearDay(time)

_TimeSub(time, 8)

Toggle(arg)

arg = NOT arg;

Toggle the variable

TRN_EVENT

2

Event trend

TRN_PERIODIC

1

Periodic trend

TRN_PERIODIC_EVENT

3

Periodic Event trend

TRUE

1

Boolean True

UnitControl(IODev,Type,Data)

IODeviceControl(IODev,Type,Data)

UnitInfo(IODev,Type)

IODeviceInfo(IODev,Type)

UnitStats()

IODeviceStats()

UserCreate(s1,s2,s3,s4,s5="",pG="",
p1="",p2="",p3="",p4="",p5="",p6="",
p7="",p8="")

_UserCreate(s1,s2,s3,s4,s5,
pG,p1,p2,p3,p4,p5,p6,p7,p8)

Create a new user with privileges

WRITE_ON_DRAG

1

Write mode for slider

WRITE_ON_DROP

0

Write mode for slider

XAboveUCL

4

XBelowLCL

8

XDownTrend

64

XErratic

512

XFreak

1

XGradualDown

256

XGradualUp

128

XMixture

2048

XOutsideCL

2

XOutsideWL

16

XStratification

1024

XUpTrend

32

Note: Do not modify the Include Project. Changes to the Include project are lost when you reinstall or upgrade CitectSCADA.