SattCon 05-OP Programmers Manual PDF
SattCon 05-OP Programmers Manual PDF
Progammer's manual
From verslon 2.0
O Copyright SattControl AB Malrnti
Order numbec493-0172-1 1
Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Other documentation for SattCon 05-45/0P4 . . . . . . . . . . . . . . . . .5
1 Introduction ................................7
2Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
2.1 How SattCon 05 operates . . . . . . . . . . . . . . . . . . . . . . . . .7
2.2 General rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
23 Installing terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
set terminal type............................ 10
, ..............
change the baudrate for the VDU channel 11
..- .. -J change the baudrate for the PRINT channel . . . . . . . . . . . . .11
2.4 Basic level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
25 Help menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.
2.6 Programming lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
2.7 Startlstop program execution . . . . . . . . . . . . . . . . . . . . . .15
2.8 Resetting SattCon 05 . . . . . . . . . . . . . . . . . . . . . . . ... 16
5 Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
5.1 Call and display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.2 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Choice of timer delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5 3 Resetting elasped time . . . . . . . . . . . . . . . . . . . . . . . . . .88
5.4 Listing on VDU and printer . . . . . . . . . . . . . . . . . . . . . . .88
6 Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
6.1 Call and display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
6.2 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
6 3 New initial value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
6.4 Listing on VDU and printer . . . . . . . . . . . . . . . . . . . . . . .92
:isters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
sed registerhandling ............. . . . . . . . . . 93
7.1 all and display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
7.2 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94
7 3 Listing on VDU and printer . . . . . . . . . . . . . . . . . . . . . . .95
8 Dynamic status display and I/O forcin. . . . . . . . . . . . . .97
8.1 Relay diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
8.2 Sequencers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
8 3 110 addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
UO forcing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99
8.4 Analogue inputs and outputs . . . . . . . . . . . . . . . . . . . . . 100
8 5 How to change from one dynamic display to another . . . . . . . .101
13 Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Cascade connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Step response ................................. 133
13.1 Call and display . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Erasing a controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
.
13.2 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
133 Listing on a printer and VDU. . . . . . . . . . . . . . . . . . . . .139
14 Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Message types ................................ 143
.....................
14.1 The channel definition areas 144
Call and display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Programming ................................. 145
142 Communication areas......................... 148
Call and display................................ 148
.......................
Erasing a communications area 148
Programming ................................. 148
143 Listing on VDU and printer . . . . . . . . . . . . . . . . . . . . . .152
14.4 Transmission using S1 code . . . . . . . . . . . . . . . . . . . . . 153
14.5 VDU programming via COMLI . . . . . . . . . . . . . . . . . . .153
14.7 Communication via a Hayes modem . . . . . . . . . . . . . . . . 155
Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
The Slave's identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Master call-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Slave Call.up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Automatisc disconnection . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Programming text strings for call-up and disconnection . . . . . . . . . .156
Answer codes from the modem . . . . . . . . . . . . . . . . . . . . . . .158
Block Diagram for PBS-program in master . . . . . . . . . . . . . . . . .159
Block Diagram for PBS-program in slav . . . . . . . . . . . . . . . . . .160
14.8 Communication via SattBus . . . . . . . . . . . . . . . . . . . . . 161
An Example of a SattBus network . . . . . . . . . . . . . . . . . . . . . .161
Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161
SattCon 05-25 has all the functions found in SattCon 0545 except
controllers, time channels and the COMLI master function. Otherwise the
two systems are identical.
and counten, registers, time channels, text strings, alarm queue, control
loops, COMLI channel definitions, COMLI message areas, and the program
versions which are stored in the PROM.
The SattCon 05 has a serial channel which can be used as either a VDU or
COMLI channel. If the serial channel is used as a COMLI channel, it can be
either Master or Slave.
An optional communications board is available with two COMLI channels
for communication with other systems via COMLI, SattControl's standard
protocol for serial transmission. SattConM can be both a supervisory
system (Master) and an outstation (Slave). The supervisory system can,for
example, handle lengthy calculations and data manipulation, while the
outstations execute direct control at high speed. Using COMLI you can
transmit and request digital and analogue signal status, register values, time
and date, time-marked events (e.g. alarms), etc. You can also transfer
programs between SattCon 05 and a personal computer via COMLI.
SanCon 05 has a call-up function which is used with COMLI-
communications over long distances via a modem and the public
telecommunications network.
The nucleus of a PBS program (control program) usually consists of
Boolean equations, which are composed of Boolean instructions (AND, OR,
etc.). The PBS program may also contain instructions for handling analogue
values, calculations, jumps, subroutines, sequence control, shift registers,
etc.
You may link to the PBS program SattCon 05's timers and counters, time
channels which can start and stop activities at certain times and days of the
week, text strings (for alarm messages etc.), control loops and other
functions which you need to obtain total control of your installation.
r
Introduction
Subroutines .'-9
SattCon 05's PBS program can be divided into a main program and
subroutines, which are executed only when they are called. You can decide
when they are to be called, for example, when a certain input changes state.
Fast loop
Execution of the fast loop, which can execute part of the program within 1
ms, can be started via VO signals.
Sequencers
For sequence conml'there are 100 sequencers each with 32 steps.
Instructions belonging to a certain step are only executed when this step is
active. You canobtain a dynamic display on the VDU which shows which
steps are active.
Shih registers , -.
SattCon 05 has shift instructions which enable you to create your own shift
registers easily. '7
Calculations
In addition to the PID loops provided, you can program your own limiter
modules, ramp functions, etc. You can also cany out calculations in1
SattCon 05 using instructions which include the four arithmetic functions,
square root extraction and logical operations. SattCon 05 has 512 registers
which you can use to store numeric values.
Timers and counters
SattCon 05 has 64 timers and 64 counters. Timer and counter presets can be
set by commands from the VDU terminal, via the PBS program, or from
inputs using thumbwheel switches for example.
Time channels
There are 16 programmable time channels which you can use to start or stop
activities, at certain times and days of the week
Text handling 3
You can enter 255 text messages of 32 characters each. Text output can be
initiated by, for example, an input changing state. Messages can contain
time, date and process values. The 10 most recent messages are stored in an
alann queue which can be displayed on the VDU or output to a printer. It is
also possible to create a simple dialogue program for entering register
values from a VDU.
Control loops
There are eight control loops, each of which can be programmed to have a
P, PD, PI or PID function. The control loops can be started and stopped by
the PBS program, and their parameters can either be entered from the
terminal, or can be fetched from the PBS program.
6 COMLI
COMLI is SanControl's standard protocol for serial transmission. Using
COMLI you can,among other things, transmit values and signal statuses
between systems inside or outside the plant. You can control
communication with the PBS program.
Peripheral units
The following equipment may be conected to SattCon 05:
Digital expansion units
Digital test panels (ITCOS).
Analogue expansion unit, XACV-B which may have test panels
(ATC0S)and PTl OO sensors (SIA05/P05).
Pulse encoder interfaces (IP05).
Printers
Back up unit (SBUPOS)
VDU terminals
Personal computers with a DOX5 documentationprogram.
Communication boards for extra COMLI channels 0x232or DX485).
i
2 Basics
In this chapter we examine the basic concepts and functions which you
should learn before reading the next chapter.
When SattCon 05 has executed all the instructions in the program, the status
is copied from the VO RAM to the outputs. If memory cell 400 is ONE,
then the output will also be ONE.
All commands are entered in capitals, so you should depress Caps Lock on
the VDU terminal before continuing.
2.3 Installing terminals
The terminals connected to the serial channel connectors should have
RS232CJV24 interface
7 data bits
1 stop bit
Even parity
The VDU terminal should also have:
Command sequences for ANSI, VT52, Tele-Tec or ADM3A.
24 lines of 80 characters.
Transmission speed of 9600 baud.
XON/XOFF (Handshaking can also be achieved using the RTS-CTS
signals).
The terminal must have the same baudrate as the serial channel to which it
is connected to enable SattCon 05 to communicate with the terminal. In
addition, SattCon 05 should be set for the type of VDU terminal which you
are using.
When you start up SattCon 05 for the first time you do not know how
SattCon 05 is set. When the battery is activated, this is done by removing
the plastic tag, thereby automatically giving the SC05 a transmission speed
of 300 baud. In order to initiate communication between the VDU and
SattCon 05 you should proceed as follows: Select any baudrate for the VDU
terminal and press the RETURN key (you can begin with 9600 baud, which
is the standard baudrate). Repeat this procedure until you obtain a message
which looks like this:
S a t t C o n 05 ver 1.0
>-
t
Cursor
When you receive this message (which shows that you are at basic level),
the VDU and SattCon 05 have the same baudrate.
You should now specify the type of VDU terminal you are using, and if you
wish you may change the baudrate (you should normally choose 9600
baud).
Before you proceed you should press the keys
f 300
Resmt baudrate ?
Execute the change with P. Change the baudrate of the VDU and return to
basic level with Q.
In order to change the baudrate of the printer serial channel, you should call
the system program "Printer baudrate" from basic level, using the command
Present budrate
You can then give the same commands as when you change the VDU
channel baudrate:
New baudrate. n=300,600, 1200,2400,4800,9600,
19200
SattCon 05 contains a number of system programs which you can call from
the basic level. For example, if you want to enter the control program (PBS
program), you call the PBS editor system program, if you want to program
timers, you call the system program TIM, and so on. When you have
finished you return to the basic level.
At basic level the following messages may be displayed after the text
"SattCon 05 ver 1.Ow:
SattCon 05 ver 1 . 0 P FIO pr 2 Pinp Sinp
>-
P: Programming enabled.
FIO: An UO address has been forced (Chapter Dynamic status
indication and VO forcing).
pr : In this example the cycle time has not exceeded the preset
execution time (Chapter Execution times and memory usage).
15: If SattCon 05 shows a figure instead of "pr", this means that the
preset cycle time has been exceeded. In this case the cycle time is
15 ms.
2: Error code for the last error to occur (Chapter System status).
Pinp: Inputs 135-137 are pulse input.
Sinp: Input 100 is used as external synchronizing of real-time clock.
2.5 Help menu
When you are at basic level you can obtain a help menu showing which
command is required to call a particular system program. AU these
commands must always end with RETURN or ENTER.
The menu is displayed from basic level with the command
PBS
when you want to enter PBS programs (PBSeditor). If you want a list of
register values, you give the command
LIREG
and if you want to print the time channels on a printer you give the
command
PRTCH
Note that you can give these commands in all system programs and at all
levels.
When data is being transferred to or from SattCon 05 via COMLI,
programming is disabled until the transmission has been completed. For
example, if there is a fault in the system sending data, programming will
remain disabled because the transmission has not been completed
successfully. If this happens you may remove the disable with the command
2.7 Startlstop program execution
On SattCon 05 there is a red LED.This lights up when PBS execution is
halted.
When the command STOP is used, both PBS execution and VO copying are
halted and the UO area is reset.
Before we examine how you enter and change PBS programs, we shall
show you how to start and stop program execution, which you can do when
you have called the system program " R U N from basic level.
You call the system program "Runnwith the command
RUN
If execution is halted, the following is displayed:
R Start execution.
S Stop execution.
If, for example, you have given the command R, I 05 replies with
PBS: run OK ?
You execute the change with the command P and return to basic level with
Q.
The setting is stored in a battery-backed memory and is therefore retained
even when you have switched off SattCon 05.
Note:
If SattCon 05 is in RUN when you connect the power, program execution
will staxt after about 3 seconds.
There is a means of starting SattCon OP45 from the keypad. You should
press shift first and then C, but not simultaneously.
2.8 Resetting SattCon 05
When, at basic level, you give the command
You can then give one of the commands below, depending on the type of
reset you want:
RESET
PBS RESET
TOTAL RESET
If, for example, you enter PBS RESET SattCon 05 replies with:
PBS RESET OK ?
You can now either execute the reset with the command P or return to basic
level without making a reset with the command Q.
SattCon 05 automatically returns to basic level when you execute with P.
PBS RESET means that:
The PBS program is deleted and that RESET is executed.
Instruction Operand
-I I- A 0100
+I I- 0 0110
- ( 1- = 0240
*
-I I- A 0120
-I I- A 0240
- ( 1- = 0242
*
Use the command PBS RETURN when there is no PBS program in the
program memory. The following message will then appear on the display:
END OF PBS always appears at the end of the program, and when there is
no PBS program in the memory, statement 0 is therefore the same as the
. program end.
Dynamic status
In the PBS editor there is dynamic display of all parameters, registers,
counters etc.
DSON Turn the dynamic display on.
DSOFF Turn the dynamic display off.
3.2 Enter new statements
The command for "enter new statement" is:
The new statement will be inserted before the statement where the cursor is
located. For every new statement entered the statement number of a l l
subsequent statements is incremented by one.
If there is no PBS program in SattCon 05, the statement will be given the
number 0.
Note that all programming is carried out within one statement at a time. You
can leave the statement you have just entered with the following commands:
P Store the statement. The next statement number is shown
on the display. You may now enter the next statement.
Q Return to display level without storing the statement.
Before you store the statement it can be changed. This is described in the
section Editing.
Example
You should now enter two completely new statements:
Q SattCon 05 ver 1 . 0 P
3.3 Editing
Both stored and unstored statements can be edited. Incorrectly entered lines
can be corrected by overtyping, lines and entire statements erased and
program lines added to a statement.
Note that you can change only one statement at a time. When you have
made your changes to a statement, leave with one of the following
commands.
P Store and end changest.
Q End changes without storing.
If you change or add to a stored statement, this is marked by a small'c to the
left of the program line.
Editing unstored statements
To be able to edit (as above) a new statement before it is stored, insertion
must be concluded. This is done by depressing RETURN without entering a
new instruction and operand.
Typeover
If you discover a single incorrect instruction, simply type over it.
Place the cursor on the line to be amended and enter an instruction and
operand as in the following example.
Deleting
The key DELETE can be used to erase the line on which the cursor is
resting. If your are to erase an entire statement, place the cursor on any of
the lines in the statement and then issue the command
END OF PBS which is always last in the PBS program cannot be erased.
Nor can you erase the statement end (*). If you attempt to erase program or
statement end, the previous line instead will be erased instead.
Addition
To insert one or more new instructions in the statement, place the cursor on
the line in front of which the new instructions should stand and then open
for the addition with RETURN.
Additions can be made at all places in a statement, even before the first and
after the last line (when the cursor is placed on the line with the asterisk).
If you are to make several changes (erase,type over) before you store the
statement, you must first conclude the addition with RETURN.
This example shows how to add instruction A 11 before the first inst'mction
in statement 2. We start from basic level.
Example
RETURN
3.4 Error messages while programming
PROG disabled:
The system is disabled for programming. Enable with CI'RL G.
Buffer full:
The statement you are entering is too long. You must split it into smaller
statements. One statement can contain up to 100 instructions.
PBS mem full:
The program memory is full and cannot hold any more instructions. You
must rearrange the PBS program, by deleting superfluous NPWs for
example.
Missing RP:
The program between insmctions 0 and = has become too long. Rewrite
the statement, e.g. by inserting a right parenthesis in a suitable place.
COMLI loadldump:
Data transmission via COMLI is in progress. Programming is disabled (see
the section Programming lock).
The message "not found, find:" means that the instruction does not appear
anywhere else in the PBS program. Now you can either search for a new
instruction or conclude searching.
3.6 PBS editor help display
When you are at the display level of the PBS editor. you can obtain a help
display which shows which commands you can give in the PBS editor,
together with SattCon 05's instructions and operands. The display only
shows the abbreviations, i.e. the characters you have to enter when you give
a command or enter an instruction and operand.
You call the help display with the command
The help display appears to the right of the PBS program, and stays on the
screen until you give a command or change a line in the program.
commands :
DSOFF DSON
TO F
instructions:
STIME AND I BINB CLRH CLRL
CMPI ENDS GET1 ST01 TIME
ADD ADN ANL BIT COM
DEC INC ORL SE I SEN
AD AN BC BI CD
CM CR CU DI ED
EF EN EO JS MA
MI MU NP ON RO
FU? RS SF SH SN
SQ SS ST SW su
=W =R =s A G
J L 0 S =
1
operands :
REM A1
CD CP
LB RB
TP KH
R S
3.7 Listing on a printer or VDU
The PBS program can be listed both on a printer connected to the PRINT
serial channel and on the VDU.
Note that all the listing commands should be given at basic level.
It is possible to work with the VDU terminal whilst listing a PBS program
on the printer.
The PBS program can be listed in two ways: either as an instruction list or
as a relay diagram. When the program is listed as a relay diagram, the same
relay symbols are used as those in the instruction list.
Instruction list
If you want to display the instruction list on the VDU you give one of the
following commands:
LIPBS The whole program.
LIBPS n Statement n.
LIPBS n-n From statement n to statement n.
LIPBS n- All statements from statement n.
LIPBS -n All statements up to statement n
If the instruction list is to be listed on a printer, enter PRPBS instead of
LIPBS.
Example
For example, if you want to list statements 0-2 on the printer, you should
give the following command at basic level:
PRPBS 0-2
The listing will look like this:
SattCon 05 - SattControl
User:....................................
Project: .................................
.........................................
PBS
f a s t l o o p o f f 1/0 0000 0000
*
0000: 0 0 -I I- A 0010
01 + I I- 0 0013
02 -( )- = 0240
*
0001: 0 0 -I I- A 0012
01 -I I- A 0240
02 -( )- = 0242
*
0002: 0 0 -I I- A 0011
0 1 -I I- A 0241
0 2 + I I- 0 0015
0 3 + I I- 0 0016
04 + I I-
05 - ( )-
8051 b y t e s free
-
0 0017
0243
The message "fast loop" shows the parameters for SattCon 05's fast loop.
Relay diagram
In this section we show the commands used to list a relay diagram without
dynamic status display on a printer or on the VDU.
In Chapter Dynamic status indication and 110 forcing we show you how to
obtain a listing of a relay diagram with dynamic status display on the VDU.
PBS pro-
When you want to list a relay diagram on the VDU you give one of the
following commands:
LILAD The whole program.
LILAD n Statement n.
LILAD n-n From statement n to statement n.
LILAD n- All statements from statement n.
LILAD -n All statements up to statement n.
Example
For example, if you want to list statement 2 on the VDU, you should give
the following command at basic level:
LILAD 2
The listing will look like this:
SattCon 05 - SattControl
User:......... ...........................
Date: 89-05-18 09:50:32
Project: .................................
.........................................
PBS
f a s t loop o f f 1/0 0000 0000
! <0002> !
I I
+---I I---I I---------------------------- ( )--+
! 0011 0241 0243 !
1 I !
I ! 1
+--+I I--------------------------------- + I
! 0015 ! !
! 1 I
I 1 !
+--+I I--------------------------------- + I
! 0016 I I
! ! 1
I I !
+--+I I--------------------------------- + I
! 0017 I
8051 bytes f r e e
4 Instructions and o,
There are two types of PBS instruction: bit instructions and word
inshuctions. Both types may be used in a single statement.
The bit instructions act on bit operands (one bit), and the word instructions
act on word operands (16 bits). Digital inputs and outputs are examples of
bit operands, and analogue inputs/outputs are examples of word operands.
PBS instructions may be divided into three main groups:
Instructions which form logical conditions.
Conditional instructions which are only executed when previous
conditions have been met.
Unconditional instructions which are executed regardless of whether
previous conditions have been met or not.
-I I- A
+I I- 0
- (S) - S- 0 11 J
0 10 0 Instructions which
form a condition
02 4 0 -Conditional instruction
*
A statement may contain more than one conditional instruction.
The bit accumulator is used to store temporarily the result of each condition.
Example
Logic symbol:
Relay diagram:
Logical OR (OR)
The instruction 0 x corresponds to the function logical OR (parallel
connection. closing contact). Note that the first instruction in an OR
expression should always be A or AN. The instruction is condition-forming.
Operands
The operand x can be inputs, outputs and RAM (0000-1777), timers'
inputs/outputs (Tin, THn, Tn), counters' outputs (Cn, CZn) and sequencers
(Sn.m).
Listing on VDU and printer
The instruction is supplemented with a relay symbol when written to screen
and printer.
Example
Logic symbol:
Rely diagram:
Operands
Operand x is reset if the condition is not fulfilled.
The operand x can be inputs, outputs and RAM (0000-1777). timers'
inputs/outputs (TIn, THn,), counters' outputs (Cn, CDn,CRn) and
sequencers (Sn.m).
Listing on VDU and printer
The instruction is supplemented with a relay symbol when written to screen
and printer.
Example
In the following example it is output 240 which is to be set to one if the
inputs 105 and 106 or 107 are one.
Logic symbols:
Relay diagram:
Operands
The instructions A N x and ON x act on inputs, outputs and RAM (0000-
1777). timers' inputs/outputs, (TIn, THn, Tn), counters ' outputs (Cn,Czn)
and sequencers (Sam).
The instruction =N x acts on outputs and RAM (0000-1777). timers' inputs
(TIn, THn) and sequencers (Sn.m).
Relay diagram:
Right parenthesis
The left parenthesis is not found in SattCon 05. This means that a condition
which should stand within parentheses should always be entered first in the
statement. Parentheses are treated first and logical AND precedes OR. A
parallel branch should always be terminated with a right parenthesis if it is
followed by any instruction other than =, =N, =S, or =R.
Listing on VDU and printer
The instructions are supplemented with the symbol ) when written to screen
or printer.
Example
Boolean expression: 0 2 4 0 1 0 5 *(0106+0107)
SanCon 05 can handle several parenthesis level on the assumption that all
conditions within brackets are placed first in the statement.
Relay diagram:
Self-holding (SR flip-flop)
The instruction =S x allows you to give an output or RAM a memory
function (self-holding). Self-holding is released by the instruction =R x.
When an output is set to one by =S x (SET SR), the output remains one
even when a previous condition is no longer fulfilled. The output must thus
be reset with the instruction =R x (RESET SR).
Operands
The operand x may be an output or a RAM (0000-1777).
Example
Logic symbol:
If you want to have detection of the trailing edge, enter the instruction COM
(inversion) before EDGE.
Operands
The operand x should be a RAM.
Example
Boolean expression: 0250=0115* 1000
1000=0115
Conditionak ,,,
I,,
prvgram end (ENDC)
ENDC means that the program restarts from the beginning with statement
0000. The instruction ENDC is conditional. It is thus performed only if a
previous conditions is fulfilled or if it is placed first in a statement.
Before:
After:
Note that a jump both forwards and backwards is allowed. Incorrect use of a
backward jump will however cause the program to lock in an endless loop.
In this case, the LED STOP lights up and it becomes impossible to enter
new commands. If this occurs, you should first switch off mains current and
then switch it on again while keeping the button "QUIT"depressed
simultaneously. Then correct the incorrect backward jump before restarting
execution.
Example
-I I- A 0116
JC LO10 Jump to LBL 10 when 0116 set to one.
*
-I I- A 0 1677 Not executed in a jump.
- (1)- N 0140
*
LBL Lolo
*
Subroutines
It is possible to divide your PBS program into a main program and
subroutines.
A subroutine is one or more statements which are used more than once in a
PBS program, but are only entered at one point in the program.
The main program is executed the whole time, while the subroutines are
only executed when called.
A subroutine can be called both from the main program and from another
subroutine.
Subroutines should always be entered at the end of the PBS program (after
the main program).
The last statement in the main program must always consist of the
instruction ENDC alone.
The instruction JSR Ln (n=label number) calls up a subroutine which
follows the label LBL Ln.
A subroutine must always end with ENDS. When SauCon 15 reaches
ENDS, it jumps back to the line after the JSR Ln instruction.
Main program Subroutine
I LBL LOO1
I -I I- A 1677
* - - = 0240
-I I- A 0010
JSR
I
I
I
*
ENDC
*
The instructions JSR Ln, LBL Ln, ENDS and ENDC a n conditional. They
are only executed if the previous condition has been fulfied, or if they are
at the beginning of a statement.
Note that LBL Ln is the same label instruction as that used for conditional
f jumps.
SattCon 05 can handle up to three levels of subroutine:
Lwd 0 Lbvd 1 Level 2 Lewl3
Main program Subroutine 1 Subroutine 2 Subroutine 3
k
-I I- A 0010
JSR LOO1 JSR LO02 * I
I
I
*
I
Submutine 4
i
'LBL LO04
I
I
I
I
This instruction ends the fast loop which can execute a section of program
in 1 ms. We describe the use and operation of the fast loop in more detail in
the chapter Fast loop.
4.3 Bit operands
Bits in the YO RAM
The YO RAM consists of 1024 memory cells (bits) with the VO addresses
0000-1777 (octal numbering). The first memory cell therefore has the VO
address 0000 and memory cell 1024 has the address 1777.
Memory cells 0100-0477
If SattCon 05 is fitted with three digital expansion units (N1complement),
memory cells 0100-0477 will correspond to inputs/outputs 0100-0477.
Memory cells which are not occupied by input/output boards can be used as
working memories.
Memory cells 1000-1777
Memory cells 1000-1777 are working memories, and can never be used by
input/output boards.
1600-1657 are battery-backed, and therefore retain their status when
SattCon 05 switched off.
Memory cells 1657,1600-1677 and 1557-1577have special functions:
clock pulses and fault indication, for example. These memory cells are
described in more detail in the next section.
1700-1777 are used as COMLI Master start and error bits, but those bits
which do not belong to programmed communication areas can be used as
working memories.
Overview of I/O RAM:
0000
Working memories Working memories
oon oon
0100 0100
Basic unit Expansion unit 1
01 n --
0200
Expansion unit 1 Expansion unit 2
0277
0300
Expansion unit 2 Expansion unit 3
0377
0400
Expansion unit 3
Working memories
Working memories
1556
Memory cells with 1557
Memory cells with
special functions special functions
1577
1600
Battery backed Battery backed
working memories working memories
1656
1657
Memory cells with Memory cells with
special functions special functions
1677
1 700
Start and error bits Start and error bits
COMLl Master COMLl Master
alt. working memories ah. working memories
1777
Memory cells with special functions
The memory cells 160-1665 and 1557-1577 can be set to one with CMD
commands or with function keys for SattCon OP45.
These memory cells and commands can be used, for example, to start and
stop activities directly from the keyboard. If these memory cells are
edge'supervised by the text handling program, you can also have an
operating record printed out by entering a CMD command.
CMDO
CMDl
CMD2
CMD3
CMD4
CMDS
CMD6
CMD7
CMD8
CMD9
-10
CMDll
CMD12
-13
-14
CMDl5
CMD16
CMD17
CMDl8
CMD19
CMD20
CMD21
CMD22
The following memory cek have predefined functions in SattCon 05.
1666 Execute error This memory cell is set to ONE in the event
of: A/D converter error, decoding error,
more than three subroutine levels in use, or
fast loop unable to complete execution
within the preset time.
1674 Battery low SET when the battery voltage drops below
the permissible level.
Memory cell Name Function
1675 First scan This memory cell is SET during the first
cycle after RESET, TOTAL RESET, or
connection of power.
In this section we show how to address the timer inputs and outputs. In the
chapter T i e r s you can read more about the operation of the timers
including a description of how to program the preset delay. In the section
Word operands we describe how to address the timer preset and elapsed
times, which can also be used in the PBS program.
A timer has two inputs (TI and TH)which can be set in the PBS program,
and one output (7') which is set to ONE when the preset delay has expired.
A timer output (7') cannot be the operand of a SET instruction.
Timer
M
Hold preset time has
elapsed
Addressing
Timer inputs and outputs are addressed as TIn, THn, Tn. n=timer number
(0-63).
Example
Counter inputjoutputs
SattCon 05 has 64 counters which can be used to count pulses. In this
section we show how to address the counter inputs and outputs. You can
read more about the operation of the counters in the chapter Counters,
which also describes how to program them. In the section Word operands
we show how to address the preset and accumulated values of the counters,
.which can also be used in the PBS program.
A counter has three inputs (CR, CU and CD) which can be set in the PBS
program, and two outputs (C and CZ) which are set when the accumulated
count is equal to the preset value and zero respectively.
t :eR
Count up
Count dom
3 ~ r
The inputs may only be used as operands of the instruction =. The outputs
can only be used as operands of the instructions A, 0,AN and ON.
ONE when the number
2 Pm'
CD CZ
ONE when the number
of pulses = 0
Addressing
A counter's inputs are addressed as CRn, CUn, CDn. n=counter number (O-
63).
The counter's outputs are addressed as Cn,CZn. n=counter number (0-63).
Example
Sequencers
In SattCon 05 there are 100battery-backed sequencers, each with 32 steps.
All 100 sequencers operate completely independently.
Most sequences can be divided into a number of steps which are always
processed in the same order. The tmsition from one step to the next is
initiated, for example, by signals from the process.
The condition for being in !jTEP 1, for example, may be written: You arrive
at STEP 1 if you are in STEP 0 and obtain the input signal GA. You remain
in STEP 1 until you receive the input signal GB, when you proceed to STEP
2.
SattCon 05 can only activate one step at a time, but the steps need not be
activated in numerical order. In the chapter Dynamic status display we show
you how to determine which sequence steps are active.
In the event of a power failure, the sequencer will remain in the activated
step, and on RESET all the sequencers return to STEP 0.
Addressing
The steps of a sequencer are addressed as Sn.m. n=the sequencer number
(0-99) och m=the steps number (0-31).
Example
Example of how to use sequencers:
Initialisation
GC
NPW
When STEP 0 is
active SET 0240.
When STEP 1 is
active SET 0241.
When STEP 2 is
active SET 0242.
4.4 Word instructions
The word instructions are used, for example, to handle analogue signals, but
note that word insauctions always operate on 16 bits (one word), regardless
of the resolution of a signal.
When working with word instructions, each word is regarded as a binary
number between 0 and 65535. The most significant bit (MSB) in a word is
bit 15 which, when set, represents 215, i.e. 32768. Bit 0 has the least
significance (LSB)and represents 20, i.e. 1, when set.
The total value of the word is obtained by adding the values of the bits
which are set.
811 Slatus Value
All word handling goes through an internal 2 byte (16 bits) memory called
the word accumulator.
Word accumulator
15 0
MSB LSB
When you "read in" an analogue input, its analogue value is copied into the
word accumulator (with the GET instruction). Similariy, when you transfer
a value to an analogue output, it is the word accumulator's value that is
copied (with the ST0 instruction).
In calculations, a further 2 bytes (16 bits) are used internally in SattCon 15
(concealed word accumulator) to allow intermediate results to have higher
values than 65535.
Intermediate results are therefore stored in 4 bytes; the highest number
SattCon 15 can handle is therefore 4 294 967 295.
The table below is a summary of SattCon 05's word instructions, and also
shows the operands on which these instructions can act.
--
ADD x Add the values of the word accumulator and the operand x,
and store the result in the word accumulator
SUB x Subtract the value of operand n from the word accumulator,
and store the difference in the word accumulator.
MUL x Multiply the value in the word accumulator by operand x and
store the product in the word accumulator
DIV x Divide the value in the word accumulator by operand x and
store the quotient in the word accumulator.
ANL x Logical AND (16 bits). Store the result in the word
accumulator.
ORL x Logical OR (16 bits). Store the result in the word
' accumulator
EORL x Logical EXCLUSIVE OR (16 bits). Store the resuit in the
word accumulator.
AND1 Logical AND between the bit accumulator and the VO bit
which is pointed out by the word accumulator. Sets to one the
UO bit which is pointed out by the word accumulator.
SEI The above instruction acts on the same operands as GET and
STO.
CMP x Compare the value of the word accumulator with that of the
operand
MINX Compare the value of the operand with that of the word
accumulator and store the smaller value in the word
accumulator.
MAX x Compare the value of the operand with that of the word
accumulator and store the higher value in the word
accumulator.
n= 1- 15 (number of steps)
Example
The instructions below transfer a value from the analogue input 400 to the
analogue output 200 if the memory cell 10 is 1.
-I I- A 0010
GET A1400
ST0 A0200
*
Operands
Rn (Register)
Example
The instructions below transfer a value from the register whose number is
found in register 10 to the analogue output 200.
GETI ROlO
S T 0 A0200
*
The instructions below transfer a value from the analogue input 400 to the
register whose number is found in register 11.
GET A1400
S T 0 1 Roll
*
Addition
ADD adds the values of the operand and the word accumulator. The total is
stored in the word accumulator
The bit accumulator is reset if the total is greater than the maximum value
4294967295.
Example
Word accumulator
-111 =7
Operand
I+-
Word accumulator
IWoWmD3XX)10101=10
Subtraction
The instruction SUB deducts the value of the operand from the value of the
word accumulator. The difference is stored in the word accumulator.
The bit accumulator is reset if the value of the operand is greater than the
value of the word accumulator when the instruction is executed.
Operands
SUB acts on the same operands as GET STO.
Example
Word accumulator
b i
Word accumulator
Multiplication
The instruction MUL multiplies the value of the operand by the value of the
word accumulator. The product is stored in the word accumulator.
The bit accumulator is reset if the product is greater than the maximum
value.
The instruction is conditional.
Operands
Mul acts on the same operands as GET and STO.
Example
Word accumulator
I i
Operand
*ImxwmoooooolOl 14
Word accumulator
1 ' =25
Division
The instruction DIV divides the value of the word accumulator by the value
of the operand. The quotient is stored in the word accumulator.
Any remainder of the division is saved as the operand REM (Refer to the
section Word operands).
In division by 0 the bit accumulator is reset; the quotient and remainder are
then both 0.
Operands
DIV acts on the same operands as GET and STO.
Example
Word accumulator
i
0000000000001010 Word accumulator
Operand
OOOOOOOOOOOOOOI0
Square root extraction (SQR)
The instruction SQR extracts the square root of the value of the word
accumulator. The result (which is always an integer) The instruction above
acts on:is stored in the word accumulator.
The bit accumulator is not affected by root extraction. It is always one when
SQR is executed.
The instruction is conditional.
Example
V
Word accumulator
I""""'"' ' I
Word accumulator
= OOOOOOOOOOOOOOIl
I
i
The instruction DEC decreases the value of a word or register by one, When
the value is 0, the SattCon 05 starts from 65535 again If the operand is a
sequencer, the previous step in the sequencer is set to one. After step 0 step
31 will be set to one.
The value of the word accumulator is not affected when INC and DEC are
executed.
The instructions are conditional.
Operands
0000-1760 (Word in I/O RAM)
Rn (Register)
Sn (Sequencer)
Example
In the example below the value of the word 600 (the memory cells 600-617
when 600 is the MSB and 617 the LSB) and the register 12 are increased by
one (1) each time the memory cells 10 and 11, respectively, are set to 1.
-I I- A 0010
EDGE 1000
INC 0600
*
-I I- A 0011
EDGE 1001
INC R0 12
*
In the example below the next stage in sequencer 15 is set to one every time
the memory cell 12 is set to one.
-I I- A 0012
EDGE 1002
INC S 15
*
Programming tip
If calculations may give results which are negative or greater than the
maximum value 4 294 967 295, then subsequent arithmetic instructions
should be positioned in their own statements (the bit accumulator is always
set to one at the start of each statement). An instruction which follows
immediately after GET or ST0 need not fonn its own statement (GETand
ST0 do not affect the bit accumulator).
Example 1
Add the number 275384 to the value in register 5 (which in this case is
8743). and store the result in registers 6 and 7. We store the result in two
registers because it will be >65535 (these registers form a 32-bit word,
where register 6 corresponds to the concealed word accumulator and
register 7 to the word accumulator).
MSB w- LSB
Hexadecimal: 4 , 5 5 Y
D F ,
Decimal: 262144 + 21983
Example 2
Carry out the following calculation: 1 15-295+225.The result (=45) is stored
in register 1.
GET KO0115
SUB KO0295
*
ADD KO0225
S TO ROO1
*
The bit accumulator is reset in the first statement because the result will be
negative (115-295=-180).The ADD instruction must therefore be
positioned in a new statement. The ST0 instruction must also be placed in
its own statement since the ADD instruction resets the bit accumulator when
the max. value is passed (0point).
Example 3
Calculate 1234*R000*ROOl/R002and store the result in R003.
Jump to L14 if the product is greater than the maximum value, or if the
product is divided by 0.
Jump to L15 if the quotient is greater than 65535 (but less than the
maximum value).
LBL L 14
-( 1- = 0240 "Alarm"
*
LBL L 1 5 See example 1.
ST0 ROO4
DIV KO0256
DIV KO0256
STO ROO5
*
Note:
The instruction C M P and the memory cell 1673 are described in the section
Comparison.
Logical AND (ANL)
The instruction ANL perfoms a logical AND between the value of an
operand and that of the word accumulator. The result is stored in the word
accumulator.
The bit accumulator is not affected. It is thus always one when ANL is
executed.
The instruction is conditional.
Operands
ANL acts on the same operands as GET and STO.However, a constant
should always be hexadecimal (KHn) instead of decimal.
Example
Word accumulator
0000000000001111 Word accumulator
Operand I &
I
-1111
1
Logical OR (ORL)
The instruction ORL performs a logical OR between the value of an
operand and that of the word accumulator. The result is stored in the word
accumulator.
The bit accumulator is not affected. It is thus always one when ORL is
executed.
The instruction is conditional.
Operands
ORL acts on the same operands as GET and STO.However, a constant
should always be hexadecimal (KHn) instead of decimal.
Example
C Word accumulator
Operand 1111000000001111
1111000000001111
Exclusive OR (EORL)
The instruction EORL performs an exclusive OR between the value of an
operand and that of the word accumulator. The result is stored in the word
accumulator.
The bit accumulator is not affected. It is thus always one when EORL is
executed.
The instructions is conditional.
Operands
EORL acts on the same operands as GET and STO.However, a constant
should always be hexadecimal (KHn) instead of decimal.
Example
Word accumulator
0000000000001111 Word accumulator
Operand 1111000000000000
1111000000001111
Example
0001: 00 GET R050 Read in the value of RSO.
0 1 -I I- A 0050 If 50=1
02 AND1 and 110 address as per word
acc.=l
03 -( )- = 0040 Set 40 to one.
*
f
Octal Decimal Octal Decimal Octalt Decimal
Compare (CMP)
The instruction compares the value of the operand and that of the word
accumulator. The instruction is conditional.
The memory cells 1671-1673 obtain the following status when CMP is
executed:
1671 one if the word accumulator value < operand value
1672 one if the word accumulator value = operand value
1673 one if the word accumulator value > operand value
Furthermore, the bit accumulator obtains the following value when CMP is
executed:
Zero if the word accumulator value c or > operand value.
One if the word accumulator value = operand value.
Operands
CMP acts on the same operands as GET and STO.
Example
Sets to one 250 if the analogue input AI400's value is less than or equal to
the figure 6554.
GET A1400
CMP KO6554
+I I- 0 1671
-( )- = 0250
*
In the above example we have not used the memory cell 1672 since the bit
accumulator will also be one when the operand is equal to the word
accumulator. 240 will thus be set to one both when AI400=6554 (the bit
accumulator becomes one) and when A14W6554 (The condition is
fulfied since 1671 becomes one).
GET KO9831
CMPI R015
*
-I I- A 1673
- ( 1- = 0251
*
Selecting minimum and maximum value (MAX,MIN)
The instruction MIN compares the value of the word accumulator with that
of the operand, the smallest value being stored in the word accumulator.
The instruction MAX compares the value of the word accumulator with that
of the operand, the greatest value being stored in the word accumulator.
Operands
MAX and IvlIN act on the same operands as GET and STO.
Example
The smallest of the values in registers 5, 10, 11 and 12 is to be stored in
register 18.
GET ROO5
MIN ROlO
MIN Roll
MIN R012
ST0 R018
*
-- -
MSB LSB
Example
Before the instruction ROTW R2 has been executed, the word accumulator
has the following value.
MSB LSB
MSB LSB
Rotate word left (ROTW Ln)
When the instruction ROTW Ln is executed, the status of the bitsin the
word accumulator is rotated n steps to the left (n=1-15).
The instruction is conditional.
MSB LSB
Example
Before the instruction ROTW L2 has been executed, the word accumulator
has the following value:
MSB LSB
MSB LSB
Word accumulator
MSB LSB
The instruction is unconditional
Example
Before ROTW RB2 (2 rotations) has been executed, the bit accumulator has
the status 1 and the word accumulator has the following value:
MSB LSB
Afterwards the bit accumulator has obtained the status 1 and the word
accumulator has obtained the following value:
MSB LSB
Rotate left via the bit accumulator (ROTWLBn)
ROTW LBn moves the status of the bit accumulator to the LSB of the word
accumulator. The status of bits in the word accumulator is displaced one
step to the left and MSB is then transferred tothe bit accumulator. This
rotation is performed n times. n= 1-15.
Bit accumulator
Word eccumuletor
MSB LSB
The instruction ROTW LB n is unconditional.
Example
Before ROTW LB1 (1 rotation) has been executed, the bit accumulator has
the status 1 and the word accumulator has the following value:
MSB LSB
Afterwards the bit accumulator has obtained the status 0 and the word
accumulator has obtained the following value:.
MSB LSB
Transferring values between registers (SFT)
The instruction SFT Rn'm transfers values between several registers in a
sequence. n is the number of the first register and m the number of the last
register.
The instruction is conditional.
Example
If, e.g., SFI' R1-3 is executed, the following happens:
LSB
LSB
MSB LSB
LSB
LSB
MSB - LSB
Reset bits 0-7 CLRL
The instruction CLRL rests the bits 7-0 in the word accumulator.
The instruction is conditional.
MSB LSB
-
MSB LSB
-
accumulator change places with each other (Bit 7 becomes MSB and bit 8
LSB).
MSB
LSB
Example
Before SWAP is executed the word accumulator has the following value:
MSB LSB
When SWAP is executed the word accumulator has the following value:
f MSB LSB
Set a bit to one (BINBIT)
The instruction BINBlT sets to one a bit in the word accumulator. The bit
that is to be set to one is determined by the decimal value of the 5 least
signif~cantbits in the word accumulator (bits 0-4). If the bits' value is 0
before the instruction is executed, all the bits in the word accumulator will
be reset. If the value is 16 the most significant bit in the word accumulator
(bit 15) will be set to one and the remaining bits in the word accumulator,
reset.
Note that if the value of the bits 4-0 is > 16 when BINBIT is executed, then
one of the bits in the word accumulator will be set to one nonetheless, but
the bit accumulator will be reset (for a possible alarm).
The instruction is conditional
Example
If the bits 0-4 in the word accumulator have the value 10, bit 9 in the word
accumulator will be one and the remaining bits, zero when BINBIT has
been executed.
=I0
A
Before: 1-
MSB LSB
After: -10
MSB LSB
Conversion to a BCD figure (BCD)
The instruction BCD converts a binary figure in the word accumulatorto a
BCD figure. The BCD figure is stored in the word accumulator.
Word accumulator
0000010000100011 =I059
-
Word accumulator
1-
1 0 5 9
-
binary figure which is stored in the word accumulator.
Word accumulator
JMOI(WmJ0101110011
1 0 5 9
f BINIBCD
Word accumulator
If any of the four digits in the BCD figure is greater than 9 (>1001), the bit
accumulator is reset.
The instruction is conditional.
Copying date and time (TIME)
The instruction T i e copies date and time to registers 0-6 (RO=year,
Rl=month, R2=dayl RS=hour, RS=minute, RSsecond).
Example 1
The SattCon 05 calender can be used to decode special times for, e.g.,
generating a listing. This example sets to one address 1200 12.00 hours, the
15th of every month.
Example 1
Every 24 hours at 12.00hours, the SattCon 05 real-time clock is
synchronised from external equipment.
Example 2
The real-time clock is synchronised from external equipment which
transmits the correct time code in a binary form as below.
Input address
100 112
101 113
102 114
103 Hour. 0-15 1 15 Second, 00-59
104 116
105 117
106
107 Minute, 00-59
110
111
Addressing
You address the word by stating the most significant bit (MSB).GET 01 10
thus means that the total value of the memory cells 110 to 127 is copied
over to the word accumulator. 110 is MSB and 127 is LSB.
The last digit in the word's address is thus 0. If, e.g., you write GET 114,
SattCon 05 will interpret this as GET110 since the memory cell 114 forms
part of the word 110.
Analogue inputs
Up to three analogue expansion units can be connected to SattCon 05. An
analogue expansion unit has 12 inputs and 4 outputs.
Analogue
inputs
Expansion
unlt 1
Expanslon
unlt 2
Expsnsion
unlt 3
Wad in VO RAM
V O M
aooD
a
.
.
,
AllW
All 04
All10
Expanston
unlt 1
All 74
Expanslon
unlt 2
Exprnrlon
unlt 3
Addressing
The analogue inputs are addressed AIn where n is the input number. the last
digit in the input number is always 0 or 4.
Analogue outputs
Analogue output signals consist of only 8 bits so when, e.g., a value is
copied to an analogue output, it is only the 8 most significant bits that are
used.
The MSB bit in the word TP (time delay) determines whether the time base
should be 1 or 0.1 second. When it is one, the timer works with the time
base 0.1 second, and when it is zero, it is thus time base 1 second which
applies.
The memory where time delay and elapsed time are stored is battery'backed,
which means that the values are retained even when SattCon 05 has been
switched off
Addressing
The time delay is addressed TPn where n is the timer number.0-63.
The memory where time delay and elapsed time are stored is battery
backed, which means that the values are retained even when SattCon 05 has
been switched off
Addressing
The counters' preselection is addressed CPn where n is the counter number.
Constants
Arithmetical calculations often contain constants which need changing only
in rare cases. Constants can be positive integers between 0 and 65535.
Addressing
Constants are addressed Kn where n is a positive integer 0-65535.
Example
The following PBS program divides the value of analogue input 440 by 2
and copies the result over to analogue output 200.
GET A1440
DIV KO0002
ST0 A0200
*
Hexadecimal constants
When you use constants together with the logical word instructions (ANL,
ORL, EORL), the constant is always hexadecimal. '
Addressing
Hexdecimal constants are addressed KHn where n is a hexadecimal value.
Example
Every digit (letter) in a hexdecimal value is equivalent to four bits as in the
following example.
MSB LSB
Conversion table
Registers
SattCon 05 contains 512 battery'backed 16bit registers where , e.g.,
calculation results can be stored.
Addressing
SattCon 05 registers are addressed Rn where n is the registe mumber (0-
51 1).
Example
The following PBS program calculates the mean value of the values of
registers 0-5 and stores the result in ngister 15.
GET ROO0
ADD RO 01
ADD Roo2
ADD Ro 03
ADD ROO4
ADD ROO5
DIV KO0006
STO R015
*
You can enter your own values in registers. How this is done is described in
the chapter Registers.
Remainder in division
Any remainder in division is stored in the operand Remainder.
Addressing
This operand is addressed REM.
Example
The following program divides the value of register 1 by 7 and stores the
result in register 10. Any remainder is stored in register 99.
GET ROO1
DIV KO0007
ST0 ROlO
GET REM
ST0 R099
*
Sequencers
The section bit operands demonstrated how to set to one the steps in a
sequencer with =. If the steps in a sequencer are to be set to one in
numerical order, you can also use the instructions INC and DEC.
The booklet Sample programs describes how to make programs for
sequence control with the instruction INC.
Addressing
When you use these instructions SattCon 05 sequencer Sn isaddressed.
where n is the sequencer number (0-99).
Analogue status, fault indication
The 16'bit words which are addressed AS (Analog Status) are specially
produced for supervision of plants with analogue signals and are thus used
only when analogue expansion units are part of the system.
Addressing
The word Analog Status is addressed ASn where n can be 00 to 04
Function
AS detects the same error types as can be displayed on the VDU in the basic
level and explained by means of the command LE (refer to the chapter
System status). AS can be used in the PBS program to initiate an alann or
execute/jump over special program lines in the event of an error.
In the case of OP45, AS02 and AS03 have the same function as ASOl, but
for expansion units 2 and 3, respectively. AS has the same function as on
SattCon 05-25/45. but the basic unit is examined with ASO1. In the case of
expansion units 1,2 and 3, AS02, AS03 and AS04 are used accordingly.
w o n unit 3 AS03
A1 Al Al Al Al Al Al Al Al Al Al Al At
374 370 364 360 354 350 344 340 334 330 324 320 314
Fallure at 4-20 mA Input
A bil is set to ONE if an open
arwil(<3 mA) is delected at
the corresponding input. The
inwl must be strapped for
4-20 mA input signal.
(Fault type 3)
SattCon MW45
A m
em exp exp Bask exp
3 2 1 unit 3
Expansionunit 1 AS02
Al Al Al Al Al Al Al Al Al Al Al
250 244 240 234 230 224 220 214 210 204 200
Eqmsionunit 3 ASM
-I I- A SUB su
-0- = MUL MU
-0-
=N DIV DI
-(S)- =S SQR SQ
-(It)- =R EORL EO
)Rp CMP CM
EDGE MIN MI
ENDC MAX MA
NPW ROTW RO
JC SFT SF, SH
JSR SWAP SW
LBL BINBIT B m
EFL BITBIN BITB
GET BCD BC
ST0 BIN BI
The counter has three inputs which can be set to one with the instruction =
(SET). inskad of entering, e.g., = CU 15 RETURN (set to one counter 05
countup input), you can enter the same abbreviations as SattCon 05 prints.
In this case you may also enter CU C15 RETURN.
A timer has two inputs and one output which are used in the PBS program
when you want to introduce a delay. Note that you may also use the preset
and accumulated values of the timers in. for example, calculations.
Timer
Preset delay, TP
Preset delay
TH is a hold input which, when set to ONE, stops the timing. The timer
resumes operation when TH is reset to ZERO.
TI-
TH
*
Timing stopped
The preset delay and elapsed time of a timer are stored as 16-bit words and
these values are addressed as TP (Timer Preset) and TA ( T i e r
Accumulated) respectively.
Example
Timer 1 should start when 0010 is SET, and 0240 should be SET when the
preset time has elapsed.
-I I- A 0100
-0--
TI01 TI01 must be set for the whole of the
* preset delay if T 01 is to be SET.
-I I- A T 01
-0-=
0240
*
When TImers is called the timers are displayed from timer n (0-63). If n is
omitted, they are displayed from timer 0.
All the timers cannot be display on the VDU at the same time, but you can
scroll backwards and fonvards among them with the spacebar and the key
",".You can obtain a dynamic display of the timer on which the cursor is
resting by pressing the key ".".
5.2 Programming
Move the cursor to the timer to be programmed and depress the key
RETURN.
t
Then program by entering the new settings according to the questions which
SanCon 05 displays on the VDU.The next question appears when you
depress the key RETURN.If you reply with RETURN only, this is
interpreted as 0.The following questions are displayed.
hour ?
minutes ?
seconds ?
0.1 seconds ?
OK ?
Every timer can be given a delay of between 0.1 sec and 9 hours 6 min. 7
sec. For delays longer than 54 min. 36 sec.. the 1-second timebase is
obtained automatically. For shorter delays, you select the higher resolution
of 0.1 see. by answering the question .1 seconds with a figure (0-9).
The key DELETE deletes the last character entered.
Programming is terminated by answering the question OK ? by P to store or
Q to conclude without storing.
Example:
There follows an example which shows how to give timer 25 the delay of 1
min. 10.5 sec.
First call Timers with the command
If the requirement is that the timer delay should be exactly a specific time,
then use a fixed execution time and a counter that counts up or down once
per program run.
All timers are printed by the printer when in the basic level you give the
command
PRTIM
Printing can be stopped with the command Q.
6 Counters
SattCon 05 has 64 counters. A counter is used to count pulses, and when a
preset number of pulses has been received, one of the counter outputs is set
to ONE. You can program the preset to any value between 0 and 65535.
A counter has three inputs and two outputs, which you use in the PBS
program when you want to implement a counter function (see also section
Bit operands). Note that you may also use the preset and accumulated
values of the counters in, for example, calculations (see section Word
operands).
Counter
Preset, CP
CU is the counter's count-up input. Each time it is set to ONE, the value of
the internal accumulator is incremented by one.
CD is the count-down input. Each time it is set to ONE,the value in the
accumulator is decremented by one.
CR is a reset input; when it is set to ONE, the accumulator is reset.
C is the output which is set to ONE when the value of the accumulator is
equal to the preset.
CZ is set to ONE when the value of the accumulator is ZERO.
The counter's preset and accumulated values are stored as 16-bit words and
addressed as CP (Counter Preset) and CA (Counter Accumulated)
respectively.
Note:
The counter operates cyclically: if a CD pulse is received when the value in
the accumulator is 0, the accumulator is changed to 65535. If the value in
the accumulator 65535 when a CU pulse is received, the accumulator is
given the value 0.
Example
Assuming that counter 1 has been programmed to have a pxeset of 5, we
want output 0250 to be Sm after input 114 has been set to ONE 5 times.
When Counters is called the counters are displayed from counter n (0-63). If
n is omitted, they are displayed from counter 0.
Counter Reset Accumulated value
COO acc 0
co1 ac c 4
C02 acc 100
C03 acc 0
C04 acc 0
CO 5 acc 10
C06 acc 2 00
All the counters cannot be display on the VDU at the same time, but you
can scroll backwards and forwards among them with the spacebar and the
key ",".You can obtain a dynamic display of the counter on which the
cursor is resting by pressing the key ".".
6.2 Programming .
Move the cursor to the counter to be p r o g ~ and
~ ~depress
u the key
RETURN.
Then program by entering the new setting according to the question which
SattCon 05 displays on the VDU. The following question is displayed.
count ?
As you see, SanCon 05 lists the question "count?". You now replay with
Reply with a new value and then depress P to store and Q to quit without
storing.
6.4 Listing on VDU and printer. . ; .- '
All counters are listed on the screen when in the basic level you give the
command
AU counters are printed by the printer when in the basic level you give the
command
PRTCNT
When Registers is called the registers are displayed from register n (0-51 1).
If n is omitted, they are displayed from register 0.
Register Integer value Percentage value of max value (65535)
I
RO 00 0
4 +
0.0%
ROO1 255 0.3%
ROO2 1500 2.2%
ROO3 65535 100.0%
ROO4 32768 50.0%
ROO5 9876 15.0 %
AU the registers cannot be display on the VDU at the same time, but you
can scroll backwards and forwards among them with the spacebar and the
key ",".You can obtain a dynamic display of the register on which the
cursor is resting by pressing the key ".".
7.2 Programming
Move the cursor to the' register to be programmed and depress the key
RETURN.
Then program the registers by entering a new integer or percent value. The
following question is displayed.
value ?
Every register can be allocated either an integer value between 0 and 65535
or a percentage value between 0% and 100%.The percentage value can be
stated to an accuracy of one decimal place (n.n%).
Programming is terminated by P to store or Q to conclude without storing.
Example
There follows an example which shows how to enter the value 1024 in
register 20 and the value 25.5% in register 21.
First call Registers with the command
REG20
and then depress the key RETURN.
You now obtain the following listing.
R020 0 0.0% value ?
As you see, SanCon 05 lists the question "value?" You now reply with
1024
Store the new value in register 20 with the command P.
R020 1024 1.5% value ?
All registers are printed by the printer when in the basic level you give the
command
PRREG
forcing
Seq-
sequence 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
P 15 0 1 3 3 2 0 0 0 0 011 0 5 6 119 0 0 0 0
t
Active steps
While the dynamic display is on the screen you may also force up to 16
memory cells to ONE or ZERO, as described further on in this section
t
Status of the I/O adresses
I/O forcing
When you give the command for dynamic display of 110.addresses any 16
UO addresses can be forced to one or zero. That an VO address is forced
means that between the program executions it will always be assigned its
forced value until it is released.
Forced UO addresses can be affected inside a program, in order to regain
their forced value after the program execution. The forced VO addresses
will thus begin every new program cycle with their forced value.
6 You force or release VO addresses with the following commands:
SFETURN n P Set address n to ONE.
SN RETURN n P Reset address n to ZERO.
FFEITJRN n P Release address n.
FARETURN P Release all VO addresses.
SattCon 05 automatically return to the dynamic display.
If you press Q instead of P in the above commands SattCon 05 return to the
dynamic display without forcing or releasing an address.
The message "force I/O full" means that no more VO addresses can be
forced without first releasing a previously forced address.
When a memory cell has been forced, the text "FIO" appears on the VDU
when you at basic level.
You cannot force any YO-addresseswhen the fast loop is activated. Should
you artempt to do so nonetheless, the following text will appear on the
screen.
1
Force 1/0 i s not allowed when f a s t loop i s ON.
analog in
adr 100 1----=--100% 104 0% 110 -= 25% 114
120 0% 124 I=-= 50% 130 ===: 45% 134
140
160
200
-
-
1
-
:
1-1:
30%
69%
0%
144
164
204
- 0%
17%
0%
150
170
210
0%
0%
0%
154
174
214
--
--1-11:
analog out
adr 100 0% 120 0% 140 0% 160 0%
200 0% 220 0% 240 0% 260 0%
300 0% 320 0% 340 0% 360 0%
400 0% 420 0% 440 0% 460 0%
Note that SattCon 05 for analogue outputs also shows the value of a word in
the VO-RAM.
8.5 How to change from one dynamic display
to another
If, for example, you are displaying VO addresses, you need not return to
basic level to change to a display of analogue inputs. When you are in one
of the system programs
dynamic display of VO addresses
dynamic display of analogue inputs/outputs
you can use the following "short commands" to change between the
dynamic displays:
When you choose to use 137 as a pulse input, inputs 135-137 are
automatically connected to counter 00.
Counter 00 counts these rapid pulses and inputs 135-137 obtain the
following functions:
135 CR: The counter accumulator is reset, with a positive edge on
137 if 135 is ONE.
136 DIR: ZERO = countup, ONE = countdown
137 CNT: Countup or -down of the accumulatorvalue with a
positive edge. Resetting of the accumulator if 135 is
ONE.
The counter preset and initial value are programmed as usual (see
Counters). When the accumulatorvalue goes below 0 in a countdown, the
accumulator will be given a value that is equal to the preset.
SYNC
SanCon 05 displays the following:
Input ( 3 ) 100, 135-137 (115-117) are Inputs
(Input/sync input/Pulse input) ?
Programming
Select S if you want to use input 100 as a synchronizingpulse input, or I to
use the input as a normal input.
Depending on your response, SattCon 05 will ask the following question:
I n p u t (s) 100 i s Sync i n p u t Ok?
-
1
-I I- A
- ( 1-
*
-I I- A
- ( 1- =
*
:;;: Fast loop
EFL
*
-I I- A
+I I- 0
- ( 1- =
*
EFL only ends the fast loop if the fast loop is active, and the conditions
preceding EFL are met, or EFL fonns a separate statement (the instruction
is conditional). As long as the fast loop is not activated the entire PBS
program is executed (including the instructions preceding EFL) within the
normal time.
When the fast loop is activated, SanCon 05 makes an 110 copy of the basic
t' unit for SattCon 05-25/45 and the first expansion unit for SattCon OP45.
SattCon 05's fast loop is activated.byI/O signals. You can define two
different VO addresses (start addresses) which can be used to activate the
fast loop. The fast loop is activated when one of the start addresses is set to
ONE,and when the start address is RESET, SattCon 05 returns to normal
program execution.
Fut kmp
-I I- A
- ( 1-
*
-
-I I- A
- ( 1- =
*
EFL
*
-I I- A
+I I- 0
-(
*
)- -
GET
STO
1 In this example input 0100 is start address for the fast loop. When
SattCon 05 detects that 0100 has been set to ONE, normal execution
is temporarily intempted and SattCon 05 begins to execute the fast
loop.
2 Before the fast loop is executed, an VO copy is made of the
inputs/outputs included in the fast loop, i.e. the basic unit for SattCon
05-25/45 and the first expansion unit for SattCon OP45.
3 SattCon 05 reaches the instruction EFL after 2 ms, then jumps
forward to the point in the main program where execution was
interrupted.
4 After 4 ms execution is intenupted again and SattCon 05 returns to
the fast loop.
5 6 I10 copy of the inputsloutputs included in the fast loop, execution of
fast loop, i.e. the basic unit for SattCon 05-25145 and the first
expansion unit for SattCon.0~45.
7 When SattCon 05 reaches the end of the main program (END OF
PBS), all the UO addresses are copied, and the fast loop is executed
again.
8 I10 copy of the inputs/outputs included in the fast loop, i.e. the basic
unit for SattCon 05-25/45 and the first expansion unit for SattCon
OP45, execution of fast loop.
9 When 0100 is RESET,SattCon 05 returns to normal execution.
10 11 Normal 110 copying.
When the fast loop is not activated (and not iri the T O P poiition), the two .
start addresses in the I/O R A M are monitored as often as is stated by the .
predefined execution time for the fast loop. Activation of a fast loop occurs
when one of these two start addresses is set to ONE. Before the fast loop is
activated, VO copying takes place at normal cycle time.
The start of a fast loop activated by input signals from the basic unit in the
case of SattCon 05-25/45 and the first expansion unit in that of the SattCon
OP45 is thus always dependent on the normal VO copying.
If the shortest possible reaction time is required for a fast loop, you should
always let the fast loop be activated by setling to ONE one of its start
addresses in the PBS program. VO copying is then performed within the
predefined time for a fast loop even during the first fast loop run.
Placing an interlock first in the fast loop ensures that it does not load the
system unnecessarily.
Example
A 100 :fast loop ends here if 100=0
EFL
-
A 101
EFL
Stopping a fast loop always occurs with the predefined time for a fast loop.
10.1 Call and display-
When the fast loop is activated, SattCon 05 releases all forced UO
addresses. If you have any forced YO addresses and program the fast loop.
the following text appears on the screen:
FL<CR>
Force 1/0 w i l l be removed i f f a s t loop i s ON.
Fast loop off 1/0 0100 0107
The fast loop function is called from the basic level with the command:
10.2 Programming
You program the fast loop function by depressing the key
RETURN
and then answering the following questions:
Within which time is the fast loop to be executed (cycle)?
Which VO addresses is the fast loop to activate (VOadr)?
You reply by first entering the new value or addresses and then pressing
m.:
When you have done this, the next question appearson the-
VDU.
If you do not want to change a value or address, you proceed to the next
question by pressing RETURN without first entering anything.
The key DELETE deletes the last character entered.
Programming is terminated by P to store new values and Q to quit without
storing.
The execution time
When you have pressed RETURN,SattCon 05 displays the first question:
The execution time can be between 1 and 255 ms.
You reply by:
0 The fast loop is not to be used.
n New time. n=1-255.
Start addresses
The second question is:
1/0 adr?
When a time channel is activated, its associated memory cell is set to ONE
for a single program cycle. You are therefore given a short pulse which can
be used in the PBS program to initiate an operation In the example below,
memory cell 1000 is activated by the time channel, and then used to set
output 240 at the predetermined time.
TCH
When Time channels is called, the time channels are displayed from time
channel 0.
Time channel The time at which
number the time channel is to be activated.
I I
TCOO Monday 07:30:00 1/0 adr 1000
TCOl Mon Fri- 00:00:00 1/0 a d r 1001
TC02 -- Off -- 00:00:00 1/0 adr 0000
t t
The days of the week The UO
on which the channel is address to
to be activated. Off= be set
time channel not used
Before you program a time channel you need to move the cursor to the time
channel to be programmed. Step backwards and forwards between the time
channels with Space and ",".
11.2 Programming -3
Move the cursor to the timer channel to be displayed and depress the key
RETURN. '1
Pmgramming takes place in dialogue fom. The system lists questions that
you answer by fint entering the new setting and then pressing RETURN.
When you have done this, the next question is displayed on the VDU.
If you do not want to change a certain setting, proceed to the next question
by pressing RETURN only.
Pmgramming is concluded by P to store new settings and Q to quit without
storing.
If you enter an incorrect character, use the key DELETE to delete the last
character entered.
SattCon 05 will display the following questions:
day (l=Mon) ?
hour ?
minute ?
second ?
1/0 a d r ?
Hour
Replay by stating at which hour the time channel is to be actived.
Minute
Replay by stating at which minute the time channel is to be actived.
Second
Replay by stating at which second the time channel is to be actived.
I/0address
Here you should enter the number of the RAM to be replaced when the time
channel is activated.
All time channels are printed by the printer when in the basic level you give
the command
PRTCH
Printing can be stopped with the command Q.
Programming
If you want to program a new time, depress the key RETURN once, and
twice to program a new date.
New date
The example below shows how to enter the date 88-08-1 1
00-00-00 year ?
year ? 88 RETURN
month ? 8 RETURN
day? 18 RETURN
OK ? P
12 Text handling
The function for text handling and programming of text strings is the same
for both the SattCon 0545 and OP45. The differences are described in the
section SanCon OP45.
SanCon 05 can store 32 text strings, each with 32 characters. The texts are
entered via the VDU terminal keyboard.
Text output is initiated by a change of state of a memory cell. During
programming you specify which memory cell is to be monitored, and
whether a positive, negative or any edge will initiate output.
Messages can be output to both the VDU and a printer if you have a
SattCon 05-45 and to both the display and a printer if you have a SanCon
OP45. In addition to the characters you have entered, messages may include
date, time, register values, the active step of a sequencer, and the
accumulated values of timers and counters.
You may also construct your own dialogue programs for entering register
values. When SattCon 05 requests a new value for a certain register, you
enter this and the new value is stored in the register. If you use the text
handling program to monitor one of memory cells 1660-1665 and 1557-
1577, the dialogue program can be started with CMD commands from the
keyboard or with the function keys from SattCon OP45.
If you want SattCon 05 to output longer text (e.g. reports), you can link
several text strings to the same memory cell. During displaying on the VDU
15 text strings can be linked together and during printing on the printer 10
text strings can be linked together.
You can also link together more than 10 text strings via the PBS program;
how to do this is described in the program examples book
TEX
The texts are displayed as follows:
\
D d T t Unloading c o m p l e t e d
off=notmonitored
+
Cc h i g h t r n s 0210
- T
- -
Machine
4 time: TIM10----
. . . . .. . ... . . . .
C h i g h f l a g 1660
C continue
off 0000 1
Monitored memory cell
At the beginning of each text string thwc an f o u ~ ~ ~ s i t i o n s
-.
contain the letters 13, d, T, t or the character These characters show
whether the date and time are output with the text string, and the text's
destination (VDU,printer).
1 2 3 4 Text
After the text string there are two positions which can contain the letters C
and c, together with the character -.These characters show whether the text
string is to end with CR/LF (carriage returdline feed) or not.
You step backwards and forwards between the text strings with the key
space and the key ",".
You reply by first entering the new data and text, then pressing RETURN.
When you have done this, the next question is displayed.
If you do not want to change a particular item, you proceed to the next
question by pressing RETURN without entering anything.
Programming is concluded with P to store new settings and Q to quit
without storing.
110 address
The second question is:
1/0 adr?
You should now enter the number of the memory cell to be monitored:
n 110 address n.n=O-1777
The table shows the function of each presentation alternative, and how this
is indicated on the display for both VDU and printer.
Alternative Function
0 Not output to VDU or printer (depending on the question
displayed).
(VDU: Blank Printer: Blank)
Text with date, time and CR/LF
(VDU: D T C Printer: d t c)
Text with time and C W F
-
(VDU: T C Printer: t c) -
Text with date and CFULF
(VDU: D - C Printer: d c) -
Text with CR/LF
-
(VDU: - C Printer: - c) -
Text with date and time
(VDU: D T - Printer: d t -)
Text with time
-
(VDU: - T - Printer: t -)
Text with date
(VDU: D - - Printer: d - -)
Text only
-
(VDU: - - -Printer: - -)
Text . .
I, ..
.%.
You can now enter the text string. When you have entered the text you press
RETURN and can then finish programming with P (store the text and
parameters) or with Q (return without storing).
Editing
The table below shows the keys used to delete characters or move the
cursor. The key DELETE moves the cursor to previous character and delete
it. The keys CTRL F moves the cursor forward one step without deleting
(CTRL and F must be pressed simultaneolusly). The keys CTRL H move
the cursor one step backwards without deleting (CIXL and H must be
pressed simultaneously).
t t
Line 3 Column 25
If <0000> is entered, this is interpreted as zero characters and the text string
. is abbreviated by six characters (the hook brackets are not printed out but
are included in the abbreviation). The number of characters within hook
brackets must be even.
It is also possible to enter the hexadecimal ASCII value for each character
in the control code. The control code according to ANSI for moving the
cursor to line 3 and column 25 is:
This control code is generated during printout with the following ASCII
values in the text string:
This table shows the commands which can generate w n m l codes for . '.' '.
It is also possible to enter the hexadecimal ASCII value for each character
in the control code which can be sent to the printer being used. These ASCII
values are also to be written within hook brackets.
Carriage Return
L i e Feed
Process variables
If you want register values, the active step of a sequencer, or the
accumulated values of timers/counters to be incorporated in a message, you
should enter the following abbreviations at the points in the text string
where this informations is to go:
R:m Write out the decimal values for registers nnn and nnn+l.
The text output is done as xxxxx.yyy. The register value
nnn can be 0-65535 and nnn+l can be 0-999.
R=nnn Write out the contents of register nnn in the form of a
horizontal bar. Every section of the bar should correspond
to around 0.64 of the full value. The bar will be eight
characters wide.
When the text string is output, these abbreviations are replaced by the actual
values.
T mU Y '..
..
By entering the following abbreviationsin the text stxing, you may also
construct dialogue programs which request register values:
R?nnn Stop text output temporarily; wait for a reply; then store the
reply as an integer value in register nnn. The reply must be
between 0 and 65535.
R!nnn Stop text output temporarily; wait for a reply; then store the
reply as a percentage value in register nnn. The reply must
be between 0 and 100.
R+nnn Stop text output temporarily, wait for the reply, which
should consist of an integer part and a decimal part in
registers nnn and nnn+l.
These abbreviations are not displayed when the text string is output (you
should therefore enter the actual question as part of the message), but
instead they generate a temporary halt in text output. Output does not
continue until you have entered a new value, and this value is then stored in
the register. You may also reply with RETURN only if you do not want to
change the value, in which case the old value remains in the register.
You can therefore reply with:
n Store the value n in the register.
Q Retain the old value.
Example
The following text has been entered:
D T -<CRLF>Register 0: RGOOO - high flag 1661
- - <CRLF>Register 0 ( % ) : R%000 - continue
- - <CRLF>New value ( % ) ? R!000 Thank you! - continue
When memory cell 1661 is set to one by the command CMDl RETURN
(see Chapter Bit operands), the following is displayed:
Register 0: 20317
Register 0 ( % ) : 31.0
New value ( % ) ?
You can now reply with a new value which will be stored as a percentage in
register 0:
Thank you!
Text-::
PRTEX
AU text strings are listed out on the VDU when you give the command:
The contents of the alarm are listed on the VDU when you give the
command:
CR (Carriage Return) returns the cursor to the beginning of the line. Note
that automatic CRLF (Carriage Return Line Feed) in texts is outputted
before the text is printed to display (the opposite applies when printout is /3
done to a VDU).
Example 1:
Position the cursor (Cursor Position) to line 3 and column 25:
<mp>
t
rad 3 kolumn 25
Example 2:
Position the cursor in the same column on the next line (Line Feed):
Description Command
Erase screen
Erase line
Caniage return
Line feed
Backspace
Select 4 line display mode
Select 3+1 line display mode
Cursor home
Cursor up
Cursor down
Cursor forward
Cursor backward
Cursor position
Example 1
Enter the text SauCon 05 on line 2 column 15. This problem is solved by
entering the command in the text string which positions the cursor.
Lie
2
1
3
o
SATTCON 05
IS
. I 39 Column
<ES><CP0300><ELXS3><CR><OOOOOO> - h i g h f l a g 1564
START <0000000000000000000000> - continue
STOP <0000000000000000000000> - continue
WAIT <0000000000000000000000> - continue
UP <0000000000000000000000> - continue
ALARM<CH><C+05><00000000000000> - continue
................................ off 0000
DANGER !<CR><LF><C+05><000000> - h i g h f l a g 1661
The first text string contains the command for erasing the display (Erase
Screen), position the cursor on the 3rd line, column 0,erase the line (Erase
Line), select 3+1 lines and caniage return (Carriage Retum). The headings
are then entered in each text string (continue). By abbreviating the text
strings, the headings are printed out on the next line. The headings are
printed out when F10 (memory cell 1564) is pressed on the operator
keyboard. When the headings have been printed out, the cursor will move to
Column 5 on line 0 (Caniage Retum, Line Feed and Cursor Position + 05).
The alann text "DANGER will be printed out each time F1 (memory cell
1661) is pressed.
Line
89-03-29 15:35:00 DANGER !
89-03-29 15:40:13 DANGER !
o 8 17 26 34 39 Column
The following example shows how you can pack the text strings to provide
more space:
- - <ESCP0300ELS3CR>START STOP - high f l a g 1564
- - WAIT UP ALARM <CH><C+05> - continue
- - ................................ off
D T DANGER !<CRLFC+05><0000000000> - high f l a g 1661
National character sets on the display
OP45 contains six different characters sets for the display: US,
S w e d W i a n d , Germany, Denmark, W e t h e r l a n d s and Norway.
The table below shows the hexadecimal codes where the characters sets
differ according to the language variant:
Select the character set and execute the change with P. Go back to basic
level with Q.
Anabgue input
Controller
Constant % Analogue output
Register Register
Analogue input
Each controller is linked to a memory cell (start bit) which, when set to
ONE, starts the controller. The controller is disabled when the memory cell
is RESET. When the controller is switched off SattCon 05 "freezes" the
output signal and it is retained until the controller restarts.
SattCon 05's controllers always operate in AUTO mode, which means that
the output signal is controlled on the basis of the setpoint and current
process value. However, it is still possible to control the output signal
manually (MANUALmode) to obtain a value which is independent of the
setpoint and input. How to do this is described in the program examples
book.
Cascade connection
You may connect two controllers in cascade, the output from the first
controller forming the setpoint of the other.
The output signal from the first controller may be stored, for example, in a
register, and the setpoint of the second controller fetched from this register.
The following pairs of controllers can be cascaded:
0-1 4-5
1-2 5-6
2-3 6-7
3-4 7-8
The first controller (lower number) is called the Master and the second is
called the Slave.
Process
varible
output 1 4
output 2 A
13.1 Call and display
You enter the "Controllers" system program from basic level with the
command
CON
The controllers are shown as follows:
CONTROLLER N o .
--------------
00 01 XX XX XX XX 06 07
,ON' t 1
Programmed conwller Not programmed controller
Erasing a controller
If you want to erase a previously programmed controller, give the command
ERn. n=0-7 (controller number).
E r a s e no. nn OK?
t
Conwller numba
Execute with P and if you have changed your mind enter Q and SattCon 05
will Rtum to the basic level.
13.2 Programming
Enter a controller number (0-7). You can now control or program a given
controller.
The controllers are programmed by your entering the values and addresses
which SattCon 05 asks for and then pressing RETURN.When you have
done this the next parameter is displayed. If you only want to check the
settings, just press RETURN.
PB=proprtional band
G-gain
Integral time
PI and PID controllers may have an integral time between 1.0 and 3600.0
seconds. You can either enter the I-time yourself or it can be retrieved from
a register.
Default: 3600.0 seconds
The number 10 in a register is equivalent to an integral time of 1.0s.and the
number 36000 is equivalent to an integral time of 3600.0s. All numbers
under 10 are interpreted as 1.0s. and numbers over 36000 are interpreted as
3600.0s.
Sometimes the tern R/min (Repeats per minute) is used instead of integral
time. There is the following relationship between the two terms:
Default: 50.0%
Minimum Out (Minimum output signal)
The output may never be less than "Minimum output". This limit may be
between 0.0 and 100.0%. You may either enter the value from the keyboard
or it may be fetched from a register.
Default: 0.0%
Maximum Out (Maximum output signal)
The output may never be greater than "Maximum output". This limit may be
between 0.0 and 100.0%. Note that "Maximum output" must be greater than
"Minimum output". You may either enter the value from the keyboard or it
may be fetched from a register.
Default: 100.0%
Digital Output (Digital three-point controller)
If you select the alternative-Yes,the controller will be a digital three-point
controller. No therefore means that the conmller is has an analogue output. '7
Default: No (Controller with analogue output)
Output
Applies to controllers with analogue outputs. The controller's output can
either be transmitted to an actuator via an analogue output, or stored in a
register.
Default: AOOOO
Digital output open
Only applies to a digital three-point controller. You should specify the
digital output for "Open".
Default: 0000
Digital output close
Only applies to a digital three-point controller. You should specify the
digital output for "Close".
Default: 0000
Position feedback
Only applies to a digital three-point controller. The "Position" signal can be
obtained from an analogue input or a ~ g i s t e r .
Default: AIOOO
Deadzone: Output-Position
Only applies to a digital three-point controller. If the difference between the
output signal of the analogue section and the "Position" signal is less than
the deadzone, neither Open or Close operate. The deadzone may be between
0.0 and 5.0%, and can either be entered from the keyboard or obtained from
a register.
Default: 0.0% 1
All register values over 5.0% are interpreted as 5.0%.
Cascade
You may select No (No cascade wnnection). Master or Slave. If the
controller is the fust controller in a cascade pair. you must select Master,
and if it is the second controller you must select Slave. Lf the controller is a
digital three-point controller you cannot select Master.
Default: No
SattCon 05 can communicate with other systems via one or two serial
channels using the communication protocol COMLI.Data (status of
memory cells, analogue input values, register values etc.) may therefore be
transferred between two or more SattCon 05's or between SanCon 05 and
other systems equipped with COMLI.
Communication takes place on the Master-Slave principle. A Master (the
supervisory system) always initiates transmission. The units which are
Slaves (outstations) reply when they are called. SattCon 05-25 has no
Master function.
The SattCon 05 has a serial channel which can be used as either a VDU or
COMLI channel. If the serial channel is used as a COMLI channel, you can
choose yourself whether it should be either Master or Slave. An optional
communications board for two COMLI channels is available. If the
communications board is used, the serial channel on the CPU cannot be
used as a COMLI channel. When you use the communications board,
SattCon 05 can be Master and Slave simultaneously. Up to 32 outstations
can be connected to one Master channel in a multipoint configuration. If
both channels are Masters, 64 outstations may therefore be ~ O ~ e c t to
ed
SanCon 05.
When a COMLI network only consists of one Master and one Slave, the
configuration is referred to as being point-to-point.
9
Camnmri&
-- * 6-P-? ,.
When several systems are connected to each oth&(mbltihint) an RS485'
interface must beused, but when there is only one Master and one Slave
(point-to-point) RS 232 may also be used (see the SanCon 05-45
Installation and maintenance).
The systems in a COMLI network transmit messages to each other. These
may be a request for data, transfer of data or an acknowledgement.
When a Master sends a request, the Slave replies by transferring the
requested data to the Master.
Transfer L
..................
:
. . .... . . ......
......
................... . . . . . .. . .. ..
.. . ..
Acknowledgement
Each outstation (Slave) has its own identity, and a Slave only replies to a
message which contains its identity. Note that one supervisory system can
transmit this message to several outstations!
Each message which a Master is to transmit is linked to a memory cell in
the Master's VO RAM. When this memory cell is set to ONE the message is
transmitted. With the PBS program you may therefore determine when a
particular message is to be sent.
When you are programming the COMLI Master function you enter a
parameter called message type, i.e. you determine whether a message is to
be a request or a transfer of data, and what is to be transmitted. You also
enter the channel on which the message is to be sent and where the
transmitted data is to be stored (analogue input values may, for example, be
transmitted to the VO RAM or a register).
The message type and the destination address, or addresses, for a message
are stored in a communication area SattCon 05 has 32 communication
areas, so it can transmit up to 32 different messages. You only need to
program communication areas when a COMLI channel is used as a Master.
AU information about the C O W channels (Master or Slave function,.
baudrate, identity etc.) is stored in the channel definition areas. SattCon 05
has two channel definition areas, one for each COMLI channeL You need to
program the channel definition areas ~gardlessof whether the COMLI
channels are to be used as Master or Slaves.
Message types
The following tables show the message types which SattCon 05 can
transnit and receive.
Each message type is represented by a character, and it is this character you
enter when you specify the message types the Master is to transmit.
The message types which a Master can receive, and those which a Slave can
transmit and receive, are predefined.
A Master can transmit
Typ ASCII Meaning
(Hex)
0 30 Transfer of memory cells status or register values.
2 32 Request for register values or memory cells status.
3 33 Transfer of a single memory cell's status.
4 34 Request for a single memory cell's status.
9 39 Request for analogue input values.
I 49 Request for date and time.
J 4A Transfer of date and time.
1.- SD Request for timed event.
[ 5B Transfer of timed event.
Message types ] and [ are used to tnpsrnit the following information to and
from SattCon 05:time of status change, the memory cell which changed
status and the direction of the status change (High or Low). SattCon 05 is
only able to transmit such information if the memory cell is monitored by
the text program (see Chapter Text handling).
Note that message type ] is only transmitted when a memory cell monitored
by the text program changes status. If you want several systems to receive
message type 1, a single communication area should be used to send the
message to all the systems.
When this type of infonnation is transmitted to SattCon 05 (message type I),
it is placed in the alarm buffer. If a text is linked to the memory cell, the text
is combined with the time of the status change and is then output to the
VDU and/or printer (you may select where it is to be output in the text
program). If the memory cell is not linked to a text string, SattCon 05
outputs the number of the memory cell, the status change (HighLow) and
the time of the change.
A Master can receive +
Programming
The channel definition areas are programmed by your entering the settings
which SattCon 05 asks for and then pressing RETURN.When you have
done this the next parameter is displayed.
fr If you do not want to change a certain setting, proceed to the next parameter
by pressing RETURN only.
Programming is concluded with P to store new settings and return to the
basic level and Q to quit without storing.
The key DELETE erases the last character entered.
SattCon 05 will list the following questions (certain ones are omitted
according to the answers):
COMLI ON/OFF OFF ?
Master/Slave S ?
Identity I ?
Baudrate 9600 ?
Number of data bits 8
Number of stop bits 1
Parity O ?
Time-out 3 ?
Modem delay O?
Number of retransmissions 0
Number of UART-errors 0
Number of BCC-errors 0
Number of other errors 0
Clear error counters N ?
Modem connection N ?
Modem timeout l ?
1/0 address for DCD 0000
Clear modem commection N ?
When the channel is to be used for communication with other systems,you '
Identity
Only applies to Slave. When the channel is a Slave, it should be assigned an
identity, which is a number between 1 and 247.
Baudrate
You may select a baudrate between 300 and 19200baud.
Parity
You may choose between odd, even or no parity. Reply with 0 for odd c' 7
parity, E for even parity and N for no parity.
The number of data bits and stops bits is preset and these settings cannot be
changed.
Timeout
Only applies to Master. This is the time, in seconds, which a Master must
wait before it retransmits a message which has not been answered. The table
below shows the permissible times for each baudrate.
Time (s)
7-59
5-59
4-59
3-59
3-59
3-59
3-59
Modem delay
This parameter need only be set if you want to communicate via a modem.
You may adapt SanCon 05 to work with several different types of modem
by delaying the handshaking signal (RTS); the delay may be set between 0
and 30 milliseconds in steps of 5 ms. The delay should normally be 0.
Clear error counters -
.. - *
Modem connection
Select here with modem call-up in which register the answer from the
modem should be placed. N denotes that no modem call-up occurs.
Modem timeout
Select here the time the master should wait for the answer from the modem
before error code 98 is placed in the register that is specified with the
question modem connection.
I/0 address for DCD
Select here in which UO address the copy of Data Carrier Detect should be
placed. If DCD is active the 110 address will be set to one otherwise to zero.
.. /
COM
When you have done so, SattCon 05 lists the areas to be programmed:
Erase no. nn OK ?
Execute with P and if you have changed your mind enter Q and SattCon 05
will return to the basic level.
Programming
Enter the communication area to be controlled and programmed (0-37).
The communication areas are programmed by your entering the settings
which SattCon 05 asks for and then pressing RETURN.When you have
done this the next parameter is displayed.
If you do not want to change a certain setting, proceed to the next parameter
by pressing RETURN only.
Programming is concluded with P to store neui:settings and Q to quit
without storing. .. .
Note that SattCon 05 does not start to operate with the new settings untn
you have stored them with P.
If the message below is displayed when you have stored new settings, this
means that SattCon 45 cannot work with your new values. It remains in the
programming mode so that you can change the incorrect value.
E r r o r i n programmed area - O l d data v a l i d
SattCon 05 will list the following questions (certain ones are omitted
according to the answer):
Start bit 1700
Error bit 1701
Channel (1/2) l ?
Slave i d e n t i t y (1.. 2 4 7 ) l ?
Messagetype ( 0 / 2 / 3 / 4 / 9 / 1 / ~ / A / ~ ) 0 ?
Start bit
Each message is automatically linked to a start bit (memory cell) in the 110
RAM. When this start bit is set to ONE the Master transmits the message.
Error bit
Each message is also linked to an e m r bit (memory cell) in the YO RAM.
This error bit is set to ONE when there is an error in the communication. A
communication error is considered to exist when the Master has made five
transmissions of the same message without receiving a valid reply. The
memory cell is RESET by SattCon 05 when the communication is error-
free.
Channel
You should specify which channel (1 or 2) is to transmit the message.
Remember that the channel must be a Master.
Slave identity
A Master must know the Slave or Slaves to which the message is to be
transmitted. You simply enter their identities (1-247).
Message type
You must also specify the type of message to be transmitted to the Slave.
The messages which a Master can transmit are described in the section
Message types. The following types can be transmitted: 0.2.3.4.9. I. J, 1,
t.
The parameters which will then be listed depend on the message type
selected.
If you have selected the message type I or J (request/transfer of date and
time), no further questions will be listed.
Parameters for types .Oand.2.:.. . . . - .
.., . .
,. .. ,,
't., .
if you have selected message type 0 or 2, you should determine from which
memory cells or registers status or register values, respectively,. are to be
retrieved and where they are to be stored. The following questions are
listed:
First address
Last address
To address
The status of a l l memory cells, or the values of all registers between "First
address" and "Last address" are to be transferrWrequested and stored "To
address" (I/O address or register).
If you transfer/request the status of memory cells, the first VO address must
end with the digit 0 and the last VO address must end with the digit 7.
If what you are transferring is to be stored in the VO RAM, the VO address
"To address" must end with the digit 0.
The register comprises 16 bits. This means that if your are to transfer
memory cells' status to a register, you must transfer 16 memory cells, and if
you are to transfer.status to two registers, you must thus transfer 32 memory
cells, etc.
Parameters for types 3 and 4.
if you have selected message type 3 or 4, you should determine from which
memory cell the status is to be retrieved ("From address) and the number of
the memory cell where this status is to be stored. ('To address). The
following questions are listed:
From address
To address
The first two questions are always answered by an analogue input (AI) and
the last question is answered by an 1/0 address or register (R).
Parameters for type A and A
If you have selected message type - ur A. YUU ~luuld,enterthe offset value.
If, e.g., the status change of memory cell 1000 and time for this change are
transferred to another system (type A) and if Offset is +4100, the other
system interprets this as it it was memory cell 5 100 which changed its
status. The following question is Listed:
O f f set + 0000 ?
PRCOM
Thus now you can only program SattCon 05 via the COMLI channel.
Return to COMLI mode takes place when the keys CI'RL, and B (02 Hex)
are pressed simultaneously.
14.7 Communication via a. Hayes
.,...., ' . mbdem. 7'"; t .I. I
Call-up can only be performed from the first COMLI channel, which is
either on the DUART expansion or the VDU channel.
Connection
Here is an example of the connections where a SattCon 05 is the master and
a SattCon 05 is the slave.
Pin configuration
The pin configuration for the cable between SattCon 05 and a modem.
SattCon05 VMmOMLI Modem
DCD
ov
RW
TXD
When a slave is to be called up, the master fimsends out a text string which
contains an initiating code and then a text string which contains the
telephone number. The Master then monitors the COMLI channel and reads
the codes the modem transmits backIf the code comes on a line conneced
for a certain speed then all communications continue with standard protocol
COMLI. The master will first ask for the register which contains the slave
identity code. If the wrong identity code is taken then this is understood as a
spontaneous call and the slave's communication is sent once and then the
line is shut down. If the identity code is correct then the regular C O m I
communication is sent to the defined slave. The line will now function as an
established connection.
Slave Call-up
A slave calls up the master's modem by a tone signal W i g set,i.e. a
memory cell becomes a 1. This is detected in the PSB program which then
starts a call-up (transmit initiating code and telephone number). The master
starts by asking for the register containing the slave's identity number,
thereafter all messages defined in the slave are sent once. When all the
messages are sent the tone signal is cancelled the line is disconnect and the
slave returns to the stand-by mode.
Au tomatisc disconnection
Disconnection is automatic when the transference is complete.
If the connection is bmken,(an error on the telephone) then COMLI
monitors the transmission and disconnection of the transmission is affected
within 1 minute, the system alarm in the master is also activated. If no
COMLI answer is received, then this is regarded as a forbidden call-up and
the connection is broken.
Code Explanation
AT Opening sequence.
BO European standard.(CCI'TT V.22 eller CCIlT V.21).
EO No echo with test to modem.
QO Answer from modem to connected system.
VO Answer from modem in code form.
x4 Modem waits for connection tone before dialling number.
Y1 Bread after long bread-signal.
&DO Modem ignores DTR-signal.
&C1 DCD is activated when modem has a valid carrier.
S0=2 Number of ring signals before the modem answers.
<OD> The system sends camage return (CR).
D Call-up
T Tone signalling
+++ Disconnecting
ATHO Replace the handset
Answer codes from.the modem - . .
The numerical characters that the modem leaves are the following:
Code Explanation
Ok.
Connection established, 300 baud
In coming rung signal detected.
No carrier with connecting attempt.
Incorrect command.
Connection established, 1200 baud.
No connection tone.
Engaged.
No reply.
Connection established, 600 baud.
Connection established, 2400 baud.
Block Diagram for PBS-program in master .
Block Diagram for PBS-program in slav
c4 . 5-2
14.8 Communication viaSattBus : : - 'I
S&n 05-45 and SanCon OP45 with a SattBus function (SattCon 05-SB)
communicates via SattBus instead of COMLI. SanBuss is a two core '7
asynchronous communications bus, type TokenBus with a maximum of 120
users (nodes).
A SattCon 05-SB has a SanBus connector which replaces the COMLI
channel.
SanCon 05-SB has the following software changes in relation to ordinary
SattCon 05:
1 There is no quick-loop.
2 There is no pulse input.
3 The PBS-program's maximum size is reduced.
SattCon SattCon
05-45 SB 05-45 SB SattCon
OP45 SB
-
SattBus SattCon 0
Connector 05-45 SB SattCon
OP45 SB
I
>
I I
Programming
By connecting a DUART expansion, you receive access to a terminal and a 3
printer channel. Making it possible to program via a standard VDU I
terminal.
SattCon 05-SB can even be programmed via a COMLI terminal mode from
a connected SattBus converter.You can even save and transfer a program by
sending a COMLI message for saveltransfer.
Save and transfer can also be performed with SBUPOS.
The messages are programmed as usual in the communication areas
(COM).The only difference to COMLI is the manner in which the messages
are transfered. SanCon 05-SB identity is set with a hexadecimal switch on
the SattBus unit.
SattCon 05 -SB can communicate with a system that does not use COMLI
i.e. a system that only uses SatBus. However, only the COMLI messages
0,1,2,3 and 4 can be used.
15 Security Copying, SBI
.*
Keys
LOAD Lights when transfering occurs.
SAVE Lights when the memory's contents are saved.
VERIFY Lights when a verification occurs.
Switches
ON SBUPOS is ready for use.
OFF SBUPO5 is shut off.
i
,. .
-.s . - ? -
LOAD denotes that:. ; . . . .
:.: '
PBSexecutlngstops.
SattCon 05's program memory is erased.
SBPUOS's memory contents are copied to SattCon 05's.
PBS program
Time delay in all time circuits
Pre-selection of all counter circuits
Transfering speeds for VDU and printer
COMLI parameters
Register contents
Texts
Time channel
Regulator parameters
Re-set of SattCon 05 performed.
Conml that the memory's contents of SBUPOS and SattCon 05 are the
same i.e. verification is performed automatically.
If the verification fails then SattCon 05 is unconditionally set to STOP.
If the memory's contents are not the same then the indicator ERROR
lights.
If the PBS program changes register contents during VERIFY,the
indicator ERROR will turn on even if the LOAD or SAVE was correct
If this happens, stop the PBS program and do a new LOAD or SAVE
and VERIFY.
16 System status
When you start SanCon 05 the following takes place:
r
The memories and battery are tested.
I/O addresses which are not battery-backed are reset to ZERO.
rogramming is disabled.
I/O address 1675 (FIRSTSCAN) is set to ONE.
COND: BSWP
TOTAL RESET OK?
I
If you do not want to reset SattCon 05, give the command Q instead of P.
Systemstatus
When you give the following command at basic level. SattCon 05 explains
what the error code means:
LE Display last error.
J
l a s t error 4:A/D converter e r r o r
t
Explanation
The code 00 means that there is no mains voltage to the unit in this position.
In order to be able to view the identity codes, SattCon 05 must be in the
RUN position.
PWR
If a backward jump is used incorrectly, it is possible that the PBS program
can become locked in an endless loop. The STOP LED then lights and it '3
becomes impossible to enter commands. If this happens, you should turn off
the power to SattCon 05, then switch it on again with the button on the CPU
card pressed. After approximately 10 seconds you can release the button
and you should be in contact with SattCon 05 again. Then remove the
incorrect backward jump. After an unconditional stop, the error message P
(fault on the program memory) may occur.
17 Execution times and memory
COM
ENDC
NPW
JC L 00-255 7 2 (26)
JSR L 00-255 7 2 (38)
LBL L 00-255 2 1
ENDS
EFL
END OF PBS
GET ooo0-1760,TA,TP, .
CA.CP,AO,AS.R 4 40-49 (54-70)
A1 4 42 (193-552,Not 6)
K 5 37 (44)
REM 3 8 (30)
ADD 0000-1760,TA.T'.
CA,CP,AO,AS,R 4 40-49 (68-79)
A1 4 42 (202-56 1,.Not 6)
K 5 37 (53)
REM 3 8 (39)
Instruction Operand Memory Execution time
(bytes) (IN
SUB 0000-1760,TA,TP,
CA,CP,AO,AS,R 4 4049 (70-81)
A1 4 42 (204-563,Not 6)
K 5 37 (55)
REM 3 8 (41)
MUL 0000-1760,TA,TP,
CA,CP,AO,AS,R 4 4049 (248-254)
A1 4 42 (377-736,Not 6)
K 5 37 (228)
REM 3 8 (214)
MIN/MAX 0000-1760,TA,TP,
CA,CP,AO,AS,R 4 40-49 (73-88)
A1 4 42 (207-565,Not 6)
K 5 37 (58)
REM 3 8 (44)
CLRWCLRH
SWAP
BINBIT
BITBIN
BCD
BIN
You may preset a time between 5 and 1275 ms in steps of 5 ms. Enter the
new time and then press P:
nP Store the time n. n=5-1275 in steps of 5.
SattCon 05 returns to basic level when you give the command Q.
Why should you now need to preset the execution time manually? One of
the reasons is that you may load the system slightly if, for example, you use
the PBS program, PID loops, COMLI and other functions all at the same
time. The time left over when the PBS program has been executed is used to
execute the other system functions.
If you do not know how long it takes to execute your PBS program, you can
preset the time to 5 ms, then start execution. If it takes longer than 5 ms, the
correct execution time is shown on the display.
~ a t t ~ o05n ver 1.0 P 25
t .
T N execution
~ time
The maximum cycle time is 1.3 sec. If this is exceeded, the STOP lamp
lights up and all outputs are reset.
=.
A PBS program with a large number of arithmetic instructions can take a
long time to be executed. You can shorten this time by, for example,
allowing less time-critical arithmetic instructions to be executed in every
other cycle.
Example:
020 is one evej-
other PBS cycle
*
LBL L 00
J
*
LBL L 01
*