analogue value
logical value a/m, s/n,v/n
Logical values represent logical results of measurements or calculations, or status flags.
block reference
text string
One to seven character string used to identify groups of blocks
which are associated
Number from 0 to 15. Specifies execution frequency for executable
blocks.
Floating point number. This is the analogue result of the block.
Logical flag which may be a (auto/true/1) or m (manual/false/0).
This flag enables or disables the block for normal scanned execution.
Logical result of block, may be v (violated/true/1) or n
(nonviolated/false/0).
This flag may be s (set/true/1) or r (reset/false/0).
If it is s and the block is executed the block's am flag
will subsequently be reset (to m) thus ensuring that the block executes
only once.
This string parameter may be used to identify the block, and is
printed in parenthese () after the block number when printed in engineers
mode. The text string is converted to upper case, and may not include spaces.
It must also be unique, attempts to enter an existing nn into a
block will be regected by eng. A maximum of 29 characters are accomodated.
Within eng blocks may be located using th '_' command imedeately followed
by a string. All matches will be listed, and connection will be made to
the last match. To clear an nn paramter enter nn-
example:
b6301 _FIR
Block 6301 (FIRST-AO) type analogue out
Block 14001 (FIRST-DI) type analogue out
b14001
example: (must be unique)
b14011 nnFIRST-DI
b.name
(name in use - block 14001)
This string parameter is used by various parts of the system to
identify the block. For example the PI-Bus driver inserts card and point
identification here for user information.
example:
b5301 b14037;p
Block 14037 () type dig input
Block 14037 () type dig input
nn.b.name
de.descr
nm.name DI card 03 point 05
tg.tag
0 sn.scan 0(0.0 sec) ra.rslta
0.000
am.au/mn m vn.vltn
n ss.sshot r
en.A Entpr 0
dd.D Entpr 0
b14037
The Indata (plc) driver uses the information here to identify 'nin'
and 'nout' numbers.
This string parameter is used as a textual description of the block.
It is useful in adding short comments which are displayed on the drawing
produced by the engdraw program. Text is converted to uppercase.
b14011 deThis is a bit of text to explain that this block is a digital
input block
descr
=THIS IS A BIT OF TEXT TO EXPLAIN THAT THIS BLOCK IS A DIGITAL INPUT BLOCK
One analogue output block is connected to each PI-Bus analogue output
point.
The Digital input block reflects the status of a discrete signal from
the process.
The Digital output block asserts the status of its am flag in
the form of a discrete digital output.
The Pulse duration Output block is used for plant control via two discrete
digital output, producing a timed raise or lower signal, to effect the
required control action.
One K48 analogue input/output block is connected to each analogue input
point and corresponding analogue output point on a SIOX K48 module. The
calibrated output is presented on the block ra parameter.
This block is used to connect one SIOX N45 I/O module to various other ABACUS I/O blocks.

