Appendix E - RTU Stand-Alone Tasks
When communications with the host are interrupted, the Remote Terminal Unit switches to Stand-Alone mode to enable it to work independently of the host. Stand-Alone controls are implemented by the Stand-Alone task (SATSK) which runs once every second to determine whether Stand-Alone control should be active:
Stand-Alone control uses pre-coded algorithms (sequences of instructions). The data that the algorithms act on are "points" such as AIs (analog inputs), DIs (digital inputs), SPs (setpoints), DVs (digital outputs), and AOs (analog outputs). Specific points are not pre-coded in the algorithm. Instead, the point types and addresses are coded in a control block.
The 25x85 Logic Processor contains both Foreground and Background (Stand-alone) controls that work alone or in combination with commands from the host. Foreground control algorithms (control blocks) run continuously, all of the time. Background control blocks run only when communications with the host have been lost or the RTU has been placed in a FORCED Stand-Alone mode.
Control blocks direct the execution of algorithms. Control blocks specify which algorithm is used, how often it is executed, and other data. A control block can refer to only one algorithm but an algorithm can use the information from any control block that refers to it. Control blocks are stored on the Remoter Terminal Unit's Solid State Disk (SSD). During RTU startup, they are copied from the SSD to RAM. The RAM copy of the control block is used at execution time.
The 25x86 8602 Control Panel contains a Stand-Alone Active switch that can be set the RTU to one of three modes of operation.
· INHIBIT: If the Stand-Alone switch on the RTU Control Panel is in the INHIBIT position, neither Foreground nor Background control blocks will be executed. SATSK reschedules itself to run again in one second.
· FORCED: If the Stand-Alone switch is in the FORCED position, both Foreground and Background controls are active - regardless of the status of communications with the host and all control blocks will run, all of the time. This provides a way to locally activate Stand-Alone controls during normal communication periods.
· AUTO: If the Stand-Alone switch is in the AUTO position and the RTU is in normal communication with the host (or NCC), control blocks designated as Foreground will run continuously and control blocks designated as Background will not run at all. Should communication with the host be interrupted for more than the length of time specified in the configuration EEPROM, Stand-Alone controls are activated until communication with the host is re-established and control blocks designated as Background will run.
RTU Control Blocks
A control block is 32 bytes in length. It consists of a "header" (5 bytes) followed by the "body" (27 bytes). The header provides control information to the DDC program and determines the format of the control block body.
Table E-1 - Control Block Header Bytes
Byte # |
Byte Description |
00 |
Algorithm Type Code |
01 |
Algorithm Control and Status |
02 |
Internal Error Status |
03 |
Delay Counter |
04 |
Repeat Time in Seconds |
Table E-2 - Time-Scheduling Bytes
Byte # |
Byte Description |
05 |
Start Time Hour |
06 |
Start Time Minute |
07 |
Stop Time Hour |
08 |
Stop Time Minute |
09 |
Day(s) of occurrence |
Byte 00
Identifies the type of algorithm.
· 00 - Indicates skip this control block.
· FF - Indicates the end of the control blocks
Byte 01
Contains control and status information (indicates, for example, whether it is running in Foreground or Stand-Alone).
Byte 02
Set when an error flag bit is set in the status byte (byte 01).
Byte 03
Contains the Delay Counter value. The initial value of this counter is set to zero. After the control block runs, DDC resets the Delay Counter to the Repeat Time (byte 4) for the algorithm to run again on the next interval.
Byte 04
Specifies the Repeat Time, the period at which the control block will be run again.
Bytes 05 - 09
Used by those blocks that allow time scheduling. These bytes contain Start, Stop, Day of Week, and Holiday information.
Bytes 10 - 31
Contain parameters unique to the type of algorithm. Examples are temperature settings and point addresses.
Control Block Scheduling
The optional control block time parameters define a period of time during a particular day or days, for example, holidays from noon to 1 PM, or Monday through Friday from 8 AM to 5 PM. Each scheduled period has a Start Time (a beginning), a Stop Time (an ending), and specified Days of the Week.
All blocks that have time scheduling capability are active or inactive depending on the day of the week. Some become active at a specified time of day, others select an operation by the time of day. See Error! Reference source not found.- Days of the Week Bit Patterns.
Table E-3 - Days of the Week Bit Patterns
Day |
Bit Number |
Symbol |
Monday |
7 |
MON |
Tuesday |
6 |
TUE |
Wednesday |
5 |
WED |
Thursday |
4 |
THU |
Friday |
3 |
FRI |
Saturday |
2 |
SAT |
Sunday |
1 |
SUN |
Holiday |
0 |
HOL |
If, for example, you want the control block to run only on weekends and holidays, the bit pattern would be: 00000111 binary or 07 hex. The days can be specified symbolically using the symbols shown, e.g., MON+TUE+WED for Monday, Tuesday and Wednesday. On the specified days, the control block will become "active" between the designated Start and Stop Times.
NOTE: When NO time parameters are stated, or all 5 parameters are set to 0, the control block runs regardless of the time of day or day of week. A single time parameter of -1 must be specified for non-scheduled algorithms.
Algorithm Types
Each RTU normally contains only those algorithm types required or specified for the system. Algorithm types may be standard or customized to meet specific needs. Appendix F lists the common 25x85 control blocks that can be defined in byte 00, the first byte of the control block.
Control blocks are maintained through the use of the HSQ MISER CBM utility program. Refer to the HSQ MISER System Manual for program specifics. Standard control blocks are listed in Appendix F of this manual. Each control block listing shows the control block numbers, the function of each control block, and what each byte in the control block represents.
Status Byte Codes
Table E-4 lists possible values that can occur in the Control Block Status byte (byte 01). Note that if more than one status value applies, the values are added together. For example, if Foreground (08) is set, CPA has PWM output (20), and a fatal error occurs (02), the Status byte value will be 2A.
Table E-4 Control Block Status Byte (Byte 01)
Hex Value |
Meaning |
Comments |
00 |
Stand-Alone Mode |
|
01 |
Non-Fatal Error |
See Tables E-4 and E-5 |
02 |
Fatal Error |
See Tables E-4 and E-5 |
04 |
*** |
Unused |
08 |
Primary Mode |
Foreground mode |
10 |
CPA: Raise/Lower Output |
If neither CPA bits are set, then |
20 |
CPA: PWM Output |
CPA does Start/Stop output |
40 |
OPSTR, OPSTP |
Cooling mode |
80 |
Disable Control Block |
Error Byte Codes
Table E-5 Additional RTU Error Codes
Decimal |
Hex |
|
33 |
21 |
Invalid Command |
34 |
22 |
Point Invalid |
35 |
23 |
Point Disabled |
36 |
24 |
Invalid Memory Request |
37 |
25 |
Memory Exhausted |
38 |
26 |
Point Type Invalid |
39 |
27 |
Point Undefined |
40 |
28 |
Outputs Disabled |
41 |
29 |
Invalid Configuration Code |
42 |
2A |
Unused |
43 |
2B |
Invalid MUX ID |
44 |
2C |
MUX Down |
45 |
2D |
MUX Disabled |
46 |
2E |
Max. Starts Per Hour |
47 |
2F |
Min. On/Off Time Not Met |
48 |
30 |
Low Control Ownership Level |
49 |
31 |
Invalid RTU ID |
50 |
32 |
Invalid Access Level |
Table E-6 Control Block Error Codes
Decimal |
Hex |
|
1 |
01 |
Invalid Algorithm Type |
2 |
02 |
Invalid Input Point |
3 |
03 |
Invalid Output Point |
4 |
04 |
Input Point Disabled |
5 |
05 |
Output Point Disabled |
6 |
06 |
Invalid CB Field |
7 |
07 |
CPA: Position HI Limit |
8 |
08 |
CPA: Position LO Limit |
9 |
09 |
CPA: Sample Hi Limit |
10 |
0A |
CPA: Sample Lo Limit |
11 |
0B |
Units Conversion Error |
12 |
0C |
Result Out-of-Range |
13 |
0D |
4 - 20 Ma Sensor Limit Error |
PID Control Block Status Codes | ||
17 |
11 |
Setpoint at Hi Limit |
18 |
12 |
Setpoint at Lo Limit |
19 |
13 |
Process Variable (AI) at Hi Limit |
20 |
14 |
Process Variable (AI) at Lo Limit |
21 |
15 |
Output at Hi Limit |
22 |
16 |
Output at Lo Limit |
© 2000 HSQ Technology