Programming
AFP-2800/2802 Manual – P/N 11249 11-Mar-08 85
7 PROGRAMMING
7.1 CONTROL SCRIPTS & VIRTUAL POINTS
Scripts are text based logic equations which are stored and processed by the panel many times a second. As
each script’s logic becomes true, the output associated with the script is activated. Note that an isolated point is
seen as inactive by the panel and hence, in a logic programming script, it will return the value false (or true if the
NOT function is applied to it within the script).
Virtual points are the logical output of the script attached to them. A maximum of 1000 virtual points can be
assigned to any panel. A virtual point can be latched or non-latched, alarmed or non-alarmed. These parameters
are configured from the Virtual Point List (refer to page 43). They can be changed at any time by going back into
the list and reprogramming the point. Virtual points are used in other scripts to simplify them, for instance if a
number of scripts use the same group of points, these points can be allocated a VP, which can then be used in
the scripts which use this group. Real points, as well as other virtual points, can be used in any script to create
logic that will control outputs from the system.
Scripts can refer to any AZF, digital input, digital output, virtual point, Analog addressable device, software zone
or system point in any combination of AND, OR, NOT or RANGE logic. Logic equations can be built up by
bracketing functions to create combinations of logic.
Note: RANGE logic functions entered via the panel keyboard must not span more than 1 module address e.g. 1.1.Z1
1.1.z8. If you need to span more than 1 module address, then you must enter the range via the PC Interface
The scripting facility on the AFP-2800/2802 is a very powerful feature which makes it easy for the operator to view
and modify the control logic of an output and all can be done on-screen without the need of a laptop programmer.
Functions which can be used in scripts are as follows:
Function Syntax example
OR L1D1 OR 1.1.Z2;
AND 1.1.Z1 AND 1.1.Z2;
NOT ( ! )
!1.1.Z1;
RANGE OR ( -> )
1.1.Z1 --> 1.1.Z8;
RANGE AND ( &> )
1.1.Z1 &> 1.1.Z8;
DELAY ( Txx )
T10
ON/OFF Day-Date-Time ( TIM[] )
TIM[00:00:00,09:00:0, MO, WE];
Number of Points in a Zone ( ANY[] )
ANY3[Z20]
All of the above functions refer to the alarm condition of each point. If you wish to refer to the fault, isolate or pre-
alarm condition in a script you can use the following special functions.
Special Function Syntax Example Syntax Meaning
Point in Fault F1.1.z1; Fault 1.1.Zone 1
Point Isolated IL1D1; Isolate Loop 1 Detector 1
Point in Pre-alarm PL1D1; Pre-alarm Loop 1 Detector 1
Point is on/active
(isolate state of point is
ignored)
SL1D1; De-isolated state of loop 1 Detector 1
I.e. an isolated alarm point in a script
is treated as alarm.