One analogue input block is connected to each PI-Bus analogue input point. The calibrated output is presented on the block ra parameter. The block has the following parameters in addition to the common parameters tg sn ra am vn and ss.
integer_value
integer_value
This parameter sets the gain of the amplifier as follows
|
|
gain | range |
|
|
1 | 0 - 10 volt |
|
|
2 | 0 - 5 volt |
|
|
4 | 0 - 2.5 volt |
|
|
8 | 0 - 1.25 volt |
|
|
16 | 0 - 625 m volt |
|
|
32 | 0 - 312.5 m volt |
|
|
64 | 0 - 156.25 m volt |
|
|
128 | 0 - 78.125 m volt |
|
|
256 | 0 - 39.0625 m volt |
|
|
512 | 0 - 19.53125 m volt |
|
|
1024 | 0 - 9.765625 m volt |
block_number or indirect
floating_point_value
This is the result of the analogue to digital conversion represented as 0.0 to 100.0 (unipolar) or -100.0 to 100.0 (bipolar).
floating_point_constant
floating_point_constant
The block result is calculated using the following equation
One analogue output block is connected to each PI-Bus analogue output point. The block has the following parameters in addition to the common parameters tg sn ra am vn and ss.
sp set point floating_point_value
hl high limit floating_point_value
ll low limit floating_point_value
sp set point
The full output range of the analogue output is represented by a setpoint of 0-100. On the first scan after the am is set the sp set point is made equal to the current output.
hl high limit
ll low limit
The sp is constrained between the values of hl and ll , before being further processed.
The Digital input block reflects the status of a discrete signal from the process. The vn flag will be v when the discrete signal is active, and n otherwise. Although the block has all the common parameters including sn and am it is scanned independently of the normal block scanning process.
The Digital output block asserts the status of its am flag in the form of a discrete digital output. Depending on the process I/O used the vn flag may indicate the actual status of the digital output. Although the block has all the common parameters including sn, it is scanned independently of the normal block scanning process.
The Pulse duration Output block is used for plant control via two discrete digital output, producing a timed raise or lower signal, to effect the required control action. In addition to the common parameters the following exist
sp set point floating_point_value
hl high limit positive floating_point_value
ll low limit positive floating_point_value
sp set point
The required number, and duration of pulses required are cascaded into the sp of this block. Cascading +1.00 produces a raise pulse of one unit duration, -1.00 a lower pulse of one duration.
On the first scan after being set auto the sp is set to zero.
hl high limit
The maximum duration of pulse permitted in either direction is determined by the hl high limit value. If the absolute value of sp is greater than hl then hl pulses will be sent
ll low limit
The minimum duration of pulse permitted in either direction is determined by the ll low limit value. If the sp is less than ll then no pulse will be sent.
ra result a
The value of ra represents the actual pulse length to be sent. If an sp value greater than a predetermined maximum is sent then only that maximum is sent and the value of sp is reduced by that amount. Thus pulses are carried forward from one scan to the next.
The actual execution of the pulse duration depends on hardware. If a SIOX N45 module is to be used, the PDO block must be referenced in the N45 module block, see N45 section.
The Indata communications protocol is based on markers. Each of the units on an Indata network has an address in the range 1-31. Markers have a number in the range 1-511 (coresponding to blocks 18001 to 18511). Only one unit on the network should write a marker, but any or all of the units may read that marker. Markers may be either analog or digital.
In the Indata programming language a marker is set using a NOUT entity, and is read using a NIN entity.
If ABACUS reads a marker (set by another unit) it will detect the type (analog or digital), the source address and the value. The value will be put into the ra of the block for analog markers, or the vn for digital markers.Text is inserted in the nm parameter describing the address and type or marker. For example if a digital marker (1) from unit with addres 1 is received
nin d adr 1 mark 1
will be written.
If ABACUS is to output a marker then the nm must have text of the following format.
nout d
or
nout a
The digital value of the am flag or analog value of the ra will be transmitted onto the network.
To avoid scanning the entire address range when only some addresses are present the first and last uPLD addresses are defined in the ra parameters of block 23 and 23 respectively.
The cycle time is defined by setting a value in the ra of block 24. This value is the polling frequency of the driver in milliseconds.
To reduce trafic, the Indata protocol allows polling of changes of signals in addition to taking all values. The C/I ratio is the ratio of the number of Change messages to Init (i.e. all signals) messages.
sudo $ABACUS_HOME/indata /dev/cua1 9600 21 18001 &
sudo $ABACUS_HOME/indata /dev/cua2 9600 31 19001 &
sudo $ABACUS_HOME/indata /dev/cua3 9600 41 20001 &
One method is to use a RS232 - RS422 (4-wire) converter with the RS422 TX and RX pairs connected together.
TX+ ----+-----------------+--------------+-----------+ | | | | TX- ----|--+--------------|--+-----------|--+--------|--+ | | | | | | | | RX+ ----+ | | | | | | | | RX- -------+

One K48 analogue input/output block is connected to each analogue input point and corresponding analogue output point on a SIOX K48 module. The calibrated output is presented on the block ra parameter. The block has the following parameters in addition to the common parameters tg sn ra am vn and ss.
ao analogue output block number
ds data source integer constant
mx max value floating_point_constant
ze zero floating_point_constant
The block result is scaled to the range ze to mx corresponding to 0 to 100 % input. This may be 0 - 20mA, 4 - 20mA, or 0 - 10 V depending on the hardware configuration of the K48 module.
The K48 module should be configured to have 4 addresses, (4A/I and 4A/O). The value of ds defines both the SIOX port used and the point address. ds should be 10000 + 100*port number + SIOX point address. i.e. for port number 2, SIOX point address 5 ds should be 10205.
The ao parameter should be connected to an analogue output block, whose result will be sent to the corresponding point address.
The block has the following parameters in addition to the common parameters
tg
sn ra am vn and ss.
| ds | data source | integer constant |
| oa | output a terminal 1 | block_number |
| ob | output b terminal 2 | block_number |
| oc | output c terminal 3 | block_number |
| od | output d terminal 4 | block_number |
| oe | output e terminal 5 | block_number |
| ia | input a terminal 10 | block_number |
| ib | input b terminal 11 | block_number |
| ic | input c terminal 12 | block_number |
| id | input d terminal 13 | block_number |
| ie | input e terminal 14 | block_number |
| if | input f terminal 15 | block_number |
| ig | input g terminal 16 | block_number |
| ih | input h terminal 17 | block_number |
| ii | input i terminal 18 | block_number |
| ij | input j terminal 19 | block_number |
| ik | input k terminal 20 | block_number |
| il | input l terminal 21 | block_number |
| im | input m terminal 22 | block_number |
| in | input n terminal 23 | block_number |
The value of ds defines both the SIOX port used and the point address. ds should be 10000 + 100*port number + SIOX point address. i.e. for port number 2, SIOX point address 5 ds should be 10205.
The SIOX N45 I/O module is a general purpose digital I/O module with 7 sourcing output and 14 inputs, all 10V - 35V DC. The outputs can supply 0.5A each and have short circuit protection. Through the built-in CPU and a simple PLC programming language, curtain options are available.
If the PLC programme has been correctly loaded and configured, a number of the outputs may serve as pulse duration outputs. The corresponding output parameter (oa - og ) should be connected to a pdo block. Enter the pdo block as a positive number to connect the raise side, and as a negative number for the lower side. Thus it is possible to connect raise and lower in any combination. The pdo function, if programmed into to N45 module excludes ordinary digital output operation for those specified output points. It is possible to configure any combination of digital outputs and pdo outputs.
| This block type functions as an AND or OR gate for up to five logical inputs, any or all of which may be inverted. | |
| The switch block derives a single logical result (vn), and can switch auto or manual two blocks, depending on the status of a single logical input. Two list processing algorithms allow ranges of blocks to be switched. | |
| The pattern block is used to switch up to five blocks auto or manual. |

The checklist block derives a single logical result (vn), and
can switch auto or manual one block, depending on the status of five logical
inputs. The block has the following parameters in addition to the common
parameters tg sn ra am vn and ss.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The logical result of the five blocks specified by each of the logical inputs in turn (ia,ib ,ic,id,ie) is processed by its coresponding algorithm ( aa,ab,ac, ad,ae) to generate five intermediate logical results in accordance with table ck1. (Note that only aa can have a value greater than one.)
Unconnected inputs are ignored.
af = 0 AND operation
The logical result of the block will be v (true) only if all of the five intermediate logical results are true (1).
af = 1 OR operation
The logical result of the block will be v (true) if any of the five intermediate logical results is true (1).
Table ck1
|
|
|
|
|
|
|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
||
The block addressed by the sv parameter will be affected in accordance with table ck2.
Table ck2
| intermediate result | switch type s | switch type r | switch type + | switch type - |
| target block becomes | ||||
| 1 | a | m | a | m |
| 0 | - | - | m | a |
The switch block derives a single logical result (vn), and can
switch auto or manual two blocks, depending on the status of a single logical
input. The block has the following parameters in addition to the common
parameters tg sn ra am vn and ss.
| ia | logical input | block_number or indirect_block_number |
| aa | algorithm a | 0 - 7 |
| sa | switch a | block_number s/r/+/- or indirect_block_number s/r/+/- |
The status of the logical input specified by the input a ia parameter is processed by algorithm a aa and the target block's am auto/manual flag is changed in accordance with table sw1 .
The logical result of the block is set to the intermediate logical result
derived by aa algorithm a.
| ab | algorithm b | 0 - 7 |
| sb | switch b | block_number s/r/+/- or indirect_block_number s/r/+/- |
The status of the logical input specified by the input a ia parameter is processed by algorithm b ab and the target block's am auto/manual flag is changed in accordance with table sw1 .
List processing
These algorithms permit the execution of the block's algorithm over a contiguous list of blocks instead of individual blocks. The target list is specified by sa and sb . The first output block is specified by sa, the last by sb . The input list is of exactly the same length as the output list, thus it is only necessary to specify the first input block with ia. Indirection is allowed on ia, sa and sb. The direction of processing is always from the first to the last, and cannot be reversed; thus the block specified as the first output block must have a lower or equal block number as that specified as the last. If ia is zero then an imaginary input list of blocks all having a 0 (nonviolated,reset, false) logical result is used.
The only restriction to the size of the lists is that they must both be accommodated within the constraint of the system.
aa = ab = 6 List processing (inverting)
The switch type of both sa and sb must be the same. For each block an intermediate result is calculated and the corresponding target block is modified as if the algorithm were 0 (inverting).
aa = ab = 7 List processing (noninverting)
This algorithm functions in the same list processing way as above, except that for each block an intermediate result is calculated and the corresponding target block is modified as if the algorithm were 1 (noninverting).
Table sw1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
list processing (inverting) see text | |||||||
|
|
list processing (noninverting) see text | |||||||

The pattern block is used to switch up to five blocks auto or manual.
The block has the following parameters in addition to the common parameters
tg
sn ra am vn and ss.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Each time the block is executed the blocks specified by switches sa to se are switched auto or manual depending on the specified switch type s or r respectively.
Note unless continual and repeated operation is desired it is usual to the set the single shot flag ss to s.
The p.i.d. block is designed to perform P, PI, or PID control functions, with standard control constants, executing a variety of alternative control algorithms, and calculating control performance data at the same time.
The motor block is designed to allow comprehensive control of the starting/stopping
of electric motors, pumps, and opening/closing of valves. The connections
are made through digital inputs and outputs. Facilities are included to
initiate alarm signals if the motor/pump fails to respond to control signals
in allowed time periods. The accumulation of run time is also included.

The p.i.d. block is designed to perform P, PI, or PID control functions,
with standard control constants, executing a variety of alternative control
algorithms, and calculating control performance data at the same time.
In addition to the common parameters the p.i.d. block has the following
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The am flag of a pid block may be considered as an îauto-requestî flag. When the am flag is auto the loop may be regarded as requested auto. The vn flag may be regarded as that flag which indicates that the loop is in fact operating in automatic.
When conditions are right for the controller to start operating in automatic the vn falg is set, and previous stored values of er are set to zero, and previous values of mv are set to the current mv value. If the se flag is set ( e equalise) then the setpoint value is made equal to the measured variable. This is done to ensure bumpless transfer.
ir input run
If the vn violation status of any block connected here is v then the normal processing of the block may proceed. The vn of this pid block is made the same as that of the pointed to block if this pid block is auto. If this pid block is inactivated because of this connection it will be initialised when reactivated. This allows interlocking of control loops.
ip input process
If the vn violation status of any block connected here is v then the normal processing of the block may proceed. No re-initialisation is performed nor is the vn status changed as a consequence of this connection. This parameter is intended for use with the ai=1 dead time controller option.
ia input a
The measured variable (mv) in the following is derived from the analogue result ra of the block specified here.
mh input hl, ml input ll
These limits are used to constrain the value of the measured variable (mv).
is input setpoint, sp setpoint
If the is value is that of a valid block number, then the sp value is obtained from the analogue result ra of that block. The sp value is the same as the ra of this block.
sh setpoint hl, sl setpoint ll
These limits are used to constrain the value of sp. Upon execution of this block the ra of the block pointed to by is will also be constrained, That is to say the constrained sp is fed back to the block pointed to by is on each scan.
op output block, an answer
an answer is the result of the control equation below which is then added to the op output block. If the op output block is an analogue output, pulse duration output or a control block the value of an is added to the sp of that block, other wise it is added to its ra.
Note that because of the fact that an incremental value is added to the op output block it is possible to alter manually, or with other blocks, that value.
er = sp - mv
er_1 = er from previous scan
er_2 = er from two scans previous
mv_1 = mv from previous scan
mv_2 = mv from two scans previous.
an = kp * ( prop_value + int_value + deriv_value )
where prop_value, int_value and deriv_value are internal temporary variables depending on the algorithms and constants as follows
td derivative time, ad derivative algorithm, deriv_value
if ad = 0 then
deriv_value =(mv - 2*mv_1 + mv_2) * td / scan_time_in_minutes
if ad = 1 then
deriv_value =(er - 2*er_1 + er_2) * td / scan_time_in_minutes
if ad = 3 then
er = error squared, (note if error is -ve, er is also made -ve)
deriv_value =(er - 2*er_1 + er_2) * td / scan_time_in_minutes
Derivative time (in minutes) can be set to zero to disable derivative action. The derivative action may be configured to operate on the measured variable (ad=0) or the error ( ad=1). Even error squared control is available with (ad=3).
kp proportional constant, ap proportional algorithm, prop_value
if ap = 0 then prop_value = er - er_1
if ap = 1 then prop_value = mv - mv_1
The proportional action may be configured to operate on the error ( ap=0) or the measured variable ( ap=1)
ti integral time, ai integral algorithm, int_value
if ti is not equal to 0 then int_value = er * scan_time_in_minutes / ti
To disable integral action simply set ti to 0, otherwise ti represents integral time in minutes. ( ai integral algorithm is reserved for future use.)
These parameters are reserved for future use.
if ag = 0 gf = gf + abs( er ) absolute error
if ag = 1 gf = gf + er * er error squared
if ag = 2 gf = gf + abs( er ) * db absolute error * time
if ag = 3 gf = gf + er * er * db error squared * time
After a step change in demand, one can look at the rising value of gf
and compare with other tuning constants.
Motor Block

The motor block is designed to allow comprehensive control of the starting/stopping of electric motors, pumps, and opening/closing of valves. The connections are made through digital inputs and outputs. Facilities are included to initiate alarm signals if the motor/pump fails to respond to control signals in allowed time periods. The accumulation of run time is also included.
Each of the logical inputs and outputs has associated with it an algorithm for inverting the significance of that input or output. In each case this algorithm follows the normal ABACUS convention where 1=noninverting, and 0=inverting.
In addition to the common parameters the motor block has the following
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Check if sn = current scan & am = a No - exit
Yes
Read in all logical inputs to internal flags
IRVAL = logical result of ir if ar=1 else not logical result of ir
IUVAL = logical result of iu if au=1 else not logical result of iu
ITVAL = logical result of it if at=1 else not logical result of it
IPVAL = logical result of ip if ap=1 else not logical result of ip
ICVAL = logical result of ic if ac=1 else not logical result of ic
C1VAL = logical result of c1 if a1=1 else not logical result of c1
C2VAL = logical result of c2 if ar=1 else not logical result of c2
SAVAL = logical result of sa if na=1 else not logical result of sa
SRVAL = logical result of sr if nr=1 else not logical result of sr
SPVAL = logical result of sp if np=1 else not logical result of sp
Read in time values from scratchpads if specified
t1 = if (d1 is a block) d1's ra
t2 = if (d2 is a block) d2's ra
t3 = if (d3 is a block) d3's ra
t4 = if (d4 is a block) d4's ra
if t1 > t2 then set saval (alarm) (time-out)
if IPVAL (stop input) then reset SAVAL (alarm)
if ITVAL (start i/p) is set then set SRVAL (start o/p)
if SRVAL (start o/p) is set then
if IRVAL (run i/p) ir reset
or t2 > t1 or IPVAL (stop i/p) or ICVAL (auto) is set
then reset SRVAL (start switch)
if ICVAL (auto) is set then
if IRVAL (ready i/p) is reset
or t2 > t1 or IPVAL (stop i/p) or ITVAL (start) is set
then reset ICVAL (auto flag)
if ICVAL is set (auto)
then
if af = 0 do îANDî control action i.e.
if C1VAL AND C2VAL then set SRVAL (start)
else reset SRVAL (start)
else
if af = 1 do îORî control action i.e.
if C1VAL OR C2VAL then set SRVAL (start)
else reset SRVAL (start)
Calculate timer values
if SRVAL is set (start requested) and IUVAL (running i/p) is reset
then increment t2
if IUVAL is set (runnning) then increment t3
if t3 > 3600
then increment t4, and subtract 3600 from t3
(t4 becomes hours if t3 is seconds)
set SPVAL to the complement of SRVAL
(i.e. stop o/p opposite of start o/p)
reset is and ip blocks (start and stop scratchpads)
is = if (as = 1) then 0 else 1
ip = if (ap = 1) then 0 else 1
set / reset logical block in accordance with internal flags
ic block = if ( (ICVAL = 1) & (ac = 1) )
or ( (ICVAL = 0) & ( ac = 0) ) then 1 else 0
sr block = if ( (SRVAL = 1) & (nr = 1) )
or ( (SRVAL = 0) & ( nr = 0) ) then 1 else 0
sp block = if ( (SPVAL = 1) & (np = 1) )
or ( (SPVAL = 0) & ( np = 0) ) then 1 else 0
sa block = if ( (SAVAL = 1) & (na = 1) )
or ( (SAVAL = 0) & ( na = 0) ) then 1 else 0
FINISH
| Index Block | This block type is used for counting, timing and integer arithmetic. |
| Input code conversion block | The input conde conversion block is used to reference a continuous range of logical block results and produce an analogue result depending upon their status. |
| Output code conversion block | The output conde conversion block is used to convert an analogue result into a bit pattern and switch a continuous range of blocks. |
| Control Block | The control block is a multifunction block capable of many different types of calculation, control functions, accumulation functions, and list processing. |
| Sequence Block | This block causes the execution of curtain other blocks independently of their scan parameters in a sequence determined by an input list to the sequence block. Alternatively a serial programme can be executed. |
| Scratchpad Block | All blocks which have no other block type are classified as scratchpad blocks. Scratchpad blocks are nonexecutable, and only have the common parameters. They are used for analogue and data storage only. |
The index block is used for counting, timing and integer arithmetic. The block has the following parameters in addition to the common parameters tg sn ra am vn and ss.
| ia | logical input | block_number or indirect_block_number |
|---|---|---|
| aa | algorithm a | 0 - 7 |
| ib | analogue input | block_number or indirect_block_number |
| ab | algorithm b | 0 - 7 |
| hl | high limit | floating_point_constant |
| ll | low limit | floating_point_constant |
| k1 | constant | floating_point_constant |
ia input a, aa algorithm a
The status of the logical input specified by the ia parameter is processed by aa in accordance with table IX1. If the intermediate logical result is 1 then further processing is carried out as described below, otherwise processing is discontinued, except for the initialisation described for ab of 1.
ib input b
The analogue result of the block specified by this parameter is used as the measured variable in further processing of this block.
hl high limit, ll low limit, k1 constant
The value of these parameters are used in the various calculations performed in accordance with ab.
| algoritm | logical | logical | intermediate | |
|---|---|---|---|---|
| description | previous | current | result | |
| 0 | off (inverting) | - | 0 | 1 |
| - | 1 | 0 | ||
| 1 | on (noninverting) | - | 1 | 1 |
| - | 0 | 0 | ||
| 2 | on-going | 0 | 1 | 1 |
| 1 | 1 | 0 | ||
| 1 | 0 | 0 | ||
| 0 | 0 | 0 | ||
| 3 | off-going | 1 | 0 | 1 |
| 0 | 0 | 0 | ||
| 0 | 1 | 0 | ||
| 1 | 1 | 0 | ||
| 4 | any-change | 0 | 1 | 1 |
| 1 | 0 | 1 | ||
| 0 | 0 | 0 | ||
| 1 | 1 | 0 | ||
| 5 | no-change | 0 | 0 | 1 |
| 1 | 1 | 1 | ||
| 0 | 1 | 0 | ||
| 1 | 0 | 0 |
ra = measured variable + k1
If ib is nonzero ra = measured variableFurther processing of this algorithm only occurs if the logical input ia and its algorithm aa produce an intermediate result of 1. Each time this algorithm is processed, the value of ra and vn are updated according to the following conditions.If k1 = 0 thenIf ib is zero and k1 = 0 ra = ll
If ib is zero and k1 < 0 ra = hl
if ra+k1 hl thenra = ll, and vn = v
else
ra = ra + k1 , and vn = n
If k1 < 0 then
if ra+k1 < ll then
ra = hl, and vn = v
else
ra = ra + k1 , and vn = n
In this way the value of ra steps from one limit to the other
with steps of k1. When arriving at the limit the violation flag
is set for one scan.
ra = k1 - measured variableIf ( ra < ll ) or ( ra hl ) vn = v
else vn = n
ra = k1 * measured variableIf ( ra < ll ) or ( ra hl ) vn = v
else vn = n
ra = measured variable / k1If ( ra < ll ) or ( ra hl ) vn = v
else vn = n
ra = k1 / measured variableIf ( ra < ll ) or ( ra hl ) vn = v
else vn = n

The input code conversion block is used to reference a continuous range of logical block results and produce an analogue result depending upon their status.
In addition to the common parameters the input conde conversion block has the following

The output conde conversion block is used to convert an analogue result into a bit pattern and switch a continuous range of blocks.
In addition to the common parameters the output conde conversion block has the following
aa = 0 binary transferThis algorithm transfers the binary pattern of the measured variable
to the am flags of the specified range of blocks. The block specified
by sw is regarded as the least significant bit in the word, and
is represented by 1 in the measured variable, the next block by 2 then
by 4 etc. Should a bit be set in the measured variable then the corresponding
output block will be set auto, otherwise it will be set manual.

The control block is a multifunction block capable of many different
types of calculation, control functions, accumulation functions, and list
processing. The ab algorithm b parameter specifies the manner in
which the control block is processed. The algorithms are divided into three
main categories.
|
0 to
|
9
|
|
|
10 to
|
13
|
|
|
14 to
|
19
|
|
|
20 to
|
25
|
|
The block has the following parameters in addition to the common parameters
tg
sn ra am vn and ss.
|
|
|
|
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result is the intermediate analogue result which is then process by aa.
| ab | description | calculation(s) performed |
|---|---|---|
| 0 | simple transfer | result = sp + in - mv (mv = ra of ia block) |
| 1 | simple ratio | result = (sp + in - mv) * k1 |
| 2 | flow rate conditioning | result = k2 * sqrt( (mv - k1)*(sp + hl)/(in + ll) ) |
| 3 | general mathamatics | result = k2 * (mv - k1) * (sp + hl)/(in + ll) |
| 4,5,6 | two term control | error = sp + in - mv (error is an internal variable) |
| result* = k1 * ( error - k2 * er ) | ||
| er = error | ||
| *Note | ||
| 4 | er is used for aa calculation | |
| 5 | ra is used for aa calculation | |
| 6 | sp is used for aa calculation | |
| 7 | natural logarithm | result = k2 * ln( (mv - k1)*(sp + hl)/(in + ll) ) |
| 8 | exponential | result = k2 * exp( (mv - k1)*(sp + hl)/(in + ll) ) |
These algorithms operate on the contiguous list of block defined as those blocks between is and ia. ia should refer to a block with higher block number than that pointed to by is.
result is the intermediate analogue result which is then process by aa.
| ab | description | calculation performed |
|---|---|---|
| 10 | sum | result = k2 + k1 * sum ( is .. ia ) |
| 11 | ave | result = k2 + k1 * ave ( is .. ia ) |
| 12 | max | result = k2 + k1 * max ( is .. ia ) |
| 13 | min | result = k2 + k1 * min ( is .. ia ) |
Algorithms are either pre-initialised or post-initialised.
Pre-initialisation involves resetting the accumulations and setting the result to zero the first time the block is processed after having been set auto.
Post-initialisation processes the accumulations to obtain the result prior to resetting the accumulations, on the first scan after the block has been set auto. This having the advantage that the block may be left manual whilst accumulating, it only being necessary to set it auto to obtain the result, and to reset the accumulations for the next period. (It is normal to set the single shot flag ss in this case.)
acc is an internal floating point variable which is incremented by the cascading block with its result each time it cascades.
| ab | description | calculation(s) performed |
|---|---|---|
| 14 | integration pre-initialised | result = acc / ( k1 * 100 ) |
| 15 | integration post-initialised | result = acc / ( k1 * 100 ) |
| 16 | average pre-initialised | result = acc / er (er = number of samples) |
| 17 | average post-initialised | result = acc / er (er = number of samples) |
| 18 | std. deviation pre-initialised | result = k1 * standard deviation (-1 if less than 10 samples) |
| 19 | std. deviation post-initialised | result = k1 * standard deviation (-1 if less than 10 samples) |
ia
The input a ia parameter specifies the first of a range of blocks to be used as inputs to these algorithms. During processing, the algorithm steps from the first input block to next, then the next etc., and at each step reads the result of the input block which then becomes the measured variable mv. If the input a ia parameter is zero then the measured variable is regarded as zero for all steps.
| ca | cascade a | block_number cascade_type or indirect_block_number cascade_type |
| cb | cascade b | block_number cascade_type or indirect_block_number cascade_type |
The ca parameter specifies the first block to receive a cascade from the list processing algorithm. The cb parameter specifies the last block to receive a cascade. The number of target blocks is thus defined by the cascades, and therefore the number of input blocks is the same. cb must point to a higher block number than ca.
The cascade type must be the same for both ca and cb, and must be consistent with the type of target block.
When the algorithm is processed the measured variable is taken from each input block in turn. The measured variable is processed and the result cascaded to the corresponding target block.
For each item of data thus processed, limits are checked to produce an intermediate violation status, and result which are taken into account by the cascades.
When the block specified by cb has been processed the algorithm is finished and the last calculated result and violation status are the final values for the block.
| ab | description | calculation(s) performed |
|---|---|---|
| 20 | simple transfer | result = mv |
| 21 | multiplication | result = (sp - mv) * k1 |
| 22 | division | result = (sp - mv) / k1 |
| 23 | division | result = k1 / (sp - mv) |
| 24 | multiply input | result = mv * A / k1 A = initial value of by output result to be cascaded to |
| 25 | simple transfer | result = mv mv = result of block whoseindirect input number is the result of the current input. If this number is invalid no cascade is performed at this stage. |
aa Logical algorithm
The analogue result of the block calculated by the various algorithms ( ab) is further processed by aa. (In the case where ab = 4 it is the value of er, where ab = 6 it is the value of sp) The list processing algorithms have the result processed by aa at each step.
These parameters are related to the final ra and vn values as in the following table.
|
|
ra hl
|
ll <= ra <= hl
|
ll ra
|
|||
|---|---|---|---|---|---|---|
|
ra
|
|
ra
|
|
ra
|
|
|
|
|
result
|
|
result
|
|
result
|
|
|
|
result
|
|
result
|
|
result
|
|
|
|
hl
|
|
result
|
|
ll
|
|
|
|
result
|
|
0
|
|
result
|
|
All blocks which have no other block type are classified as scratchpad blocks. Scratchpad blocks are nonexecutable, and only have the common parameters. They are used for analogue and data storage only.
The operator communicates with ABACUS4 via an operators station. This is usually a PC running the Linux operating system and the X window system. This may be the same system that is running ABACUS4 or another reachable over a network.
Text based operator interfaces may be constructed, but these are not documented here.
All normal operator access to the ABACUS4 block database is done via the Alarm Code Block, although all blocks are accesable to the Tck/tk language.
The Alarm Code Block permits the monitoring of the analogue or logical results of blocks, and the generation of process alarms when limits are violated, or upon changes.
The block permits the operator access to its high and low process limits,
and to the result, setpoint, auto/manual and auto/manual request flags
of the loop being monitored.

The Alarm Code Block permits the monitoring of the analogue or logical results of blocks, and the generation of process alarms when limits are violated, or upon changes.
The block permits the operator access to its high and low process limits, and to the result, setpoint, auto/manual and auto/manual request of the loop being monitored.
In addition to the common parameters the Alarm Code Block has the following
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is the loop name which is used in all ABACUS journaling. (It should be copied over the the descriptor of any Enterprise Server database points - see later.)
ia input a
The ra of the block referenced here is taken as the measured variable of the loop. Subject to the value of aa it is this block's result which is tested against the various limits.
is input setpoint
The ra of the block referenced here is taken as the setpoint of the loop.
ar auto/man request
The vn of the block referenced here is taken as the auto/man request flag of the loop. That is to say the flag which is set when the operator requests that the loop go into auto.
st status
The vn of the block referenced here is taken as the auto/man status flag of the loop. That is to say the flag which is set when the loop is in auto.
hl high limit
ll low limit
xh high high limit
xl low low limit
hy hysteresis value
Each time the measured variable passes one of the above limit values a message is recorded in the journal file, excepting that if the hy value is nonzero a return excursion is ignored until a movement greater than hy occurs. This can be used to avoid multiple alarms when a noisy signal goes into alarm.
For correct functioning of the limit test facilities the following should be true
xh > hl > ll > xl, and hy should be positive and less than the difference between any two of the other limits.
s1 status 1 (alarm) text
The text string written by the block processor here depends on the relationship between the measured value and the alarm limits. If hy = 0 the following is carried out
if ( measured value < xl ) then s1 = lx (low low alarm text)
else if ( measured value < ll ) then s1 = ml (low alarm text)
else if ( measured value > hl ) then s1 = mh (high alarm text)
else if ( measured value > xh ) then s1 = hx (high high alarm text)
else s1 = mo (ok text)
If however the hy value is nonzero the above becomes
if ( measured value < xl ) then s1 = lx (low low alarm text)
else if ( (xl + hy ) > measured value >= xl ) then s1 is unchanged
else if ( measured value < ll ) then s1 = ml (low alarm text)
else if ( (ll + hy ) > measured value >= ll ) then s1 is unchanged
else if ( measured value > hl ) then s1 = mh (high alarm text)
else if ( (hl - hy ) < measured value <= hl ) then s1 is unchanged
else if ( measured value > xh ) then s1 = hx (high high alarm text)
else if ( (xh - hy ) < measured value <= xh ) then s1 is unchanged
else s1 = mo (ok text)
aa algorithm
This algorithm determines which limits are used to define an alarm state and set the vn of the Alarm Code Block or if the st logical value should be used. The following tables shows the effects of alternative aa values. (aa values greater than 9 inhibit the printing/logging of setpoint changes)
Analogue alarms
| aa | mv<xl | mv < ll | mv>ll&mv<hl | mv>hl | mv>xh |
|---|---|---|---|---|---|
| 0,10 | vn = n | n | n | n | n |
| 1,11 | vn = v | v | n | v | v |
| 4,14 | vn = v | n | n | n | v |
Digital alarms
| aa | st -> vn = n | st -> vn = v |
|---|---|---|
| 2,12 | vn = n | v |
| 3,13 | vn = v | n |
s2 status 2 (hand/auto) text
The text string written by the block processor here depends on the vn of the block referred to in st. If this block's vn = v then ma is copied, otherwise mm.
All changes to limit values, setpoint value, auto/manual request flag, and status changes are logged in the journal file if the Alarm Code Block is auto. One line is written for each event, and has the following format
YYMMDD HH:MM:SS signal_name message ( old_value ) new_value
where
signal_name is the si of the Alarm Code Block
YYMMDD HH:MM:SS is the time and date of the event
message = "setpoint changed"
"hi-hi lim changed"
" high lim changed"
" low lim changed"
or "lo-lo lim changed" as appropriate.
When an alarm limit is exceeded the format is as follows
YYMMDD HH:MM:SS signal_name alarm_text value units
where alarm_text is the appropriate alarm text string ( ml mh lx hx or ok ), value is the measured value, and units is the text un.
The easiest way to get to see a list of the commands is to run the xman program, and look into the n section.
Displays are stored in a subdirectory of /home/abacus. This directory has the name of the application, and also contains the datadump.bin file(s). If the project is called smith for example then these files will reside in the directory /home/abacus/smith. It is usual to have one 'display manager' file which includes code for menus and a frame for the displays to be shown in, and a number of 'display files'. In addition the background diagrams and dynamic symbols are stored in gif format.
eng2 b1234,p
Here block 1234 is printed, something like the following being returned:
Block 1234 () type index B1234 () nn de nm tg spare;sn 0(0.0 sec);ra 0.000 am m ;vn n ;ss r en 0;dd 0 aa 0;ia 0( 0.000 m-rn) ab 0;ib 0( 0.000 m-rn) k1 0;hl 0;ll 0The tcl program is responsible for extracting the part of this printout which is of interest.
eng2 requires that all the commands come together in its first argument, so that if spaces are part of the syntax, then the argument should be enclosed in quote marks. If you use this program from an xterm window for example beware of the command line conversions that your shell does, in particular the * character is translated into all the filename of files in the current area, before being passed onto, in this case, the eng2 program. This can be avoided either by enclosing you arguments in quotes, or by prefixing the * with the \ character.
eng2 is sometimes used with a unix pipe. For example if we ish to list all the si paramters of the blocks in the range 8001 to 8099 we could use
eng2 b8001,xb8099,.si
This would produce something like
Block 8001 () type alarm code Xblock 8099 type alarm code b 8001;si b 8002;si# 02 GAUGE ON/OFF SHEET b 8003;si# 03 GAUGE STATIC b 8004;si# 04 GAUGE STANDARDIZE b 8005;si ...Whereas we might not want the 'b ' parts or the ';si'. We could use the unix program sed in a pipe like this
eng2 b8001,xb8099,.si | sed -e "s/^b //" -e "s/;si/ /"which would produce something like
Block 8001 () type alarm code Xblock 8099 type alarm code 8001 8002 # 02 GAUGE ON/OFF SHEET 8003 # 03 GAUGE STATIC 8004 # 04 GAUGE STANDARDIZE 8005 8006Removal of the top two lines could be achieved with grep
eng2 b8001,xb8099,.si | sed -e "s/^b //" -e "s/;si/ /" | \ grep -v "^B\|^X"The possibilities are endless, however there are some other programs to do the simpler things easier.
frank(abacus):~$ ra 14 0.250931frank(abacus):~$ frank(abacus):~$Note that there was no end of line printed.
frank(abacus):~$ ra2 14 51 52 53 0.15332 0.1 0.2 0.58 frank(abacus):~$The values are returned in the same order as the block numbers apear in the command line.