Sunteți pe pagina 1din 282

Horsch Elektronik AG http://www.horsch.

ch
9473 Gams, Switzerland info@horsch.ch
Tel.: +41 81 771 61 81; Fax: +41 81 771 17 47

ECCO Manual

Version: 1.02 English


Author: M. Chicherio
Date: 26. October 2005
Horsch Elektronik AG

1. FOREWORD
The ECCO programming language by Horsch Elektronik AG was developed as a
means to control and monitor large machines for the automatic assembly of complex
work pieces and has been continually improved and implemented successfully over
many years. Originally developed by Gabriel Horsch in the 80s, it was improved over
the last ten years by PhD Peter Horn and Marcel Sestak.
The ECCO control system is the consistent next step in the development line of SMC
controllers. What was formerly implemented on its own hardware can now be
handled by standard PCs, with the customer benefiting from all the advantages of the
PC.
The ECCO runtime environment is exceptionally powerful and allows a Pentium 3
800 MHz to process 200'000 instructions from 200 tasks in one second with the
processor using only 5% of its processing power.
This manual has been written with great care but it may still contain errors. Please
report any errors found to Horsch Elektronik AG.

Under international intellectual property agreements, it is prohibited to copy,


digitalize, alter or reproduce this manual in full or in part. Sale, loan or passing on
to third parties is prohibited.
Even though this manual has been written with great care, it may still be subject to
errors and omissions. By using this manual, you acknowledge this fact and waive
all claims for compensation against Horsch Elektronik AG, LCA Automation AG or
third parties that could arise from the use of this manual, including but limited to
claims arising from errors, incompleteness, or other erroneous information. If you
do not agree to this condition, you must immediately return the manual, delete all
digital copies and cease to use the product described.
Brand names are used without special reference or marking and the lack of
identification of a brand name does not represent a declaration that it is freely
available for use.

HORSCH ELEKTRONIK AG
Haagerstrasse 42
Postfach
CH-9473 Gams

© 2004, 2005

10/26/05 – Ver.: 1.02 English ECCO Manual - 2/282 -


Horsch Elektronik AG

2. TABLE OF CONTENTS
1. Foreword ......................................................................................................2
2. Table of contents .........................................................................................3
3. Introduction to ECCO ..................................................................................8
3. 1. Advantages of ECCO over IEC 61131...........................................................8
3. 2. Installation of ECCO ......................................................................................9
3. 3. Working with the terminal ..............................................................................9
3. 4. Operation modes and status........................................................................15
3. 5. The programming environment....................................................................18
3. 6. A minimal program.......................................................................................20
3. 7. Functions, tasks and procedures.................................................................22
3. 8. Registers and flags ......................................................................................24
3. 9. Working with strings.....................................................................................26
3. 10. Inputs and outputs .......................................................................................28
3. 11. Displays and user input ...............................................................................29
3. 12. Flow control .................................................................................................30
3. 13. Internationalization ......................................................................................32
3. 14. ECCO intercommunication ..........................................................................33
3. 15. Statistic and ZPoint......................................................................................33
3. 16. The PAC ......................................................................................................36
4. Commands .................................................................................................37
4. 1. Conventions.................................................................................................37
4. 2. Systematic command reference ..................................................................38
4. 3. Alphabetical command reference ................................................................42
.ADDRESS ................................................................................................. 43
.ARRAYS / .END_ARRAYS........................................................................ 44
.CODE_OFF ............................................................................................... 45
.CPLINK_MAP_DEF / .END_CPLINK_MAP_DEF ..................................... 46
.DISPLAYS / .DISP_END ........................................................................... 47
.END ........................................................................................................... 48
.ERROR_CODE_START............................................................................ 49
.ERROR_FLAG_OFFSET .......................................................................... 50
.FUNCTIONS / .FUNC_END ...................................................................... 51
.IO_TEXT / .END_IO_TEXT ....................................................................... 53
.LANGUAGES ............................................................................................ 55
.LIMITS ....................................................................................................... 56
.LOCAL....................................................................................................... 58
.MAX_ECCO .............................................................................................. 59
.OWN_ECCO ............................................................................................. 60
.PAC_DEF / .END_PAC_DEF .................................................................... 61
.PASSWORD.............................................................................................. 62
.PROFIBUS_DEF / .MASTER / .END_PROFIBUS_DEF ........................... 63
.PROJECT.................................................................................................. 65
.PROTECTED / .END_PROTECTED ......................................................... 66
.PSL / .END_PSL ....................................................................................... 67
.SET_CONST / .END_CONST ................................................................... 70
.SETLABEL ................................................................................................ 71

10/26/05 – Ver.: 1.02 English ECCO Manual - 3/282 -


Horsch Elektronik AG

.SLCE_DEF / .END_SLCE_DEF ................................................................ 72


.SLCS_DEF / .END_SLCS_DEF ................................................................ 73
.STATIONS / STATION / .END_STATIONS............................................... 74
.STATISTIC / GROUP / .END_STATISTIC ................................................ 75
.STOP_IO_TEXT ........................................................................................ 78
.STRING_REG / .END_STRING_REG....................................................... 79
.STRINGS / .END_STRINGS ..................................................................... 80
.TEXT ......................................................................................................... 82
.TINP_TEXT / .END_TINP_TEXT .............................................................. 83
.UNLOCK / .END_UNLOCK ....................................................................... 85
.ZPOINT / ANLAGE / RACK / .END_ZPOINT ............................................ 86
ABS ............................................................................................................ 89
AND ............................................................................................................ 90
BMOV ......................................................................................................... 91
BUS_OFF ................................................................................................... 92
BUS_ON..................................................................................................... 93
CALC .......................................................................................................... 94
CALL........................................................................................................... 95
CALLD ........................................................................................................ 96
CALLF ........................................................................................................ 98
CDATEDISP ............................................................................................. 100
CLOSE ..................................................................................................... 101
CLR_PUFFER .......................................................................................... 102
CLS........................................................................................................... 103
CLS_WIN.................................................................................................. 104
COND_TRAP / IF_COND / END_COND_TRAP ...................................... 105
CREGDISP............................................................................................... 107
CTIMEDISP .............................................................................................. 108
CWRITE ................................................................................................... 109
DATEDISP................................................................................................ 110
DO / DO_WHILE / DO_WHILENOT ......................................................... 111
END_NUM_INP ........................................................................................ 113
EXCL ........................................................................................................ 114
GET_PSL ................................................................................................. 115
GW_DD .................................................................................................... 116
GW_DW ................................................................................................... 117
GW_MSG ................................................................................................. 118
GW_QUEUE............................................................................................. 119
GW_RD_DD ............................................................................................. 120
GW_RD_DW ............................................................................................ 121
HP_CDATEDISP ...................................................................................... 122
HP_CLS_WIN........................................................................................... 124
HP_CREGDISP ........................................................................................ 125
HP_CTIMEDISP ....................................................................................... 127
HP_CWRITE ............................................................................................ 129
HP_DATEDISP......................................................................................... 130
HP_REGDISP .......................................................................................... 131
HP_TIMEDISP.......................................................................................... 132
HP_WRITE ............................................................................................... 133
ID_INIT ..................................................................................................... 134
ID_READ .................................................................................................. 135

10/26/05 – Ver.: 1.02 English ECCO Manual - 4/282 -


Horsch Elektronik AG

ID_REG_RD ............................................................................................. 136


ID_REG_WR ............................................................................................ 137
ID_STATUS.............................................................................................. 138
ID_WRITE ................................................................................................ 139
IF / IFNOT / ELSE / END_IF..................................................................... 140
INM ........................................................................................................... 142
INP............................................................................................................ 143
JMPCOND................................................................................................ 145
JMPTIM .................................................................................................... 146
JPBIT........................................................................................................ 147
JPEQ ........................................................................................................ 148
JPGT ........................................................................................................ 149
JPLT ......................................................................................................... 150
JUMP........................................................................................................ 151
L_INP........................................................................................................ 152
L_JMPCOND ............................................................................................ 153
L_OUTP.................................................................................................... 154
L_SWITCH / CASE / DEFAULT / END_SWITCH ..................................... 155
LEN_STR ................................................................................................. 156
MID_STR.................................................................................................. 157
MOV ......................................................................................................... 158
MOV_PUFFER ......................................................................................... 159
NEW_PUFFER ......................................................................................... 160
NOT .......................................................................................................... 161
NSDEF ..................................................................................................... 162
NUM_INP ................................................................................................. 163
OPEN ....................................................................................................... 164
OR ............................................................................................................ 165
OUTA........................................................................................................ 166
OUTP........................................................................................................ 167
PAC .......................................................................................................... 168
POWER_OFF........................................................................................... 169
PUFFER ................................................................................................... 170
RD_DATE................................................................................................. 171
RD_HOUR................................................................................................ 172
RD_PUFFER ............................................................................................ 173
RD_TIME.................................................................................................. 174
RD_WEEK................................................................................................ 175
REGDISP ................................................................................................. 176
RET .......................................................................................................... 177
RETD........................................................................................................ 178
RETE ........................................................................................................ 179
RETF ........................................................................................................ 180
SAVE_ARRAY.......................................................................................... 181
SCALE_AD............................................................................................... 182
SCALE_DA............................................................................................... 183
SCHICHT.................................................................................................. 184
SEARCH................................................................................................... 185
SEND_IO.................................................................................................. 186
SEND_REG.............................................................................................. 187
SEND_SR................................................................................................. 188

10/26/05 – Ver.: 1.02 English ECCO Manual - 5/282 -


Horsch Elektronik AG

SET_LANG............................................................................................... 189
SET_PSL.................................................................................................. 190
SETBIT ..................................................................................................... 191
SETTIM .................................................................................................... 192
SLCE ........................................................................................................ 193
SLCS ........................................................................................................ 194
SLV_RCV_STR ........................................................................................ 195
SLV_SND_STR ........................................................................................ 196
SMOV ....................................................................................................... 197
STAT_CLR ............................................................................................... 198
STAT_PUFFER ........................................................................................ 199
STAT_QUEUE.......................................................................................... 200
STAT_TAKT ............................................................................................. 201
STCKZAHL............................................................................................... 202
STDEF...................................................................................................... 203
STR_ADD................................................................................................. 204
STR_ADD_ASCII ..................................................................................... 205
STR_ADD_NR.......................................................................................... 207
STR_TO_ASCII ........................................................................................ 208
STR_TREAT............................................................................................. 209
STR_VAL.................................................................................................. 210
SV_COM .................................................................................................. 211
SV_CONST .............................................................................................. 212
SV_FIL...................................................................................................... 213
SV_READ................................................................................................. 214
SV_TRJ .................................................................................................... 215
SWITCH / CASE / DEFAULT / END_SWITCH ......................................... 216
TASK_KILL............................................................................................... 217
TASK_OPEN ............................................................................................ 218
TASK_STEP............................................................................................. 219
TIMEDISP................................................................................................. 220
TINP ......................................................................................................... 221
VI_CLRKEY.............................................................................................. 224
VI_DATE................................................................................................... 225
VI_JMPKEY.............................................................................................. 227
VI_RDISP ................................................................................................. 228
VI_READ .................................................................................................. 230
VI_TIME.................................................................................................... 231
VI_WRITE................................................................................................. 233
WAITIM..................................................................................................... 234
WHILE / WHILENOT / END_WHILE......................................................... 235
WR_TIME ................................................................................................. 237
WRITE ...................................................................................................... 238
XOR.......................................................................................................... 239
ZPOINT_STATE ....................................................................................... 240
4. 4. Labels ........................................................................................................241
BACKPGM................................................................................................ 242
ERROR_PROTOTYPE............................................................................. 243
HOT_TASK / HOT_END........................................................................... 244
HPPGM .................................................................................................... 246
NRMPGM ................................................................................................. 247

10/26/05 – Ver.: 1.02 English ECCO Manual - 6/282 -


Horsch Elektronik AG

NSPGM .................................................................................................... 248


NSRESP................................................................................................... 249
STPGM..................................................................................................... 250
STRESP ................................................................................................... 251
4. 5. Obsolete commands..................................................................................252
CTRDEC................................................................................................... 253
CTRDISP.................................................................................................. 254
CTREQ ..................................................................................................... 255
CTRINC .................................................................................................... 256
CTRPRES ................................................................................................ 257
CTRRES................................................................................................... 258
DISABLE_STOP / ENABLE_STOP .......................................................... 259
STAT_SEND ............................................................................................ 260
STEND ..................................................................................................... 261
TIMETRAP / END_TIMETRAP ................................................................. 262
TRAP / IF_TRAP / END_TRAP ................................................................ 263
4. 6. Commands no longer supported ...............................................................264
5. Appendices ..............................................................................................265
5. 1. State diagram ............................................................................................265
5. 2. Priority diagram .........................................................................................266
5. 3. Colors and fonts on the display .................................................................266
5. 4. System registers ........................................................................................268
5. 5. System flags ..............................................................................................271
5. 6. System errors ............................................................................................272
5. 7. Commands for servo slaves and PAC .......................................................277
5. 8. Bibliography...............................................................................................280
6. Valid versions ..........................................................................................282

10/26/05 – Ver.: 1.02 English ECCO Manual - 7/282 -


Horsch Elektronik AG

3. INTRODUCTION TO ECCO
This section will explain various aspects of ECCO. It serves primarily as an
introductions to programmers unskilled in ECCO but also provides opportunity to
experienced ECCO programmers to become more familiar with the principles of the
language.

3. 1. Advantages of ECCO over IEC 61131


The advantages of the ECCO programming language and the new ECCO operating
system are difficult to communicate. It stands in contrast to other control systems,
which, for historical reasons, have been developed in a different direction through
norming and the number and training of programmers.
The IEC-61131 programming language usually used by other control systems is a
state machine, derived over time from the now obsolete relay technology. The
application of relay technology had a powerful influence on the traditional training of
control system engineers and operators of industrial machinery.
Digital technology has been treated and thought about in the same way. Now
processors with programmable digital components have taken over almost all the
tasks of relay technology. Each processor processes its program lines in runtime. To
simulate a status machine, additional operating system tasks must be carried out in
the processor, which reduces its performance. Therefore, status machines work
more slowly.
The IEC 61131 state machine is simulated in the cycle of the processor program with
inputs being read-in first, then all programmed statuses of the inputs and outputs are
processed and, at the end of the cycle, the outputs are set.
In a complicated state machine, it is difficult even for experienced programmers to
remember the entire set of states of the inputs and outputs and to execute changes
to the program without affecting other states.

ECCO is a real time language, so the program is processed by each processor in


real time. The execution of tasks in a process is also performed in real time. This
corresponds to the human way of thinking, in which tasks are performed in
sequence.
In a state machine, a change in a complicated process means that all states must be
checked for potential effects, because all variables affect all other variables. In
ECCO, however, only a time segment is changed and has no effect on other time
segments which would have to be checked.

The difference can be seen by the example of a group of ten workers, performing a
task in collaboration. In a state machine, each individual step by each individual
worker would have to be defined and monitored, because each worker affects the
momentary state of the joint task.
In a sequenced process, each worker is given a task to perform independently and
mutual controls are restricted to the synchronization points between a few workers
and only at the end of the task, to the synchronization of the whole group.
That is why the state of individual tasks must be monitored at specific points in real
time. Not at all times however, as is the case in a state machine. This simplifies
thought processes and the simplifies changes to an existing program considerably .

10/26/05 – Ver.: 1.02 English ECCO Manual - 8/282 -


Horsch Elektronik AG

Experience has shown that an extension or change to a program in ECCO and the
checking of the effect on other program processes is significantly faster than in a
state machine, such as the IEC 61131 programming language.
The ECCO operating system works faster and is more adapted to human thought
patterns, and hence easier to understand than a state machine. The proof lies in the
flexibility, faster implementation of changes and thus significantly shorter start-up
times for challenging, complicated processes.

Consideration of programming, start-up and modification costs has allowed the


ECCO programming language to survive for more than 20 years, despite minimum
recognition and spread.

3. 2. Installation of ECCO
The actual installation of ECCO is extremely simple and takes only a few seconds. In
addition, however, some third-party software packages are required, whose
installation may take longer. This section shows all installation steps. It should be
noted that some programs are subject to licensing requirements and may only be
used in compliance with the license.

1. Install Windows 2000 or XP – ECCO may not run stably on other Windows
versions.
2. If a Beckhoff touch screen panel is installed, its driver must also be installed.
Any customer-specific modifications to the standard installation must also be
made.
3. Install the Profibus card. If a Hilscher card is used in conjunction with a pre-
installed Beckhoff industrial PC, the Profibus driver cannot simply be installed,
but first the pre-installed Beckhoff driver must be replaced by a driver from
Hilscher.
4. If a CP-Link card is used, it must be installed and TwinCat CP must also be
installed. The installation of TwinCat CP is self-explanatory.
5. Install SyCon Tool. The installation of SyCon is self-explanatory. Of course,
SyCon must be configured for the installation. Unfortunately, this does not
happen automatically.
6. Installation of Kithara runtime license through execution of ksetup.exe.
7. Execute the related program hdd32.exe. Only then will the ECCO license
dongle on the USB port be recognized automatically.
8. Create a directory for ECCO and copy all ECCO files, or the entire contents of
the .zip file into it.
9. Create links to the start menu and desktop.

With that, the actual installation of ECCO is completed. The configuration of ECCO is
explained in the next section. For the use of SyCon and other tools, refer to the
relevant documentation.

3. 3. Working with the terminal


The ECCO terminal imitates the earlier SMC42 panel. Thus, it is very easy for
experienced SMC42 users to switch to ECCO. Because ECCO is based on the Soft-

10/26/05 – Ver.: 1.02 English ECCO Manual - 9/282 -


Horsch Elektronik AG

SPS control system for Windows-based PCs, it is started like any other Windows
program.

1. Switch on the machine with the main switch on the switch box
2. Switch on the controller PC. Depending on the configuration, a password may
have to be entered.
3. Start the ECCO runtime environment ecco.exe.
4. The configurator appears.
5. Select the program in the “Load Program at Startup” field and start with the
“Start ECCO” button.
6. The selected program will now be started by the runtime environment. The
program returns a message selected by the programmer with the .TEXT
command.

The ECCO configurator


The configurator appears first when ECCO is started-up. If the control system has
been properly configured, the user needs only to click on “Start ECCO” to start the
control system.
The instructions in this section are a little more difficult and explain the advanced
configuration of ECCO. Anyone who is not interested can readily skip this section.

The first advanced setting concerns the


ability to skip the configurator, as is
required in the production environment,
so that the number can start fully
automatically. ECCO is called by
ecco -s <HEX file>
where the -s switch causes the skipping
of the configurator and the compiled
runtime program is entered in <HEX
file>.

On a call without the -s switch, the main


page of the configurator appears, as
shown to the side. Most elements are
inactive, because the user must first log
in before changes can be made.
Login is effected by the user clicking on
"User Login".
The “Login info” box contains details of
the last ending of ECCO, when and how
ECCO was ended and the user. ECCO
can show the status of the runtime
environment and power supply unit in the
“Engine Runtime status” and “UPS
Status” fields.

The main page for a logged in user looks


like the representation to the side. As
well as the ability to start ECCO with

10/26/05 – Ver.: 1.02 English ECCO Manual - 10/282 -


Horsch Elektronik AG

“Start ECCO”, or to shut down the program with “Cancel”, the user can select a
runtime program, start ECCO without a runtime program by deactivating “Load
program at startup”, log out and review and change the current settings).

The settings can be reviewed and changed, if necessary, using “ECCO Settings”.
The various possibilities are described below.

The settings are displayed in eight tabs,


the first of which establishes a link to the
auxiliary programs. Because the older
generation of control systems operated
exclusively through the serial port, this is
still supported by ECCO.
Most users waive this, however, and use
the first option, as selected in the
screenshot, to provide an interface to
auxiliary programs.
The “IP address for PC Services” selects
the IP address to be used.

“IDEX”, the second tab, serves only for


function as IDEX units are declared and
configured through .PRODIBUS_DEF.
The number in the “Max” field shows the
number of IDEX antenna connected.
Then comes the actual table with the
IDEX elements, where the fields have the
following meanings:

ID Profibus ID of the unit


Bd Number of the card in use
Ant Antenna on the unit
Nr The ECCO ID
IB The first input byte in the
reproduction
OB The first output byte in the
reproduction

The third tab is labeled “Engine Tracer”.


It provides the possibility to initialize the
register on start-up, to define the start-up
behavior of the runtime environment and
behavior on Profibus errors, to activate
support for and configure the tracer, to
define the time for periodic saving of the
buffered register, to affect event
recording, which makes offline analysis
easier and to input the number of system
cycles in a millisecond.

10/26/05 – Ver.: 1.02 English ECCO Manual - 11/282 -


Horsch Elektronik AG

The fourth tab, the first in the upper row,


allows configuration of the screen.
Typically, ECCO is operated as stand
alone application, running on its own
computer with its own screen. It is
however also possible to display the
runtime environment’s output on a
separate panel through any available
serial port or, through TCP/IP to a
separate computer, e.g. to administer
ECCO computers centrally.

The fifth tab is used for ZPoint and


StatREAD.
The term “gateway” comes from older
generations of control systems in which
the SMC control system communicated
through a special gateway card with the
ZPoint computer.
The “Gateway support” checkbox
activates the ZPoint connection. The
“Configuration file” button selects the
appropriate configuration file. The
“Activate/Deactivate STATISTIC support”
checkbox must be activated if statistical
software such as ZPoint or StatREAD will
be used.

The sixth tab is labeled “ECCO” and


serves to connect with external control
systems in order to create a network of
control systems.
The “Support ECCO <-> ECCO
communication” checkbox activates
support for the network. The other fields
are for the declaration of the IP Address
of the linked control systems.

The seventh tab, labeled “Slave and VI”


allows deactivation of support for slaves.
It also provides information on the slaves
that are connected.

PB Profibus ID of the terminal


ECC The number allocated in ECCO
BRD Number of the card in use
Slv The type of slave connected
Typ
COM Sequential COM number
Typ Parameters of the COM ports

10/26/05 – Ver.: 1.02 English ECCO Manual - 12/282 -


Horsch Elektronik AG

The eighth and final tab activate PAC


support and shows the following
information:

ID Profibus ID of the PAC


Brd Number of the card in use
PAC ECCO ID of the PAC

The elements of the terminal

The terminal consists of a display with light blue background on which the ECCO
programs and the runtime environment can write messages. The bottom two lines
are reserved for the runtime environment and are usually known as status lines.
The other elements represent keys with which the user operates the program. Some
keys carry an LED that indicate their status.

When active, the alternative function for each number key is selected. This
is documented for each key.
Selection for the input of numbers.
Indicates errors and emergency stops. On an emergency stop, an
acknowledgement must first be issued through the hardware, for example
by releasing the emergency stop button. An error is acknowledged by
pressing the “Fail” key which triggers the error reset sequence.

10/26/05 – Ver.: 1.02 English ECCO Manual - 13/282 -


Horsch Elektronik AG

Indicates when the current type of operation is “Manual operation”. The


key is used to switch to manual operation mode.
Indicates when the current type of operation is “Station operation”. The key
is used to switch to station operation mode.
Indicates when the current type of operation is “Automatic operation”. The
key is used to switch to automatic operation mode.
Starts the selected function, station or program.
Interrupts the program and enters diagnostic mode. Normal program
sequences are interrupted in order to indicate the inputs that are expected.
The program is continued with “Start”.
Terminates the ECCO monitor and the application program.
In diagnostic mode, shows the first condition expected.
In selection mode for station, function and flag, etc. leaves selection mode.
In diagnostic mode, shows the next condition.
Lights when an input, output or flag is selected and is H. Pressing the key
sets the selected element H.
Lights when an input, output or flag is selected and is L. Pressing the key
sets the selected element L.
Number 0. If “Shift” is active, a timer is selected.
Number 1. If “Shift” is active, an input is selected.
Number 2. If “Shift” is active, an output is selected.
Number 3. If “Shift” is active, a flag is selected.
Number 4. If “Shift” is active, an error flag is selected. If the error flag is set
H, the relevant error handler is executed. Can also be used to lower raised
error flags.
Number 5. If “Shift” is active, a function is selected. The number keys can
be used as well as the arrow keys.
Number 6.
Number 7.
Number 8.
Number 9.
Decimal point as used in NUM_INP queries, for example. If “Shift” is active,
a counter is selected.
Sign selection as used in NUM_INP queries, for example.
Deletes the input, including shift selection and all numbers that have been
input.
This can be used to declare the program invalid on a system error.
Confirms the input.
Arrow keys for navigating function selection or between PSL pages.
Represents those key switches whose functions can be freely
programmed by the programmer.

How the individual keys are used in the different types of operation is explained in the
next section.

10/26/05 – Ver.: 1.02 English ECCO Manual - 14/282 -


Horsch Elektronik AG

3. 4. Operation modes and status


One great advantage of ECCO compared to other control systems are its operation
modes. These greatly simplify the set-up, testing, start-up and modification of
complicated procedures
The difference between an operational state and an operation mode is simple: the
controller is in a state that affects its behavior. The user can select certain
operational states which are then known as operation modes.
ECCO recognizes eight operational states: norming, manual, station and automatic
operation mode, function mode, fail, emergency stop and system fail. The user can
select four of these states directly. They are the function mode, manual, station and
automatic operation mode.
The individual operational states are shown graphically in Appendix 5. 1 “State
diagram”. The appendix also details the state transitions, or how to switch from one
state to another.

Manual operation
Individual elements and functions can be selected directly by the user in manual
operation mode. Thus, individual outputs can be switched in order to calibrate the
machine mechanically. This simplifies start-up greatly, as it can be done at a time
when the programming itself has not been completed
Setting inputs, outputs, flags and error flags is performed as described in section on
terminal keys by pressing and then , , or . Function mode
can be selected with .

Station operation
In station operation mode, a single station is started independently to the others. In
this operation mode, the key is pressed and the number of the station input
either as a number or using the arrow keys. The selection can be changed with
or confirmed with the key. Finally, the station is started with . The
procedure can be interrupted with the key and ECCO can be debugged
directly at the terminal. For further details, see below.

Automatic operation
Automatic operation mode is the actual production mode. In it, the procedures and
processes required for automation are carried out automatically. Automatic operation
mode is started by pressing the key in manual mode and then the key.
The procedure can be interrupted with the key and ECCO can be debugged
directly at the terminal, or a switch to function mode can be made. For further details,
see below. It is strongly recommended, however, not to make use of this possibility
during production.

10/26/05 – Ver.: 1.02 English ECCO Manual - 15/282 -


Horsch Elektronik AG

Norming
The norming sequence is carried out on starting up the machine in order to normalize
and initialize the control system and all elements of the machine The machine is
ready in manual mode only on completion of the sequence.
The background task and hot task are started at the same time as the Norming
sequence.
The procedure can be interrupted with the key and ECCO can be debugged
directly at the terminal. For further details, see below. It is strongly recommended,
however, not to make use of this possibility during production, as the machine is then
no longer in a properly defined state.

Fail
If a fail condition (programmed by the user) occurs in automatic or station operation,
the program is interrupted, the lights and “SYSTEM FAIL” appears on the
display, together with the number of the element that triggered the error
The error is acknowledged by the user by pressing the key, which starts the
error reset routine. If this fails, ECCO quits the program and switches to manual
mode.

Emergency stop
In contrast to fail, emergency stop is active in all operation modes. Normally a
physical emergency stop circuit acts as input to the software condition which itself
protects the machine.
The conditions for a software emergency stop can be selected freely by the
programmer. If any one condition is satisfied, all tasks except background tasks are
interrupted and the emergency stop sequence started. This can be freely selected by
the programmer but normally sets all outputs low.
After completion of the emergency stop sequence, “Emergency Stop” appears on the
display, together with the number of the element that triggered the emergency stop
and the key lights.
After the emergency stop switch has been reset, and the emergency stop condition
remedied, the emergency stop is acknowledged with the key and the
emergency stop reset sequence starts. Unless programmed otherwise, ECCO then
switches to manual mode.

System errors
System errors are either “common” and can be remedied by the user so that the
program can continue, or “fatal” which means that ECCO declares the program
invalid and a new program must be loaded
A more detailed description of system errors can be found in Appendix 5. 6 “System
errors”.

Function mode
Functions not requiring a parameter can be selected in function mode. With
, the user can switch to function mode where the required function can be
selected either directly with number keys (e.g. for function numbered 1.2 the keys

10/26/05 – Ver.: 1.02 English ECCO Manual - 16/282 -


Horsch Elektronik AG

) or using the arrow keys. The text that describes the function in the
current language is displayed in order to be able to select it more easily. The function
is then started with .
Function mode serves to test parameterless functions, to call function with
parameters through encapsulating functions and to provide the user with certain
start-up functionality.
The change to function mode can be made in manual, station and automatic
operation modes at any time, although in station and automatic operation, the
program running must first be interrupted with .

Debugging with the terminal


ECCO is exceptionally suitable for rapid prototyping and evolutional programming,
This is particularly so because it is easy in ECCO to locate mechanical, electrical or
logical errors and the programmer has various supportive tools. The terminal itself is
a simple but extremely useful tool whose possibilities are described briefly below.
Application programs can be interrupted at will with . Background tasks
continue, however so that safety and supervision functions remain operational. The
“PROGRAM STOPPED” message appears and a switch is made to diagnostic mode.
The and keys light. The program is scrapped by pressing the
key and cannot be continued.
Switches between different conditions that the program is waiting for are made with
and : switches to the next condition and returns to the
first condition. If the last condition has been reached with , no further
conditions are displayed.
The program is continued with .

Starting-up after a crash


In order to restart ECCO successfully after, say, a system crash without running the
risk of triggering consequential errors, overwriting registers or endangering the
integrity of connected machines, the following steps must be taken:
1. Start PC and ECCO configurator.
2. Close the configurator as soon as it opens.
3. Start the ECCO configurator again, and the application program with “Start
ECCO”.
4. It may be that a message about an inconsistent tracer file appears. The
message can be acknowledged. The ECCO application program will now start
normally.

In order to reduce the risk of crashes and to minimize the risk of inconsistent data,
the computer used should always powered through a UPS, the operating system
should always be the latest edition, including service packs and patches and ECCO
should never be crashed deliberately. So always shut down ECCO with the shut
down function. This will not only ensure correct saving of data, but it will also ensure
that machine and field bus hardware is correctly shut down, which, in particular,
protects Profibus Master cards against incorrect configurations.

10/26/05 – Ver.: 1.02 English ECCO Manual - 17/282 -


Horsch Elektronik AG

3. 5. The programming environment


The ECCO environment was described in the preceding section, as far as it concerns
the machine user. The following sections are concerned with various aspects of
programming in ECCO. This section, therefore, serves as a link and covers the
programming environment and the tools required for programming.
Tools for the configuration of individual elements, such as PacTest for the PAC, are
described in their relevant manuals.

UltraEdit
UltraEdit is a versatile, high performance editor supported by ECCO. UltraEdit is
marketed by IDM Computer Solutions. For further information see [10].

Compiler
As every compiler, the ECCO compiler is console-based and its precise functioning
can be defined by a series of switches. The syntax used is:
eccocmp.exe <File> <Switch>
with meanings:
<File> The file to be compiled. Optional for some switches.
<Switch> Optional switches that define the precise function.

Switches available are:


-debug Generates a file required by the debugger. So if the debugger is
to be used, this switch must be used.
-edit Writes all the error messages from the compiler procedure into
a file named hderr.err. The switch is only available for
reasons of compatibility.
-help If <File> is not entered, a list of all commands and instructions
is generated. If <File> is not entered, the relevant help will be
output for every compiler error.
-io Checks that the program is not using any inputs, outputs, flags
or error flags not declared in .IO_TEXT. Error reports with the
number of the incorrect line are generated for undefined
elements.
-lang<x> Selects the language in <x> for ZPoint. <x> may be 1,2 or 3.
-list Generates a file in which source and target codes are shown
together. Serves only for functional checks of the compiler by
Horsch Elektronik AG.
-map Generates a file named <File>.map listing all global and local
labels.
-phelp Like –help but waits for an action by the user, such as
pressing a key, after every output.
-reg Checks that all global registers are declared in .IO_TEXT as
comments, similar to -io.
-ultra Is required if the compiler is called integrally from UltraEdit32.
Error reports are adapted for UltraEdit32.

10/26/05 – Ver.: 1.02 English ECCO Manual - 18/282 -


Horsch Elektronik AG

Lo
oaader
During software development and testing, several improved versions of a program
must often be loaded over a short period. Instead of stopping and restarting ECCO
each time, the new program can be loaded by ECCO in manual mode or emergency
stop. Various switches make it possible to configure the loader in the command line
so that the loading procedure is executed automatically.

The call is:


eccoload <File> <Switch>
where <File> is the file to be loaded, with path if necessary. Switches available are:

-B<b>,<p>,<d>, Details of the port configuration for loading through a serial port.
<s> The entry -B19200,n,8,1 means 19,200 baud rate, no parity
bits, eight data and one stop bit.
-C<p> Indicates serial port <p> for loading through a serial port. The
switch -C2 means that COM2 on the PC will be used.
-P40 –S7 Must always be entered precisely in this way for serial ports.
Provided for reasons of compatibility but has no function in
ECCO.
-E<i> IP address <i> to which the program will be loaded.

The loader provides an interactive


interface in which all options can also be
selected through the graphic interface. If
the loader is called with no options, the
warning at the side appears first. It
means that the loading procedure cannot
be executed automatically because
certain parameters are missing. This is
to be expected with manual input.

The actual loading screen is shown to


the side. In addition to the selection of
the link, the only other selection is
whether information should be displayed
after successful loading. This is selected
in the “Info after download” box.

More advanced settings are made in the


“Settings” dialog. Here, the configuration
of the serial port can be entered as well
as the IP address when loading over a
TCP/IP network. Third, the file to be
loaded can be entered at the bottom.

If “Download” is selected on the loading


screen, the loader loads the program
over the connection entered in the
controller PC. A blue bar indicates
progress. If loading information is

10/26/05 – Ver.: 1.02 English ECCO Manual - 19/282 -


Horsch Elektronik AG

required, this will be displayed at the end of the load, as shown on the right.

Debugger
The debugger is almost an all-purpose tool to debug programs and monitor
operations. As the debugger is feature-rich and has many high performance
components, it has been the subject of separate documentation [8].

3. 6. A minimal program
The program lines in this section represent the minimum structure required for a valid
ECCO program. These declarations and labels are used and are described in more
detail on the pages indicated:

42 .ADDRESS
45 .CODE_OFF
48 .END
56 .LIMITS
59 .MAX_ECCO
60 .OWN_ECCO
65 .PROJECT
71 .SETLABEL
82 .TEXT
242 BACKPGM
246 HPPGM
247 NRMPGM
248 NSPGM
249 NSRESP
250 STPGM
251 STRESP

The minimal ECCO program:


.CODE_OFF 0
.PROJECT 1001 ; selectable project number
.MAX_ECCO 1
.OWN_ECCO 1

.LIMITS ECCO1, I1001-1008 ; control system and inputs


O1001-1008, ; outputs
F1001-1056, ; flags
D1001-1008, , error flags
T1, ; global timer
X1, ; function: lines
Y1, ; function: columns
Z1, ; time values
S1, ; stations
W1, ; display routines
J1, ; strings
P1 ; function procedures

10/26/05 – Ver.: 1.02 English ECCO Manual - 20/282 -


Horsch Elektronik AG

.ADDRESS 0
NULL:
.TEXT “ECCO Minimal Program Version 1.00”

.ADDRESS 2

.ADDRESS 26
.SETLABEL STRESP
.SETLABEL NSRESP
.SETLABEL NRMPGM
.SETLABEL STPGM
.SETLABEL NSPGM
.SETLABEL NULL
.SETLABEL NULL
.SETLABEL NULL
.SETLABEL NULL
.SETLABEL HPPGM
.SETLABEL BACKPGM

.ADDRESS 1210

BACKPGM: ; background program


CLOSE
NSRESP: ; em-stop restart program
CLOSE
STRESP: ; fail restart program
CLOSE
STPGM: ; fail program
CLOSE
NSPGM: ; emergency stop program
CLOSE
NRMPGM: ; norming program
CLOSE
HPPGM: ; main program
CLOSE

.END ; always last program line

Every ECCO program must contain at least these elements.

Let us look at the individual elements and blocks:


The first statement is an offset for relocation and, in ECCO, must always be 0.
ECCO's predecessor used different values here, so the argument must be changed
on porting.
Then follow details of the customer's project number of the program and the number
of linked control systems and the address of the control system within the network.
Because the specified program does not interact with other ECCO systems,
MAX_ECCO and OWN_ECCO are both 1.
How control systems are linked together, which values are then to be used and what
must be given attention is described in detail in section 3. 14 "ECCO
intercommunication".

10/26/05 – Ver.: 1.02 English ECCO Manual - 21/282 -


Horsch Elektronik AG

Various limits are given in the .LIMITS block which allow the compiler to optimize
the translation process and resulting program.
Then comes the first of four .ADDRESS declarations. These tell the compiler how the
program is ordered and must always be used as shown. It should be noted that other
address values had to be given in earlier versions and these must be adapted when
porting programs.
The .TEXT declaration is used to provide the text to be displayed when the program
is started. The text usually includes a version number so that the user can ensure
that the latest version of the program has been loaded.

The rest of the program consists of two lines that are almost the same size in the
minimal program: first labels are declared and then their functionality programmed.
The declarations allow individual labels to be given other names. This is however not
recommended, as such programs are difficult to understand. The eleven .SETLABEL
instructions should always be copied verbatim.
The functionality of the functions in the minimal program is obviously at a minimum.
In normal programs, this is where the work starts.

3. 7. Functions, tasks and procedures


This section explains how the task of the ECCO programmer can be broken down
into many smaller parts and what aids ECCO provides. This relates to large
programming blocks, and not to the programming of individual devices or commands.

Functions
As any modern programming language, ECCO incorporates functions. A function is a
related program block that solves a certain problem.
Specifically, functions can be given parameters in ECCO, so that solutions can be
made general and re-usable. Functions are started from program tasks, about which
more later, with CALLF and ended with the RETF instruction. They can be nested so
that one function can call another.
Functions must be defined in the .FUNCTIONS block. The definition consists of the
position (as lines and columns) where it can be called from the terminal, the number
of arguments and a text to describe the function.
The arguments are copied, as described below, the function started and the calling
task deactivated with the CALLF command. As soon as the function ends, i.e. when
it meets RETF, the arguments are copied back, unless they were constants in the
task making the call, and the task making the call is continued after CALLF. The task
making the call can be a normal program task or function, but not a background task.
If a parameterless function is started from the display, up to four functions can be
nested within each other. Opposite to this, in a running program, an unlimited number
of functions can be nested, but each function needs to have a free task (which
however are limited). Thus, the nesting of function is limited only by the number of
tasks available.
The CALLF command seems at first sight to be somewhat cumbersome, but it does
open up great opportunities:
CALLF #<Label>, I<Offset>, O<Offset>, F<Offset>,
D<Offset>, <Arg> [, <Arg>]

10/26/05 – Ver.: 1.02 English ECCO Manual - 22/282 -


Horsch Elektronik AG

Inputs, outputs, flags and error flags can be moved with the offset fields into the
L_INP, L_OUTP and L_JMPCOND commands and thus parameterized. Then follow
the 32-bit arguments and then the 16-bit arguments, both in accordance with the
function declaration. The arguments are copied into a local register, so the function
task has up to 32 LV and up to 32 LW registers.
ECCO provides the unusual but extremely helpful possibility of starting
parameterless function direct from the terminal. Thus, for example, function can be
tested directly, or calibration or start-up routines can be started manually packed into
function.

Tasks
SPS control systems generally, and ECCO in particular should not only handle one
task at a time, but several. The solution lies in the use of tasks. A task is a program
chain or a series of instructions that is processed in sequence. As several tasks are
active simultaneously, the desired parallelism can be achieved.
Only five commands are required for the use and administration of tasks:
101 CLOSE
164 OPEN
217 TASK_KILL
218 TASK_OPEN
219 TASK_STEP

A new task is opened with the OPEN or TASK_OPEN commands. A background task
can only open background tasks, a program task only program tasks. The calling
task is not interrupted, and both the calling task and the called task work in parallel
simultaneously.
A task can close itself with the CLOSE command. The possibilities for manipulating
tasks have been greatly expanded in ECCO compared to SMC42. As already
mentioned, tasks can also be opened with TASK_OPEN, a task can end another with
TASK_KILL and the speed of execution can be slowed with TASK_STEP.
The synchronization of tasks in ECCO is performed by mutexes in EXCL command.
In most cases, this is not necessary as all write and calculation operations are atomic
and access to the terminal is self-synchronized through elegant exclusion rules just
like error flags. More on this in section 3. 11 "Displays and user input". These
exclusion rules are usually referred to as task group priority. The precise priority
diagram is reproduced in Appendix 5. 2 "Priority".

Labels
ECCO uses jump labels, to allow branching and jumps. The start of each function
block, such as a function, a task or an error flag, has a label acting as starting point.
Labels can, of course, be used within a program block in order to branch within the
block or to branch execution of the block to a later point.
These labels are global, meaning that they are visible and reachable from any point
in the program. But that is not always desired. A label should be visible only within
the program block so that the same label name can be used more than once, which
is necessary especially in some larger programs. ECCO supports local labels with
the .LOCAL instruction.
The list below provides an overview of labels and their use.

10/26/05 – Ver.: 1.02 English ECCO Manual - 23/282 -


Horsch Elektronik AG

BACKPGM Mandatory labels. They are indicated by .SETLABEL and are


ERROR_PROTOTYPE described in detail in section 4. 4 "Labels".
HOT_TASK/HOT_END These labels declare the starting point for standard
HPPGM functionality such as program operation, background task or
NRMPGM the handling of emergency stops and fails.
NSPGM
NSRESP
PROG_BEG
STPGM
STRESP
@<Label> All labels beginning with the @ character are display tasks.
#<Label> All labels beginning with the # character indicate the start of
a function task.
&<Label> All labels beginning with the & character are error handlers,
i.e. tasks which are executed when the associated error flag
is raised.
$<Label> All labels that begin with the $ character are local labels and
only visible between two consecutive .LOCAL instructions.

3. 8. Registers and flags


Registers are areas of memory for storage of numbers and strings. In contrast, flags
and related constructs such as inputs, outputs and error flags, are binary values with
exactly the two possible states L und H.
As strings are described in the next section, only registers for numerical values will
be treated in this section.
Registers, like flags, can be affected by the logical operators AND, NOT, OR und XOR.
For registers, the outcome is the bitwise operation on the input registers.

Numerical registers
There are various types of registers differentiated by their range, use and length:

AV Array composed of 16-bit elements. Up to 256 arrays, each of up to 32767


elements. Must be defined in the .ARRAYS block.
AW Array composed of 32-bit elements. Up to 256 arrays, each of up to 32767
elements. Must be defined in the .ARRAYS block.
C Counter. The use of counters in new programs is not recommended. Internal
length of 16 bits.
FW Floating point constant. A normal constant which pushes the decimal point
four places to the left. Is defined in .SET_CONST and used in connection with
slaves and the PAC.
KV 16-bit constant. Up to 512 KV constants are allowed which must be defined in
the .SET_CONST block.
KW 32-bit constant. Up to 512 KW constants are allowed which must be defined in
the .SET_CONST block.
LV Local 16-bit register of a display routine or a function. Up to 32 local registers
allowed, the precise number depending on the declaration of the display
routine or function.
LW Local 32-bit register of a display routine or a function. Up to 32 local registers

10/26/05 – Ver.: 1.02 English ECCO Manual - 24/282 -


Horsch Elektronik AG

allowed, the precise number depending on the declaration of the display


routine or function.
RV Global 16-bit register. The number depends on .LIMITS but 32767 at the
most.
RW Global 32-bit register. The number is declared in .LIMITS but 32767 at the
most.
SR Variable strings. The number is defined in .LIMITS but 4096 at the most.
ST Constant string in a local language. Up to 2048 strings allowed for each
language.
SW System register. The precise meaning of each register can be found in
Appendix 5. 4 "System registers".
T Global timer. Up to 255 allowed with the upper limit set in .LIMITS.
ZW Time value The number depends on .LIMITS but 49 at the most.

Indirect addressing
When a value is stored in a register, this is usually already defined in the compiling.
This definition is known as direct addressing as the register address is given directly.
One example is RV001, which gives the first RV register.
Indirect addressing, in contrast, allows the address to be defined runtime. Other
names are reference or pointer. The purpose, in any case, is to store the address of
a value in its own register. This allows the implementation of extremely high
performance algorithms, although programs tend towards illegibility with indirect
addressing. One example is RV(RV002). The value of RV002 must be known in
order to know the precise register. If RV002 has a value 1, but this might be altered
at runtime, indirect addressing picks up the value RV001. Certainly less easy to read
than direct addressing, and thus more susceptible to errors, but because RV002 can
be altered at runtime, type switches, for example, can be made very easily.
Specifically, RV, RW, LV, LW, SW and SR registers allow for indirect addressing. The
address register is set in round brackets with the register type, as in RW(LV001).

Arrays
Arrays are groups of related numerical elements. For example, the status of a
structure could be described in 20 words. Instead of using 20 RW registers, an AW
array with 20 elements could also be used. The advantage of the latter method is
that values are more clearly grouped and the program is therefore more legible.
Furthermore, arrays can be copied as a whole and the status in the example stored
very easily.
A whole array is described like a register, so AV001 is the first array with 16-bit
elements and AW001 the first array with 32-bit elements. In order to pick up a single
element in an array, its position, the index, is given in round brackets. Thus
AV001(002) is the second element with 16-bit length in the array AV001. In arrays,
the round brackets are not, indirect addressing, but refer to the element in the array,
which can, however, be given indirectly.

Declaration of registers
As a rule, registers do not have to be declared but many ECCO add-on programs
allow additional information, such as the meaning or function of a register to be
output if the register has first been declared as a comment in the .IO_TEXT block.

10/26/05 – Ver.: 1.02 English ECCO Manual - 25/282 -


Horsch Elektronik AG

Further information can be found in the explanation of the .IO_TEXT block from
page 53.

Flag variants – inputs, outputs, flags and error flags


There are four variations of flags, E or I for inputs, A or O for outputs, F or M for
ordinary flags and D for error flags. The OUTP command is used to set them,
although this is not allowed for inputs, of course. So, by using
OUTP M100 H, A100 L
the flag M100 is set high and the output A100 low.
If flags or error flags are declared, the NSDEF and STDEF conditions must be entered.

Error flags are a useful specialty in ECCO. Error flags are flags, or 1-bit memories
with possible states L and H, with an associated handler function. If an error flag is
set, the ECCO runtime environment will start the relevant handler. ECCO’s priority
model guarantees the necessary exclusivity. Specifically, this means:

1. If an error task is already active, the new task will be delayed until the old one
has finished. So only one error task is active at a time.
2. An error task will only be interrupted by an emergency stop. So in normal
operation, lack of interruption is guaranteed.
3. At the start of an error task, any display task being executed will be interrupted
and restarted from the beginning when the error task has completed.
4. If no display task is being executed at the start of an error task, the active PLS
page will be frozen, meaning that it is interrupted and restarted from the
beginning when the error task has completed.
5. The error task runs parallel to other tasks and background tasks.
6. The error flag stays risen until completion of the error task. It is lowered on
ending. A task can thus wait for completion of the error task by checking the
error flag with INP.
7. If an error task calls another, the second one will be executed when the first
one has been completed.
8. The error task closes with RETE. The restorations described above are then
undertaken.

Error flags are declared in the .IO_TEXT block. The label for the associated error
handler is given there.

3. 9. Working with strings


Strings are just that: objects in which text can be used simply and conveniently.
ECCO supports the following string operations:
53 .IO_TEXT / .END_IO_TEXT
79 .STRING_REG / .END_STRING_REG
80 .STRINGS / .END_STRINGS
156 LEN_STR
157 MID_STR
188 SEND_SR
189 SET_LANG
195 SLV_RCV_STR

10/26/05 – Ver.: 1.02 English ECCO Manual - 26/282 -


Horsch Elektronik AG

196 SLV_SND_STR
197 SMOV
204 STR_ADD
205 STR_ADD_ASCII
207 STR_ADD_NR
208 STR_TO_ASCII
209 STR_TREAT
210 STR_VAL

Of course, all display commands, such as WRITE support strings.

There are constant strings in ECCO that cannot be altered at runtime and either
given directly in the instructions with quotes or contained in an ST register. In
contrast, variable strings, which are always stored in an SR register can be altered at
runtime, for example, to make multi-language displays or complex outputs easier.
Constant strings are defined language specific in the .STRINGS block. In the
following example, two constant strings are used which are also used in other
examples in this section.
.STRINGS ENG
ST001 = “Hello ”
ST002 = “World”
.END_STRINGS
Variable strings used to output a date, a time or a register must be declared. This
allows a sort of type check to be performed for the output function. Another example:
.STRING_REG
SR100-109=D ; 10 variable date strings
SR110-119=T ; 10 variable time strings
SR120-129=R ; 10 var. register strings
.END_STRING_REG

As their name suggests, variable strings can be altered. On the one hand, messages
can be exchanged with slaves or other control systems, on the other, new text can be
recorded at runtime. In contrast to constant strings, they can be addressed indirectly.
The exchange of strings with the SEND_SR, SLV_RCV_STR and SLV_SND_STR
commands is described in detail in section 3. 14 "ECCO intercommunication".

Recording the user's own strings is very easy in ECCO and is explained below.
Other strings, text limited by quotes, or the descriptive text of an input, output, flag or
error flag can be allocated with the SMOV command. The descriptive texts have been
defined previously in the .IO_TEXT block. Multiple languages are also supported,
as described in section 3. 13 "Internationalization".
New elements can be added to existing text with the STR_ADD, STR_ADD_ASCII
and STR_ADD_NR commands. These commands can best be illustrated with an
example:
MOV RV001, 69 ; ASCII character ‘E’
SMOV SR001, “” ; delete SR001
STR_ADD SR001, “Signal ” ; text now “Signal ”
STR_ADD_ASCII SR001, RV001 ; text now “Signal E”
STR_ADD_NR SR001, 3, RV001 ; text now “Signal E069”
STR_ADD SR001, “-2.” ; text now “Signal E069-2.”

10/26/05 – Ver.: 1.02 English ECCO Manual - 27/282 -


Horsch Elektronik AG

The middle argument of the STR_ADD_NR instruction indicates the number of places.
The character set table of the STR_ADD_ASCII command can be found following
page 205.

Read-in strings can be analyzed and broken down using the LEN_STR, MID_STR,
STR_TO_ASCII and STR_VAL commands. LEN_STR returns the string’s length, i.e.
the number of characters in the string. A single ASCII character can be extracted
using STR_TO_ASCII, while STR_VAL attempts to read-in a number from the
beginning of the string. MID_STR returns a part of the original string. This can be
used to extract text to be displayed from a message received, for example.

3. 10. Inputs and outputs


ECCO is a control system for larger and largest automatic assembly lines, so its
prime and most basic functionality is the reading and setting of inputs and outputs.
Inputs and outputs have already been mentioned briefly in section 3. 8 “Registers
and flags” and this section will deal with them in more detail and show how inputs
and outputs are read and written.

The same commands can be used to read, edit and write ordinary flags, error flags,
inputs and outputs. Depending on the precise type, different outcomes will be
produced, so only when writing to an output an output will be actually written and, for
example, a valve opened.
The OUTP command sets flag variants. Of course, this does not apply to inputs as
there is a sensor or other external component which generates a logical value. If an
error flag is raised, the relevant error handler will start and the flag will be lowered
when it has ended.

The INP command is used if the program should be delayed until all given flags have
reached their given level. The programmer must take care that the conditions will in
fact be satisfied sometimes or the program will be blocked. This blocks
INP E100 H, E100 L
because an input can never be set and cleared at the same time.
If a program shall not delay, but branch depending on the logical state, the JMPCOND
command can be used. The instruction
JMPCOND E100 H, element100H
branches the local label element100H only if the input is set high. Otherwise, when
the input is set low, the program skips and goes on to the next line.
The normal INP command can be monitored by the TINP command, so that, after a
certain time (to be freely selected by the programmer), an error routine is triggered
that, for example, tells the user why the machine is standing still.

ECCO supports Profibus which means that inputs and outputs can be selected by
ECCO through Profibus. The information required by ECCO is taken from the
.PROFIBUS_DEF block. Thus the ECCO program contains a central location for
configuration of the bus and the individual components.
The Profibus is activated with the BUS_ON command and deactivated with the
BUS_OFF command. The ECCO license dongle is checked each time to ensure the
rights to use Profibus have been granted.

10/26/05 – Ver.: 1.02 English ECCO Manual - 28/282 -


Horsch Elektronik AG

The use of Profibus master cards with watchdog function is recommended, such as
those from Hilscher so that safe stopping of the machine is guaranteed on a crash of
ECCO or the operating system.

3. 11. Displays and user input


The following commands can be used for black-and-white output on the display:
107 DATEDISP
125 HP_DATEDISP
131 HP_REGDISP
132 HP_TIMEDISP
133 HP_WRITE
175 REGDISP
217 TIMEDISP
238 WRITE

There are also a whole series of commands for color output on the display:
100 CDATEDISP
107 CREGDISP
108 CTIMEDISP
109 CWRITE
122 HP_CDATEDISP
125 HP_CREGDISP
127 HP_CTIMEDISP
129 HP_CWRITE

There is also one command for input from the display. It is:
163 NUM_INP

Finally, the screen, or parts of it, can be deleted with the following commands:
103 CLS
104 CLS_WIN
124 HP_CLS_WIN

At first glance, this appears to be an impenetrable mass of commands. With twenty


commands concerned only with the display, how can the programmer keep an
overview?
But the matter is not as difficult as it appears. The simple fact is that there are only
four output commands, each with four variants.
The four commands are:
DATEDISP Display a date REGDISP Display a register
TIMEDISP Display a time WRITE Write a string
The four variants, denoted by a prefix to the command, are:
low priority black/white C low priority color
HP_ high priority black/white HP_C high priority color
Now the 16 output commands can be taken apart and analyzed easily. Thus, for
example, the HP_CWRITE command means “Write a string on the display with high
priority and in color”.

10/26/05 – Ver.: 1.02 English ECCO Manual - 29/282 -


Horsch Elektronik AG

To understand why high priority output commands must be used, ECCO’s priority
model must be considered. These will be examined in detail in section 5. 2 “Priority”.
Here, only the points relevant for displaying will be treated.
In principle and usually, several tasks run simultaneously in ECCO, independently of
each other. Because there is only one display, however, this represents a shared
resource and the various tasks cannot access it at will, but must communicate with
each other through synchronization. This is largely handled by the ECCO runtime
environment and the programmer must simply use the functions available in a correct
way.
Because only one task should access the display at a time, there are several special
tasks for display access, of which only one is active at any precise moment and thus
may access the display.
Several PSL tasks may be programmed of which only one is active at a time. A PSL
task serves to display process information and the user can select which the
information displayed in detail. We talk about PSL pages, therefore. The selected
PSL task is only active if no display or error task is active.
Display tasks have a higher priority than PSL tasks and serve primarily to request
values and settings from the machine operator. Only one display task can be active
at a time. Normal program tasks can call display tasks and the ECCO runtime
environment provides the necessary synchronization. If an error or other display task
is active at the time of the call, its execution will be delayed until they are no longer
active. Otherwise the display task can begin and the currently active PSL page will
be interrupted. At the end of the display task, the PSL task will be processed again
from its beginning.
Error tasks, which, as the name indicates, handle errors, have even higher priority.
As for the display task, only one error task may be active at a time. An active error
task interrupts the display and PSL tasks and causes them to restart when finished.
These rules ensure a comprehensive and well-defined screen structure which is
implemented by the lower priority display commands. But there are situations where
the programmer wants to deviate from the rules: in such a case, he may use the high
priority output commands, which will always be displayed.

PSL pages are entered with <row>.<column> which makes it possible for the user
to navigate between PSL pages with the arrow keys. Page 0.0 has a special function:
this page is always activated on start-up if no arrow key has yet been pressed. More
details can be found in the explanation of .PSL / .END_PSL.

The command can also be used in error and normal program tasks as well as display
tasks, but this is not recommended as the programs will become illegible. Requesting
values should be reserved for display tasks.

3. 12. Flow control


A typical program should not only do something, it must primarily be able to react to
its environment. As in most programming languages, this is also implemented in
ECCO through flow control, commands that determine which command will be
executed next; through conditions, deterministic loops and supervision.
In this section, the commands for structured and unstructured conditions and loops
will be listed first. This has been kept brief deliberately, on the one hand because
every programmer already knows the concept which needs no further explanation,

10/26/05 – Ver.: 1.02 English ECCO Manual - 30/282 -


Horsch Elektronik AG

therefore, and on the other, because the commands are explained in detail in the
reference section.
Supervision will be explained in more detail, as this concept is less well known.

Structured conditions
A structured condition is a condition used in structured programming. It is
distinguished by the fact that no label need be used as the blocks that are selected
by the condition are limited by the structured command. ECCO has fife commands
for structured conditions:

111 DO / DO_WHILE / DO_WHILENOT


140 IF / IFNOT / ELSE / END_IF
155 L_SWITCH / CASE / DEFAULT / END_SWITCH
216 SWITCH / CASE / DEFAULT / END_SWITCH
235 WHILE / WHILENOT / END_WHILE

Unstructured conditions and jump commands


As well as commands for structured programming, ECCO also allows the somewhat
old-fashioned unstructured condition instructions. Using these, the programmer must
make the structure of the program clear through the use of labels. These can be
seen, therefore, as jump commands where the jump will be executed if the condition
is satisfied. That is why the usual “condition free” jump command is listed here.

145 JMPCOND
146 JMPTIM
147 JPBIT
148 JPEQ
149 JPGT
150 JPLT
151 JUMP
153 L_JMPCOND

Supervision
Supervision is a concept found in only a few programming languages. That is why it
is explained here in more detail.
Often it must be ensured that a number of program lines (representing a logical
functionality) are monitored, or interrupted when a certain condition is met. In most
programming languages each command must be monitored individually, which
represents a considerable effort and which the resulting program illegible. Because
ECCO provides explicit commands for supervision, this is easily implemented.
A simple example shall demonstrate the advantages: three cylinders must be
switched on in sequence in order to transport a work piece. So far, so good. But if a
malfunction of the pneumatic supply occurs at any time, the movement must stop
and be handled in a specific manner. If one path is blocked, it must be handled
differently. If the transportation takes too long, a third handling method is required.
Obviously, this is no longer so simple. In order to limit the programming effort and to
ensure that the program structure remains transparent ECCO provides two
commands for just such cases:

10/26/05 – Ver.: 1.02 English ECCO Manual - 31/282 -


Horsch Elektronik AG

105 COND_TRAP / IF_COND / END_COND_TRAP


221 TINP

In addition, obsolete and lower-performance commands continue to be supported,


but these should no longer be used in new programs.

3. 13. Internationalization
ECCO control systems are delivered all over the world – with the possible exception
of the Antarctic. So the requirement to support different languages is particularly
important. This is achieved very simply in ECCO as strings can be programmed
language specific and switching between languages can be made anytime during
operation. This section explains how internationalization is implemented and where
the programmer must pay attention to.

To generate an SPS program in several languages, the following declarations must


first be internationalized:
51 .FUNCTIONS / .FUNC_END
53 .IO_TEXT / .END_IO_TEXT
55 .LANGUAGES
74 .STATIONS / STATION / .END_STATIONS
75 .STATISTIC / GROUP / .END_STATISTIC
78 .STOP_IO_TEXT
80 .STRINGS / .END_STRINS
86 .ZPOINT / ANLAGE / RACK / .END_ZPOINT

First, the language used must be defined in the .LANGUAGES declaration. Other
declarations are, as usual, not essential but if they are used, there must be a
declaration block for each language. The language for the rest of the program is
given in the header, for example:
.LANGUAGES GER, ENG

.STRINGS GER
ST001 = “Dies ist eine Zeichenkette”
ST002 = “Mehr Text”
.END_STRINGS

.STRINGS ENG
ST001 = “This is a string”
ST002 = “Additional text”
.END_STRINGS

The selected language can be changed with the SET_LANG instruction.


189 SET_LANG

For internationalization purposes, the program must take care not to output any direct
strings, those limited by quotes, as these cannot be translated, of course. So
constant or dynamic strings should be used for all display commands.
The ECCO runtime environment ensures that all user-programmed error and system
messages are displayed in the current language.

10/26/05 – Ver.: 1.02 English ECCO Manual - 32/282 -


Horsch Elektronik AG

3. 14. ECCO intercommunication


As already mentioned, ECCO reveals its full power in the controlling of large, highly
complex installations for automation. Often, such installations are so large that there
is a requirement for several control systems operating more or less independently.
ECCO supports such a setup and provides the possibility of communication between
control systems.

The following declarations and commands facilitate communication:


56 .LIMITS
59 .MAX_ECCO
60 .OWN_ECCO
85 .UNLOCK / .END_UNLOCK
185 SEND_IO
187 SEND_REG
188 SEND_SR
237 WR_TIME

ECCO demands only a few declarations in order to communicate with networked


control systems. The IP address is selected in the ECCO configurator, so changes of
the IP address do not require adjustments to the ECCO program.
First, the number of linked control systems and the control system’s own address in
the network must be entered: .MAX_ECCO for the number of control systems
interconnected, .OWN_ECCO for the control system’s own address.
The .LIMITS declaration provides the characteristics of the control systems
interconnected. Only a reduced block must be entered, as described in the .LIMITS
declaration.
Finally, the elements accessible to the interconnected control systems must be
declared in the .UNLOCK block. All other elements, i.e. not declared in this block, are
thus protected from being overwritten.

One convention must be respected in the actual communication: every control


system can have up to 999 inputs and 999 outputs. The control system to which the
input or output refers to, is entered with the thousands digit; this is omitted for the
own control system. Hence, A201 is the control system’s own output 201 and A2201
is output 201 on the interconnected control system 2.
The relevant elements can be written into the networked ECCO system with the
SEND_IO, SEND_REG and SEND_SR commands. The system clocks can be
synchronized with WR_TIME.

3. 15. Statistic and ZPoint


The term “statistic” is usually understood by ECCO programmers and users typically
more broader than the pure recording and analysis of data. The term also includes
machine parameterization and linking to an ERP solution. The term will be used as
broadly in this section, to reflect the language of ECCO customers.
ECCO supports two statistics programs. The first is StatREAD, developed by Horsch
Elektronik AG and optimized for ECCO, and ZPoint, developed and marketed by
AMS Engineering.

10/26/05 – Ver.: 1.02 English ECCO Manual - 33/282 -


Horsch Elektronik AG

StatREAD
The StatREAD tool suite is distinguished by easy handling and ease of
understanding. Using this tool, a freely selectable PC acts as machine controller,
which can parameterize ECCO and display measurements and display data to the
user graphically.<0}
For further information, please refer to the documentation:
[7] STATREAD + STATCALC – Configuration and Technical Documentation,
Horsch Elektronik AG, Version 1.26, 1997.

ZPoint
ZPoint functions as the interface between the ERP software and the ECCO machine
program. Similarly to StatREAD, the machine state and order data can be
administered and ZPoint provides particular analysis, optimization and administrative
functionalities to be able to manage a large inventory of machines and assembly
lines efficiently and automatically.
Because of its greater flexibility, ZPoint is significantly more difficult to operate than
StatREAD and requires significantly more information from the ECCO program,
which increases the programming effort enormously. For this reason, ZPoint should
only be used in conjunction with a ZPoint system integrator.

Gateway and the Gateway Administrator


A gateway is used to connect ZPoint with ECCO. Formerly, this was a dedicated
hardware card, but nowadays, it is a software module in the ECCO runtime
environment. The gateway is written with data from ECCO which is made available to
ZPoint asynchronously, so that the cycle time is not unnecessarily affected by ZPoint.
Using a gateway administrator tool, old SMC42 gateways can be administered, as
well as the ECCO gateway.

After starting with GwyAdmin.exe, a


page with the majority of its button
deactivated appears. The tool is
finished with the “Cancel” button. “File
import” loads a ZPoint configuration, a
file named export.<lng>, where
<lng> is a language selector. After
entering an IP address, the tool is
connected to the gateway with
“Connect”. During connection, the
configuration is compared to the one
within the gateway and acknowledged
with a message.
Now, all buttons are available and
information is also displayed about
the gateway. The “Config compare”
button compares the configuration
loaded in the tool with that in the
gateway. This functionality was run

10/26/05 – Ver.: 1.02 English ECCO Manual - 34/282 -


Horsch Elektronik AG

implicitly on connection. A new


configuration can be loaded into the
gateway with “Download” and
“Status” shows the status of the
gateway, as shown in the graphic to
the side.
Different areas of the gateway
memory can be deleted with the
“Clear Data Buffer”, “Invalidate RAM”
and “Clear Config Data” buttons
which act on the data buffer only, all
memory (which is performed on
restart), or the range of the
configuration.

The last button is labeled “Show DB” and opens a window which shows more than
simply the data in the gateway. Values can be set with this feature too, for example,
to run ECCO without ZPoint during an initial start-up phase. The following shows the
“Show DB” window.

A selection can be made with the “Start/Stop” button, whether the area in the
gateway should be read, in which case no changes can be made, as shown, or
whether no area should be read, in which case changes can be made.
The monitored area can be entered in the usual ZPoint way in the upper left corner
and values can be written to the right of that.
The memory range monitored is shown next. First two 16-bit values are shown,
followed by the resulting 32-bit value. Each offset number is therefore made up of
four 16-bit or two 32-bit values.

10/26/05 – Ver.: 1.02 English ECCO Manual - 35/282 -


Horsch Elektronik AG

3. 16. The PAC


The PAC is a device for automatic process control, measurements collection and
recording. It allows the separation of the process supervision system in ECCO from
the actual feed-back controller. On the one hand, this makes ECCO programs
shorter and simpler and on the other hand, it means that complex control algorithms
can be incorporated easily. Process security is also greatly improved.
The PAC allows simultaneous motion control of two independent servo axes or four
force/distance measurements, provides various feed-back motion control algorithms,
hardware watchdog, offset error monitoring and saving measurement curves with up
to 500 data points. Further information and instructions on the PAC can be found in
the PAC manual.

In ECCO, the PAC is controlled trough the PAC command. This instruction is easy to
use and extremely powerful: The arguments required can be read from an array or
written into an array. The configuration of the number of elements is performed by
.PAC_DEF once at a central location.

61 .PAC_DEF / .END_PAC_DEF
168 PAC
[9] PACTest Manual, Horsch Elektronik AG, Version 1.00, 2002.

10/26/05 – Ver.: 1.02 English ECCO Manual - 36/282 -


Horsch Elektronik AG

4. COMMANDS
4. 1. Conventions
The conventions used in this manual are shown below together with the general
possibilities for their use. They do not represent commands but extend the
functionality of ECCO and increase user convenience.

Reading the syntax


The syntax used is limited to a very few elements:

<Field> Text in pointed brackets are fields to be entered appropriately


by the user.
[Option] Optional fields and text are in square brackets. The user can
decide, depending on the case at hand, whether to make use of
such an option.
Lines The use of lines is regulated as in ECCO itself: If a line ends in
a comma, the command is continued on the next line and could
have been continued on the same line. With no comma, a new
command or key word follows and a line change is essential.
“Quotes” In the syntax and examples, strings are limited by different
characters. This is for typographical reasons only, however, and
the double quotes on the key 2 should be used in every case.
All other elements should be written in words.

RV, RW, LV, LW and SW registers allow indirect addressing, meaning that the number
that indicates the register used is not input as a number, as in RW100, but comes
from a 16-bit register of the type RV, LV or KV. The address register must then be set
in round brackets as the register type, as in RW(LV001). Indirect addressing is
described in more detail in section 3. 8 “Registers and flags”.

With arrays, round brackets do not represent indirect addressing, but refer to the
element within the array. The element in the array can be entered as a number or
directly without changing the way it is written.
It should be noted that not all registers may be used for all commands and that
indirect addressing is forbidden for certain commands. The commands indicate this.

10/26/05 – Ver.: 1.02 English ECCO Manual - 37/282 -


Horsch Elektronik AG

4. 2. Systematic command reference

General declarations and definitions


42 .ADDRESS
45 .CODE_OFF
55 .LANGUAGES
56 .LIMITS
59 .MAX_ECCO
60 .OWN_ECCO
62 .PASSWORD
65 .PROJECT
71 .SETLABEL
74 .STATIONS / STATION / .END_STATIONS
82 .TEXT

Declarations
44 .ARRAYS / .END_ARRAYS
46 .DISPLAYS / .DISP_END
51 .FUNCTIONS / .FUNC_END
53 .IO_TEXT / .END_IO_TEXT
61 .PAC_DEF / .END_PAC_DEF
66 .PROTECTED / .END_PROTECTED
70 .SET_CONST / .END_CONST
72 .SLCE_DEF / .END_SLCE_DEF
73 .SLCS_DEF / .END_SLCS_DEF
79 .STRING_REG / .END_STRING_REG
80 .STRINGS / .END_STRINGS
85 .UNLOCK / .END_UNLOCK

Program definitions
48 .END
58 .LOCAL
67 .PSL / .END_PSL
162 NSDEF
203 STDEF

Calling and ending tasks


95 CALL
96 CALLD
98 CALLF
101 CLOSE
259 DISABLE_STOP / ENABLE_STOP
164 OPEN
169 POWER_OFF
177 RET
178 RETD
179 RETE

10/26/05 – Ver.: 1.02 English ECCO Manual - 38/282 -


Horsch Elektronik AG

180 RETF
261 STEND
217 TASK_KILL
218 TASK_OPEN
219 TASK_STEP

Jumps and structured programming


111 DO / DO_WHILE / DO_WHILENOT
140 IF / IFNOT / ELSE / END_IF
145 JMPCOND
146 JMPTIM
147 JPBIT
148 JPEQ
149 JPGT
150 JPLT
151 JUMP
153 L_JMPCOND
155 L_SWITCH / CASE / DEFAULT / END_SWITCH
216 SWITCH / CASE / DEFAULT / END_SWITCH
235 WHILE / WHILENOT / END_WHILE

Supervision and timers


49 .ERROR_CODE_START
50 .ERROR_FLAG_OFFSET
83 .TINP_TEXT / .END_TINP_TEXT
105 COND_TRAP / IF_COND / END_COND_TRAP
192 SETTIM
262 TIMETRAP / END_TIMETRAP
221 TINP
263 TRAP / IF_TRAP / END_TRAP
234 WAITIM

Flag variants
90 AND
114 EXCL
143 INP
152 L_INP
154 L_OUTP
158 MOV
161 NOT
165 OR
167 OUTP
239 XOR

Register commands
89 ABS
90 AND
91 BMOV

10/26/05 – Ver.: 1.02 English ECCO Manual - 39/282 -


Horsch Elektronik AG

94 CALC
156 MOV
161 NOT
165 OR
185 SEARCH
191 SETBIT
239 XOR

String commands
79 .STRING_REG / .END_STRING_REG
80 .STRINGS / .END_STRINGS
156 LEN_STR
157 MID_STR
189 SET_LANG
197 SMOV
204 STR_ADD
205 STR_ADD_ASCII
207 STR_ADD_NR
208 STR_TO_ASCII
209 STR_TREAT
210 STR_VAL

Commands to read-in date and time


171 RD_DATE
172 RD_HOUR
174 RD_TIME
175 RD_WEEK

Communication between controllers


185 SEND_IO
187 SEND_REG
188 SEND_SR
237 WR_TIME

Use of Profibus and CPLink


46 .CPLINK_MAP_DEF / .END_CPLINK_MAP_DEF
63 .PROFIBUS_DEF / .MASTER / .END_PROFIBUS_DEF
92 BUS_OFF
93 BUS_ON

Display: inputs and outputs


67 .PSL / .END_PSL
100 CDATEDISP
103 CLS
104 CLS_WIN
107 CREGDISP
108 CTIMEDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 40/282 -


Horsch Elektronik AG

109 CWRITE
110 DATEDISP
113 END_NUM_INP
115 GET_PSL
122 HP_CDATEDISP
124 HP_CLS_WIN
125 HP_CREGDISP
127 HP_CTIMEDISP
129 HP_CWRITE
130 HP_DATEDISP
131 HP_REGDISP
132 HP_TIMEDISP
133 HP_WRITE
163 NUM_INP
175 REGDISP
190 SET_PSL
217 TIMEDISP
238 WRITE

Saving arrays
181 SAVE_ARRAY

Servo commands for slave and PAC


142 INM
166 OUTA
168 PAC
181 SCALE_AD
183 SCALE_DA
208 SV_COM
212 SV_CONST
213 SV_FIL
214 SV_READ
215 SV_TRJ

Slave commands
193 SLCE
194 SLCS
195 SLV_RCV_STR
196 SLV_SND_STR

Special commands for IDEX systems


134 ID_INIT
135 ID_READ
136 ID_REG_RD
137 ID_REG_WR
138 ID_STATUS
139 ID_WRITE

10/26/05 – Ver.: 1.02 English ECCO Manual - 41/282 -


Horsch Elektronik AG

Special commands for the VI terminal


224 VI_CLRKEY
225 VI_DATE
227 VI_JMPKEY
228 VI_RDISP
230 VI_READ
231 VI_TIME
233 VI_WRITE

Commands for statistics buffer


102 CLR_PUFFER
159 MOV_PUFFER
160 NEW_PUFFER
170 PUFFER
173 RD_PUFFER
198 STAT_CLR
199 STAT_PUFFER
200 STAT_QUEUE
201 STAT_TAKT

Production monitoring and statistics with STATREAD


75 .STATISTIC / GROUP / .END_STATISTIC
184 SCHICHT
260 STAT_SEND
202 STCKZAHL

Production monitoring with ZPoint


86 .ZPOINT / ANLAGE / RACK / .END_ZPOINT
116 GW_DD
117 GW_DW
118 GW_MSG
119 GW_QUEUE
119 GW_RD_DD
121 GW_RD_DW
240 ZPOINT_STATE

Counter commands (obsolete)


253 CTRDEC
254 CTRDISP
255 CTREQ
256 CTRINC
257 CTRPRES
258 CTRRES

4. 3. Alphabetical command reference

10/26/05 – Ver.: 1.02 English ECCO Manual - 42/282 -


Horsch Elektronik AG .ADDRESS

.ADDRESS

Defines the first address, or position of the memory, of the code that follows.

Syntax:
.ADDRESS <Pos>

Fields:
<Pos> Address of the code that follows in hexadecimal notation.

Comments:
The following four address instructions must always be present:
.ADDRESS 0 ; before NULL
NULL:

.ADDRESS 2 ; before PROG_BEG


PROG_BEG:

.ADDRESS 26 ; before .SETLABEL


.SETLABEL STRESP

.END_STATIONS
.ADDRESS 1210 ; after .END_STATIONS

SMC4x controllers required different address values to be input. Correct changes


must be applied when porting software.

See also:
71 .SETLABEL
74 .STATIONS / STATION / .END_STATIONS
246 PROG_BEG

10/26/05 – Ver.: 1.02 English ECCO Manual - 43/282 -


Horsch Elektronik AG .ARRAYS / .END_ARRAYS

.ARRAYS / .END_ARRAYS

Arrays and their size are declared within this compiler instruction. Arrays with 16-bit
elements (AV) and arrays with 32-bit elements (AW) are allowed.

Syntax:
.ARRAYS
[AW<Number>=<Size>]
[AV<Number>=<Size>]
.END_ARRAYS

Fields:
AW<Number> 32-bit array whose size is given in elements.
AV<Number> 16-bit array whose size is given in elements.
<Size> Number of elements in array. An array contains the elements 1
to <Size>. If an attempt is made to access an undeclared
element, system error 65 occurs.

Comments:
Up to 256 AW and 256 AV arrays may be declared, each with up to 32767 elements.

Example:
.ARRAYS
AV001 = 20 ; AV001(1) – AV001(20)
AW001 = 100 ; Array with 100 32-bit
values
AW002 = 20 ; and one with 20 elements
.END_ARRAYS

10/26/05 – Ver.: 1.02 English ECCO Manual - 44/282 -


Horsch Elektronik AG .CODE_OFF

.CODE_OFF

Gives the program offset. The offset is constant for each control system generation.

Syntax:
.CODE_OFF 0

Comments:
For SMC4x control system, an offset of –810000 had to be input. Correct changes
must be applied when porting applications.

10/26/05 – Ver.: 1.02 English ECCO Manual - 45/282 -


Horsch Elektronik AG .CPLINK_MAP_DEF / .END_CPLINK_MAP_DEF

.CPLINK_MAP_DEF / .END_CPLINK_MAP_DEF

Describes a CPLink connection in ECCO.

Syntax:
.CPLINK_MAP_DEF <Card>, “<Text>”
INPUTS
B<Byte>, <Addr> [-<Addr>] [,<Addr> [-<Addr>]]
[B<Byte>, <Addr> [-<Addr>] [,<Addr> [-<Addr>]]]
OUTPUTS
B<Byte>, <Addr> [-<Addr>] [,<Addr> [-<Addr>]]
[B<Byte>, <Addr> [-<Addr>] [,<Addr> [-<Addr>]]]
.END_CPLINK_MAP_DEF

Fields:
<Card> Number of the CPLINK card. Valid values are 1 to 3.
<Text> Text displayed on failure of the component.
<Byte> Byte in the cards memory coupler area. Must be in sequence.
<Addr> Allocated instruction or output address, so excluding letters E,
I, A or O to bit in <Byte>. Each <Byte> contains precisely 8
<Addr>, where the LSB comes first on the far left. Unused bits
are marked with 0 and ranges are linked with a dash.

Comments:
To operate a CPLink card, TwinCat CP must run parallel to ECCO.

Example:
.CPLINK_MAP_DEF 1, “CPLink Card 1”
INPUTS
B0, 501-508
B1, 509, 510, 0, 0, 0, 0, 0, 0
OUTPUTS
B0, 501-508
B1, 509, 510, 511, 512, 0, 0, 0, 0
.END_CPLINK_MAP_DEF

See also:
63 .PROFIBUS_DEF / .MASTER /.END_PROFIBUS_DEF

10/26/05 – Ver.: 1.02 English ECCO Manual - 46/282 -


Horsch Elektronik AG .DISPLAYS / .DISP_END

.DISPLAYS / .DISP_END

Defines the display tasks with their labels and the number of arguments.

Syntax:
.DISPLAYS
@<Label>,<32bParam>.<16bParam>
[@<Label>,<32bParam>.<16bParam>]
.DISP_END

Fields:
<Label> Label of the display task with up to 15 characters.
<32bParam> Number of 32-bit parameters used.
<16bParam> Number of 16-bit parameters used.

Comments:
The number of definition must agree with the value condition under .LIMITS.
Up to 32 32-bit parameters and 32 16-bit parameters may be used. The display task
is called with CALLD and the required parameters are passed on. Display tasks
interrupt PSL tasks and serve primarily for interaction with the user, such as querying
for values or the selection of menus.
If a display task is interrupted by, say, an error task, the display task will be restarted
from the beginning to ensure a complete, properly defined screen.

Example:
The following example defines 3 display tasks, one with no parameters, one with a
16-bit parameter and one with the maximum number of parameters allowed.

.DISPLAYS
@MAIN_MENU ,0.0 ; No parameters
@DISP_1 ,0.1 ; One 16-bit parameter
@DISP_MAX ,32.32 ; No more allowed
.DISP_END

See also:
56 .LIMITS
67 .PSL
96 CALLD

10/26/05 – Ver.: 1.02 English ECCO Manual - 47/282 -


Horsch Elektronik AG .END

.END

Tells the compiler that this is the last program line.

Syntax:
END

Comments:
Subsequent lines will not be compiled. It is therefore possible to remove the end of
the program from compilation.

10/26/05 – Ver.: 1.02 English ECCO Manual - 48/282 -


Horsch Elektronik AG .ERROR_CODE_START

.ERROR_CODE_START

Serves for automatic generation of error numbers with the TINP command.

Syntax:
.ERROR_CODE_BASE <Value>

Fields:
<Value> Base number for automatic generation of error numbers even if
no error number is given in the TINP command. Number
between 5000 and 25000.

Comments:
If a base for the error number is given in the TINP command, it must be at least
TINP command conditions smaller than <Value>. This ensures that automatically
generated and manually input error numbers do not overlap and are unique.
Note that this declaration must be placed between .ADDRESS 0 and .TINP_TEXT.

Example:
.ERROR_CODE_BASE 10000

See also:
42 .ADDRESS
83 .TINP_TEXT / .END_TINP_TEXT
221 TINP

10/26/05 – Ver.: 1.02 English ECCO Manual - 49/282 -


Horsch Elektronik AG .ERROR_FLAG_OFFSET

.ERROR_FLAG_OFFSET

Separates the ranges of error flags for ZPoint.

Syntax:
.ERROR_FLAG_OFFSET <Const>

Fields:
<Const> A constant of the type KV or KW.

Comments:
If several ECCO control systems are served by a shared ZPoint connection, then the
problem arises that the error texts and error flags of the individual control systems
overlap.
The value of the constant must be declared in .SET_CONST and the instruction must
come after the .SET_CONST block.
This declaration means that all entries of error numbers will be moved by the offset
<Const>. The error message must be amended accordingly.

Example:
The example shows first the use of this command and then the generation of the
error message. RV1507 is the relevant register for communication with ZPoint.
.ERROR_FLAG_OFFSET KV100

; Error handler that generates an error message to ZPoint


&ERROR_D020:
CALC RV1507, KV100 + 20
RETE

See also:
70 .SET_CONST / .END_CONST
86 .ZPOINT / ANLAGE / RACK / .END_ZPOINT

10/26/05 – Ver.: 1.02 English ECCO Manual - 50/282 -


Horsch Elektronik AG .FUNCTIONS / .FUNC_END

.FUNCTIONS / .FUNC_END

Declares the functions. If several languages are defined, each language must have
its own function block.

Syntax:
.FUNCTIONS [<Lng>]
#<Label>, <Fy>.<Fx>, <32bParam>.<16bParam>, “<FTxt>”
[#<Label>, <Fy>.<Fx>, <32bParam>.<16bParam>, “<FTxt>”]
.FUNC_END

Fields:
<Lng> Language (as identified by three letters) for this function block.
Optional if only one language is defined.
<Label> Language neutral function label up to 15 characters long.
<Fy> Function line number between 1 and 40 for navigation with the
arrow keys.
<Fx> Function column number between 1 and 40 for navigation with
the arrow keys.
<32bParam> Number of 32-bit parameters required.
<16bParam> Number of 16-bit parameters required.
<FTxt> Text of up to 25 characters to describe the function in the given
language.

Comments:
A function task can be called from a program task using CALLF and is ended with the
RETF command. Because each function takes up a free task, the number of free
tasks limits the maximum nesting depth.
A function task with no parameters can also be started from the user terminal in
function mode either by selecting the arrow keys or inputting <Fy>.<Fx> and the “=”
key and starting with the “Start” key. Because only function tasks with no parameters
can be started from the user terminal, it is recommended to declare the functions in
the first function column without parameters and then to call this function from the
other functions in the same function line.
So-called function procedures with <Fy>.<Fx>=0.0 cannot be started from the
display.

Example:
.FUNCTIONS GER
;Station 1
#FUNC1_1, 1.1, 0.0, “Station 1 Menü”
#FUNC1_2, 1.2, 1.8, “Station 1 Funktion 2”
#FUNC1_3, 1.3, 0.1, “Station 1 Funktion 3”
;Station 2
#FUNC2_1, 2.1, 0.0, “Station 2 nur Menü”
.FUNC_END

10/26/05 – Ver.: 1.02 English ECCO Manual - 51/282 -


Horsch Elektronik AG .FUNCTIONS / .FUNC_END

See also:
55 .LANGUAGES
56 .LIMITS
98 CALLF
180 RETF

10/26/05 – Ver.: 1.02 English ECCO Manual - 52/282 -


Horsch Elektronik AG .IO_TEXT / .END_IO_TEXT

.IO_TEXT / .END_IO_TEXT

Describes inputs and outputs, flags and error flags in the relevant language.

Syntax:
.IO_TEXT [<Lng>]
[<In/Out> “<Text>”]
[<In/Out> <SR>]
[<Flag> “<Text>”]
[<Flag> <SR>]
[<DFlag> “<Text>”, &<Err_Label>]
[<DFlag> <SR>, &<Err_Label>]
[; <Rest> <Text>]
.END_IO_TEXT

Fields:
<Lng> Language (as identified by three letters) for this block. Optional
if only one language is defined.
<In/Out> Input or output. A block of inputs or outputs can be summarized
with “-“.
<Flag> A flag with the identifier M or F. A block of flags can be denoted
with “-“.
<DFlag> An error flag with the identifier D.
<Rest> A register (RV, RW), timer (T), counter (C) or time value (CW).
<Err_Label> Error label activated on setting the error flag.
<Text> Descriptive text in the relevant language, with up to 120
characters.
<SR> A variable string register of the type SR. The .STRING_REG
block must come before this block. This allows a variable
description of the element.

Comments:
Each language must have its own such .IO_TEXT block. In addition, the register (RV
and RW), timer (T), counter (C) and time value used (CW) should be included here as
comments in order to provide a descriptor in the debugger and similar programs.

Example:
.IO_TEXT ENG
A001 “AL Door”
A002 SR1002
A003-O999 “Free Outputs”
E001 “EMERGENCY STOP”
M100 “Hi Pressure reached”
D201 “Pressure alarm”, &Error_201
;RW1001 Pressure in Bar
;C1011 Counter Work Pieces
.END_IO_TEXT

10/26/05 – Ver.: 1.02 English ECCO Manual - 53/282 -


Horsch Elektronik AG .IO_TEXT / .END_IO_TEXT

See also:
55 .LANGUAGES
56 .LIMITS
78 .STRING_REG / .END_STRING_REG

10/26/05 – Ver.: 1.02 English ECCO Manual - 54/282 -


Horsch Elektronik AG .LANGUAGES

.LANGUAGES

Defines up to three languages which can be switched in between at runtime.

Syntax:
.LANGUAGES <Lng1> [,<Lng2> [,<Lng3>]]

Fields:
<Lng1> Language descriptor for the first language.
<Lng2> Optional: Language descriptor for the second language.
<Lng3> Optional: Language descriptor for the third language.
Each language descriptor consists of precisely three letters.

Comments:
If this declaration is missing, GER is used.

Example:
.LANGUAGES GER, ENG ; German and English

10/26/05 – Ver.: 1.02 English ECCO Manual - 55/282 -


Horsch Elektronik AG .LIMITS

.LIMITS

Defines various limits in order to use program memory optimally and to define the
borders between different ECCO control systems.

Syntax:
Own control system:
.LIMITS <ECCO_No>, <Inputs>, <Outputs>, <Merkers>, <DMerkers>,
<Timers>, <Zeitwerte>, <FZeilen>, <FSpalten>, <Stationen>,
<Displays>, <Strings>, <RWs>, <RVs>, <Prozeduren>

External control systems:


.LIMITS <ECCO_No>, <Inputs>, <Outputs>, <Merkers>, <DMerkers>

Fields:
<ECCO_No> ECCO Station written to. Format: ECCO<x> with <x> 1 to 15.
<Inputs> Input range. Format: E<start>-<stop> or I<start>-
<stop>. The thousands of the range must correspond to the
ECCO number. The other three places of <start> must be 1
greater than a number divisible by 16 and that of <stop> must
be divisible by 16.
<Outputs> Output range. Format: A<start>-<stop> or O<start>-
<stop>. The thousands of the range must correspond to the
ECCO number. The other three places of <start> must be 1
greater than a number divisible by 16 and that of <stop> must
be divisible by 16.
<Merkers> Flag range. Format: F<start>-<stop> or M<start>-
<stop>. The thousands of the range must correspond to the
ECCO number. The other three places of <start> must be 1
greater than a number divisible by 8 and that of <stop> must
be divisible by 8.
<DMerkers> Error flag range. Format: D<start>-<stop>. The thousands
of the range must correspond to the ECCO number. The other
three places of <start> must be 1 greater than a number
divisible by 8 and that of <stop> must be divisible by 8.
<Timers> Number of global 16-bit timers in the control system. Format:
T<x> with <x> 1 to 255.
<FZeilen> Number of lines for functions. Defines the limits for
.FUNCTIONS. Format: X<x> with <x> 1 to 40.
<FSpalten> Number of columns for functions. Defines the limits for
.FUNCTIONS. Format: Y<x> with <x> 1 to 40.
<Zeitwerte> Number of ZW time values for the control system. Format: Z<x>
with <x> 1 to 49.
<Stationen> Number of stations. Format: S<x> with <x> 1 to 9999.
<Displays> Number of display routines. Format: W<x> with <x> 1 to 512.
<Strings> Number of SR strings. Format: J<x> with <x> 1 to 4096.

10/26/05 – Ver.: 1.02 English ECCO Manual - 56/282 -


Horsch Elektronik AG .LIMITS

<Prozeduren> Number of function procedures defined in .FUNCTIONS.


Format: P<x> with <x> 1 to 1024.

A comment or a new line can be added after the comma dividing two fields.

Comments:
In SMC4x control systems, other limits to drive the CAN bus had to be declared and
some fields had slightly different meanings. Correct adoptions must be made when
porting software.
It should be noted that the control systems are designated with ECCO<x> and no
longer with SMC<x>.
Only those control systems to which this ECCO actually communicates must be
declared.
Note that the memory occupied by RV, RW, AV and AW may not be larger than 512 KB.
The compiler checks this and reports any breach as an error.

Example:
Two control systems declared, the machine’s own as ECCO1 and another as
ECCO2.

.MAX_ECCO 2 ; Interconnected systems


.OWN_ECCO 1 ; Own system is ECCO1

.LIMITS ECCO1, ; Own control system


I1001-1480, ; Inputs
O1001-1800, ; Outputs
F1001-1200, ; Flags
D1001-1200, ; Error flags
T19, ; Global timers, 16-bit
X8, ; Functions: max. rows
Y4, ; Functions: max. columns
Z5, ; Time values
S4, ; Stations
W20, ; Number of DISP routines
J12, ; Variable strings
P50 ; Function procedures: number

.LIMITS ECCO2, ; External control system


I2001-2192, O2001-2192, F2001-2400, D2001-2008

See also:
48 .FUNCTIONS
59 .MAX_ECCO
60 .OWN_ECCO

10/26/05 – Ver.: 1.02 English ECCO Manual - 57/282 -


Horsch Elektronik AG .LOCAL

.LOCAL

Starts a new section for local labels.

Syntax:
.LOCAL

Comments:
Local labels begin with the $ character.
The .LOCAL command is not allowed in display, error and function tasks. It is
automatically generated on calling a section with its own local variables, so local
labels can be used nevertheless.

Example:
The example shows two stations with the use of local blocks.
STAT01:
.LOCAL
$process1:
OUTP A101 H
JMPCOND E501 L, $process1
OUTP A102 L
CLOSE

STAT02:
.LOCAL
$process1:
OUTP A102 H
JMPCOND E502 L, $process1
OUTP A101 L
CLOSE

The advantage is that the program text can be copied and only details may be
altered.

10/26/05 – Ver.: 1.02 English ECCO Manual - 58/282 -


Horsch Elektronik AG .MAX_ECCO

.MAX_ECCO

Specifies the number of interconnected ECCO control systems.

Syntax:
.MAX_ECCO <Value>

Fields:
<Value> Number between 1 and 9.

Comments:
If this command is missing or if <Value> does not correspond to .LIMITS and
.OWN_ECCO, a compiler error is generated.
In older versions, this command was called .MAX_SMC; hence, it must be adapted
when porting old programs.

Example:
.MAX_ECCO 1

See also:
56 .LIMITS
60 .OWN_ECCO

10/26/05 – Ver.: 1.02 English ECCO Manual - 59/282 -


Horsch Elektronik AG .OWN_ECCO

.OWN_ECCO

Specifies the ECCO control system’s own address.

Syntax:
.OWN_ECCO <Address>

Fields:
<Address> Own ECCO interconnection address.

Comments:
If this command is missing or if <Address> does not correspond to .LIMITS and
.OWN_ECCO, a compiler error is generated.
In older versions, this command was called .OWN_SMS and it must be adapted on
porting.

Example:
.OWN_ECCO 1

See also:
56 .LIMITS
59 .MAX_ECCO

10/26/05 – Ver.: 1.02 English ECCO Manual - 60/282 -


Horsch Elektronik AG .PAC_DEF / .END_PAC_DEF

.PAC_DEF / .END_PAC_DEF

Declares PAC commands.

Syntax:
.PAC_DEF
<Cmd_Name> <Cmd_No>, <InArgs>, <OutArgs>
[<Cmd_Name> <Cmd_No>, <InArgs>, <OutArgs>]
.END_PAC_DEF

Fields:
<Cmd_Name> Name of the command. This is a descriptor used by the PAC
command.
<Cmd_No> Characteristic number of the command.
<InArgs> Number of arguments to be read from the PAC.
<OutArgs> Number of arguments to be sent to the PAC.

Comments:
This block should be copied from the PAC documentation in order to ensure proper
operation.
Note that there is no comma between <Cmd_Name> und <Cmd_No>.

See also:
168 PAC
[5] PAC Handbuch, Horsch Elektronik AG, Version 1.01, 2001.

10/26/05 – Ver.: 1.02 English ECCO Manual - 61/282 -


Horsch Elektronik AG .PASSWORD

.PASSWORD

The password ensures that only authorized users can alter outputs, flags or error
flags at the terminal.

Syntax:
.PASSWORD <Password>

Fields:
<Password> Password number between 0 and 65535.

Comments:
In manual mode or stopped automatic mode, the user will be asked to input a
password if outputs, flags or error flags are to be changed. The password entered
remains valid until the next start in automatic or station mode.
If no password is to be requested, this declaration should be waived.

Example:
.PASSWORD 12345

10/26/05 – Ver.: 1.02 English ECCO Manual - 62/282 -


Horsch Elektronik AG .PROFIBUS_DEF / .MASTER / .END_PROFIBUS_DEF

.PROFIBUS_DEF / .MASTER / .END_PROFIBUS_DEF

Describes the PROFIBUS card in ECCO.

Syntax:
.PROFIBUS_DEF <Card>, <Text>
FILE “<PB_File>”
[ID_IO <PB_ID>, “<Text>”
[INPUTS
B<Byte>, <Adr> [-<Adr>] [,<Adr> [-<Adr>]]
[B<Byte>, <Adr> [-<Adr>] [,<Adr> [-<Adr>]]]]
[OUTPUTS
B<Byte>, <Adr> [-<Adr>] [,<Adr> [-<Adr>]]
[B<Byte>, <Adr> [-<Adr>] [,<Adr> [-<Adr>]]]] ]
[ID_PAC <PB_ID>, <EID>, “<Text>”]
[ID_IDEX <PB_ID>, <Ant>, <EID>, <IB>, <OB>, “<Text>”]
[ID_SLV <PB_ID>, <Com>, <EID>, <Type>, “<ComPort>”,
“<Text>”]
.END_PROFIBUS_DEF

Fields:
<Card> Number of the Profibus card. Valid values are 1 to 4.
<Text> Text displayed on failure of the component.
<PB_File> File details for SyCon PB_File.
<Byte> Byte in the cart’s memory mapping. Must be in the same
sequence as in the SyCon file.
<Adr> Allocated input or output address, so excluding letters E, I, A or
O to bit in <Byte>. Each <Byte> contains precisely 8 <Adr>,
where the LSB comes first on the far left. Unused bits are
identified with 0 and ranges are linked with “-“.
<PB_ID> ID of the components on the Profibus. Must agree with SyCon
and is a number between 1 and 125.
<EID> ID of the component in ECCO. Note that the PACs, slaves and
VI terminals each have their own ID space.
<Ant> Antenna; number between 1 and 2. Two antennas per analysis
unit can be connected to a Baluff IDEX device. In ECCO, each
antenna has its own identifier.
<IB> First input byte in the memory mapping. The value is to be
taken from the SyCon configuration file and is a number
between 0 and 2047.
<OB> First output byte in the memory mapping. The value is to be
taken from the SyCon configuration file and is a number
between 0 and 2047.
<Com> Serial interface on the Profibus slave. Number between 1 and
21. Several serial terminals can be connected to an appropriate
bus coupler with its <PB_ID> and they receive their own <EID>
in ECCO. This field is required to differentiate between the
terminals by providing unique identification.

10/26/05 – Ver.: 1.02 English ECCO Manual - 63/282 -


Horsch Elektronik AG .PROFIBUS_DEF / .MASTER / .END_PROFIBUS_DEF

<Type> Descriptor of the connected slave. The descriptor should be


taken from the slave’s documentation.
<ComPort> The parameters to the serial interface. The string is constructed
canonically and shown below for completeness.

<ComPort> field has the following format:


<Bauds>, <Parity>, <DBits>, <SBits>
The fields have the following meanings and possible values:
<Bauds> Baud rate. Possible values are 1200, 2400, 4800, 9600 and
19200 baud.
<Parity> Defines whether a parity check should be performed. Valid
values are e for even, u for uneven and n for no parity check.
<DBits> Number of data bits per word. Valid values are 7 and 8 data
bits.
<SBits> Number of stop bits per word. Valid values are 1 and 2 stop
bits.
Note that not all combinations are allowed. The values should therefore be taken
from the slave’s documentation.

The descriptors for <Type> currently are VI, PAGO, MARKER, BARCODE, ELV and
STANDARD. The list may be expanded when new slaves are supported.

Comments:
Up to 30 PACS and 30 slaves can be connected. The slaves and the PACs have,
independently of each other, ECCO IDs 1 to 30 and the VI terminals the IDs 1 to 15.
The ID must agree with the ID encoded at the terminal. Up to 30 serial terminal
couplers can be connected.
Proper communication requires that the hardware in use and correspond to the
settings from SyCon match.
At least one INPUTS or OUTPUTS block must be entered for each I/O-element. They
must be in the same sequence as in the SyCon file. Individual elements are
explained in more detail in the relevant documentation.

Example:
.PROFIBUS_DEF 1, HILSCHER
FILE “project.pb”
ID_IO 5, “Beckhoff Slave 1”
INPUTS
B0, 001-008
OUTPUTS
B0, 001-008
ID_PAC 7, 16, “PAC Achse links”
ID_PAC 8, 17, “PAC Achse rechts”
ID_IDEX 15, 1, 2, 402, 405, “IDEX Lesekopf Station 1”
ID_SLV 22, 1, 1, VI, “9600,e,7,1”, “VI-Terminal”
.END_PROFIBUS_DEF

10/26/05 – Ver.: 1.02 English ECCO Manual - 64/282 -


Horsch Elektronik AG .PROJECT

.PROJECT

Specifies the project number.

Syntax:
.PROJECT <ProjectNo>

Fields:
<ProjectNo> Assigned project number between 1 and 65535.

Comments:
Can be used to assign customer-specific project numbers.

Example:
.PROJECT 1001

10/26/05 – Ver.: 1.02 English ECCO Manual - 65/282 -


Horsch Elektronik AG .PROTECTED / .END_PROTECTED

.PROTECTED / .END_PROTECTED

Protects outputs, variable strings, flags, error flags and registers from being
overwritten locally.

Syntax:
.PROTECTED
<Element>[-<Stop>]
[<Element>[-<Stop>]]
.END_PROTECTED

Fields:
<Element> An output, variable string, flag, error flag or RV or RW register to
be protected.
<Stop> Optional: Serves to input a range. In this case, all elements
between <Element> and <Stop> are protected. Number with
no identifying letter.

Comments:
The overwriting could come from a PC program such as TSTRS or the debugger or
from the user terminal. In the case of an attempt to overwrite a protected element, an
error message is displayed on the user terminal and PC programs receive an error
telegram.

Example:
.PROTECTED
A001-032
A193
M100
D101-199
SR010-099
SR200
RV001
RW101
.END_PROTECTED

10/26/05 – Ver.: 1.02 English ECCO Manual - 66/282 -


Horsch Elektronik AG .PSL / .END_PSL

.PSL / .END_PSL

Describes a PSL screen page.

Syntax:
.PSL <Row>.<Column>
<Code>
.END_PSL

Fields:
<Row> The line of the PSL page to be described. Valid values are
given below.
<Column> The column of the PSL page to be described. Valid values are
detailed below.
<Code> The program code for the PSL page. Only the commands listed
below may be used.

The addressing given as <Row>.<Column> allows navigation between PSL pages


with the arrow keys on the terminal. The pages are ordered as:
0.0
1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10
2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10
3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10
4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10
5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10
6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10
7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10
8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 8.10
9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 9.10
10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10

Only these commands are allowed in the <Code> block of a PSL page:
ABS AND BMOV CALC CDATEDISP
CLS CLS_WIN CREGDISP CTIMEDISP CTRDEC
CTRDISP CTREQ CTRINC CTRPRES CTRRES
CWRITE DATEDISP DO GET_PSL IF
IFNOT INM INP JMPCOND JMPTIM
JPEQ JPGT JPLT JUMP MOV
NOT OR RD_DATE RD_PUFFER RD_TIME
REGDISP SCALE_AD SCALE_DA SEND_IO SEND_REG
SEND_SR SET_LANG SET_PSL SETBIT SETTIM
SMOV SWITCH TIMEDISP VI_CLRKEY VI_DATE
VI_JMPKEY VI_RDISP VI_READ VI_TIME VI_WRITE
WAITIM WHILE WRITE XOR

Comments:
Pages are numbered from 1.1 to 10.10

10/26/05 – Ver.: 1.02 English ECCO Manual - 67/282 -


Horsch Elektronik AG .PSL / .END_PSL

Page 0.0 has a special place: this page is always activated on start-up if no arrow
key has yet been pressed. It is recommended that it only deletes the display or
displays general machine information (like the type produced).
When the program reaches the .END_PSL command, a jump is made to the start of
the PSL page.
Precisely one PSL task is active in automatic mode and it must not be started from
the main program. This task is stopped as soon as a display or error task becomes
active. If no display or error task is active any longer, the PSL task restarts from the
start of the <Code> block again.
So as not to use unnecessary processor resources for PSL tasks, it is recommended
to build a timer into the <Code> block that delays for 2 to 5 seconds.

Example:
This example shows how production data are displayed with a PSL task.
.PSL 1.1
CLS_WIN 0, 110 ; Delete the required space
WRITE 1, 60, 1, “Register 1001:”
WRITE 1, 70, 1, “Register 1002:”
$LOOP_11: ; Update only what is needed
REGDISP 15,60, 1, RW1001, “#9.0.0# dec”
REGDISP 15,70, 1, RW1002, “#9.0.0# dec”
SETTIM T0, 300 ; Wait for 3 seconds
WAITIM T0
JUMP $LOOP_11 ; Update values
.END_PSL

See also:
56 .LIMITS
89 ABS
90 AND
91 BMOV
92 CALC
100 CDATEDISP
103 CLS
104 CLS_WIN
107 CREGDISP
108 CTIMEDISP
253 CTRDEC
254 CTRDISP
255 CTREQ
256 CTRINC
257 CTRPRES
258 CTRRES
109 CWRITE
107 DATEDISP
111 DO / DO_WHILE / DO_WHILENOT
115 GET_PSL
140 IF / IFNOT / ELSE / END_IF
142 INM
143 INP

10/26/05 – Ver.: 1.02 English ECCO Manual - 68/282 -


Horsch Elektronik AG .PSL / .END_PSL

145 JMPCOND
146 JMPTIM
148 JPEQ
149 JPGT
150 JPLT
151 JUMP
156 MOV
161 NOT
165 OR
171 RD_DATE
172 RD_PUFFER
174 RD_TIME
175 REGDISP
181 SCALE_AD
183 SCALE_DA
185 SEND_IO
187 SEND_REG
188 SEND_SR
189 SET_LANG
190 SET_PSL
191 SETBIT
192 SETTIM
197 SMOV
216 SWITCH / CASE /DEFAULT / END_SWITCH
217 TIMEDISP
224 VI_CLRKEY
225 VI_DATE
227 VI_JMPKEY
228 VI_RDISP
230 VI_READ
231 VI_TIME
233 VI_WRITE
234 WAITIM
235 WHILE / WHILENOT / END_WHILE
237 WRITE
239 XOR

10/26/05 – Ver.: 1.02 English ECCO Manual - 69/282 -


Horsch Elektronik AG .SET_CONST / .END_CONST

.SET_CONST / .END_CONST

Defines constant that can also be aliases for slaves.

Syntax:
.SET_CONST
[KW<Number> = <Value>]
[KV<Number> = <Value>]
[FW<Number> = <Value>]
[KV<Number> = <Slave>]
.END_CONST

Fields:
<Number> Number in the range 1 to 512 for KW and KV and 1 to 128 for
FW.
<Value> Value to be assigned to the constant. For KV a 16-bit number,
for KW a 32-bit number and for FW a type of floating point
number.
<Slave> Alias for a motion control slave.

The format for <Slave> is:


<Typ><Slave_No>.<Servo>
Where:
<Typ> Either SV, DA or AD.
<Slave_No> Address of the slave. Number between 1 and 15.
<Servo> Address of the servos or converter on the slave.

Comments:
A PAC from Horsch AG is usually used as motion control slave.
FW type constants are floating point constants with four places after the point. They
are used as fixed point substitutes for the regulator slave and the PAC. Up to 512 KW,
512 KV and an additional 128 FW can be declared.

Example:
.SET_CONST
; 16-bit integer constants
KV001 = 1
KV002 = 2
; 32-bit integer constants
KW101 = 123456789
KW102 = -2
; Floating point numbers
FW001 = 3.1416
KV003 = SV1.1 ; Slave 1, Servo 1
KV004 = DA1.1 ; Slave 1, A/D-Wandler
KV005 = AD2.1 ; Slave 2, D/A-Wandler
.END_CONST

10/26/05 – Ver.: 1.02 English ECCO Manual - 70/282 -


Horsch Elektronik AG .SETLABEL

.SETLABEL

Declares the address of a program label.

Syntax:
.SETLABEL <Label>

Fields:
<Label> Label whose address will be declared here.

Comments:
This declaration is used only in conjunction with the .ADDRESS instruction to create a
program table for the compiled program. It is used as follows:

.ADRESS 26
.SETLABEL STRESP ; Failure restart routine
.SETLABEL NSRESP ; Emergency stop restart
.SETLABEL NRMPGM ; Norming program
.SETLABEL STPGM ; Fail handling routine
.SETLABEL NSPGM ; Emergency stop routine
.SETLABEL NULL ; Free
.SETLABEL NULL ; Free
.SETLABEL NULL ; Free
.SETLABEL NULL ; Free
.SETLABEL HPPGM ; Main program
.SETLABEL BACKPGM ; Background program

See also:
42 .ADDRESS
242 BACKPGM
246 HPPGM
247 NRMPGM
248 NSPGM
249 NSRESP
250 STPGM
251 STRESP

10/26/05 – Ver.: 1.02 English ECCO Manual - 71/282 -


Horsch Elektronik AG .SLCE_DEF / .END_SLCE_DEF

.SLCE_DEF / .END_SLCE_DEF

Allows the use of descriptors within SLCE.

Syntax:
.SLCE_DEF
<Descriptor> <Value>
[<Descriptor> <Value>]
.END_SLCE_DEF

Fields:
<Descriptor> Descriptor, up to 30 characters long.
<Value> Value for the <Descriptor>. The precise meaning depends
on the controller slave used.

Comments:
Ensure there are no commas between <Descriptor> and <Value>, only one or
more spaces.

Example:
.SLCE_DEF
Minimum_Zone1 36
Maximum_Zone1 37
Value_at_a_given_point 38
.END_SLCE_DEF

See also:
73 .SLCS_DEF / .END_SLCS_DEF
193 SLCE

10/26/05 – Ver.: 1.02 English ECCO Manual - 72/282 -


Horsch Elektronik AG .SLCS_DEF / .END_SLCS_DEF

.SLCS_DEF / .END_SLCS_DEF

Allows the use of descriptors within SLCS.

Syntax:
.SLCS_DEF
<Descriptor> <Value>
[<Descriptor> <Value>]
.END_SLCS_DEF

Fields:
<Descriptor> Descriptor, up to 30 characters long.
<Value> Value for the <Descriptor>. The precise meaning depends
on the controller slave used.

Comments:
Ensure there are no commas between <Descriptor> and <Value>, only one or
more white spaces.

Example:
.SLCS_DEF
Unteres_Limit 1
Oberes_Limit 2
Record_Length 10
Yet_another_instruction 11
.SLCS_DEF

See also:
72 .SLCE_DEF / .END_SLCE_DEF
194 SLCS

10/26/05 – Ver.: 1.02 English ECCO Manual - 73/282 -


Horsch Elektronik AG .STATIONS / STATION / .END_STATIONS

.STATIONS / STATION / .END_STATIONS

Assigns a label and text in the relevant language to a station.

Syntax:
.STATIONS [<Lng>]
STATION <Label>, “<Text>”
[STATION <Label>, “<Text>”]
.END_STATIONS

Fields:
<Lng> Three-letter label for the language. Each language defined in
.LANGUAGES must have its own station block. If only one
language is defined, its input is optional.
<Label> Program label with which the related station code begins.
<Text> Text description of the station in the language.

Comments:
To start a station in manual mode from the terminal, the “Stat” key must first be
pressed. Then there are two possibilities: the “Value” key followed by the station
number and the “=” key, or searching with the arrow keys. The <Text> appears on
the user terminal. The station is started with the “Start” key.
<Text> informs the user of the function of the selected station and is thus important.
All stations must be listed to allow paging with the arrow keys.

Example:
.STATIONS ENG
STATION STAT1, “M1 Load”
STATION STAT2, “M2 Operation”
STATION STAT3, “M3 Unload”
.END_STATIONS

See also:
55 .LANGUAGES
56 .LIMITS

10/26/05 – Ver.: 1.02 English ECCO Manual - 74/282 -


Horsch Elektronik AG .STATISTIC / GROUP / .END_STATISTIC

.STATISTIC / GROUP / .END_STATISTIC

Allows the configuration of STATREAD.

Syntax:
.STATISTIC [<Lng>]
GROUP <Gr_No>, “<Name>” [, <SerF>, <Pos>, <Len>]
VAL <Gr_No>.<Val_No>, <DTyp>, <Dec>, <Stat_Flag>,
“<Name>”
PRM <Gr_No>.<Prm_No>, <DTyp>, <Dec>, <SecLevel>,
<Soll_Reg>, <GWO_Reg>, <GWU_Reg>, <EGO_Reg>,
<EGU_Reg>, “<Name>”
.END_STATISTIC

Fields:
<Lng> Three-letter label for the language. Each language defined in
.LANGUAGES must have its own statistic block. If only one
language is defined, its input is optional. If no language is
defined and the .LANGUAGES instruction is missing, German is
used as the default.
<Gr_No> Number in the statistics group. Number between 1 and 20.
<Name> String as descriptor for the statistics group, the measurement or
parameter in the relevant language, up to 30 characters long.
<SerF> Optional: Path and file name for the serial number database. If
this field is entered, <Pos> and <Len> must also be given.
<Pos> Optional: Position of the entry in the serial number database. If
<SerF> is entered, this field must also be entered.
<Len> Optional: Key length within the serial number database. If
<SerF> is entered, this field must also be entered.
<Val_No> Number of the measurement value, between 1 and 255.
<DTyp> Data type of the measurement value or parameter. Valid
descriptors and their meanings are shown below.
<Dec> Decimal places for the display of fixed point numbers.
<Stat_Flag> Flag indicating a statistical analysis. 0 is no, 1 is yes.
<Prm_No> Number of the parameter, between 0 and 255.
<SecLevel> Security level required to change parameter, as number
between 0 and 9. The precise meanings are shown below.
<Soll_Reg> Register for the set value. The meaning of the notation is shown
below.
<GWO_Reg> Register for the upper limit value. The precise meaning is
shown below.
<GWU_Reg> Register for the lower limit value. The precise meaning is shown
below.
<EGO_Reg> Register for the upper intervention limit. Precise meanings are
shown below.
<EGU_Reg> Register for the lower intervention limit. Precise meanings are
shown below.

The following descriptors are available for <DTyp>:

10/26/05 – Ver.: 1.02 English ECCO Manual - 75/282 -


Horsch Elektronik AG .STATISTIC / GROUP / .END_STATISTIC

CODE Error code. Integer that describes the processing procedure.


DATE Date in days since January 1, 1980. Is named “Datum” in
STATREAD.
FIXED Signed fixed point number with <Dec> places after the point. Is
named “Float” in STATREAD.
LONG Signed parameter.
MACHINE Machine number. Integer that describes the machine. Is named
“Masch-Nr” in STATREAD.
PART_NO Unique work piece number. Is named “EDV-Nr” in STATREAD.
SER_NO<x> <x>th part of the work piece serial number. <x> is a digit. Is
named “Ser-Nr<x>” in STATREAD.
TIME Time in seconds since midnight with two decimal places for the
hundredths of a second. Is named “Uhrzeit” in STATREAD.
TIME_VAL Time duration in seconds with two decimal places for the
hundredths of a second. Is named “Zeit” in STATREAD.

<SecLevel> uses five security levels. Not all available levels are used in
STATREAD. Users require the following minimum levels to carry out the activities
shown:
4 Create and modify parameters.
Create and modify register sets.
3 Create and modify order numbers.
Change the reset time of scrap rates.
2 Set, print and display current parameters.
Print and transmit register sets to the control system.
Delete error log.
Reset an error rates.
Activate and deactivate reset time of scrap rates.
1 Transmit and delete order numbers.
Make entry in the history.
0 Change own password.

A non-standard notation is used for <Soll_Reg>, <GWO_Reg>, <GWU_Reg>,


<EGO_Reg> and <EGU_Reg> which not only indicates the register used, but also
whether such a register is required. Values allowed are:
-1 No register is used in ECCO for the value and no data is
transmitted. The value cannot be entered in STATREAD.
0 No register is used in ECCO for the value and no data is
transmitted but the value can be entered in STATREAD which
can then be used for, say, statistical analysis.
1 to 2047 The parameter is transmitted to the ECCO control system and
stored in the RW register with the appropriate number.

Comments:
This block serves to configure the STATREAD statistics within the ECCO program.
Using this information, the compiler can generate the .INI files for STATREAD
directly. If no analysis is to be performed by STATREAD, this block may be omitted.
The PRM parameter serves the dynamic configuration of the machine and are thus
input values, while the VAL values transmit measurement results and are therefore
outputs.

10/26/05 – Ver.: 1.02 English ECCO Manual - 76/282 -


Horsch Elektronik AG .STATISTIC / GROUP / .END_STATISTIC

The following commands are used in connection with STATREAD statistics:


CLR_PUFFER MOV_PUFFER NEW_PUFFER POWER_OFF PUFFER
RD_PUFFER SCHICHT STAT_CLR STAT_SEND STAT_TAKT
STCKZAHL

Upper and lower limits and upper and lower intervention limits can be set for all
parameters with set values. The difference between limits and intervention limits is
that all work pieces where parameters are outside the limits are classified as scrap.
In contrast, intervention limits serve as a warning outside of which the programmer
can program corrective measures, such as auto-calibration. If intervention limits are
specified, they should be within the limits.

Example:
The example writes a statistics group to a machine.
.STATISTIC ENG
GROUP 1, “Group 1”, H:\SerNos\ser.btr, 1, 2

VAL 1.1, PART_NO, 0, 0, “Part Number”


VAL 1.2, DATE, 0, 0, “Date”
VAL 1.3, CODE, 0, 0, “Scrap Code”
VAL 1.4, TIME_VAL, 2, 1, “Cycle Time”
VAL 1.5, FIXED, 3, 1, “Value (3 decimal places)”

PRM 1.0, LONG, 0, 4, 610,611,612,-1,-1, “Prm 1”


PRM 1.5, LONG, 0, 3, 615, 0, 0,-1,-1, “Val for Val1.5”
.END_STATISTIC

See also:
83 .ZPOINT / ANLAGE / RACK / .END_ZPOINT
102 CLR_PUFFER
159 MOV_PUFFER
160 NEW_PUFFER
168 POWER_OFF
170 PUFFER
172 RD_PUFFER
184 SCHICHT
195 STAT_CLR
199 STAT_SEND
201 STAT_TAKT
202 STCKZAHL
[6] STATREAD – User’s Guide, Horsch Elektronik AG, Version 1.26, 1997.
[7] STATREAD + STATCALC – Configuration and Technical Documentation,
Horsch Elektronik AG, Version 1.26, 1997.

10/26/05 – Ver.: 1.02 English ECCO Manual - 77/282 -


Horsch Elektronik AG .STOP_IO_TEXT

.STOP_IO_TEXT

Limits the output of IO text displayed when in debug mode.

Syntax:
.STOP_IO_TEXT <Chars>

Fields:
<Chars> Number of characters to which output is limited.

Comments:
Application programs can be interrupted at will with the “Stop” key. On this event, the
message “PROGRAM STOPPED” appears and the “Esc” and “OK” key light up. The
runtime environment also shows the inputs for which the program is waiting. This
command thus limits the description of these inputs.
In all other situations such as the SMOV command, full IO text is used.

Example:
.STOP_IO_TEXT 90 ; Limit IO text on “Stop” to
; 90 characters.

See also:
53 .IO_TEXT / .END_IO_TEXT
197 SMOV

10/26/05 – Ver.: 1.02 English ECCO Manual - 78/282 -


Horsch Elektronik AG .STRING_REG / .END_STRING_REG

.STRING_REG / .END_STRING_REG

Declares the format of a variable string.

Syntax:
.STRING_REG
SR<Start>[-<Range>] = <Type>
[SR<Start>[-<Range>] = <Type>]
.END_STRING_REG

Fields:
<Start> First SR register whose type is set.
<Type> Type of format of the string. Valid types are shown below.
<Range> Optional: Last SR register whose type is input in this line.

Possible type labels for <Type> are:


D Date format as used by, say, DATEDISP: #jjjj/mm/tt#.
R Register format as used by, say, REGDISP: #8.4.2#.
T Time format as used by, say, TIMEDISP: #hh:mm:ss:pp#.

Comments:
Strings are up to 120 characters long but the format must appear in the first 30
characters. Because strings with no formatting have no <Type> descriptor, they may
not be listed here.

Example:
.STRING_REG
SR100-199=R
SR200-249=T
SR250-259=D
.END_STRING_REG

10/26/05 – Ver.: 1.02 English ECCO Manual - 79/282 -


Horsch Elektronik AG .STRINGS / .END_STRINGS

.STRINGS / .END_STRINGS

This compiler directive defines the constant strings in a language.

Syntax:
.STRINGS [<Lng>]
ST<Number> = “<Text>”
[ST<Number> = “<Text>”]
.END_STRINGS

Fields:
<Lng> Three-letter label for the language. Each language defined in
.LANGUAGES must have its own station block. If only one
language is defined, its input is optional.
ST<Number> Descriptor if the string to which <Text> is allocated. For the
numbering, see below.
<Text> Text to which the descriptor is allocated.

Comments:
Up to 2048 strings can be defined for each language. The numbering of the strings
begins with 1 and must be incremented each time by 1 with no gaps.
Depending on its use, <Text> may include formatting instructions or not. These are
explained under the output commands.
CDATEDISP CREGDISP CTIMEDISP CWRITE DATEDISP
HP_CDATEDISP HP_CREGDISP HP_CTIMEDISP HP_CWRITE HP_DATEDISP
HP_REGDISP HP_TIMEDISP HP_WRITE NUM_INP REGDISP
TIMEDISP VI_DATE VI_TIME VI_WRITE WRITE

Example:
.STRINGS ENG
ST001 = “String without formatting.”
ST002 = “String with #8.4.2# formatting.”
.END_STRINGS

See also:
55 .LANGUAGES
100 CDATEDISP
107 CREGDISP
108 CTIMEDISP
109 CWRITE
110 DATEDISP
122 HP_CDATEDISP
125 HP_CREGDISP
127 HP_CTIMEDISP
129 HP_CWRITE
125 HP_DATEDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 80/282 -


Horsch Elektronik AG .STRINGS / .END_STRINGS

131 HP_REGDISP
132 HP_TIMEDISP
133 HP_WRITE
163 NUM_INP
175 REGDISP
217 TIMEDISP
225 VI_DATE
231 VI_TIME
233 VI_WRITE
237 WRITE

10/26/05 – Ver.: 1.02 English ECCO Manual - 81/282 -


Horsch Elektronik AG .TEXT

.TEXT

Inputs a short text to describe the program.

Syntax:
.TEXT “<Text>”

Fields:
<Text> Text used to describe the program. ECCO displays this text
automatically on initialization, after loading a program and after
switching on the power supply.

Comments:
This instruction allows the definition of a text displayed on the bottom line of the
terminal on start-up. Typically, this is the date and version number of the software.

Example:
.TEXT “BASE_200 Rev.1.01, 01.01.2004/autor”

10/26/05 – Ver.: 1.02 English ECCO Manual - 82/282 -


Horsch Elektronik AG .TINP_TEXT / .END_TINP_TEXT

.TINP_TEXT / .END_TINP_TEXT

Defines the parameter transfer for the TINP command.

Syntax:
.TINP_TEXT
TIMEOUT <SR_LineText>
CONDITION <SR_Cond>
IO_TEXT <SR_IOText>
REGISTER <Line>
.END_TINP_TEXT

Fields:
<SR_LineText> Is initialized by operating system with the text “TIMEOUT AT
LINE: #6.0.0#?”.
<SR_Cond> If the TINP command goes into a timeout, the operating system
writes the first unsatisfied condition into this register.
<SR_IOText> If the TINP command goes into a timeout, the operating system
writes the .IO_TEXT of the first unsatisfied condition into this
register in the selected language.
<Line> RW type register in which the operating system writes the line in
which the TINP command went into a timeout.

Comments:
The interplay between this command and .ERROR_CODE_START,
ERROR_PROTOTYPE, TINP, error flags and variable strings is explained under the
TINP command.
The position of the command is shown in the example and is mandatory.
When porting older programs, care must be taken on the fact that in SMC42, <Line>
had to be a register of type RV; in ECCO, it must now be an RW register.

Example:
The command is used canonically as follows:
.ADDRESS 0
NULL:

.ERROR_CODE_START 25000 ; Min. Val. 5000, Max. 25000

.TINP_TEXT
TIMEOUT SR0101 ;TIMEOUT AT LINE
CONDITION SR0102 ;1ST UNMATCHED CONDITION
IO_TEXT SR0103 ;IO_TEXT OF THE UNM. COND
REGISTER RW0069 ;ECCO PROGRAM LINE NUMBER
.END_TINP_TEXT

10/26/05 – Ver.: 1.02 English ECCO Manual - 83/282 -


Horsch Elektronik AG .TINP_TEXT / .END_TINP_TEXT

See also:
42 .ADDRESS
48 .ERROR_CODE_START
53 .IO_TEXT / .END_IO_TEXT
242 ERROR_PROTOTYPE
221 TINP

10/26/05 – Ver.: 1.02 English ECCO Manual - 84/282 -


Horsch Elektronik AG .UNLOCK / .END_UNLOCK

.UNLOCK / .END_UNLOCK

Specifies outputs, registers, variable strings, error flags and flags to be written by
external interconnected ECCO systems.

Syntax:
.UNLOCK
<Element>[-<Stop>]
[<Element>[-<Stop>]]
.END_UNLOCK

Fields:
<Element> An output, variable string, flag, error flag or RV or RW register.
This element will be unlocked.
<Stop> Optional: Serves to input a range. In this case, all elements
between <Element> und <Stop> are unlocked. A number with
no identifying letter.

Comments:
Outputs, flags, error flags, variable strings and registers are automatically protected
against overwriting by an interconnected ECCO. Overwriting must be explicitly
allowed through this declaration.
If an attempt to overwrite a locked element is made, then the program will be stopped
in the ECCO system that made the attempt, until it is interrupted by the relevant
TIMETRAP, TRAP or triggering of an emergency stop. The other tasks continue even
though the external control system is stopped.
Note that no element locally protected by .PROTECTED can be unlocked for external
access by .UNLOCK.

Example:
.UNLOCK
A001-032
A193
M100
D101-199
SR100
RV001
RW101
.END_UNLOCK

See also:
66 .PROTECTED / .END_PROTECTED

10/26/05 – Ver.: 1.02 English ECCO Manual - 85/282 -


Horsch Elektronik AG .ZPOINT / ANLAGE / RACK / .END_ZPOINT

.ZPOINT / ANLAGE / RACK / .END_ZPOINT

Defines various parameters for communication with the ZPoint software.

Syntax:
.ZPOINT [<Lng>]
ANLAGE “<Anlage_Name>”, <Anz_GS>
[RACK <DB_No>, <Gateway_ID>]
GS <GS_No>, <Anz_Mod>, <DB_No>, <Gateway_ID>,
<R_Base>, <F_Base>, <Gruppe>, “<GS_Name>”
M <GS_No>.<Modul_No>, <DB_No>, <Gateway_ID>,
<R_Base>, <F_Base>, <Gruppe>, “<Modul_Text>”
PRM <GS_No>.<Modul_No>.<PRM_No>, <RW_No>,
“<PRM_Text>”
EW <GS_No>.<Modul_No>.<EW_No>, <RW_No>,
“<EW_Text>”
VAL <GS_No>.<Modul_No>.<VAL_No>, <Typ>, <Dez>,
“<Val_Text>”
.END_ZPOINT

Fields:
<Lng> Three-letter label for the language. Each language defined in
.LANGUAGES must have its own ZPoint block. If only one
language is defined, this is optional. If no language is defined
and the .LANGUAGES instruction is missing, German is used as
the default.
<Anlage_Name> Name of the machine for the ZPoint software as a string in the
relevant language, up to 40 characters long.
<Anz_GS> Number of systems in the machine. The limits depend on the
ZPoint version.
<DB_No> Data block number of the gateway coupler. Up to 64 different
blocks can be used.
<Gateway_ID> Identification of the gateway if several gateways are used.
<GS_No> Number for the system described. Value between 1 and
<Anz_GS>.
<Anz_Mod> Number up to 56 of the modules in this basic system.
<R_Base> Base register number for the user set values register block.
<F_Base> Base flag number for the reserved flag block.
<Gruppe> Statistics group for production data. A number between 0 and
20 where 0 means “no statistics”.
<GS_Name> Name of the basic system in the relevant language up to 40
characters long.
<Modul_No> Module number between 0 and <Anz_Mod> of the basic
system. In PRM, EW and VAL inputs, 0 means the system and
the other numbers indicate an actual module.
<Modul_Text> Name of the module in the relevant language of up to 40 chars.

10/26/05 – Ver.: 1.02 English ECCO Manual - 86/282 -


Horsch Elektronik AG .ZPOINT / ANLAGE / RACK / .END_ZPOINT

<PRM_No> Parameter number. The number of the parameter implicitly


indicates the memory within the coupling block to ZPoint. The
parameters are numbered from 1 unbroken with the upper limit
defined by the ZPoint configuration.
<RW_No> RW or RV register that is reproduced.
<PRM_Text> Name of the parameter as text in the relevant language up to
40 characters long.
<EW_No> Number of the setting value. The number of each setting
implicitly indicates the memory within the coupling block to
ZPoint.
<EW_Text> Name of the setting value in the relevant language of up to 40
chars.
<VAL_No> Number of the value between 1 and 255. The number of the
value implicitly indicates the memory within the gateway coupler
memory.
<Typ> Data type of the value. S for signed and U for unsigned.
<Dez> Number of decimal places in fixed point notation.
<Val_Text> Name of the value in the relevant language of up to 40 chars.

Comments:
ZPoint is a production monitoring and operation control system package. It allows the
central administration and modification of settings and parameters of the machine
controlled by ECCO and to store measurements, cycle times and other information
from ECCO.
ZPoint communicates with ECCO through a gateway functionality which
automatically transfers the required details from ECCO registers to and from ZPoint.
In addition, product data called VAL in ZPoint are transferred to ZPoint through
buffers.
Once, a gateway was a physical interface and the logical container for statistical
groups; nowadays, this is an equivalent software module. Normally, a basic system
consists of an ECCO controlled machine and modules or stations. In each case, the
customer must make the precise allocation in accordance with the relevant ZPoint
configuration.
The guidelines and customer instructions must be complied with in the use of ZPoint.

The following commands are used for communication with ZPoint:


.ERROR_FLAG_OFFSET GW_DD GW_DW GW_MSG GW_RD_DD
GW_RD_DW MOV_PUFFER NEW_PUFFER PUFFER STAT_TAKT

STATREAD software provides certain functions in a simpler and more transparent


form.

Example:
.ZPOINT ENG
ANLAGE “DEMO-MACHINE”, 1
RACK 108, 1

; 1 GS w/ 2 modules, DB_No 109, Gateway ID 1, Registers ...


; ... start at RV/RW1900, flags at M0700, statics group 1

10/26/05 – Ver.: 1.02 English ECCO Manual - 87/282 -


Horsch Elektronik AG .ZPOINT / ANLAGE / RACK / .END_ZPOINT

GS 1, 2, 109, 1, 1900, 0700, 1, “DEMO”

; 2 Moduls
M 1.1, 100, 1, 1910, 0710, 0, “MODUL 1”
M 1.2, 101, 1, 1920, 0720, 0, “MODUL 2”

; Parameters (2 for GS, 3 for each module)


PRM 1.0.1, RW1500, “TYPE”
PRM 1.0.2, RW1510, “CYCLE-TIME REF.”

PRM 1.1.1, RW1521, “PARAMETER 1 FOR MODULE 1”


PRM 1.1.2, RW1522, “PARAMETER 2 FOR MODULE 1”
PRM 1.1.3, RW1523, “PARAMETER 3 FOR MODULE 1”

PRM 1.2.1, RW1524, “PARAMETER 1 FOR MODULE 2”


PRM 1.2.2, RW1525, “PARAMETER 2 FOR MODULE 2”
PRM 1.2.3, RW1526, “PARAMETER 3 FOR MODULE 2”

; Set Values
EW 1.0.1, RW1001, “SOME OFFSET”
EW 1.0.2, RW1002, “ANOTHER SET VALUE”

; Production data
VAL 1.0.1, S, 0, “PART NUMBER”
VAL 1.0.2, S, 3, “SOME LENGTH”
.END_ZPOINT

See also:
48 .ERROR_FLAG_OFFSET
55 .LANGUAGES
75 .STATISTIC / GROUP / .END_STATISTIC
116 GW_DD
117 GW_DW
118 GW_MSG
119 GW_RD_DD
121 GW_RD_DW
159 MOV_PUFFER
160 NEW_PUFFER
170 PUFFER
201 STAT_TAKT

10/26/05 – Ver.: 1.02 English ECCO Manual - 88/282 -


Horsch Elektronik AG ABS

ABS

Allocates the absolute amount of the source register to the destination register.

Syntax:
ABS <Dest>, <Source>

Fields:
<Dest> Destination register of type AV, AW, RV, RW, LV, LW or ZW.
<Source> Source register of type AV, AW, RV, RW, LV, LW, KV, KW or ZW.

Comments:
In arrays, only single elements can act as source or destination.

Example:
MOV RW001, -5
ABS RW002, RW001 ; RW002 = +5

ABS AV001(1), AV001(2)

10/26/05 – Ver.: 1.02 English ECCO Manual - 89/282 -


Horsch Elektronik AG AND

AND

The destination value corresponds to the logical AND link of all input source values.

Syntax:
AND <Dest>, <Source>, <Source> [, <Source>]
or
AND <DestReg>, <SrcReg>, <SrcReg> [, <SrcReg>]

Fields:
<Dest> An output, flag or error flag.
<Source> An output, input, flag or error flag.
<DestReg> A register of type AV, AW, RV, RW, LV, LW or ZW.
<SrcReg> A register (AV, AW, RV, RW, LV, LW, ZW, KV or KW) or a direct
numerical value. Must have the same bit width as <DestReg>.

Comments:
A mixture of registers on one side and inputs and outputs and flags on the other is
not allowed.

For inputs and outputs and flags the destination is precisely H if all sources are H.
For registers, the result is constructed in bits and the destination bit is precisely 1 if
all sources are 1.
The destination <Dest> may not be one of the <Source> sources. Only inputs and
outputs of the machines own control system may be input.

Examples:
Output A024 is only raised when inputs E010 to E014 are raised.
AND A024, E010, E011, E012, E013, E014

The second example shows use with registers.


MOV LW001, 42 ; 101010(b)
MOV LW002, 36 ; 100100(b)
AND LW003, LW001,LW002 ; AND 100000(b) = 32

AND LW004, LW001, 7 ; Lowest bits into LW004


; 010(b) = 2

See also:
161 NOT
165 OR
239 XOR

10/26/05 – Ver.: 1.02 English ECCO Manual - 90/282 -


Horsch Elektronik AG BMOV

BMOV

Copies a certain number of elements from one array to another.

Syntax:
BMOV <Dest>, <Source>, <Number>

Fields:
<Dest> The first index in the array which will be copied to.
<Source> The first index in the array which will be copied from.
<Number> Number of elements to be copied. A numerical value, an AV
element or an LV, RV or KV register.

Comments:
If any array element has not been declared or the indirectly addressed registers do
not exist, system error 65 “INDEX out of range” is generated.
If AW elements are copied into an AV array, the higher value bits will be dropped. In
the opposite case, the array will be copied as signed values.

Examples:
Copies elements 10 to 12 from array AV002 to elements 1 to 3 of array AV001.
BMOV AV001(1), AV002(10), 3
; AV001(1) <= AV002(10)
; AV001(2) <= AV002(11)
; AV001(3) <= AV002(12)

The second example has the same effect as the first, except that indirect addressing
is used.
MOV LV001, 1
MOV LV002, 10
MOV LV003, 3
BMOV AV001(LV001), AV002(LV002), LV003

See also:
44 .ARRAYS
156 MOV

10/26/05 – Ver.: 1.02 English ECCO Manual - 91/282 -


Horsch Elektronik AG BUS_OFF

BUS_OFF

Ends communication supervision of a Profibus master card.

Syntax:
BUS_OFF <Card>

Fields:
<Card> Master card that will be ended. Number between 1 and 10.

Comments:
The SW register that has access rights for the input card is reset. The SW register
has the address 40+<Card>.

Example:
BUS_OFF 1 ; Ends communication super-
; vision of the first card.
; and resets SW041.

See also:
63 .PROFIBUS_DEF / .MASTER / .END_PROFIBUS_DEF
93 BUS_ON

10/26/05 – Ver.: 1.02 English ECCO Manual - 92/282 -


Horsch Elektronik AG BUS_ON

BUS_ON

Starts supervision of communication of a Profibus master card.

Syntax:
BUS_ON <Card>

Fields:
<Card> Master card that will be started. Number between 1 and 10.

Comments:
To start supervision of the relevant Profibus card, rights are read from the USB
dongle. If the rights are not available, ECCO can hang up at any time and without
warning.
The system flag M027 indicates whether the USB dongle is present. If the dongle is
present and M027 thus H, the dongles serial number is kept in system register
SW040.
System registers SW041 to SW050 indicate whether a master card is being
supervised. The system register with the address 40+<Card> contains the value in
SW040, if card <Card> is being supervised, otherwise zero.

Example:
The example tries to start the watchdog for the first Master card only if the USB key
is present. If the command is successful, SW041 will contain the serial number of the
rights to indicate success.
IF M027 H
BUS_ON 1
END_IF

See also:
63 .PROFIBUS_DEF / .MASTER / .END_PROFIBUS_DEF
92 BUS_OFF

10/26/05 – Ver.: 1.02 English ECCO Manual - 93/282 -


Horsch Elektronik AG CALC

CALC

Performs a calculation.

Syntax:
CALC <Dest>, <Arg1> <Op> <Arg2>

Fields:
<Dest> Register in which the result will be written, of type RV, RW, LV,
LW, AV or AW.
<Arg1> First operand. An SW, RV, RW, LV, LW, AV, AW, KV, KW or ZW
register.
<Op> Operator. The basic operations +, -, * and / are allowed.
<Arg2> Second operand. In addition to the possibilities allowed in
<Arg1>, a direct numerical value is also allowed.

Comments:
If the destination register <Dest> is 16-bits wide, higher value bits will be truncated.
There is no monitoring for numerical overflows. Monitoring is restricted to division by
zero.

Examples:
Doubles the value in LW001 and writes the result in LW002.
CALC LW002, LW001 * 2

And again:
CALC LW002, LW001 + LW001

10/26/05 – Ver.: 1.02 English ECCO Manual - 94/282 -


Horsch Elektronik AG CALL

CALL

Branches to a routine.

Syntax:
CALL <Label>

Fields:
<Label> Routine branched to.

Comments:
Calls a routine that starts under the label named <Label>. The routine is ended with
the RET command and the program continues immediately after the CALL command.
A maximum of 16 routines can be nested.
No local register is opened for the routine so the routine shares the local register with
its caller. However, the callers supervision is interrupted.

Example:
Task STAT01 calls routine SUB1, which does nothing.
STAT01: ; Calling task
CALL SUB1 ; calls SUB1
CLOSE

SUB1: ; Called routine


RET ; Does nothing

See also:
164 OPEN
177 RET

10/26/05 – Ver.: 1.02 English ECCO Manual - 95/282 -


Horsch Elektronik AG CALLD

CALLD

Calls a display task.

Syntax:
CALLD @<Label>, I<Offset>, O<Offset>, F<Offset>,
D<Offset>, <Arg> [, <Arg>]

Fields:
<Label> Label of the display task with up to 15 characters.
<Offset> Offset for the inputs and outputs, flags and error flags by which
the arguments in the L_INP, L_OUTP und L_JMPCOND
instructions are to be offset. <Offset> must be a multiple of 8.
<Arg> Argument transferred of type RV, RW, LV, LW, KV or KW.
There must be precisely as many argument <Arg> input as declared in .DISPLAYS.

Comments:
This command starts the display task starting at @<Label>, which deactivates the
program task or function task currently running.
The 32-bit arguments must be input first. The first <Arg> argument is copied into in
LW001, the second into LW002 and so on. Then come the 16-bit arguments where
the first 16-bit argument is allocated to LV001, the second to LV002 and so on. It is
important that the 32-bit values are used as 32-bit arguments and 16-bit values as
16-bit arguments. As a result, there are up to 32 LV and up to 32 LW registers in the
display task.
All arguments are written back at the end of a display task upon RETD, so long as
<Arg> is not write-protected, as for constants or system registers.
Within a display task, no jumps may be made beyond the task boundaries defined by
@<Label> and the related RETD and no further display tasks or function tasks may
be called. If the RETD command is reached, the arguments will be written back as
described above and the task that called the display task reactivated.
Display tasks serve to make screen inputs and outputs within a clearly defined
environment and are primarily used to request parameters and the like from users.
One display task at the most is active with a higher priority than a PSL task which is
therefore suppressed. It can be interrupted by an error task. When the error task has
finished, the display task starts again from the beginning to ensure a well defined
display.
Supervision of the calling task is interrupted with a normal CALL.

Example:
The example shows an exemplary use of the display. The display task must first be
declared in the .DISPLAYS block.
.DISPLAYS
@DISP1, 1, 0 ; Only one 32-bit argument
.DISP_END

10/26/05 – Ver.: 1.02 English ECCO Manual - 96/282 -


Horsch Elektronik AG CALLD

The display task may be implemented as:


@DISP1:
; Do whatever.
; LW001 contains the first and only argument.
RETD

The call is then as follows:


CALLD @DISP1, I0, O0, F0, D0, RW030

See also:
46 .DISPLAYS
95 CALL
152 L_INP
153 L_JMPCOND
154 L_OUTP
178 RETD

10/26/05 – Ver.: 1.02 English ECCO Manual - 97/282 -


Horsch Elektronik AG CALLF

CALLF

Calls a function task.

Syntax:
CALLF #<Label>, I<Offset>, O<Offset>, F<Offset>,
D<Offset>, <Arg> [, <Arg>]

Fields:
<Label> Label of the function task with up to 15 characters.
<Offset> Offset for the inputs and outputs, flags and error flags by which
the arguments of the L_INP, L_OUTP und L_JMPCOND
instructions are to be offset. <Offset> must be a multiple of 8.
<Arg> Argument transferred of type RV, RW, LV, LW, KV or KW.

Comments:
The 32-bit arguments must be input first. The first <Arg> argument is copied into in
LW001, the second into LW002 and so on. Then come the 16-bit argument where the
first 16-bit argument is allocated to LV001, the second to LV002 and so on. It is
important that on 32-bit values can be used as 32-bit arguments and 16-bit values as
16-bit arguments. All arguments are written back at the end of a function task as long
as <Arg> is not a constant.
Functions must be declared in the .FUNCTIONS block. Depending on this, there may
be up to 32 LV and up to 32 LW registers in the function task.
This instruction copies the arguments as described above, starts the new function
task and deactivates the previous task. As soon as the function ends, i.e. when it
meets RETF, the arguments are copied back, unless they were constants in the
calling task, and this task continues just after CALLF. The task making the call can be
a normal program task or function, but not a background task. Supervision of the
calling task is interrupted, as with a normal CALL.

Example:
This example shows a function task. The declaration for this is:
.FUNCTIONS
#Funktion, 0.0, 1.2, “Example funktion”
.FUNC_END

The function task is then, for example:


#Funktion:
; LW001 and LV001, LV002 are available
RETF

The function is then called with:


CALLF #Funktion, I0, O0, F0, D0, RW001, KV001, RV001

10/26/05 – Ver.: 1.02 English ECCO Manual - 98/282 -


Horsch Elektronik AG CALLF

See also:
48 .FUNCTIONS / .FUNC_END
95 CALL
152 L_INP
153 L_JMPCOND
154 L_OUTP
180 RETF

10/26/05 – Ver.: 1.02 English ECCO Manual - 99/282 -


Horsch Elektronik AG CDATEDISP

CDATEDISP

Writes the date from a register on the display in color.

Syntax:
CDATEDISP <xPos>, <yPos>, <Size>, <Color>, <Register>,
<FText>

Fields:
<xPos> Column in which the date will be written. Valid values are in the
range 0 to 60.
<yPos> Line. Lower edge of the output. Valid values are in the range 0
to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Color> Color for the output. Valid values are 1 to 13, as shown in the
illustration on page 267.
<Register> Register that contains the date to be output, of type RW, AW or
LW.
<FText> Formatted text. Text limited either by quotes or an ST or SR
register. Allowable formatting is shown below.

<FText> has the format:


“[Text] #<Format># [Text]”
The following format descriptors are allowed in the <Format> format:
jjjj Writes the year with four digits.
jj Writes the year with two digits.
mm Writes the month with two digits from 01 for January to 12 for
December.
tt Writes the day of the day with two digits.

Comments:
The RD_TIME command is used to read in the date in a register.

Example:
The example reads the date in and outputs it in red.
RD_TIME RW100, RW101 ; Read time and date
CDATEDISP 1, 20, 1, 2, RW101, “Today: #tt/mm/jj#”

See also:
108 CTIMEDISP
110 DATEDISP
122 HP_CDATEDISP
174 RD_TIME

10/26/05 – Ver.: 1.02 English ECCO Manual - 100/282 -


Horsch Elektronik AG CLOSE

CLOSE

Closes a parallel task.

Syntax:
CLOSE

Comments:
If a running parallel cycle chain meets this command the task closes immediately.
The task is also removed from the active task list in the debugger.

Example:
Describes a station, or a task that implements the function of a station, that does
nothing.
STAT_NOTHING:
CLOSE ; Already finished

The station can be called with:


OPEN STAT_NOTHING

See also:
164 OPEN

10/26/05 – Ver.: 1.02 English ECCO Manual - 101/282 -


Horsch Elektronik AG CLR_PUFFER

CLR_PUFFER

Deletes a data buffer.

Syntax:
CLR_PUFFER <Puffer>

Fields:
<Puffer> A register of type RV, RW, AV, AW, LV or LW that gives the buffer
to be deleted in the range 0 to 199.

Comments:
The command may not be used when working with ZPoint.
If the buffer does not exist because <Puffer> is outside the valid range, nothing
happens.

Example:
NEW_PUFFER RV101, RW100, 1 ; Saves RW100 at the address
; 1 in a new buffer, to which
; RV101 then points.
CLR_PUFFER RV101 ; Delete this buffer

See also:
75 .STATISTIC / GROUP / .END_STATISTIC
160 NEW_PUFFER

10/26/05 – Ver.: 1.02 English ECCO Manual - 102/282 -


Horsch Elektronik AG CLS

CLS

Clears the whole terminal screen.

Syntax:
CLS

Comments:
This command is identical to
CLS_WIN 0, 200
CLS is to be preferred, as it makes no assumptions about the size of the display.

See also:
104 CLS_WIN

10/26/05 – Ver.: 1.02 English ECCO Manual - 103/282 -


Horsch Elektronik AG CLS_WIN

CLS_WIN

Deletes a number of lines on the screen.

Syntax:
CLS_WIN <Start>, <Stop>

Fields:
<Start> First line in the range to be cleared. Valid values are in the
range 0 to 199.
<Stop> Last line in the range to be cleared. Valid values are in the
range 1 to 200.
<Stop> must be greater than <Start>.

Comments:
It should be noted when porting older programs that modern terminals have a greater
number of lines.

Examples:
The first example deletes the content of the screen between lines 32 and 64.
CLS_WIN 32, 64

The second example clears the whole screen and is thus identical to CLS:
CLS_WIN 0, 200

See also:
103 CLS
122 HP_CLS_WIN

10/26/05 – Ver.: 1.02 English ECCO Manual - 104/282 -


Horsch Elektronik AG COND_TRAP / IF_COND / END_COND_TRAP

COND_TRAP / IF_COND / END_COND_TRAP

Allows the monitoring of several commands and the handling of multiple conditions.

Syntax:
COND_TRAP <Cond>[, <Cond>]
<Code>
IF_COND <Cond_No> [- <Cond_Range>]
<Cond_Code>
[IF_COND <Cond_No> [- <Cond_Range>]
<Cond_Code>]
END_COND_TRAP

Fields:
<Cond> One or more inputs and outputs, flags or error flags with the
desired level, H or L. If the level is no longer satisfied, the
relevant <Cond_Code> is executed. It is also possible to input a
time value as a number with duration in 10 ms units at the first
place. Up to 32 conditions are allowed.
<Code> The code that is monitored by the command.
<Cond_No> Number that indicated to which condition <Cond> the
<Cond_Code> relates.
<Cond_Range> Optional: Allows <Cond_Code> to handle several conditions
together. <Cond_Range> indicates the highest condition
<Cond> in the range.
<Cond_Code> Code that is executed when the related <Cond> is triggered by
the supervision for <Code>.

Comments:
The TRAP and TIMETRAP instruction blocks are less powerful alternatives to this
command. There must be an IF_COND block for each condition that handles a
condition.
Caution: If a further task is called, the supervision is interrupted until program flow is
restored.

Example:
The example shows a simple axis motion supervision:
OUTP A123 H, A124 H ; Start axes
COND_TRAP 100, E120 L, A123 H, A124 H
INP E121 H ; Wait for end position
IF_COND 1 ; Time (1 sec) elapsed
; Handle time elapsed case
IF_COND 2 ; E120->H: path blocked
; Handle blocked path
IF_COND 3-4 ; A123->L or A124->L
; Handle valve blockage
END_COND_TRAP

10/26/05 – Ver.: 1.02 English ECCO Manual - 105/282 -


Horsch Elektronik AG COND_TRAP / IF_COND / END_COND_TRAP

See also:
262 TIMETRAP / END_TIMETRAP
263 TRAP / IF_TRAP / END_TRAP

10/26/05 – Ver.: 1.02 English ECCO Manual - 106/282 -


Horsch Elektronik AG CREGDISP

CREGDISP

Formats and writes the value in a register to the display in color.

Syntax:
CREGDISP <xPos>, <yPos>, <Size>, <Color>, <Register>,
<FText>

Fields:
<xPos> Column in which the date will be written. Valid values are in the
range 0 to 60.
<yPos> Line. Lower edge of the output. Valid values are in the range 0
to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Color> Color of the output. Valid values are 1 to 13, as shown in the
illustration on page 267.
<Register> Value to be output. An SW, RV, RW, LV, LW, AV, AW, KV, KW or ZW
register.
<FText> Formatted text. Text limited either by quotes or an ST or SR
register. The allowed formatting is shown below.

The formatting in <FText> can be input as:


“[Text] #<Digits>.<DecPoint>.<RightShown># [Text]”
Meanings:
<Digits> Number of places reserved for output on the display. A negative
value allows left justified output with the number of places in the
amount.
<DecPoint> Number of places after the decimal point in the value output.
<RightShown> Number of places after the decimal to be output.
<Text> Optional: Additional unformatted text.

Comments:
The formatting of numbers allows working implicitly with fixed decimal numbers.
Note that overflowing places after the decimal will be curtailed and not rounded.

Example:
MOV RW001, 204567
CREGDISP 1, 20, 1, 1, RW001, “Value: #8.4.2# mm”
; Displays “Value: 20.45 mm”
; in black

See also:
125 HP_CREGDISP
175 REGDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 107/282 -


Horsch Elektronik AG CTIMEDISP

CTIMEDISP

Displays the time which is stored in a register on the display in color.

Syntax:
CTIMEDISP <xPos>, <yPos>, <Size>, <Color>, <Register>,
<FText>

Fields:
<xPos> Column from which the formatted text will be written. Valid
values are in the range 0 to 60.
<yPos> Lower edge of the output. Valid values are in the range 0 to
200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Color> Color for the output. Valid values are 1 to 13, as shown in the
illustration on page 267.
<Register> An RW, AW or LW register with the time to be output.
<FText> Formatted text. Text limited either by quotes or an ST or SR
register. The allowed formatting is shown below.

<FText> can contain up to 120 characters and has this format:


“[Text] #<Format># [Text]”
These format descriptors are allowed in the <Format> format:
hh Writes the hour in double-digit form, e.g. 08.
mm Writes the minute double-digit.
ss Writes the second double-digit.
pp Writes the hundredth of a second double-digit.

Comments:
The RD_TIME command is used to read in the date in a register.

Example:
The example reads the time in and outputs it in green.
RD_TIME RW100, RW101 ; Read time and date
CTIMEDISP 1, 20, 1, 8, RW100, “Time: #hh:mm#”

See also:
100 CDATEDISP
105 DATEDISP
127 HP_CTIMEDISP
174 RD_TIME
219 TIMEDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 108/282 -


Horsch Elektronik AG CWRITE

CWRITE

Outputs a string in color.

Syntax:
CWRITE <xPos>, <yPos>, <Size>, <Color>,
[<Start>, <Len>,] <Text>

Fields:
<xPos> Column from which <Text> will be written. Valid values are in
the range 0 to 60.
<yPos> Line. Lower edge of <Text>. Valid values are in the range 0 to
200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Color> Color for the output. Valid values are 1 to 13, as shown in the
illustration on page 267.
<Start> Optional: Position in <Text> from which it will be output. This
allows the output of individual parts of a string. The first
character is in position 1.
<Len> Optional: Length of the part of <Text> to be output. Must be
input if <Start> has been input but may not be used
otherwise.
<Text> Text to be output, up to 120 characters long. Either text limited
by quotes or an ST or SR register.
<Start> and <Len> must be selected so that they do not exceed the length of
<Text>. If <Start> and <Len> are not given, the whole string will be output.

Examples:
CWRITE 1, 10, 1, 2, “Hello World in RED”

The second example shows how the command can be used to output a part of an
input flag text. In .IO_TEXT:
E001, “AL UEBERWACHUNG NOT-AUS/AUS LEVEL E0 E001”
The output could then be:
SMOV SR0201, E001
CWRITE 0, 150, 2, 1, 35, 8, SR0201
; displays “E0 E001” in black

See also:
129 HP_CWRITE
238 WRITE

10/26/05 – Ver.: 1.02 English ECCO Manual - 109/282 -


Horsch Elektronik AG DATEDISP

DATEDISP

Displays the date stored in a register.

Syntax:
DATEDISP <xPos>, <yPos>, <Size>, <Register>, <FText>

Fields:
<xPos> Column from which the date will be written. Valid values are in
the range 0 to 60.
<yPos> Line. Lower edge of the output. Valid values are in the range 0
to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Register> Register that contains the date to be output, of type RW, AW or
LW.
<FText> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

<FText> has the following format:


“[Text] #<Format># [Text]”
These format descriptors are allowed in the <Format> format:
jjjj Writes the year with four digits.
jj Writes the year with two digits.
mm Writes the month with two digits from 01 for January to 12 for
December.
tt Writes the day of the month with two digits.

Comments:
The RD_TIME command is required to read in the date in a register.

Example:
The example reads the date in and outputs it in two ways.
RD_TIME RW100, RW101 ; Read time and date
DATEDISP 1, 20, 1, RW101, “Today: #mm/tt/jj#”
DATEDISP 1, 30, 1, RW101, “Year: #jjjj#”

See also:
125 HP_DATEDISP
132 HP_TIMEDISP
174 RD_TIME
217 TIMEDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 110/282 -


Horsch Elektronik AG DO / DO_WHILE / DO_WHILENOT

DO / DO_WHILE / DO_WHILENOT

Repeats a program block as long as the input condition holds.

Syntax:
DO
<Code>
DO_WHILE <Comparison>
or
DO
<Code>
DO_WHILE <Condition>
or
DO
<Code>
DO_WHILENOT <Condition>

Fields:
<Code> Program block that will be executed.
<Comparison> A comparative condition that defines whether the <Code>
should be executed once again.
<Condition> A logical condition or a timer that defines whether the <Code>
should be executed once again.

<Comparison> is constructed like this:


<Operand> <Operator> <Operand>
Meanings:
<Operand> A directly input number or a register of the type SW, RV, RW, AV,
AW, LV, LW, KV, KW, C, T or ZW. It is thus possible, but not very
practical to compare two timers.
<Operator> The comparative operators <, >, =, <=, >= or <>.

<Condition> is either a timer or one or more inputs and outputs, flags or error flags
with the desired level, H or L.

Comments:
In contrast to the WHILE command, <Code> is always executed at least once,
because the condition is checked only after execution.
DO_WHILE with inputs and outputs and flags loops only when all levels are correct.
DO_WHILENOT loops unless all levels hold.
If this command is used to constantly query a value from an external control system,
it must be ensured that the control system and the data bus used are not overloaded.
Typically, this is prevented by waiting for a short time after each query. Only inputs
and outputs of the interconnected ECCO may be queried.

Examples:
The first example shows the use of comparisons.

10/26/05 – Ver.: 1.02 English ECCO Manual - 111/282 -


Horsch Elektronik AG DO / DO_WHILE / DO_WHILENOT

MOV LV001, 100


DO
CALC LV001, LV001 – 1 ; Run through loop 100 times
DO_WHILE LV001 > 0

The second example shows the usual use of a timer.


SETTIM T0, 100 ; Wait for 1 second
DO
; Do whatever
DO_WHILENOT T0

The last example shows the use of inputs and outputs and flags. The loop is only
repeated if all four conditions have been satisfied.
DO
; Do whatever
DO_WHILE E101 L, E102 H, A200 H, M100 L

See also:
235 WHILE / WHILENOT /END_WHILE

10/26/05 – Ver.: 1.02 English ECCO Manual - 112/282 -


Horsch Elektronik AG END_NUM_INP

END_NUM_INP

Stops waiting for input by NUM_INP.

Syntax:
END_NUM_INP

Comments:
The command is typically useful only to interrupt a monitored input, but can be used
across tasks. The input value of NUM_INP stays at its original value.

Example:
The example shows the usual use. The command prevents a machine standstill due
to an incorrect user input.
COND_TRAP 500 ; Gives the user 5 seconds
; for input
NUM_INP 1, 20, 1, LV001, “Value: #4.2.2#”
IF_COND 1 ; Handle time overflow
END_NUM_INP ; Stop input
OUTP D0100 H ; and start error task
INP D0100 L
END_COND_TRAP

See also:
105 COND_TRAP / IF_COND / END_COND_TRAP
163 NUM_INP

10/26/05 – Ver.: 1.02 English ECCO Manual - 113/282 -


Horsch Elektronik AG EXCL

EXCL

Allows exclusive access to a resource.

Syntax:
EXCL <Mutex> L

Fields:
<Mutex> An output or flag that controls the exclusive access.

Comments:
Allows mutual exclusion of several concurrent tasks during access to shared
resources such as sub-programs, PSL tasks or registers.
All tasks that want to access the resource, begin with the EXCL query which waits
until <Mutex> is low. If this condition has been satisfied, <Mutex> is raised
automatically and atomically. This prevents a second waiting chain from accessing
the resource.
At the end of the critical section the flag or output must be lowered so other waiting
tasks can now use the resource.
Checking and setting are two inseparable operations and are executed
simultaneously and atomically. This is the only way to ensure mutual exclusion.
The output for <Mutex> may only come from an interconnected ECCO.

Example:
Example of two tasks which want to access the same subroutine:
TASK1:
; Uncritical section
EXCL M050 L ; Critical section starts.
; M033 -> H
CALL SUB_PROG1
OUTP M050 L ; Critical section finished.
CLOSE

TASK2:
; Uncritical section
EXCL M050 L ; Critical section starts.
; M033 -> H
CALL SUB_PROG1
OUTP M050 L ; Critical section finished.
CLOSE

SUB_PROG1:
; ... ; Shared resource
RET

10/26/05 – Ver.: 1.02 English ECCO Manual - 114/282 -


Horsch Elektronik AG GET_PSL

GET_PSL

Reads in the current PSL page.

Syntax:
GET_PSL <Dest>

Fields:
<Dest> An RV or LV register in which the address of the current PSL
page will be written in code.

Comments:
The value of <Dest> corresponds to 256*line + column of the PSL page. Thus the
value 515=2*256+3 on PSL page 2.3.
In most cases, the value itself is not of interest, because it will be used only to
reconstruct the PSL page with SET_PSL.
If no PSL page is shown, the command returns the last page selected.

Example:
GET_PSL RV008

See also:
67 .PSL
190 SET_PSL

10/26/05 – Ver.: 1.02 English ECCO Manual - 115/282 -


Horsch Elektronik AG GW_DD

GW_DD

Writes a 32-bit value (in Intel 80x86 parlance called DD) in a ZPoint gateway data
block.

Syntax:
GW_DD <GS_No>.<Modul_No>, <Index>, <Value>

Fields:
<GS_No> Number of the basic system.
<Modul_No> Number of the module.
<Index> Memory position within the data block. Valid values are in the
range 0 to 65535.
<Value> Value to be send. A register of the type LW, RW, AW, KW or ZW.

Example:
Sends the value zero to memory position 44 in ZPoint module 61.
MOV LW001, 0
GW_DD 1.61, 44, LW001

See also:
83 .ZPOINT / ANLAGE / RACK / .END_ZPOINT
117 GW_DW
118 GW_MSG
119 GW_RD_DD
121 GW_RD_DW

10/26/05 – Ver.: 1.02 English ECCO Manual - 116/282 -


Horsch Elektronik AG GW_DW

GW_DW

Writes a 16-bit value (in Intel 80x86 parlance called DD) in a ZPoint gateway data
block.

Syntax:
GW_DW <GS_No>.<Modul_No>, <Index>, <Value>

Fields:
<GS_No> Number of the basic system.
<Modul_No> Number of the module.
<Index> Memory position within the data block. Valid positions are in the
range 0 to 65535.
<Value> Value to be sent. A register of type AV, AW, RV, RW, LV, LW, KW
or ZW.

Comments:
Caution: In ECCO the letter W in register means 32-bit width. This command writes
only 16-bit, because in Intel 80x86 language, DW stands for a 16-bit register, also
known as Data Word.

Example:
Sends the value zero to memory position 46 in ZPoint module 61.
MOV LV001, 0
GW_DW 1.61, 46, LV001

See also:
83 .ZPOINT / ANLAGE / RACK / .END_ZPOINT
116 GW_DD
118 GW_MSG
119 GW_RD_DD
121 GW_RD_DW

10/26/05 – Ver.: 1.02 English ECCO Manual - 117/282 -


Horsch Elektronik AG GW_MSG

GW_MSG

Sends a message or any value direct to a gateway.

Syntax:
GW_MSG <GS_No>.<Modul_No>, <Msg>

Fields:
<GS_No> Number of the basic system.
<Modul_No> Number of the module.
<Msg> Value or message to be sent. A register of type AV, AW, RV, RW,
LV, LW, KW or ZW.

Comments:
The command is used to send a message direct to a gateway without changing the
content of the data block. The message is addressed to a data block by
<GS_No>.<Modul_No> but is received by the super-ordinated gateway.

Example:
Send the value 1 to the gateway of data block 1.0.
MOV LV001, 1
GW_MSG 1.0, LV001

See also:
83 .ZPOINT / ANLAGE / RACK / .END_ZPOINT
116 GW_DD
117 GW_DW
119 GW_RD_DD
121 GW_RD_DW

10/26/05 – Ver.: 1.02 English ECCO Manual - 118/282 -


Horsch Elektronik AG GW_QUEUE

GW_QUEUE

Returns the number of buffered messages in the gateway.

Syntax:
GW_QUEUE <Register>

Fields:
<Register> Register of type LV, LW, AV, AW, RV or RW in which the number
of buffered messages will be written.

Comments:
The command is used to ensure that on finishing or a shift change the system can
only continue when all messages have been read out of the gateway.

Example:
Waits until there is no more data available:
DO
STAT_QUEUE LW001, LW002
GWY_QUEUE LW003
CALC LW004, LW001 + LW003
DO_WHILENOT LW004=0

See also:
83 .ZPOINT / ANLAGE / RACK / .END_ZPOINT
200 STAT_QUEUE

10/26/05 – Ver.: 1.02 English ECCO Manual - 119/282 -


Horsch Elektronik AG GW_RD_DD

GW_RD_DD

Reads a 32-bit value (called DD in Intel 80x86 parlance) from a gateway data block.

Syntax:
GW_RD_DD <GS_No>.<Modul_No>, <Index>, <Register>

Fields:
<GS_No> Number of the basis system.
<Modul_No> Number of the module.
<Index> Memory position within the data block. Valid values are in the
range 0 to 65535.
<Register> Register that will be read into of type LW, RW or AW.

See also:
83 .ZPOINT / ANLAGE / RACK / .END_ZPOINT
116 GW_DD
117 GW_DW
118 GW_MSG
121 GW_RD_DW

10/26/05 – Ver.: 1.02 English ECCO Manual - 120/282 -


Horsch Elektronik AG GW_RD_DW

GW_RD_DW

Reads a 16-bit value (called DD in Intel 80x86 parlance) from a gateway data block.

Syntax:
GW_RD_DW <GS_No>.<Modul_No>, <Index>, <Register>

Fields:
<GS_No> Number of the basis system.
<Modul_No> Number of the module.
<Index> Memory position within the data block. Valid values are in the
range 0 to 65535.
<Register> Register that will be read into of type LW, AV, AW, RV or RW.

Comments:
Caution: In ECCO the letter W in register means 32-bit width. This command writes
only 16-bit, because in Intel 80x86 parlance, DW stands for a 16-bit register (i.e. Data
Word).
The conversion from 16 to 32-bit takes account of the sign.

See also:
83 .ZPOINT / ANLAGE / RACK / .END_ZPOINT
116 GW_DD
117 GW_DW
118 GW_MSG
119 GW_RD_DD

10/26/05 – Ver.: 1.02 English ECCO Manual - 121/282 -


Horsch Elektronik AG HP_CDATEDISP

HP_CDATEDISP

Writes the date stored in a register on the display in color. Is high priority, meaning it
will not be blocked by an error or display task.

Syntax:
HP_CDATEDISP <xPos>, <yPos>, <Size>, <Color>, <Register>,
<FText>

Fields:
<xPos> Column from which the date will be written. Valid values are in
the range 0 to 60.
<yPos> Line. Lower edge of the output. Valid values are in the range 0
to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Color> Color for the output. Valid values are 1 to 13, as shown in the
illustration on page 267.
<Register> Register that contains the date to be output, of type RW, AW or
LW.
<FText> Formatted text. Either text limited by quotes or an ST or SR
register of up to 120 characters. The allowed formatting is
shown below.

<FText> has this formatting:


“[Text] #<Format># [Text]”
The following format descriptors are allowed in <Format>:
jjjj Writes the year with four digits.
jj Writes the year with two digits.
mm Writes the month with two digits from 01 for January to 12 for
December.
tt Writes the day of the month with two digits.

Comments:
The RD_TIME command is used to read in the current date into a register.
Normally a display command will not be executed when an error or display task is
active in parallel. High priority display commands will be executed and displayed
even under these circumstances. They are, therefore, suitable for the display of
messages that must be displayed to the user in all circumstances.

Example:
The example reads the date in and outputs it with high priority in red.
RD_TIME RW100, RW101 ; Read time and date
HP_CDATEDISP 1, 20, 1, 2, RW101, “Today: #tt/mm/jj#”

10/26/05 – Ver.: 1.02 English ECCO Manual - 122/282 -


Horsch Elektronik AG HP_CDATEDISP

See also:
100 CDATEDISP
108 CTIMEDISP
110 DATEDISP
127 HP_CTIMEDISP
130 HP_DATEDISP
174 RD_TIME

10/26/05 – Ver.: 1.02 English ECCO Manual - 123/282 -


Horsch Elektronik AG HP_CLS_WIN

HP_CLS_WIN

Deletes a number of lines on the screen. Is high priority, meaning it will not be
blocked by an error or display task.

Syntax:
HP_CLS_WIN <Start>, <Stop>

Fields:
<Start> First line in the range to be cleared. Valid values are in the
range 0 to 199.
<Stop> Last line in the range to be cleared. Valid values are in the
range 1 to 200.
<Stop> must be greater than <Start>.

Comments:
It should be noted when porting older programs that modern terminals have more of
lines.
Normally a display command will not be executed when an error or display task is
active in parallel. High priority display commands will be executed and displayed
even under these circumstances. They are, therefore, suitable for the display of
messages that must be displayed to the user in all circumstances.

Example:
The example deletes the content of the screen between lines 32 and 64.
HP_CLS_WIN 32, 64

See also:
103 CLS
104 CLS_WIN

10/26/05 – Ver.: 1.02 English ECCO Manual - 124/282 -


Horsch Elektronik AG HP_CREGDISP

HP_CREGDISP

Formats and writes a value in a register to the display in color. Is high priority,
meaning it will not be blocked by an error or display task.

Syntax:
HP_CREGDISP <xPos>, <yPos>, <Size>, <Color>, <Register>,
<FText>

Fields:
<xPos> Column in which the date will be written. Valid values are in the
range 0 to 60.
<yPos> Line. Lower edge of the output. Valid values are in the range 0
to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Color> Color for the output. Valid values are 1 to 13, as shown in the
illustration on page 267.
<Register> Register holding the value to be output. An SW, RV, RW, LV, LW,
AV, AW, KV, KW or ZW register.
<FText> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

The formatting in <FText> is input as:


“[Text] #<Digits>.<DecPoint>.<RightSize># [Text]”
Meanings:
<Digits> Number of places reserved for output on the display. A negative
value allows left justified output with the number of places in the
amount.
<DecPoint> Number of places after the decimal point in the value.
<RightSize> Number of places after the decimal point to be shown.
<Text> Optional: Additional unformatted text.

Comments:
The formatting of numbers allows working implicitly with fixed decimal numbers.
Note that overflowing places after the decimal will be curtailed and not rounded.
Normally a display command will not be executed when an error or display task is
active in parallel. High priority display commands will be executed and displayed
even under these circumstances. They are, therefore, suitable for the display of
messages that must be displayed to the user in all circumstances.

Example:
MOV RW001, 204567
HP_CREGDISP 1, 20, 1, 1, RW001, “Value: #8.4.2#mm”
; Displays “Value: 20.45mm”
; w/ HP, in black

10/26/05 – Ver.: 1.02 English ECCO Manual - 125/282 -


Horsch Elektronik AG HP_CREGDISP

See also:
107 CREGDISP
131 HP_REGDISP
175 REGDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 126/282 -


Horsch Elektronik AG HP_CTIMEDISP

HP_CTIMEDISP

Displays the time stored in a register with high priority in color. Is high priority,
meaning it will not be blocked by an error or display task.

Syntax:
HP_CTIMEDISP <xPos>, <yPos>, <Size>, <Color>, <Register>,
<FText>

Fields:
<xPos> Column from which the formatted text will be written. Valid
values are in the range 0 to 60.
<yPos> Line. Lower edge of the output. Valid values are in the range 0
to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Color> Color for the output. Valid values are 1 to 13, as shown in the
illustration on page 267.
<Register> An RW, AW or LW register with the time to be output.
<FText> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

<FText> can contain up to 120 characters and has this formatting:


“[Text] #<Format># [Text]”
These format descriptors are allowed in <Format>:
hh Writes the hour in double-digit form, e.g. 08.
mm Writes the minute double-digit.
ss Writes the second double-digit.
pp Writes the hundredth of a second double-digit.

Comments:
The RD_TIME command is used to read in the date in a register.
Normally a display command will not be executed when an error or display task is
active in parallel. High priority display commands will be executed and displayed
even under these circumstances. They are, therefore, suitable for the display of
messages that must be displayed to the user in all circumstances.

Example:
The example reads the time in and displays it with high priority in green.
RD_TIME RW100, RW101 ; Read time and date
HP_CTIMEDISP 1, 20, 1, 8, RW100, “Time: #hh:mm#”

See also:
100 CDATEDISP
108 CTIMEDISP
105 DATEDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 127/282 -


Horsch Elektronik AG HP_CTIMEDISP

122 HP_CDATEDISP
174 RD_TIME
219 TIMEDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 128/282 -


Horsch Elektronik AG HP_CWRITE

HP_CWRITE

Outputs a string in color. Is high priority, meaning it will not be blocked by an error or
display task.

Syntax:
HP_CWRITE <xPos>, <yPos>, <Size>, <Color>,
[<Start>, <Len>,] <Text>

Fields:
<xPos> Column from which <Text> will be written. Valid values are in
the range 0 to 60.
<yPos> Line. Lower edge of <Text>. In the range 0 to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Color> Color for the output. Valid values are 1 to 13, as shown in the
illustration on page 267.
<Start> Optional: Position in <Text> from which it will be output.
Thus, an individual part of a string can be output. The first
character is in position 1.
<Len> Optional: Length of the part of <Text> to be output. Must be
given if <Start> has been set, but may not be used otherwise.
<Text> Text to be output. Either text limited by quotes or an ST or SR
register.

Comments:
Normally a display command such as WRITE will not be executed when an error or
display task is active in parallel. High priority display commands such as HP_CWRITE
will be executed and displayed even under these circumstances. They are, therefore,
suitable for the display of messages that must be displayed to the user in all
circumstances.

Example:
HP_CWRITE 1, 10, 1, 2, “High priority and red”

See also:
107 CWRITE
133 HP_WRITE
237 WRITE

10/26/05 – Ver.: 1.02 English ECCO Manual - 129/282 -


Horsch Elektronik AG HP_DATEDISP

HP_DATEDISP

Writes the date from a register. Is high priority, meaning it will not be blocked by an
error or display task.

Syntax:
HP_DATEDISP <xPos>, <yPos>, <Size>, <Register>, <FText>

Fields:
<xPos> Column from which on the date is written. In the range 0 to 60.
<yPos> Line. Lower edge of the output. In the range 0 to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Register> Register that contains the date to be output, of type RW, AW or
LW.
<FText> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

<FText> has this format:


“[Text] #<Format># [Text]”
These format descriptors are allowed in <Format>:
jjjj Writes the year with four digits.
jj Writes the year with two digits.
mm Writes the month with two digits from 01 for January to 12 for
December.
tt Writes the day of the month with two digits.

Comments:
The RD_TIME command is used to read in the date in a register.
Normally a display command will not be executed when an error or display task is
active in parallel. High priority display commands will be executed and displayed
even under these circumstances, and hence suitable for displaying messages that
must be shown in all circumstances. However, programmers should use high priority
commands sparingly, as they could endanger a well defined screen construction.

Example:
The example reads the date in and outputs it with high priority.
RD_TIME RW100, RW101 ; Read time and date
HP_DATEDISP 1, 20, 1, RW101, “Today: #mm/tt/jj#”

See also:
105 DATEDISP
132 HP_TIMEDISP
174 RD_TIME
217 TIMEDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 130/282 -


Horsch Elektronik AG HP_REGDISP

HP_REGDISP

Formats and writes the value in a register to the display. Is high priority, meaning it
will not be blocked by an error or display task.

Syntax:
HP_REGDISP <xPos>, <yPos>, <Size>, <Register>, <FText>

Fields:
<xPos> Column from which on the date will be written. Valid values are
in the range 0 to 60.
<yPos> Line. Lower edge of the output. Valid values are in the range 0
to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Register> Value to be output. An SW, RV, RW, LV, LW, AV, AW, KV, KW or ZW
register.
<FText> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

The formatting in <FText> is given as:


“[Text] #<Digits>.<DecPoint>.<RightSize># [Text]”
Meanings:
<Digits> Number of places reserved for output on the display. A negative
value indicates left-aligned formatting with the number of places
indicated by the value.
<DecPoint> Number of places after the decimal in the value.
<RightSize> Number of places after the decimal to be shown.
<Text> Optional: Additional unformatted text.

Comments:
The formatting of numbers allows working implicitly with fixed decimal numbers. Note
that overflowing places after the decimal will be curtailed and not rounded.
Normally a display command will not be executed when an error or display task is
active in parallel. High priority display commands will be executed and displayed
even under these circumstances.

Example:
MOV RW001, 204567
HP_REGDISP 1, 20, 1, RW001, “Value: #8.4.2# mm”
; Output: “Value: 20.45 mm”

See also:
175 REGDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 131/282 -


Horsch Elektronik AG HP_TIMEDISP

HP_TIMEDISP

Outputs the time stored in a register. Is high priority, meaning it will not be blocked by
an error or display task.

Syntax:
HP_TIMEDISP <xPos>, <yPos>, <Size>, <Register>, <FText>

Fields:
<xPos> Column from which on the formatted text will be written. Valid
values are in the range 0 to 60.
<yPos> Line. Lower edge of the output. In the range 0 to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Register> Register containing the time to be output. Of type RW, AW or LW.
<FText> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

<FText> has the following format:


“[Text] #<Format># [Text]”
These format descriptors are allowed in <Format>:
hh Writes the hour in 24-hour format in double-digit form, e.g. 08.
mm Writes the minute double-digit.
ss Writes the second double-digit.
pp Writes the hundredth of a second double-digit.

Comments:
The RD_TIME command is used to read in the date in a register.
Normally a display command will not be executed when an error or display task is
active in parallel. High priority display commands will be executed and displayed
even under these circumstances. They are, therefore, suitable for the display of
messages that must be displayed to the user in all circumstances. However,
programmers should use high priority commands sparingly, as they could endanger a
well defined screen construction.

Example:
The example reads the time in and outputs it with high priority.
RD_TIME RW100, RW101 ; Read time and date
HP_DATEDISP 1, 20, 1, RW100, “Time: #hh:mm#”

See also:
105 DATEDISP
125 HP_DATEDISP
174 RD_TIME
217 TIMEDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 132/282 -


Horsch Elektronik AG HP_WRITE

HP_WRITE

Outputs a string. Is high priority, meaning it will not be blocked by an error or display
task.

Syntax:
HP_WRITE <xPos>, <yPos>, <Size>, <Text>

Fields:
<xPos> Column from which on <Text> will be written. Valid values are
in the range 0 to 60.
<yPos> Line. Lower edge of <Text>. In the range 0 to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Text> Text to be output. Either text limited by quotes or an ST or SR
register.

Comments:
Normally a display command such as WRITE will not be executed when an error or
display task is active in parallel. High priority display commands such as HP_WRITE
will be executed and displayed even under these circumstances. They are, therefore,
suitable for the display of messages that must be displayed to the user in all
circumstances.

Example:
HP_WRITE 1, 10, 1, “Hello World” ; Is high priority

See also:
237 WRITE

10/26/05 – Ver.: 1.02 English ECCO Manual - 133/282 -


Horsch Elektronik AG ID_INIT

ID_INIT

Initializes an IDEX data carrier.

Syntax:
ID_INIT <Address>, <ErrorLabel>

Fields:
<Address> Address of the IDEX station whose data carrier will be
initialized. Valid values are in the range 1 to 30.
<ErrorLabel> Label which will be branched to if an error occurs.

Comments:
Sets the whole data content and the internal check sum of the data carrier to 0. This
command is to be preferred when a work piece palette is to be loaded with a new
work piece.

Example:
Initializes the data carrier at IDEX station 3. Branches on an error to label
installDEX_ERROR.

ID_INIT 3, installDEX_ERROR

See also:
135 ID_READ
136 ID_REG_RD
137 ID_REG_WR
138 ID_STATUS
139 ID_WRITE
[1] Connecting a Balluff IDEX BIS S 6002 and BIS C 6002 to ECCO, Horsch
Elektronik AG, Version 0.02, 2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 134/282 -


Horsch Elektronik AG ID_READ

ID_READ

Reads a register from the data carrier to the interim buffer.

Syntax:
ID_READ <Address>, <ID_Reg>, <Count>, <ErrorLabel>

Fields:
<Address> Address of the IDEX station whose data carrier is to be read.
Valid values are in the range 1 to 30.
<ID_Reg> First, lowest register number in IDEX data buffer. The size of
the buffer depends on the device used. The value can be found
in the corresponding connection manual.
<Count> Number of register that will be read into the IDEX data buffer
from the work piece data carrier in one step. Valid values are in
the range 1 to 15.
<ErrorLabel> Label which will be branched to if an error occurs.

Comments:
If is selected incorrectly so that an IDEX register below the valid range is read, the
value of the first of the elements below the valid range will be read and the value of
the last element for those above the valid range.

Example:
Reads 5 values from the data carrier at IDEX address 3.

ID_READ 3, 1, 5, ID_ERROR
; Read Idex-Reg. 1,2,3,4,5.

See also:
134 ID_INIT
136 ID_REG_RD
137 ID_REG_WR
138 ID_STATUS
139 ID_WRITE
[1] Connecting a Balluff IDEX BIS S 6002 and BIS C 6002 to ECCO, Horsch
Elektronik AG, Version 0.02, 2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 135/282 -


Horsch Elektronik AG ID_REG_RD

ID_REG_RD

Reads an IDEX data register from the buffer into an ECCO register.

Syntax:
ID_REG_RD <Address>, <ID_Reg>, <Register>

Fields:
<Address> Address of the IDEX station whose data buffer will be read.
Valid values are in the range 1 to 30.
<ID_Reg> Register number in IDEX data buffer to be read. The size of the
buffer depends on the device used. The value can be found in
the connection manual.
<Register> Register that will be read into of type RV, RW, AV, AW, LV, LW or
ZW.

Comments:
If a 16-bit register is read, the higher bits will be ignored.
The command only reads from the data buffer. The ID_READ command is used to
communicate with the actual data blocks on the work piece palette.

Example:
The example first reads from the work piece palette in order to then pass on the data
from the buffer.
ID_READ 3, 1, 2, $ERROR ; Work piece -> data buffer
ID_REG_RD 3, 1, RW101 ; Data buffer -> ECCO
ID_REG_RD 3, 2, RW102 ; ID_READ read 2 registers in

See also:
134 ID_INIT
135 ID_READ
137 ID_REG_WR
138 ID_STATUS
139 ID_WRITE
[1] Connecting a Balluff IDEX BIS S 6002 and BIS C 6002 to ECCO, Horsch
Elektronik AG, Version 0.02, 2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 136/282 -


Horsch Elektronik AG ID_REG_WR

ID_REG_WR

Writes from ECCO into the IDEX intermediary data buffer.

Syntax:
ID_REG_WR <Address>, <ID_Reg>, <Value>

Fields:
<Address> Address of the IDEX station into whose data buffer will be
written. Valid values are in the range 1 to 30.
<ID_Reg> The register in the IDEX data buffer to be written into. The size
of the buffer depends on the device used. The value can be
found in the connection manual.
<Value> A number or a register of type RV, RW, AV, AW, LV, LW, KV, KW or
ZW.

Comments:
This command first writes the data into the data buffer. From there, they are written
onto the data carrier with the ID_WRITE command.

Example:
ID_REG_WR 3, 1, RW100 ; ECCO -> data buffer
ID_REG_WR 3, 2, 12345 ; ECCO -> data buffer
ID_WRITE 3, 1, 2, $ERROR ; Write IDEX data carrier

See also:
134 ID_INIT
135 ID_READ
136 ID_REG_RD
138 ID_STATUS
139 ID_WRITE
[1] Connecting a Balluff IDEX BIS S 6002 and BIS C 6002 to ECCO, Horsch
Elektronik AG, Version 0.02, 2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 137/282 -


Horsch Elektronik AG ID_STATUS

ID_STATUS

Delivers status information of the IDEX data carrier.

Syntax:
ID_STATUS <Address>, <Register>

Fields:
<Address> Address of the IDEX station whose status will be queried. Valid
values are in the range 1 to 30.<0}
<Register> Register into which the status information will be written, of type
RV, RW, LV, LW, AV or AW.

Comments:
The status information returned in <Register> is hardware-dependent. The
relevant documentation should be consulted for details.

Example:
ID_STATUS 1, LW100

See also:
134 ID_INIT
135 ID_READ
136 ID_REG_RD
137 ID_REG_WR
139 ID_WRITE
[1] Connecting a Balluff IDEX BIS S 6002 and BIS C 6002 to ECCO, Horsch
Elektronik AG, Version 0.02, 2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 138/282 -


Horsch Elektronik AG ID_WRITE

ID_WRITE

Writes from IDEX intermediate data buffer onto data carrier.

Syntax:
ID_WRITE <Address>, <ID_Reg>, <Count>, <ErrorLabel>

Fields:
<Address> Address of the IDEX station whose data carrier will be written
to. Valid values are in the range 1 to 30.
<ID_Reg> First, lowest register number in IDEX data buffer. The size of
the buffer depends on the device used. The value can be found
in the appropriate connection manual.
<Count> Number of register that will be written into the work piece
palette in one step. Valid values are in the range 1 to 15.
<ErrorLabel> Label which will be branched to if an error occurs.

Comments:
If a write error occurs, the data carrier memory could be corrupted. Error handling in
<ErrorLabel> can determine the memory status and possible cause of the error
using ID_STATUS.
If has been selected incorrectly so the an IDEX register is outside of the valid range
is written to, the ECCO operating system intervenes to correct and ensure no error
occurs.

Example:
The example writes to two IDEX registers which are then written to the data carrier at
IDEX station 3. If an error occurs in the last step, a branch to $ERROR will be made.
ID_REG_WR 3, 1, 1234567 ; ECCO -> data buffer
ID_REG_WR 3, 2, LW101 ; ECCO -> data buffer
ID_WRITE 3, 1, 3, $ERROR ; Data buffer -> palette

See also:
134 ID_INIT
135 ID_READ
136 ID_REG_RD
137 ID_REG_WR
138 ID_STATUS
[1] Connecting a Balluff IDEX BIS S 6002 and BIS C 6002 to ECCO, Horsch
Elektronik AG, Version 0.02, 2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 139/282 -


Horsch Elektronik AG IF / IFNOT / ELSE / END_IF

IF / IFNOT / ELSE / END_IF

Executes program blocks dependent on a condition.

Syntax:
IF <Comparison>
<True_Code>
[ELSE
<False_Code>]
END_IF
or
IF <Condition>
<True_Code>
[ELSE
<False_Code>]
END_IF
or
IFNOT <Condition>
<True_Code>
[ELSE
<False_Code>]
END_IF

Fields:
<Comparison> A comparative condition that defines whether <True_Code> or
<False_Code> is to be executed.
<Condition> A timer or one or more logical conditions. Defines whether
<True_Code> or <False_Code> will be executed.
<True_Code> Code that will be executed if the condition is satisfied.
<False_Code> Optional: Code that will be executed if the condition is not
satisfied.

<Comparison> is constructed as follows:


<Operand> <Operator> <Operand>
Meanings:
<Operand> A directly given number or a register of the type SW, RV, RW, AV,
AW, LV, LW, KV, KW or ZW.
<Operator> One of the comparative operators <, >, =, <=, >= or <>.

<Condition> is either a timer such as T002 or one or more inputs and outputs,
flags or error flags with the desired level, H or L.

Comments:
IF executes <True_Code> only if <Comparison> is satisfied or if all conditions
hold. A timer is true if it has not elapsed.
IFNOT executes the <True_Code> if not all conditions have been satisfied.
With conditions, the commands IF and IFNOT can be exchanged for one another if
<True_Code> and <False_Code> are exchanged at the same time.

10/26/05 – Ver.: 1.02 English ECCO Manual - 140/282 -


Horsch Elektronik AG IF / IFNOT / ELSE / END_IF

The <Comparison> block has fewer possibilities than the DO / DO_WHILE and
WHILE / END_WHILE instructions because there, counters C and timers T can also
be compared.
If this command is used to constantly query a value from an interconnected ECCO
control system, it must be ensured that the control system and the data bus used are
not overloaded. Typically, this is prevented by waiting for a short time after each
query. Only inputs and outputs of the interconnected ECCO may be queried.

Examples:
The first example shows use with comparisons.
IF RW100=1
; Whatever must be done, when RW100 is 1.
ELSE
; Whatever must be done, when RW100<>1.
END_IF

The second example shows how a timer can check whether an operation was
executed “fast”.
SETTIM T0, 100 ; Allow operation 1s
; The operation comes here
IF T0
CWRITE 1, 10, 1, 8, “Fast”
ELSE
CWRITE 1, 10, 1, 2, “Slow”
END_IF

The third example shows the use of IF with conditions.


IF E100 H, E101 L
MOV LV001, 1
ELSE
MOV LV001, 2
END_IF

The last example is identical to the third, except it uses the IFNOT command.
IFNOT E100 H, E101 L
MOV LV001, 2
ELSE
MOV LV001, 1
END_IF

See also:
111 DO / DO_WHILE / DO_WHILENOT
235 WHILE / WHILENOT / END_WHILE

10/26/05 – Ver.: 1.02 English ECCO Manual - 141/282 -


Horsch Elektronik AG INM

INM

Reads in a value from a regulator slave or PAC.

Syntax:
INM <Dest>, AD<Slave>.<Channel>
or
INM <Dest>, <Source>

Fields:
<Dest> Register in which the measurement will be stored; of type LW,
RW or AW.
<Slave> Slave number. Number between 1 and 30 for regulator slaves
and PAC.
<Channel> Channel of the A/D input which will be read in. The valid range
depends on <Slave>.
<Source> Input of the A/D input as LV, AV, RV or KV register.
<Source>=256*<Slave>+<Channel>.

Example:
INM RW101, AD4.2

The second example does exactly the same.


MOV LV001, 1026 ; 1026 = 4*256+2
INM RW101, LV001

See also:
156 MOV
166 OUTA

10/26/05 – Ver.: 1.02 English ECCO Manual - 142/282 -


Horsch Elektronik AG INP

INP

Waits until all conditions are satisfied.

Syntax:
INP <Cond> [, <Cond>]

Fields:
<Cond> Output, input, flag or error flag with the desired level, H or L.
Any desired number of conditions can be input.

A range can be input for <Cond>. Here <Cond> has the following syntax:
<Typ><Start> [- <Stop>] <Niveau>
Meanings:
<Typ> A or O for output, E or I for input, F or M for flag, D for error flag.
<Typ><Start> corresponds to the normal way of denoting an
output, input, flag or error flag.
<Start> Address as a number. If <Stop> is not input, it corresponds to
the normal way of writing for an output, input, flag or error flag.
<Stop> Optional: Serves to input a range. In this case, all elements
between <Start> and <Stop> are checked. A number.
<Niveau> Level to be checked; either H or L.

Comments:
The L_INP command can be used in function and display tasks.
If this command is used to constantly query a value from an interconnected ECCO
control system, it must be ensured that the control system and the data bus used are
not overloaded. Typically, this is prevented by waiting for a short time after each
query. Only inputs and outputs of interconnected ECCO systems may be queried.

Example:
INP E101 L, E102 H, A200 L, A202 H

The second example is identical to the first but covers several lines.
INP E101 L, ; The programmer can enter
E102 H, ; here exactly why the inputs
A200 L, ; and outputs are checked.
A202 H ; No comma at the end.

The third example shows the use of ranges:


INP E100-110 H, E300-303 L

The fourth example shows how a bus overload by


INP E2001 L, E2002 H, M2300 L
can be prevented:
WHILENOT E2001 L, E2002 H, M2300 L
SETTIM T0, 10

10/26/05 – Ver.: 1.02 English ECCO Manual - 143/282 -


Horsch Elektronik AG INP

WAITIM T0
END_WHILE

See also:
152 L_INP
192 SETTIM
234 WAITIM
235 WHILE / WHILENOT / END_WHILE

10/26/05 – Ver.: 1.02 English ECCO Manual - 144/282 -


Horsch Elektronik AG JMPCOND

JMPCOND

Branches if all conditions are satisfied.

Syntax:
JMPCOND <Cond>, [<Cond>,] <Label>

Fields:
<Cond> Output, input, flag or error flag with the desired level, H or L.
Any desired number of conditions can be input.
<Label> Label jumped to when all conditions are satisfied.

Comments:
The L_JMPCOND command can be used in function and display tasks.
If this command is used to constantly query a value from an external control system,
it must be ensured that the control system and the data bus used are not overloaded.
Typically, this is prevented by waiting for a short time after each query. Only the
inputs and outputs of one interconnected ECCO control system may be queried per
command.

Example:
The example shows the relationship with the IFNOT command.
JMPCOND E101 L, $TRUE ; IFNOT E101 L
MOV RW101, 1 ; MOV RW101, 1
JUMP $END
$TRUE: ; ELSE
MOV RW101, 0 ; MOV RW101, 0
$END: ; END_IF

See also:
140 IF / IFNOT / ELSE / END_IF
151 JUMP
153 L_JMPCOND

10/26/05 – Ver.: 1.02 English ECCO Manual - 145/282 -


Horsch Elektronik AG JMPTIM

JMPTIM

Branches when the timer has elapsed.

Syntax:
JMPTIM <Timer>, <Label>

Fields:
<Timer> Timer to be checked. T0 is the local timer, timers T001 to T255
are global.
<Label> Label branched to when the timer has elapsed.

Comments:
The number of global timers is input in the .LIMITS block. A maximum of 255 global
timers are available, therefore. Global timers must all be designated with three
places, as T001.

Example:
The example waits 200 ms before continuing.
SETTIM T0, 20
$LOOP:
JMPTIM T0, $END
JUMP $LOOP
$END:

See also:
56 .LIMITS
151 JUMP
192 SETTIM

10/26/05 – Ver.: 1.02 English ECCO Manual - 146/282 -


Horsch Elektronik AG JPBIT

JPBIT

Branches if a single bit in a register is 1, i.e. set H.

Syntax:
JPBIT <Register>, <Bit>, <Label>

Fields:
<Register> Register in which a bit will be checked. Type RV, RW, AV, AW,
LV, LW, KV or KW.
<Bit> Position of the bit to be checked. The valid range is 0 to 31.
<Label> Label branched to when the bit is set.

Example:
JPBIT RW(LV001), 0, $ODD ; If odd, branch

10/26/05 – Ver.: 1.02 English ECCO Manual - 147/282 -


Horsch Elektronik AG JPEQ

JPEQ

Branches if equal.

Syntax:
JPEQ <Register>, <Value>, <Label>

Fields:
<Register> An SW, RV, RW, LV, LW, AV, AW, KV, KW or ZW register.
<Value> A direct number or a <Register>.
<Label> Label branched to on equality.

Comments:
Registers with different bit widths are compared by value.

Example:
JPEQ RW001, 20, $LABEL ; Branch if RW001=20

See also:
149 JPGT
150 JPLT

10/26/05 – Ver.: 1.02 English ECCO Manual - 148/282 -


Horsch Elektronik AG JPGT

JPGT

Branches if the first argument is greater than the second.

Syntax:
JPGT <Register>, <Value>, <Label>

Fields:
<Register> An SW, RV, RW, LV, LW, AV, AW, KV, KW or ZW register.
<Value> A direct number or a <Register>.
<Label> Label branched to when the first argument is greater.

Comments:
Registers with different bit widths are compared by value.

Example:
JPGT RW001, 20, $LABEL ; Branch if RW001>20

See also:
148 JPEQ
150 JPLT

10/26/05 – Ver.: 1.02 English ECCO Manual - 149/282 -


Horsch Elektronik AG JPLT

JPLT

Branches if the first argument is smaller than the second.

Syntax:
JPLT <Register>, <Value>, <Label>

Fields:
<Register> An SW, RV, RW, LV, LW, AV, AW, KV, KW or ZW register.
<Value> A direct number or a <Register>.
<Label> Label branched to when the first argument is smaller.

Comments:
Registers with different bit widths are compared by value.

Example:
JPLT RW001, 20, $LABEL ; Branch if RW001<20

See also:
148 JPEQ
149 JPGT

10/26/05 – Ver.: 1.02 English ECCO Manual - 150/282 -


Horsch Elektronik AG JUMP

JUMP

Jumps to given label.

Syntax:
JUMP <Label>

Fields:
<Label> Label jumped to.

Comments:
In function, error and display tasks, the JUMP instruction may only be used for jumps
within the task. This is checked during compiling. This rule also applies to routines
called by CALL but is not checked by the compiler but produces a runtime error if not
observed.
JUMP can and should be avoided in structured programs.

Example:
Endlessly repeats a program block.
OUT M100 H
$LABEL:
XOR A100, A100, M100 ; Change the level each time
SETTIM T0, 100 ; and wait 1 second
WAITIM T0
JUMP $LABEL

See also:
95 CALL

10/26/05 – Ver.: 1.02 English ECCO Manual - 151/282 -


Horsch Elektronik AG L_INP

L_INP

Waits until all conditions are satisfied. The conditions have an implicit offset.

Syntax:
L_INP <Cond> [, <Cond>]

Fields:
<Cond> Output, input, flag or error flag with the desired level, H or L.
Any desired number of conditions can be input.

A range can be input for <Cond>, having the following syntax:


<Type><Start> [- <Stop>] <Niveau>
Meanings:
<Type> A or O for output, E or I for input, F or M for flag, D for error flag.
<Type><Start> corresponds to the normal way of writing for
an output, input, flag or error flag.
<Start> Address as a number. If <Stop> is not input, it corresponds to
the normal way of writing for an output, input, flag or error flag.
<Stop> Optional: Serves to input a range. In this case, all elements
between <Start> and <Stop> are checked. Is a number.
<Niveau> Level to be checked. H or L.

Comments:
This command can only be used in function and display tasks. In contrast to the
normal INP command, an offset is added implicitly here which can be input using
CALLD or CALLF.
If external inputs or outputs are accessed, the control system outputs an error.

Examples:
L_INP E101 L, E102 H, A200 L, A202 H

The second example is identical to the first but covers several lines.
L_INP E101 L, ; Enter here why exactly
E102 H, ; these inputs and
A200 L, ; outputs are being checked.
A202 H ; No comma at the end.

The third example shows the use of a range:


L_INP E101-109 H
See also:
96 CALLD
98 CALLF
143 INP
145 JMPCOND

10/26/05 – Ver.: 1.02 English ECCO Manual - 152/282 -


Horsch Elektronik AG L_JMPCOND

L_JMPCOND

Branches if all conditions are met. The conditions have an implicit offset.

Syntax:
L_JMPCOND <Cond>, [<Cond>,] <Label>

Fields:
<Cond> Output, input, flag or error flag with the desired level, H or L.
Any desired number of conditions can be input.
<Label> Label jumped to when all conditions are met.

Comments:
This command can only be used in function and display tasks. In contrast to the
normal JMPCOND command, an offset is added implicitly here which can be input
using CALLD or CALLF.
If an attempt is made to access inputs or outputs of external control systems, the
control system outputs an error.

Example:
The example shows how implicit offsets are used. The following declaration is
required:
.FUNCTIONS
#FUNC1, 0.0, 0, 0, “Demo Function”
.FUNC_END

FUNC1 is called as follows:


CALLF FUNC1, I8, O16, F0, D0

Then L_JMPCOND can be used in FUNC1 as follows:


.LOCAL
#FUNC1:
L_JMPCOND E100 H, ; Due to offset: E108 true
A100 H, ; Due to offset: A116 true
M100 H, $1 ; Offset is zero: M100 true
; Code if condition not met
$1: RETF

See also:
96 CALLD
98 CALLF
145 JMPCOND
151 JUMP

10/26/05 – Ver.: 1.02 English ECCO Manual - 153/282 -


Horsch Elektronik AG L_OUTP

L_OUTP

Sets outputs, flags and error flags. These have an implicit offset.

Syntax:
L_OUTP <Dest> <Value>[, <Dest> <Value>]

Fields:
<Dest> An output, flag or error flag. Can also be a range.
<Value> L or H.

<Dest> has the following syntax:


<Type><Start> [- <Stop>]
Meanings:
<Type> A or O for output, F or M for flag, D for error flag.
<Type><Start> corresponds to the normal way of writing for
an output, flag or error flag.
<Start> Address as a number. If <Stop> is not input, it corresponds to
the normal way of writing for an output, flag or error flag.
<Stop> Optional: Serves to input a range. In this case, all elements
between <Start> and <Stop> are set. Is a number.

Comments:
This command can only be used in function and display tasks. In contrast to the
normal OUTP command, an offset is added implicitly here which can be input using
CALLD or CALLF.
If an attempt is made to access outputs of external control systems, a system error is
risen.

Example:
The effective outputs and flags depend on the implicit offsets.
L_OUTP A100 H, A101-107 L, M100 H

See also:
167 OUTP

10/26/05 – Ver.: 1.02 English ECCO Manual - 154/282 -


Horsch Elektronik AG L_SWITCH / CASE / DEFAULT / END_SWITCH

L_SWITCH / CASE / DEFAULT / END_SWITCH

Allows the selection of a program block from up to 256 possibilities, dependent on an


argument. This is a variant on the SWITCH command.

Syntax:
L_SWITCH <Register>
CASE <Const>[, <Const>]
<Code>
[CASE <Const>[, <Const>]
<Code>]
[DEFAULT
<Code>]
END_SWITCH

Fields:
<Register> Register of type SW, RV, RW, AV, AW, LV, LW, KV or KW whose
value is selected. The value must be between 0 and 255
otherwise no <Code> will be executed, but the program will
continue with the next command after the L_SWITCH block.
<Const> A direct value or a KV or KW register between 0 and 255.
<Code> Program code that will be executed if the value in <Register>
equals <Const> in the CASE or DEFAULT condition.

Comments:
The value in <Register> is tested in L_SWITCH and if it is equal to a CASE value,
the relevant CASE program block starts and, when it finishes, a jump is made to the
END_SWITCH line. If the value does not fit with any CASE value, the DEFAULT
program block is executed. If there is no DEFAULT label a jump direct to the
END_SWITCH line is made.
If several constants <Const> have the same value, the compiler will report this as an
error during translation.
The difference from the SWITCH command is that the compiler stores a jump table for
all the possible 256 values. This makes the command significantly faster although the
program is longer.

See also:
216 SWITCH / CASE / DEFAULT / END_SWITCH

10/26/05 – Ver.: 1.02 English ECCO Manual - 155/282 -


Horsch Elektronik AG LEN_STR

LEN_STR

Returns the length of a string.

Syntax:
STR_TO_ASCII <Dest>, <String>

Fields:
<Dest> Register in which the length will be written. A register of type
RV, RW, AV, AW, LV or LW.
<String> String. A variable SR or constant ST string.

Example:
SMOV SR100, “1234567890”
MOV LV001, 100
LEN_STR LV002, SR100 ; LV002 is now 10
LEN_STR LV002, SR(LV001) ; Can also be indirect

See also:
197 SMOV

10/26/05 – Ver.: 1.02 English ECCO Manual - 156/282 -


Horsch Elektronik AG MID_STR

MID_STR

Cuts a piece out of a string.

Syntax:
MID_STR <Dest>, <Source>, <Start>, <Count>

Fields:
<Dest> SR register in which the cut-out piece will be stored.
<Source> String from which a piece will be cut. A variable SR or constant
ST string.
<Start> Position in <Source> from which the piece will be cut. Can be
input as direct number or as RV, RW, AV, AW, LV or LW register.
<Count> Number of character to be cut out and thus the new length of
<Dest>. Type RV, RW, AV, AW, LV or LW, or a direct number.

Comments:
The range between <Start> and <Count> must be completely within <Source>.

Example:
SMOV SR100, “abcd”
MID_STR SR101, SR100, 2,2 ; SR101 is now “bc”

See also:
197 SMOV

10/26/05 – Ver.: 1.02 English ECCO Manual - 157/282 -


Horsch Elektronik AG MOV

MOV

Writes the value in the source into the target.

Syntax:
MOV <DestReg>, <SourceReg>
or
MOV <Dest>, <Source>

Fields:
<DestReg> Destination register of type AV, AW, RV, RW, LV, LW or ZW.
<SourceReg> Source whose value will be written in <DestReg>. A direct
number or a register of type RV, RW, AV, AW, LV, LW, KV, KW,
ZW or SW.
<Dest> An output, flag or error flag that will be set.
<Source> An input, output, flag or error flag whose logical level will be
copied into <Dest>.

Comments:
Note: Registers are set with MOV, inputs, outputs, flags and error flags with OUTP.
MOV only ever serves to copy.

Examples:
The first example copies a system register into a local register so the value can be
processed further.
MOV LW001, SW5 ; Project number

The second example sets the output at the same value as the input.
MOV A200, E200

See also:
91 BMOV
167 OUTP

10/26/05 – Ver.: 1.02 English ECCO Manual - 158/282 -


Horsch Elektronik AG MOV_PUFFER

MOV_PUFFER

Transfers the data buffer to the statistics unit.

Syntax:
MOV_PUFFER <Puffer>, <Group>, <Cycles>

Fields:
<Puffer> Data buffer to be transferred. A register of type RV, RW, AV, AW,
LV or LW whose value, the number of the data buffer is set by
the NEW_PUFFER command.
<Group> Statistics group for the data. An RV, RW, AV, AW, LV, LW, KV or
KW register or a direct number between 1 and 20.
<Cycles> Number of machine cycles of STAT_TAKT until the buffer will be
transferred and finally deleted from ECCO.

Comments:
If <Cycles> is greater than 1, on the next STAT_TAKT the buffer will not yet be
transferred to the statistics unit. This allows the production data for a work piece to
be transferred only when the work piece has passed all stations. This is however not
advised, as the programs will become unnecessarily complicated and increased
caution is required on synchronizing some tasks as only one more STAT_TAKT may
be used for all the stations in the group.

Example:
This example shows the typical use of the command on the assumption that RV001
points to the buffer to be transferred and the data belong to group 2.
MOV_PUFFER RV001, 2, 1
STAT_TAKT

See also:
160 NEW_PUFFER
201 STAT_TAKT

10/26/05 – Ver.: 1.02 English ECCO Manual - 159/282 -


Horsch Elektronik AG NEW_PUFFER

NEW_PUFFER

Opens a new statistics data record.

Syntax:
NEW_PUFFER <Puffer>, <Value>, <DAdr>

Fields:
<Puffer> Register in which the reference number to the data record, a
number between 0 and 199, will be written. A register of type
RV, RW, AV, AW, LV or LW.
<Value> Value that will be stored in the newly created <DAdr> buffer. A
direct number or a register of type RV, RW, AV, AW, LV, LW, KV,
KW or ZW or a direct number.
<DAdr> Data record address. Address in new buffer in which <Value>
will be stored. Number between 1 and 255.

Comments:
Up to 200 data records can be processed simultaneously. All relevant measurements
belonging to a specific work piece are stored in a statistics data record. Each data
record can contain up to 255 measurements addressed within the data record.
If an attempt is made to process more than 200 data records simultaneously, the
“Buffer full” system flag M003 will be raised.

Example:
NEW_PUFFER RW012, LW001, 1 ; Opens new buffer and
; allocates in measurement #1
; the value from LW001.

See also:
102 CLR_PUFFER
159 MOV_PUFFER
170 PUFFER
172 RD_PUFFER
199 STAT_PUFFER

10/26/05 – Ver.: 1.02 English ECCO Manual - 160/282 -


Horsch Elektronik AG NOT

NOT

The destination value corresponds to the logical NOT link of the input source.

Syntax:
NOT <Dest>, <Source>
or
NOT <DestReg>, <SourceReg>

Fields:
<Dest> An output, flag or error flag.
<Source> An output, input, flag or error flag.
<DestReg> A register of type RV, RW, AV, AW, LV or LW.
<SourceReg> A register (AV, AW, RV, RW, LV, LW, ZW, KV or KW) or a direct
numerical value. Must have the same bit width as <DestReg>.

Comments:
A mixture of registers on one side and inputs and outputs and flags on the other is
not allowed.
For inputs and outputs and flags the destination is precisely H if the sources are L.
For registers, the result is constructed in bits and the destination bit is precisely 1 if
the source bit is 0, otherwise it is 0.
The destination <Dest> may not be one of the <Source> sources. <Source> and
<Dest> may not access an element in an interconnected ECCO.

Examples:
The first example shows the use for inputs and outputs.
NOT A024, E024

The second example shows use with registers.


MOV LW001, 42 ; 0..0 101010(b)
NOT LW002, LW001 ; NOT 1..1 010101(b) = -43

See also:
90 AND
165 OR
239 XOR

10/26/05 – Ver.: 1.02 English ECCO Manual - 161/282 -


Horsch Elektronik AG NSDEF

NSDEF

Defines emergency stop conditions.

Syntax:
NSDEF <Cond>[, <Cond>]

Fields:
<Cond> An input, output. flag or error flag that triggers the emergency
stop if it shows the programmed level, L or H. Up to 48
conditions are allowed.

Comments:
The emergency stop is triggered if one of the conditions is satisfied. It is thus a
logical OR link.
The emergency stop program begins at the NSPGM label.
If flags or error flags are declared, the NSDEF and STDEF conditions must be given.

Example:
Emergency stop is triggered if A101 or A102 are raised or flag M025 is lowered.
NSDEF A101 H, A102 H, M205 L

See also:
248 NSPGM
203 STDEF

10/26/05 – Ver.: 1.02 English ECCO Manual - 162/282 -


Horsch Elektronik AG NUM_INP

NUM_INP

Reads a formatted value into a register.

Syntax:
NUM_INP <xPos>, <yPos>, <Size>, <Register>, <FText>

Fields:
<xPos> Column from which on <FText> will be written. Valid values
are in the range 0 to 60.
<yPos> Line. Lower edge of the output. In the range 0 to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Register> Register that will be read into of type RV, RW, AV, AW, LV, LW or
ZW.
<FText> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

The formatting in <FText> is input as:


“[Text] #<Digits>.<DecPoint>.<RightSize># [Text]”
Meanings:
<Digits> Number of places reserved for output on the display. Negative
values mean left-aligned, positive right-aligned.
<DecPoint> Number of places after the decimal in the value.
<RightSize> Number of places after the decimal to be shown.
<Text> Optional: Additional unformatted text.

Comments:
The command shows the content of <Register> and is thus up to this point
identical to REGDISP, and waits then for the input of a new value by the user which is
closed with the “=” key. The new value is assigned to <Register>.
The instruction can be aborted by END_NUM_INP. <Register> then remains the
original value. The formatting of numbers allows working implicitly with fixed decimal
numbers.
There is no command to display the input in color.

Example:
MOV RW001, 204567
NUM_INP 1, 20, 1, RW001, “Value: #8.4.2# mm”
; Output: “value: 20.45 mm”
; If the user now inputs “10.12=” then afterwards RW001=101200

See also:
113 END_NUM_INP
175 REGDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 163/282 -


Horsch Elektronik AG OPEN

OPEN

Opens a new parallel chain, a task.

Syntax:
OPEN <Label>

Fields:
<Label> Label of the task to be called. Every global label that does not
define a function task or error flag can be started from a
background or program task using OPEN.

Comments:
The new task runs independently of the chain from which it was called.
Synchronization between two tasks is made from preference using the EXCL
command.
A parallel task is closed with CLOSE.
The TASK_OPEN returns the absolute number of the task called.

Example:
Example of one task calling another.
TASK1:
OPEN TASK2
CLOSE

TASK2:
; The program text comes here
CLOSE

See also:
100 CLOSE
114 EXCL
217 TASK_OPEN

10/26/05 – Ver.: 1.02 English ECCO Manual - 164/282 -


Horsch Elektronik AG OR

OR

The destination value corresponds to the logical OR link of all input source values.

Syntax:
OR <Dest>, <Source>, <Source> [, <Source>]
or
OR <DestReg>, <SrcReg>, <SrcReg> [, <SrcReg>]

Fields:
<Dest> An output, flag or error flag.
<Source> An output, input, flag or error flag.
<DestReg> A register of type AV, AW, RV, RW, LV, LW or ZW.
<SrcReg> A register (AV, AW, RV, RW, LV, LW, ZW, KV or KW) or a direct
numerical value. Must have the same bit width as <DestReg>.

Comments:
A mixture of registers on one side and inputs and outputs and flags on the other is
not allowed.
For inputs and outputs and flags the destination is precisely L if all sources are L. For
registers, the result is constructed in bits and the destination bit is precisely 0 if all
sources are 0.
The destination <Dest> may not be one of the <Source> sources. Only one
element of an external control system may be accessed.

Examples:
Output A024 is only raised when inputs E010 to E014 are raised.
OR A024, E010, E011, E012, ; Can cross several lines
E013, E014 ; (note the comma)

The second example shows the use with registers.


MOV LW001, 42 ; 101010(b)
MOV LW002, 36 ; 100100(b)
OR LW003, LW001,LW002 ; OR 101110(b) = 46

See also:
90 AND
161 NOT
239 XOR

10/26/05 – Ver.: 1.02 English ECCO Manual - 165/282 -


Horsch Elektronik AG OUTA

OUTA

Writes a value to the D/A channel of a regulator slave or PAC.

Syntax:
OUTA AD<Slave>.<Channel>, <Value>
or
OUTA <Dest>, <Value>

Fields:
<Slave> Slave number. Number between 1 and 30 for motion control
slaves and PAC.
<Channel> Channel of the D/A output for the output. The valid range
depends on <Slave>.
<Value> A direct numerical value or a register of type RV, RW, AV, AW, LV,
LW, KV, KW or ZW.
<Dest> Input of the A/D output as LV, AV, RV or KV register.
<Dest>=256*<Slave>+<Channel>.

Example:
OUTA AD4.2, RW101

The second example does exactly the same.


MOV LV001, 1026 ; 1026 = 4*256+2
OUTA LV001, RW101

The last example shows the use of the command in arrays.


OUTA AV001(1), AV001(KV001)

See also:
142 INM
156 MOV

10/26/05 – Ver.: 1.02 English ECCO Manual - 166/282 -


Horsch Elektronik AG OUTP

OUTP

Sets the values of outputs, flags and error flags.

Syntax:
OUTP <Dest> <Value>[, <Dest> <Value>]

Fields:
<Dest> An output, flag or error flag. A range can also be input.
<Value> L or H.

<Dest> has the following syntax:


<Type><Start> [- <Stop>]
Meanings:
<Type> A or O for output, F or M for flag, D for error flag.
<Type><Start> corresponds to the normal way of writing for
an output, flag or error flag.
<Start> Address as a number. If <Stop> is not input, it corresponds to
the normal way of writing for an output, flag or error flag.
<Stop> Optional: Serves to input a range. In this case, all elements
between <Start> and <Stop> are set. Is a number.

Comments:
The command can be used in a function or display task.
If this command is used to set values in an external control system, it must be
ensured that the control system and the data bus used are not overloaded. Typically,
this is prevented by waiting for a short time after each command. Furthermore, each
OUTP command may only communicate with a single control system.

Examples:
OUTP A101 H, A102 L, ; Use over several
M350 H, M351 H ; lines (note the comma)

The second example is identical with the first but uses a range:
OUTP A101 H, A102 L, M350-351 H

See also:
154 L_OUTP
156 MOV

10/26/05 – Ver.: 1.02 English ECCO Manual - 167/282 -


Horsch Elektronik AG PAC

PAC

Communicates with a PAC.

Syntax:
PAC <No>, <Cmd> [,<Dest> [,<Dest>]] [, < ,<Src> [,<Src>]]

Fields:
<No> Number of the PAC to be communicated with. An RV, LV or KV
register or a direct number. Valid values are 1 to 30.
<Cmd> Descriptor for the command from the .PAC_DEF block.
<Dest> Input register. Either an array or a register of type RV, RW, LV or
LW.
<Src> Output register. Either an array or a register of type RV, RW, LV,
LW, KV, or KW or a direct number.

The number of input and output argument is taken from the command in the
.PAC_DEF block.
In arrays, the first element must also be input, as in AV001(3). The command uses
the input element and the required number of subsequent elements from the array.

Comments:
The mixtures of registers and arrays in the input and output lists is not allowed and
will be trapped by the compiler on translation with an error.
The compiler if the correct number of arguments has been input.
Each argument, called a field in the PAC documentation, is 32 bits wide and is
signed.

Example:
Only one register (LV012) is written to PAC 16.
PAC 16, POS_FRC_ABORT, <, LV012

11 array elements (the number taken from .PAC_DEF) are written from AV001(5) to
AV001(15).
PAC 17, SV_SET_PRM, <, AV001(5)

The answer from PAC 18 is read into register RW001.


PAC 18, ADM_RES_CTRL_RD, RW001

The command operates with the two input arguments 9 and LV001 and returns the
result in the first 16 elements of array AV004.
PAC 19, GRAPH_ZONE_EVAL, AV004(1), <, 9, LV001

See also:
61 .PAC_DEF / .END_PAC_DEF
[5] PAC Handbuch, Horsch Elektronik AG, Version 1.01, 2001.

10/26/05 – Ver.: 1.02 English ECCO Manual - 168/282 -


Horsch Elektronik AG POWER_OFF

POWER_OFF

Terminates ECCO.

Syntax:
POWER_OFF

Comments:
Any data in process (statistics, ZPoint, queries from external control systems, etc)
continue to be processed but no further commands are executed and no further
queries answered. As soon as no data remains to be processed, ECCO returns to
the PC operating system.

10/26/05 – Ver.: 1.02 English ECCO Manual - 169/282 -


Horsch Elektronik AG PUFFER

PUFFER

Adds a measurement to an existing statistics data record.

Syntax:
PUFFER <Puffer>, <Value>, <DAdr>

Fields:
<Puffer> Data buffer. Register whose value, the number of the buffer, is
set by the NEW_PUFFER command. A register of type RV, RW,
AV, AW, LV or LW.
<Value> Value that will be stored in the newly created <Puffer> buffer
in <DAdr>. A direct number or a register of type RV, RW, AV, AW,
LV, LW, KV, KW or ZW or a direct number.
<DAdr> Data record address. Address in <Puffer> buffer in which
<Value> will be stored as a number between 1 and 255.

Comments:
All relevant measurements belonging to a specific work piece are stored in a
statistics data record. Each data record can contain up to 255 measurements storage
cells.
Measurements can be read from the buffer with RD_PUFFER.

Example:
NEW_PUFFER RW012, LW001, 1 ; Opens new buffer and stores
; in #1 the value from LW001.
PUFFER RW012, LW002, 2 ; Now stores in #2 the value
; from LW002.

See also:
160 NEW_PUFFER
172 RD_PUFFER

10/26/05 – Ver.: 1.02 English ECCO Manual - 170/282 -


Horsch Elektronik AG RD_DATE

RD_DATE

Reads in day, month and year.

Syntax:
RD_DATE <Day>, <Month>, <Year>

Fields:
<Day> Register of type RV, RW, AV, AW, LV or LW, into which the current
day will be read as a number between 1 and 31.
<Month> Register of type RV, RW, AV, AW, LV or LW, into which the current
month will be read as a number between 1 and 12.
<Year> Register of type RV, RW, AV, AW, LV or LW, into which the current
year will be read with four digits.

Example:
; Read day, month and year
RD_DATE LW001, LW002, LW003

See also:
174 RD_TIME

10/26/05 – Ver.: 1.02 English ECCO Manual - 171/282 -


Horsch Elektronik AG RD_HOUR

RD_HOUR

Reads in hours, minutes and seconds.

Syntax:
RD_HOUR <Hours>, <Minutes>, <Seconds>

Fields:
<Hours> The hours number of the current time. A register of type RV, RW,
AV, AW, LV or LW.
<Minutes> The minutes number of the current time. A register of type RV,
RW, AV, AW, LV or LW.
<Seconds> The seconds number of the current time. A register of type RV,
RW, AV, AW, LV or LW.

Example:
RD_HOUR LW001, LW002, LW003
; LW001: hours
; LW002: minutes
; LW003: seconds

See also:
174 RD_TIME
175 RD_WEEK

10/26/05 – Ver.: 1.02 English ECCO Manual - 172/282 -


Horsch Elektronik AG RD_PUFFER

RD_PUFFER

Reads a measurement from a statistics data record.

Syntax:
RD_PUFFER <Puffer>, <Register>, <DAdr>

Fields:
<Puffer> Data buffer. Register whose value, the number of the buffer, is
set by the NEW_PUFFER command. A register of type RV, RW,
AV, AW, LV or LW.
<Register> Register in which the measurement in <DAdr> will be written, of
type RV, RW, LV, LW, AV or AW.
<DAdr> Data record address. Address in <Puffer> buffer to be read;
number between 1 and 255.

Comments:
All relevant measurements belonging to a specific work piece are stored in a
statistics data record. Each data record can contain up to 255 measurement cells.
Measurements are written into the buffer with NEW_PUFFER and PUFFER. If there is
no value stored in <DAdr>, 0 is returned.

Example:
NEW_PUFFER RW012, LW001, 1 ; Opens new buffer and stores
; in #1 the value from LW001.
RD_PUFFER RW012, RW101, 1 ; Read the value back.

See also:
160 NEW_PUFFER
170 PUFFER

10/26/05 – Ver.: 1.02 English ECCO Manual - 173/282 -


Horsch Elektronik AG RD_TIME

RD_TIME

Reads time and date.

Syntax:
RD_TIME <Time>, <Date>

Fields:
<Time> Current system clock time. A register of type AW, RW, LW or ZW.
<Date> Current date. An RW, AW or LW register.

Comments:
The values in the two registers are an encoded form of the time and date. The
functions DATEDISP, HP_DATEDISP, HP_TIMEDISP, TIMEDISP, VI_DATE and
VI_TIME are used to make them legible.
If an RW, AW or LW register is input in the <Time> field, the resolution is one second. If
a ZW register is used, the resolution is one hundredth of a second. ZW registers are
thus suitable for inputting cycle times.
The value in the <Date> register corresponds to the number of days since January
1, 1980.

Example:
RD_TIME LW001, LW002 ; Read time and date
TIMEDISP 1, 10, 1, LW001, “Time: #hh:mm#”
DATEDISP 1, 20, 1, LW002, “Date: #mm/tt/jjjj#”

See also:
105 DATEDISP
125 HP_DATEDISP
132 HP_TIMEDISP
171 RD_DATE
217 TIMEDISP
225 VI_DATE
231 VI_TIME

10/26/05 – Ver.: 1.02 English ECCO Manual - 174/282 -


Horsch Elektronik AG RD_WEEK

RD_WEEK

Read calendar week and day of the week in.

Syntax:
RD_WEEK <KWeek>, <WDay>

Fields:
<KWeek> Calendar week. A register of type RV, RW, AV, AW, LV or LW.
<WDay> Day of the week. A register of type RV, RW, AV, AW, LV or LW.

Comments:
The weekdays are given in European style, so the week begins on Monday with 1
and ends on Sunday with 7.

Example:
RD_WEEK LW001, LW002 ; Calendar week and day of
; the week

See also:
172 RD_HOUR
174 RD_TIME

10/26/05 – Ver.: 1.02 English ECCO Manual - 175/282 -


Horsch Elektronik AG REGDISP

REGDISP

Formats and writes the value in a register to the display.

Syntax:
REGDISP <xPos>, <yPos>, <Size>, <Register>, <FText>

Fields:
<xPos> Column from which on the date will be written. Valid values are
in the range 0 to 60.
<yPos> Line. Lower edge of the output. In the range 0 to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Register> Value to be output. An SW, RV, RW, LV, LW, AV, AW, KV, KW or ZW
register.
<FText> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

The formatting in <FText> is defined as:


“[Text] #<Digits>.<DecPoint>.<RightSize># [Text]”
Meanings:
<Digits> Number of places reserved for output on the display. A negative
value allows left-aligned formatting with the number of places
indicated by the value.
<DecPoint> Number of places after the decimal in the value to be output.
<RightSize> Number of places after the decimal to be output.
<Text> Optional: Additional unformatted text.

Comments:
The formatting of numbers allows working implicitly with fixed decimal numbers.
Note that overflowing places after the decimal will be curtailed and not rounded.

Example:
MOV RW001, 204567
REGDISP 1, 20, 1, RW001, “Value: #8.4.2# mm”
; Output: “Value: 20.45 mm”

See also:
131 HP_REGDISP

10/26/05 – Ver.: 1.02 English ECCO Manual - 176/282 -


Horsch Elektronik AG RET

RET

Ends a routine.

Syntax:
RET

Comments:
Ends a routine called with CALL and returns to the calling program. That means the
command after CALL will executed next.

Example:
Task STAT01 calls routine SUB1, which does nothing.
STAT01: ; Calling task
CALL SUB1 ; calls SUB1
; After RET continue here
CLOSE

SUB1: ; Called routine


RET ; Does nothing

See also:
95 CALL

10/26/05 – Ver.: 1.02 English ECCO Manual - 177/282 -


Horsch Elektronik AG RETD

RETD

Ends a display task.

Syntax:
RETD

Comments:
Ends a display task called with CALL and returns to the calling program. That means
the command after CALLD will executed next.
The display task arguments will be copied back, as described under CALLD.

Example:
A more comprehensive example can be found under the description of the CALLD
instruction.
@DISP1_TASK:
; Functionality
RETD ; End @DISP1_TASK

See also:
96 CALLD

10/26/05 – Ver.: 1.02 English ECCO Manual - 178/282 -


Horsch Elektronik AG RETE

RETE

Ends an error task and resets the associated flag.

Syntax:
RETE

Comments:
The error task starts automatically if the associated error flag is raised by, for
example, the OUTP command.
The error task has the highest priority for writing to the display. Behavior after the
RETE command also depends on this: The display task previously active will be
reprocessed from the start to ensure consistent display on the screen.
Note that an error task will never be hold or interrupted. If an error occurs in a display
task, it will be restarted after the RETE command or an emergency stop will be
triggered.
There is no CALLE command, and an error task starts automatically when an error
flag has been set or, if an error is already being handled, when that one ends with
RETE.

Example:
The example shows the use of error flags using D100. The definition of the error flag
in .IO_TEXT is as follows:
.IO_TEXT
D100 “Test error D100”, &ERROR_D100
.END_IO_TEXT
The content of the error handler is:
&ERROR_D100:
; Handle the error here
RETE
Finally, the programmed error response is triggered as:
OUTP D100 H ; Trigger the error flag
INP D100 L ; wait for acknowledgement

See also:
53 .IO_TEXT / .END_IO_TEXT
167 OUTP

10/26/05 – Ver.: 1.02 English ECCO Manual - 179/282 -


Horsch Elektronik AG RETF

RETF

Ends a function task.

Syntax:
RETF

Comments:
Ends a function task called with CALLF and returns to the calling program. That
means the command after CALLF will executed next. Arguments will be copied back
unless they are write-protected in the calling program.
If a function task is started from the display, the control flow returns to selection mode
on the display.

See also:
48 .FUNCTIONS / .FUNC_END
98 CALLF

10/26/05 – Ver.: 1.02 English ECCO Manual - 180/282 -


Horsch Elektronik AG SAVE_ARRAY

SAVE_ARRAY

Saves an array to hard disk.

Syntax:
SAVE_ARRAY <Array>

Fields:
<Array> First array element, directly or indirectly addressed, from which
the AV or AW array will be saved.

The filename is built canonically as:


<Array>_<Jahr>_<Monat>_<Tag>_<Stunde>_<Min>_<Sek>_<Milli>.arr
Meanings:
<Array> The array used.
<Jahr> Year number, four digits.
<Monat> Month, one or two digits between 1 and 12.
<Tag> Day of the month, one or two digits between 1 and 31.
<Stunde> Hour, one or two digits between 0 and 23.
<Min> Minute, one or two digits between 0 and 59.
<Sek> Second, one or two digits between 0 and 59.
<Milli> Millisecond with up to three digits between 0 and 999.

Example:
If, on January 10, 2005 at precisely 17:23:05, the command
SAVE_ARRAY AV100(5)
was executed and if the array had ten elements, each having the value of their index,
a file named
AV(100)_2005_1_10_17_23_5_0.arr
would be generated with the following content:
5 ;AV(100)(5)
6 ;AV(100)(6)
7 ;AV(100)(7)
8 ;AV(100)(8)
9 ;AV(100)(9)
10 ;AV(100)(10)

See also:
44 .ARRAYS / .END_ARRAYS

10/26/05 – Ver.: 1.02 English ECCO Manual - 181/282 -


Horsch Elektronik AG SCALE_AD

SCALE_AD

Scales the analog input of a motion and process control slave or PAC.

Syntax:
SCALE_AD <AD_Adr>, <Low>, <Up>
or
SCALE_AD AD<Slave>.<Channel>, <Low>, <Up>

Fields:
<AD_Adr> Address of the analog input. An RV, AV, LV or KV register.
<Slave> Address of the control slave or PAC. Number between 1 and
30.
<Channel> Address of the AD converter on the <Slave>. The number of
the AD inputs depends on the model employed.
<Low> Lower limit, the value returned for lower saturation. An RV, RW,
AV, AW, LV, LW, KV or KW register or a direct number.
<Up> Upper limit, the value returned for upper saturation. An RV, RW,
AV, AW, LV, LW, KV or KW register or a direct number.
<AD_Adr>=256*<Slave>+<Channel>.

Comments:
The range of values recorded for a regulator slave is 0 to 4095. With no scaling, 0
represents the analog signal of -10 volt and 4095 +10 volt.
A 14-bit converter is used in the PAC so the range is between 0 and 16383. With no
scaling, 0 represents the analog signal of -10 volt and 16383 +10 volt.
Scaling with this command allows the values to be read out in units that the user can
interpret easily, such as in Newton for a force or in Pascal for a pressure.

Examples:
If, for example, the signal for a force is to be read in that represents –10V -4000N
and +10V +4000N, the example allows the value to be read in directly in Newton and
cumbersome scaling is no longer necessary.
SCALE_AD AD1.1, -4000, +4000

The second example is identical to the first.


MOV LV001, 257 ; 257=256*1+1
MOV LV002, -4000
MOV LV003, +4000
SCALE_AD LV001, LV002, LV003

See also:
70 .SET_CONST / .END_CONST
156 MOV
183 SCALE_DA

10/26/05 – Ver.: 1.02 English ECCO Manual - 182/282 -


Horsch Elektronik AG SCALE_DA

SCALE_DA

Scales the analog output of a motion and process control slave or PAC.

Syntax:
SCALE_DA <DA_Adr>, <Low>, <Up>
or
SCALE_DA DA<Slave>.<Channel>, <Low>, <Up>

Fields:
<AD_Adr> Address of the analog output. An RV, AV, LV or KV register.
<Slave> Address of the control slave or PAC. Number between 1 and
30.
<Channel> Address of the DA converter on the <Slave>. The number of
the DA outputs is model-dependent.
<Low> Lower limit, the value returned for lower marginal value. An RV,
RW, AV, AW, LV, LW, KV or KW register or a direct number.
<Up> Upper limit, the value returned for upper marginal value. An RV,
RW, AV, AW, LV, LW, KV or KW register or a direct number.
<DA_Adr>=256*<Slave>+<Channel>.

Comments:
The range of values for a control slave is 0 to 4095. With no scaling, 0 represents the
analog signal of -10 volt and 4095 +10 volt.
A 14-bit converter is used in the PAC so the range is between 0 and 16383. With no
scaling, 0 represents the analog signal of -10 volt and 16383 +10 volt.

Example:
If, for example, the signal for a proportional valve is to be read in, so that -10V
represent -300 Bar and +10V +300 Bar, the example allows the value to be read in
directly in Bar and cumbersome scaling is no longer necessary.
SCALE_DA AD1.1, -300, +300

See also:
70 .SET_CONST / .END_CONST
181 SCALE_AD

10/26/05 – Ver.: 1.02 English ECCO Manual - 183/282 -


Horsch Elektronik AG SCHICHT

SCHICHT

Reports a shift change to STAT_READ.

Syntax:
SCHICHT <Group>, <Cycles>, <SLeader>, <MLeader>

Fields:
<Group> Statistical group to which the shift change is reported. An RV,
RW, AV, AW, LV, LW, KV or KW register or a direct number
between 1 and 20.
<Cycles> Machine cycles with STAT_TAKT, until the shift change is
transferred. Number between 1 and 127.
<SLeader> Shift leader, encoded as 16-bit number between 0 and 65535.
A register of type RV, RW, AV, AW, LV, LW, KV or KW.
<MLeader> Lead machine operator present, encoded as 16-bit number
between 0 and 65535. A register of type RV, RW, AV, AW, LV,
LW, KV or KW.

Comments:
The coding for shift leader and machine operator are supplied by the customer from
the shift plans.
If values for <SLeader> or <MLeader> are out of range, the higher order bits will be
discarded.

Example:
The example allocates the new shift leader coded in RW297 and machine operator
coded in RW298 to statistical group 8 at the end of the current cycle.

SCHICHT 8, 1, RW297, RW298

See also:
201 STAT_TAKT
202 STCKZAHL

10/26/05 – Ver.: 1.02 English ECCO Manual - 184/282 -


Horsch Elektronik AG SEARCH

SEARCH

Searches for an element in an array.

Syntax:
SEARCH <Result>, <Start>, <Value>

Fields:
<Result> Register into which the position of the element found will be
written, of type RV, RW, LV, LW, AV or AW. Returns 0 if no
element is found.
<Start> Starting position in the AV or AW array with the array to be
searched. The array Is searched from the position.
<Value> Value searched for. An RV, RW, AV, AW, LV, LW, KV or KW
register or a direct number.

Comments:
The search algorithm has a running time of t O(n).
If several elements have the value <Value> any of them may be returned.

Example:
Searches the elements in AW001 from position 30 for an element with the value 55.

SEARCH LV001, AW001(30), 55

See also:
44 .ARRAYS / .END_ARRAYS

10/26/05 – Ver.: 1.02 English ECCO Manual - 185/282 -


Horsch Elektronik AG SEND_IO

SEND_IO

Reads or writes inputs, outputs, flags and error flags from or to an interconnected
ECCO control system to or from the own ECCO inputs, outputs, flags and error flags.

Syntax:
SEND_IO <FarIO>[, <FarIO>], <Dir>, <MyIO>[, <MyIO>]

Fields:
<FarIO> Input, output, flag or error flag in the interconnected ECCO.
<Dir> The character < for write, > for read.
<MyIO> Input, output, flag or error flag in this ECCO control system.
Up to 30 inputs and outputs can be input with an equal number of <MyIO> and
<FarIO>.

Comments:
Note the commas that limit <Dir>.
A prerequisite for copying is that the element in the control system which will be
written to is not included in the .PROTECTED block and is thus writable. Otherwise
the system error 69 is triggered.
Note that the thousands digit for inputs and outputs indicates the control system; so
A3004 is the fourth output of control system 3. Only one external control system may
be communicated with in a single instruction.

Example:
SEND_IO A3003, >, A026 ; Read control system 3 A3003
; into own A026

SEND_IO A3012, M3018, M3019, <, E110, E112, E113


; Write in control system 3:
; A3012 value in own E110
; M3018 value in own E112
; M3019 value in own E113

See also:
56 .LIMITS
65 .PROTECTED / .END_PROTECTED
187 SEND_REG

10/26/05 – Ver.: 1.02 English ECCO Manual - 186/282 -


Horsch Elektronik AG SEND_REG

SEND_REG

Reads from or writes registers to an interconnected ECCO to or from the machine’s


own control system.

Syntax:
SEND_REG ECCO<FarECCO>, <FarReg>[, <FarReg>], <Dir>,
<MyReg>[, <MyReg>]

Fields:
<FarECCO> Number of the external ECCO control system.
<FarReg> Register in the external ECCO control system. LV, LW, RV, RW,
KW and ZW register can be sent and RV, RW and ZW received.
<Dir> The character < for write, > for read.
<MyReg> The register in the own ECCO. LV, LW, RV, RW, KW and ZW
register can be sent and RV, RW and ZW received.
Up to 30 registers can be input with an equal number of <FarReg> and <MyReg>.
Indirect addressing is not allowed so the compiler can make certain checks with
.UNLOCK and .PROTECTED.

Comments:
Note the commas that limit <Dir>.
A prerequisite for copying is that the element in the control system which will be
written to is not included in the .PROTECTED block and is thus writable. Otherwise
the system error 69 is triggered.
When porting from SMC42, note that the interconnected ECCO is no longer identified
by SMC<x>, but ECCO<x>.
Conversion from 16-bit types to 32-bit types is signed. In the opposite direction,
higher value bits are discarded, if necessary.

Example:
Writes two of the machine’s own registers in control system 3.
SEND_REG ECCO3, RW101, RW201, <, RW5100, RW4100

Reads the same two registers back again.


SEND_REG ECCO3, RW101, RW201, >, RW5100, RW4100

See also:
56 .LIMITS
65 .PROTECTED / .END_PROTECTED
85 .UNLOCK / .END_UNLOCK
185 SEND_IO

10/26/05 – Ver.: 1.02 English ECCO Manual - 187/282 -


Horsch Elektronik AG SEND_SR

SEND_SR

Allows copying of variable strings between ECCO control systems.

Syntax:
SEND_SR ECCO<FarECCO>, <Lng>, <FarSR>, <Dir>, <MySR>

Fields:
<FarECCO> Number of the interconnected ECCO control system. Numbers
1 to 15 are available, but the ECCO must be declared under
.LIMITS.
<Lng> Number of the local language. Number between 0 and 3 where
0 selects the current language and 1 to 3 the desired language.
<FarSR> SR register in the interconnected ECCO control system.
<Dir> The character < for write, > for read.
<MySR> The local ECCO system’s SR register.

Comments:
Note the commas delimiting <Dir>.
A prerequisite for copying is that the elements in the control system which will be
written to is not included in the .PROTECTED block but in the .UNLOCK block, and is
thus writable. Otherwise the system error 69 is triggered.
When porting from SMC42, note that the interconnected ECCO is no longer identified
by SMC<x>, but ECCO<x>.

Example:
Writes own register SR100 to SR200 in control system 3 in language 1.
SEND_SR ECCO3, 1, SR200, <, SR100

Reads the register, this time in the current language.


SEND_SR ECCO3, 0, SR200, >, SR100

See also:
56 .LIMITS
65 .PROTECTED / .END_PROTECTED
85 .UNLOCK / .END_UNLOCK
185 SEND_IO

10/26/05 – Ver.: 1.02 English ECCO Manual - 188/282 -


Horsch Elektronik AG SET_LANG

SET_LANG

Selects the current language.

Syntax:
SET_LANG <Lng>

Fields:
<Lng> Three-letter label for the language.

Comments:
The text lists in .FUNCTIONS, .IO_TEXT, .STATIONS, .STATISTIC, .STRINGS
and .ZPOINT must be completed so that each element has a text in the language
selected. This condition is checked by the compiler and violations are reported as
error.

Example:
SET_LANG ENG ; Switch to English

See also:
48 .FUNCTIONS / .FUNC_END
53 .IO_TEXT / .END_IO_TEXT
55 .LANGUAGES
72 .STATIONS / STATION / .END_STATIONS
75 .STATISTIC / .END_STATISTIC
78 .STRINGS / .END_STRINGS
83 .ZPOINT / ANLAGE / RACK / .END_ZPOINT

10/26/05 – Ver.: 1.02 English ECCO Manual - 189/282 -


Horsch Elektronik AG SET_PSL

SET_PSL

Activates a PSL page

Syntax:
SET_PSL <Dest>

Fields:
<Dest> An RV, LV or KV register or direct input of the PSL page.

The direct input has the format:


PS<Row>.<Column>
with
<Row> The line on the PSL page to be activated.
<Column> The column on the PSL page to be activated.
<Dest>=256*<Row>+<Column>.

Comments:
The value in the register is often not of interest, as it is only used to reconstruct an
old PSL page saved with GET_PSL.

Example:
Saves the current PSL page in order then to call page 3.4 for whatever reason. When
finished, the old page is reconstructed.
GET_PSL LV001
SET_PSL PS3.4
; The code for a process step is placed here
SET_PSL LV001 ; Reconstruct PSL page

See also:
67 .PSL / .END_PSL
115 GET_PSL

10/26/05 – Ver.: 1.02 English ECCO Manual - 190/282 -


Horsch Elektronik AG SETBIT

SETBIT

Sets or deletes a bit in a register.

Syntax:
SETBIT <Register>, <Bit>, <Value>

Fields:
<Register> Register in which a bit will be set or cleared. A register of type
RV, RW, AV, AW, LV or LW.
<Bit> Position of bit to be changed.
<Value> L if the bit is to be set at 0 or H if the bit is to be set at 1.

Comments:
The position <Bit> must be smaller than the bit width of <Register>. Thus, the
valid range for a 16-bit register is 0 to 15, and 0 to 31 for a 32-bit register.
The same functionality can be achieved with a bit mask.

Example:
The example shows the command and the same functionality is then achieved with a
bit mask.
SETBIT RW100, 8, H
OR RW100, RW100, 256 ; 256 = 100000000 (b)
; Raises bit 8

SETBIT RW100, 1, L
AND RW100, RW100, -3 ; -3 = 1..1 01 (b)
; Lowers bit 1

See also:
90 AND
165 OR

10/26/05 – Ver.: 1.02 English ECCO Manual - 191/282 -


Horsch Elektronik AG SETTIM

SETTIM

Sets a timer.

Syntax:
SETTIM <Timer>, <Value>

Fields:
<Timer> Timer to be set. T0 is the local timer, timers T001 to T255 are
global.
<Value> A direct numerical value or an RV, LV or KV register. The value
is input in units of 10 milliseconds.

Comments:
Global timers must all be designated with three places, as T001.

Example:
The example waits 1 second before continuing.
SETTIM T0, 100
$LOOP :
JMPTIM T0, $CONTINUE
JUMP $LOOP
$CONTINUE:

See also:
146 JMPTIM

10/26/05 – Ver.: 1.02 English ECCO Manual - 192/282 -


Horsch Elektronik AG SLCE

SLCE

Receives a value from a slave.

Syntax:
SLCE <Slave>, <Command>, <Register>

Fields:
<Slave> Slave to be received from. A direct numerical value or an RV,
AV, LV or KV register.
<Command> The command that tells the slave what will be read in. The
precise meaning depends on the slave used.
<Register> Register that will be read into of type RV, RW, AV, AW, LV, LW or
ZW.

Comments:
<Command> is a number whose precise meaning depends on the slave used. To
make the code more legible, the number can be given a descriptor in the .SLCE_DEF
block and be used in <Command>.
The command cannot be used for the PAC, as the PAC command is used for that.
Slaves are external devices such as printers or scanners.
The SLCE and SLCS commands are very close to hardware. Frequently, there are
instructions realizing a specific part better, more conveniently and more user-friendly.

Examples:
SLCE 1, 5, LW101 ; Read from slave 1
; with command 5 to LW101

The second example is identical to the first if the value 5 has been allocated to the
descriptor Wert5 in .SLCE_DEF block.
SLCE 1, Wert5, LW101

See also:
72 .SLCE_DEF / .END_SLCE_DEF
168 PAC
194 SLCS

10/26/05 – Ver.: 1.02 English ECCO Manual - 193/282 -


Horsch Elektronik AG SLCS

SLCS

Outputs the value to a slave.

Syntax:
SLCS <Slave>, <Command>, <Register>

Fields:
<Slave> Slave to operate on. A direct numerical value or an RV, AV, LV
or KV register.
<Command> The command that tells the slave how <Register> is to be
interpreted. The precise meaning depends on the slave used.
<Register> Register whose value will be transferred of type RV, RW, AV, AW,
LV, LW, KV, KW, FW or ZW.

Comments:
<Command> is a number whose precise meaning depends on the slave used. To
make the code more legible, the number can be given a descriptor in the .SLCS_DEF
block and can then be used as <Command>.
The command cannot be used for the PAC, as the PAC instruction is used for that.
Slaves are external devices such as printers or scanners.
The SLCE and SLCS commands are very close to hardware. Frequently, there are
instructions realizing a specific part better, more conveniently and more user-friendly.

Examples:
SLCS 2, 1, RW110 ; Write RW110 to slave 2
; with command 1

The second example is identical to the first if the value 1 has been allocated to the
descriptor GotoPosition in the .SLCE_DEF block.<0}
SLCS 2, GotoPosition, RW110

See also:
73 .SLCS_DEF / .END_SLCS_DEF
168 PAC
193 SLCE

10/26/05 – Ver.: 1.02 English ECCO Manual - 194/282 -


Horsch Elektronik AG SLV_RCV_STR

SLV_RCV_STR

Receives a string from a slave.

Syntax:
SLV_RCV_STR <Slave>, <Format>, <SR_Reg>

Fields:
<Slave> Address of the slave as a number between 1 and 30 or an LV,
RV or KV register.
<Format> Formatting for the string as a number between 1 and 255. The
meaning of the formatting depends on <Slave>.
<SR_Reg> Variable SR string in which the received text will be written.

Comments:
The command waits until new text is received from the slave and then writes it in the
appropriate <SR_Reg>.
The meaning of <Format> can be found in the documentation for the relevant slave.

For the standard slave, <Format> can have the following values and meanings:
1 <SR_Reg> is read directly from the buffer.
2 <SR_Reg> is enclosed by characters <STX> and <ETX> as
<STX><SR_Reg><ETX>. Reception ends only when <ETX> is
received.
3 <SR_Reg> is enclosed by characters <ESC> and <CR> as
<ESC><SR_Reg><CR>. Reception ends only when <CR> is
received.
The enclosing characters are cut off and reception ends only when the closing
character is received. In format 1 only new buffer data is read in.

Examples:
SLV_RCV_STR 1, 1, SR201 ; Result depends on slave

The second example has the same outcome as the first but uses indirect addressing.
MOV LV001, 201
SLV_RCV_STR 1, 1, SR(LV001)

See also:
156 MOV
196 SLV_SND_STR

10/26/05 – Ver.: 1.02 English ECCO Manual - 195/282 -


Horsch Elektronik AG SLV_SND_STR

SLV_SND_STR

Sends a string to a slave.

Syntax:
SLV_SND_STR <Slave>, <Format>, <String>

Fields:
<Slave> Address of the slave as a number between 1 and 30 or an LV,
RV or KV register.
<Format> Formatting for the string as a number between 1 and 255. The
meaning of the formatting depends on <Slave>.
<String> An SR or ST string or text enclosed in quotes.

Comments:
If an ST register is input, the text in the current language will be used, as defined in
.STRINGS.
The meaning of <Format> can be found in the documentation for the relevant slave.

For the standard slave, <Format> can have the following values and meanings:
1 <SR_Reg> is sent unchanged.
2 <SR_Reg> is enclosed by characters <STX> and <ETX> as
<STX><SR_Reg><ETX>.
3 <SR_Reg> is enclosed by characters <ESC> and <CR> as
<ESC><SR_Reg><CR>.
The enclosing characters are added before sending.

Example:
SLV_SND_STR 1, 1, “Hello World”

See also:
80 .STRINGS / .END_STRINGS
195 SLV_RCV_STR

10/26/05 – Ver.: 1.02 English ECCO Manual - 196/282 -


Horsch Elektronik AG SMOV

SMOV

Allocates the text for a variable string for each language.

Syntax:
SMOV <DestSR>, <Source>

Fields:
<DestSR> Target register of type SR.
<Source> An ST or SR register, text enclosed by quotes or an input,
output, flag or error flag whose .IO_TEXT text is taken over.

Comments:
The precise behavior of the instruction depends on <Source>. If <Source> is an SR
or ST register or an .IO_TEXT text, then the text in all languages will copied to
<DestSR>. When the language is changed, <DestSR> will switch automatically. If,
however, text enclosed in quotes is input, this text will be used for all languages.

Examples:
The first example allocates the .IO_TEXT text of output A100 to SR100.
SMOV SR100, A100 ; Correct translation to
; all languages

The second example allocates the text that is input.


SMOV SR101, “Hello” ; Same text for all
; languages

See also:
53 .IO_TEXT / .END_IO_TEXT

10/26/05 – Ver.: 1.02 English ECCO Manual - 197/282 -


Horsch Elektronik AG STAT_CLR

STAT_CLR

Deletes the entries in a statistics data group.

Syntax:
STAT_CLR <Group>

Fields:
<Group> Statistical group to be deleted. An RV, RW, AV, AW, LV, LW, KV or
KW register or a direct number between 1 and 20. Using 0
deletes all statistical groups.

Comments:
The command deletes all entries in a statistical group if they have not already been
transferred. It is used, for example, for parts that are not yet fully assembled but
which must be removed from the machine.

Example:
STAT_CLR 8 ; Deletes the entries in
; statistical group 8

10/26/05 – Ver.: 1.02 English ECCO Manual - 198/282 -


Horsch Elektronik AG STAT_PUFFER

STAT_PUFFER

Returns the number of used and free statistical buffers.

Syntax:
STAT_PUFFER <Used>, <Free>

Fields:
<Used> Register in which the number of used statistical buffers will be
written, of type RV, RW, LV, or LW.
<Free> Register in which the number of free statistical buffers will be
written, of type RV, RW, LV, or LW.

Comments:
As there are 200 statistical buffers, <Used>+<Free>=200.

Example:
STAT_PUFFER LV001, LV002 ; Used, free

See also:
200 STAT_QUEUE

10/26/05 – Ver.: 1.02 English ECCO Manual - 199/282 -


Horsch Elektronik AG STAT_QUEUE

STAT_QUEUE

Returns the number of used and free data records.

Syntax:
STAT_QUEUE <Used>, <Free>

Fields:
<Used> Register in which the number of used data records will be
written, of type RV, RW, LV, or LW.
<Free> Register in which the number of free data records will be
written, of type RV, RW, LV, or LW.

Comments:
Data records are temporary memory between the data buffers and the actual
statistical software (STATREAD or ZPoint). They save the statistical data sent by the
user program until it has been read by the statistical software or the relevant
gateway.
As there are 24 000 data records, <Used>+<Free>=24 000.

Example:
STAT_QUEUE LV001, LV002 ; Used, Free

See also:
199 STAT_PUFFER

10/26/05 – Ver.: 1.02 English ECCO Manual - 200/282 -


Horsch Elektronik AG STAT_TAKT

STAT_TAKT

Informs the statistical unit that the relevant statistical group will be recycled.

Syntax:
STAT_TAKT <Group>

Fields:
<Group> Statistics group for the data to be cycled. An RV, RW, AV, AW, LV,
LW, KV or KW register or a direct number between 1 and 20.

Comments:
If the statistical group is not to be transferred yet with MOV_PUFFER, it must be
ensured that there is clean synchronization between the stations and tasks involved.

Example:
Cycles the second statistical group and transfers it if the counter decrements to zero.
STAT_TAKT 2

See also:
159 MOV_PUFFER

10/26/05 – Ver.: 1.02 English ECCO Manual - 201/282 -


Horsch Elektronik AG STCKZAHL

STCKZAHL

Reads in actual and set numbers in a statistical group from StatREAD.

Syntax:
STCKZAHL <Group>, <Ist_Reg>, <Soll_Reg>

Fields:
<Group> Statistics group for the data to be cycled. An RV, RW, AV, AW, LV,
LW, KV or KW register or a direct number between 1 and 20.
<Ist_Reg> An RW, AW or LW register in which the actual number is stored.
<Soll_Reg> An RW, AW or LW register in which the set number is stored.

Comments:
This command also raises flag M004 when a new order group is ready. The order
group is an order-specific group characteristic that the statistical group links to an
order. Raising the flag indicates a change of order.
This instruction cannot be used in conjunction with ZPoint.

Example:
Read in the number of items and the set number of items in statistical group 8.

STCKZAHL 8, RW100, RW101 ; Is-Number -> RW100


; Set-Number -> RW101

10/26/05 – Ver.: 1.02 English ECCO Manual - 202/282 -


Horsch Elektronik AG STDEF

STDEF

Defines the fail conditions.

Syntax:
STDEF <Cond>[, <Cond>]

Fields:
<Cond> An input, output, flag or error flag that triggers the fail program if
it shows the programmed level, L or H. Up to 48 conditions can
be given.

Comments:
The fail program is executed, beginning at the STPGM label, if a condition is satisfied
and is, therefore, a logical OR link.
In contrast to the emergency stop which is always triggered, the fail conditions are
only monitored and triggered when the control system is in automatic or station
mode.
If flags or error flags are declared, the NSDEF and STDEF conditions must be given.

Example:
In the example, a malfunction fail occurs if A101 or A102 are raised or flag M025 is
lowered.
STDEF A101 H, A102 H, M205 L

See also:
162 NSDEF
250 STPGM

10/26/05 – Ver.: 1.02 English ECCO Manual - 203/282 -


Horsch Elektronik AG STR_ADD

STR_ADD

Adds one string to another.

Syntax :
STR_ADD <Dest>, <Source>

Fields:
<Dest> Variable SR string to which <Source> will be added.
<Source> An ST or SR register or text limited by quotes whose content will
be added to <Dest>.

Example:
SMOV SR200, “” ; Empty SR200
STR_ADD SR200, “Hello ” ; SR200 now contains “Hello”
MOV LV001, 200
STR_ADD SR(LV001),“World” ; SR200 = “Hello World”

See also:
78 .STRING_REG / .END_STRING_REG
80 .STRINGS / .END_STRINGS
197 SMOV
205 STR_ADD_ASCII
207 STR_ADD_NR

10/26/05 – Ver.: 1.02 English ECCO Manual - 204/282 -


Horsch Elektronik AG STR_ADD_ASCII

STR_ADD_ASCII

Adds a character input as ASCII code to a string.

Syntax:
STR_ADD_ASCII <Dest>, <Char>

Fields:
<Dest> Variable SR string to which the character in <Char> will be
added.
<Char> An LV, LW, RV, RW, KV, KW, AV or AW register whose absolute
number in the range 0 to 255 represents the character to be
added.

Comments:
The character table used or the interpretation of the individual characters depends on
whether the receiver is a slave, printer or similar. The following character tables are
used for the display.

(ECCO screen shots: emulation


used is Terminal-850)

Example:
SMOV SR200, “Hallo ” ; SR200 now contains “Hallo ”
STR_ADD_ASCII SR200, 87 ; ASCII character W
STR_ADD_ASCII SR200, 101 ; ASCII character e
STR_ADD_ASCII SR200, 108 ; ASCII character l
STR_ADD_ASCII SR200, 116 ; ASCII character t
WRITE 1, 10, 1, SR200 ; Output: “Hallo Welt”

10/26/05 – Ver.: 1.02 English ECCO Manual - 205/282 -


Horsch Elektronik AG STR_ADD_ASCII

See also:
78 .STRING_REG / .END_STRING_REG
80 .STRINGS / .END_STRINGS
197 SMOV
204 STR_ADD
207 STR_ADD_NR

10/26/05 – Ver.: 1.02 English ECCO Manual - 206/282 -


Horsch Elektronik AG STR_ADD_NR

STR_ADD_NR

Adds a number to a string.

Syntax:
STR_ADD_NR <Dest>, <Digits>, <Value>

Fields:
<Dest> Variable SR string to which <Value> will be added.
<Digits> Number of places to be output as a number between 1 and 12.
If <Value> has more than <Digits> digits, it will be truncated
to the left. If <Value> has fewer digits, the leading free ones
will be zero-filled.
<Value> An LV, LW, RV, RW, KV, KW, AV or AW register whose absolute
number will be added.

Example:
SMOV SR200, “” ; Empty SR200
MOV LV001, 1
STR_ADD_NR SR200, 2, LV001 ; SR200 = “01”
MOV LV001, 45678
STR_ADD_NR SR200, 3, LV001 ; SR200 = “01678”

See also:
78 .STRING_REG / .END_STRING_REG
80 .STRINGS / .END_STRINGS
197 SMOV
204 STR_ADD
205 STR_ADD_ASCII

10/26/05 – Ver.: 1.02 English ECCO Manual - 207/282 -


Horsch Elektronik AG STR_TO_ASCII

STR_TO_ASCII

Returns the ASCII value of a character.

Syntax:
STR_TO_ASCII <Dest>, <String>, <Position>

Fields:
<Dest> Register in which the ASCII value of the character will be
written. A register of type RV, RW, AV, AW, LV or LW.
<String> String whose <Position>-th character will be converted. A
variable SR or constant ST string.
<Position> Position of the character within <String>. Can be given as
direct number or as RV, RW, AV, AW, LV or LW register.

Comments:
The value in <Dest> is in the range 0 to 255 or -1 if <Position> does not point to a
character in <String>. The command STR_ADD_ASCII shows the character table
in use.

Example:
SMOV SR100, “abcd”
STR_TO_ASCII LV001, SR100, 1 ; LV001 is now 97
STR_TO_ASCII LV001, SR100, 5 ; LV001 is now -1

See also:
205 STR_ADD_ASCII

10/26/05 – Ver.: 1.02 English ECCO Manual - 208/282 -


Horsch Elektronik AG STR_TREAT

STR_TREAT

Treats a string.

Syntax:
STR_TREAT <Dest>, <Source>, <Kind>

Fields:
<Dest> An SR register in which the result of the treatment will be
written.
<Source> SR string to be treated.
<Kind> Kind or type of treatment. A register of type RV, RW, AV, AW, LV
or LW. Can also be used to return.

Possible values for <Kind> are:


1 Sets <Dest> with the HEX4_1 checksum of <Source>.
2 Sets <Dest> with the HEX4_2 checksum of <Source>. Serves
to guarantee that up to 40,000, no two 11-digit numbers in
<Source> will have the same checksum.
3 Sets <Dest> with the DEC4 checksum of <Source>.
100 Compares <Dest> and <Source> and writes 0 in <Kind>, if
the two strings are equal, otherwise 1.

Example:
SMOV SR100, “12345”
SMOV SR101, SR100
MOV LV001, 100
STR_TREAT SR100, SR101, LV100
; LV100 is 0, because equal

See also:
197 SMOV

10/26/05 – Ver.: 1.02 English ECCO Manual - 209/282 -


Horsch Elektronik AG STR_VAL

STR_VAL

Converts a string to a number.

Syntax:
STR_VAL <Dest>, <String>

Fields:
<Dest> Register with the numerical value from <String>. A register of
type RV, RW, AV, AW, LV or LW.
<String> SR string to be converted.

Comments:
Returns the furthest left number in <String>, but ignores leading zeros.

Example:
SMOV SR100, “ 1 2”
STR_VAL RW100, SR100 ; RW100 is 1

See also:
197 SMOV

10/26/05 – Ver.: 1.02 English ECCO Manual - 210/282 -


Horsch Elektronik AG SV_COM

SV_COM

Sends a command without arguments to a servo-controller on motion and process


control slave or PAC.

Syntax :
SV_COM <SV_Adr>, <Command>
or
SV_COM SV<Slave>.<Servo>, <Command>

Fields:
<SV_Adr> Input of the servo-controller as RV, AV, LV or KV register.
<Slave> Slave number. Number between 1 and 30 for the control slave
or PAC.
<Servo> Servo-controller on <Slave> to which <Command> is sent.
<Command> Descriptor for the command. Valid descriptors can be found in
the documentation for the control slave or PAC and in appendix
5. 7.
<SV_Adr>=256*<Slave>+<Servo>.

Example:
Initializes servo regulator.
SV_COM SV1.2, RESET

See also:
212 SV_CONST
213 SV_FIL
214 SV_READ
215 SV_TRJ

10/26/05 – Ver.: 1.02 English ECCO Manual - 211/282 -


Horsch Elektronik AG SV_CONST

SV_CONST

Sends an instruction with one argument to a servo-controller on a motion and


process control slave or PAC.

Syntax:
SV_CONST <SV_Adr>, <Command>, <Value>
or
SV_CONST SV<Slave>.<Servo>, <Command>, <Value>

Fields:
<SV_Adr> Servo-controller as RV, AV, LV or KV register.
<Slave> Slave number. Number between 1 and 30 for the control slaves
or PAC.
<Servo> Servo-controller on <Slave> to which <Command> is sent.
<Command> Descriptor for the command. Valid descriptors can be found in
the documentation for the control slave or PAC and in appendix
5. 7.
<Value> A register of type RV, RW, AV, AW, LV, LW, KV, KW or FW or a
direct number. The valid range of values depends on
<Command>.
<SV_Adr>=256*<Slave>+<Servo>.

Example:
Sets the maximum contouring error for the first servo-controller in PAC 16.
SV_CONST SV16.1, PERR, FW016

See also:
204 SV_COM
213 SV_FIL
214 SV_READ
215 SV_TRJ

10/26/05 – Ver.: 1.02 English ECCO Manual - 212/282 -


Horsch Elektronik AG SV_FIL

SV_FIL

Sets the filter parameters of a servo-controller on a motion and process control slave
or PAC.

Syntax:
SV_FIL <SV_Adr>, <Param>, <Value>
or
SV_FIL SV<Slave>.<Servo>, <Param>, <Value>

Fields:
<SV_Adr> Input of the servo-controller as RV, AV, LV or KV register.
<Slave> Slave number. Number between 1 and 30 for control slaves and
PAC.
<Servo> Servo-controller on <Slave> on which <Param> is set.
<Param> Parameter that is set by <Value>. Available descriptors are
listed below.
<Value> A register of type RV, RW, AV, AW, LV, LW, KV or KW or a direct
number. Valid values are in the range 0 to 32767.
<SV_Adr>=256*<Slave>+<Servo>.

Possible descriptors of <Param> are:


P Proportionality constant
I Integration constant
D Differential constant
IL Integration limit
IL_MAX Integration limit at maximum speed. This descriptor is only valid
for the PAC.
Invalid descriptors will be trapped as error by the compiler.

Comments:
All filter parameters can be sent to the control slave or PAC and activated with
SV_COM instruction UDF.

Example:
Sets the proportional constant and then activates the new parameter in the controller.
SV_FIL SV1.1, P, KV100 ; Sets P proportion
SV_COM SV1.1, UDF ; Activates new parameter

See also:
204 SV_COM
212 SV_CONST
214 SV_READ
215 SV_TRJ

10/26/05 – Ver.: 1.02 English ECCO Manual - 213/282 -


Horsch Elektronik AG SV_READ

SV_READ

Reads a value from a servo-controller of a motion and process control slave or PAC.

Syntax:
SV_READ <SV_Adr>, <Sl_Reg>, <Register>
or
SV_READ SV<Slave>.<Servo>, <Sl_Reg>, <Register>

Fields:
<SV_Adr> Input of the servo-controller as RV, AV, LV or KV register.
<Slave> Slave number. Number between 1 and 30 for the control slave
or PAC.
<Servo> Servo-controller on <Slave>, from which <Command> is read.
<S1_Reg> Descriptor for the register to be read on the servo-controller.
Valid descriptors can be found in the documentation for the
control slave or PAC and in appendix 5. 7.
<Register> ECCO register into which the value will be read. An RW, AW or
LW register.
<SV_Adr>=256*<Slave>+<Servo>.

Comments:
If <Sl_Reg> is not a valid descriptor, the compiler will generate an error.

Example:
Read the status.
SV_READ SV1.2, STATUS, LW001

See also:
204 SV_COM
212 SV_CONST
213 SV_FIL
215 SV_TRJ

10/26/05 – Ver.: 1.02 English ECCO Manual - 214/282 -


Horsch Elektronik AG SV_TRJ

SV_TRJ

Sends a motion parameter to a servo-controller on a motion and process control


slave or PAC.

Syntax:
SV_TRJ <SV_Adr>, <Param>, <Value>
or
SV_TRJ SV<Slave>.<Servo>, <Param>, <Value>

Fields:
<SV_Adr> Servo-controller as RV, AV, LV or KV register.
<Slave> Slave number. Number between 1 and 30 for control slaves and
PAC.
<Servo> Servo-control number on <Slave> to which <Param> is sent.
<Param> Descriptor for the motion parameter. Valid descriptors can be
found in the documentation for the control slave or PAC and in
appendix 5. 7.
<Value> A register of type RV, RW, AV, AW, LV, LW, KV or KW or a direct
number. The valid range of values depends on <Param>.
<SV_Adr>=256*<Slave>+<Servo>.

Comments:
The command takes its name from the fact that every motion parameter defines part
of a trajectory.
If <Param> is not a valid value, the compiler reports an error.

Example:
Resets the absolute position and starts the motion of the first servo-controller in PAC
16.
SV_TRJ SV16.1, X, 0
SV_COM SV16.1, STT ; Start Motion command

See also:
204 SV_COM
212 SV_CONST
213 SV_FIL
214 SV_READ

10/26/05 – Ver.: 1.02 English ECCO Manual - 215/282 -


Horsch Elektronik AG SWITCH / CASE / DEFAULT / END_SWITCH

SWITCH / CASE / DEFAULT / END_SWITCH

Allows the selection of a program block from several possibilities, dependent on an


argument.

Syntax:
SWITCH <Register>
CASE <Const>[, <Const>]
<Code>
[CASE <Const>[, <Const>]
<Code>]
[DEFAULT
<Code>]
END_SWITCH

Fields:
<Register> Register of type SW, RV, RW, AV, AW, LV, LW, KV or KW whose
value selects.
<Const> A direct value or a KV or KW register.
<Code> Program code that will be executed.

Comments:
The value in <Register> is tested in SWITCH and if it is equal to a CASE value
<Const>, the relevant CASE program block starts and, when it finishes, a jump is
made to the END_SWITCH line. If the value does not fit with any CASE value, the
DEFAULT program block is executed. If there is no DEFAULT label a jump direct to
the END_SWITCH line is made.
If several constants <Const> have the same value, the compiler will report this as an
error during translation.

Example:
SWITCH RV110
CASE 0, 1, 2
WRITE 1, 20, 1, “Selection 1”
CASE KV110, KV111, ; CASE statement over …
3, 4 ; ... two lines
WRITE 1, 20, 1, “Selection 2”
DEFAULT
WRITE 1, 20, 1, “Default case”
END_SWITCH

See also:
155 L_SWITCH / CASE / DEFAULT / END_SWITCH

10/26/05 – Ver.: 1.02 English ECCO Manual - 216/282 -


Horsch Elektronik AG TASK_KILL

TASK_KILL

Ends a program or background task asynchronously.

Syntax:
TASK_KILL <TaskNumber>

Fields:
<TaskNummer> An RV, RW, AV or AW register which contains the absolute
number of the task to be ended.

Allocation of the absolute task number <TaskNummer> is as follows:


1 - 128 Program tasks.
161 Active PSL task.
162 Active display task.
163 Active error task.
164 - 167 Function tasks.
171 Hot task.
172 - 250 Background tasks.

Comments:
Only program or background tasks can be ended with this command. If an attempt is
made to close another type of task, or if no task exists, the command has no effect
and continues on the next line.
If the task to be ended is currently blocked, the command will only be executed when
the task would continue.
Typically, <TaskNumber> is taken over from the TASK_OPEN command.

Example:
The example, in a program task, opens a task named DemoTask and kills it
immediately.
TASK_OPEN RW100, DemoTask
TASK_KILL RW100

See also:
218 TASK_OPEN

10/26/05 – Ver.: 1.02 English ECCO Manual - 217/282 -


Horsch Elektronik AG TASK_OPEN

TASK_OPEN

Opens a task and returns its absolute task number.

Syntax:
TASK_OPEN <TaskNumber>, <Label>

Fields:
<TaskNumber> An RV, RW, AV or AW register in which the absolute number of
the called task is written.
<Label> Label of the task to be called. Every global label that does not
define a function task or error flag can be started from a
background or program task using TASK_OPEN.

<TaskNumber> contains the absolute number of the called task, as it is also


displayed in the debugger. Allocation is as follows:
1 - 128 Program tasks.
161 Active PSL task.
162 Active display task.
163 Active error task.
164 - 167 Function tasks.
171 Hot task.
172 - 250 Background tasks.

Comments:
The new task runs independently of the chain from which it was called. To this
extent, the instruction is identical with OPEN.
A parallel task is closed with CLOSE.
The absolute number in <TaskNumber> can be used for display purposes or as an
argument for the TASK_KILL command with which tasks can be ended
asynchronously.

Example:
TASK_OPEN AW002(7), DEMO_TASK

See also:
100 CLOSE
164 OPEN
217 TASK_KILL

10/26/05 – Ver.: 1.02 English ECCO Manual - 218/282 -


Horsch Elektronik AG TASK_STEP

TASK_STEP

Allows the current task to run at a reduced speed.

Syntax:
TASK_STEP <Interval>

Fields:
<Interval> The time to be waited between two instructions in 10 ms steps.

Comments:
It is often useful to slow unimportant tasks in order to keep system resources free for
important tasks or to reduce execution speed of older ported programs so hardware
is not overloaded.
After this instruction, only one instruction will be executed in the current task every
<Interval>*10ms. If the current task should run at normal speed, <Interval>
should be set zero.

Examples:
TASK_STEP 10 ; Slow down: 100ms per inst.

To return to normal speed:


TASK_STEP 0

10/26/05 – Ver.: 1.02 English ECCO Manual - 219/282 -


Horsch Elektronik AG TIMEDISP

TIMEDISP

Outputs the time stored in a register.

Syntax :
TIMEDISP <xPos>, <yPos>, <Size>, <Register>, <Ftext>

Fields:
<xPos> Column from which on the formatted text will be written. Valid
values are in the range 0 to 60.
<yPos> Line. Lower edge of the output. In the range 0 to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown on page 267.
<Register> An RW, AW or LW register with the time to be output.
<Ftext> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

<Ftext> has the format:


“[<Text>] #<Format># [<Text>]”
These format descriptors are allowed in the <Format> format:
hh Writes the hour in double-digit form, e.g. 08.
mm Writes the minute double-digit.
ss Writes the second double-digit.
pp Writes the hundredth second double-digit.

Comments:
The RD_TIME command is required to read in the date in a register.

Example:
The example reads the time in and outputs it.
RD_TIME RW100, RW101 ; Read time and date
TIMEDISP 1, 20, 1, RW100, “Time: #hh:mm#”

See also:
105 DATEDISP
125 HP_DATEDISP
132 HP_TIMEDISP
174 RD_TIME

10/26/05 – Ver.: 1.02 English ECCO Manual - 220/282 -


Horsch Elektronik AG TINP

TINP

Waits with time supervision until all conditions are satisfied.

Syntax:
TINP <Cond>, [<Cond>,] <Time> [, <HM>],
<EC_Reg> [, <EC_Base>] [, <Disable>]

Fields:
<Cond> Output, input, flag or error flag in the machine’s own control
system with the desired level, H or L. Up to 8 conditions can be
given.
<Time> Period of supervision in 10 ms units. A direct numerical value or
an RV, LV or KV register.
<HM> Optional: A flag or error flag raised when <Time> has elapsed.
<EC_Reg> An RV register in which the error code is written, if necessary.
<EC_Base> Optional: Base value for the error code. An RV register.
<Disable> Optional: Output, input, flag or error flag with the desired level,
H or L. If <Disable> is given and true, the period starts anew
and supervision restart only when <Disable> is no longer
holds.

If <Time> elapses while not all conditions are satisfied, ECCO will start the relevant
error handler: either by raising the handler flag <HM> or, if <HM> is missing, by
starting ERROR_PROTOTYPE. If <HM> is a normal flag, another task must determine
that <Time> has elapsed and lower the flag.
The value assigned to <EC_Reg> must be a unique number for the whole program
duration.
If <EC_Base> is input, the value must be at least 1 and must be small enough that
the value of <EC_Reg> remains smaller than the value input in
.ERROR_CODE_START. If .ERROR_CODE_START is 10000 and there are four
conditions, then <EC_Base> may be no more than 9996.
If <EC_Base> is not input, ECCO automatically generates a new error code at each
TINP <Cond>. These are sequential and the lowest value is defined by the compiler
declaration .ERROR_CODE_START.

Comments:
This command is the monitored variant of the INP command. The same result can be
achieved with INP in a TRAP block. TINP is preferred in such situations, however,
because its syntax is more compact.
The control flow for this command runs according to the diagram below:

10/26/05 – Ver.: 1.02 English ECCO Manual - 221/282 -


Horsch Elektronik AG TINP

After the error condition has been handled, the runtime environment executes the
instruction again. This ensures that the subsequent code is executed only when
<Cond> has been satisfied.

Examples:
The first example shows the use of an error flag:
TINP E100 H, 100, D100, RV1075
; Activate D100, if E100
; is not H within 1s.

The second example shows the use of a normal flag. A parallel task must react to
and reset it.
TINP E100 H, 100, M100, RV1075

The third example shows use with ERROR_PROTOTYPE as error handler and explicit
<EC_Base>. Note that RV1075 is assigned the value 237 if the fourth condition is
not satisfied after the time has elapsed.
TINP E0224 H, E0236 L, A0231 H, A0255 H, 100,
RV1075, 234

10/26/05 – Ver.: 1.02 English ECCO Manual - 222/282 -


Horsch Elektronik AG TINP

The final example shows the use of a blocking flag. The monitoring duration of 200
ms starts only when M0901 is lowered.
TINP E0456 L, 20, RV1075, M0901 H

See also:
48 .ERROR_CODE_START
105 COND_TRAP / IF_COND / END_COND_TRAP
242 ERROR_PROTOTYPE
143 INP
263 TRAP / IF_TRAP / END_TRAP

10/26/05 – Ver.: 1.02 English ECCO Manual - 223/282 -


Horsch Elektronik AG VI_CLRKEY

VI_CLRKEY

Deletes the key buffer of a VI terminal.

Syntax:
VI_CLRKEY <Address>, <ErrorLabel>

Fields:
<Address> Address of the VI terminal. Number between 1 and 15.
<ErrorLabel> Label branched to if there is an error in communication with the
terminal.

Example:
VI_CLRKEY 1, $VI_ERR ; Delete key buffer on VI
; terminal 1. On error go to
; $VI_ERR

See also:
225 VI_DATE
227 VI_JMPKEY
228 VI_RDISP
230 VI_READ
231 VI_TIME
233 VI_WRITE
[3] Connecting a VI terminal to ECCO, Horsch Elektronik AG, Version 0.02,
2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 224/282 -


Horsch Elektronik AG VI_DATE

VI_DATE

Writes the date from a register on a VI terminal.

Syntax:
VI_DATE <Address>, <Line>, <Reg>, <ErrorLabel>,
<Ftext>

Fields:
<Address> Address of the VI terminal. Number between 1 and 15.
<Line> The line on the VI terminal. Valid values are shown below.
<Reg> An RW, AW or LW register with the date to be output.
<ErrorLabel> Label branched to, if there is an error in communication with the
terminal.
<Ftext> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

The <Line> line has these possible values:


1 First display line. Texts longer than 20 characters are curtailed.
2 Second display line. Texts longer than 20 characters are
truncated.
3 Output on a printer attached to the VI’s printer port. Texts longer
than 50 characters are truncated. Control characters \n, \f
and \\ may be used to print a new line, a new page or a
backslash.
All other line numbers will be trapped as error by the compiler.

The following format descriptors are allowed in the <Ftext> formatting:


jjjj Writes the year with four digits.
jj Writes the year with two digits.
mm Writes the month with two digits from 01 for January to 12 for
December.
tt Writes the day of the month with two digits.

Comments:
The command is the VI equivalent to DATEDISP for the display.

Example:
RD_TIME LW001, LW002 ; Read time and date
VI_DATE 1, 1, LW002, $VI_ERROR, “Date: #mm/tt/jjjj#”

See also:
105 DATEDISP
174 RD_TIME
224 VI_CLRKEY
227 VI_JMPKEY

10/26/05 – Ver.: 1.02 English ECCO Manual - 225/282 -


Horsch Elektronik AG VI_DATE

228 VI_RDISP
230 VI_READ
231 VI_TIME
233 VI_WRITE
[3] Connecting a VI terminal to ECCO, Horsch Elektronik AG, Version 0.02,
2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 226/282 -


Horsch Elektronik AG VI_JMPKEY

VI_JMPKEY

Waits for a key press on a VI terminal.

Syntax:
VI_JMPKEY <Address>, <Keys>, <Label>, <ErrorLabel>

Fields:
<Address> Address of the VI terminal. Number between 1 and 15.
<Keys> Bit coding of the keys. Bit 0 stands for key 1, bit 1 for key 2, bit
2 for key 3 and bit 3 for key 4.
<Label> Label jumped to when key in <Keys> is pressed. Otherwise the
command falls through.
<ErrorLabel> Label branched to if there is an error in communication with the
terminal.

Comments:
The instruction waits until a key is pressed on the terminal. If a key has already been
pressed, the instruction does not wait, but perform immediately. If the key pressed is
one of the keys coded in <Keys>, the program branches to the input <Label>,
otherwise it falls through and continues on the next line.

Example:
The example outputs 1 to the display if key 1 is pressed, otherwise 2.
VI_CLRKEY 1, $VI_ERR ; Del keys already pressed
VI_JMPKEY 1, 1, $KEY1, $VI_ERR
VI_WRITE 1, 1, $VI_ERR,“2” ; If 1 not pressed
JUMP $END
$KEY1:
VI_WRITE 1, 1, $VI_ERR,“1” ; If key 1 pressed
$END:

See also:
224 VI_CLRKEY
225 VI_DATE
228 VI_RDISP
230 VI_READ
231 VI_TIME
233 VI_WRITE
[3] Connecting a VI terminal to ECCO, Horsch Elektronik AG, Version 0.02,
2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 227/282 -


Horsch Elektronik AG VI_RDISP

VI_RDISP

Formats and writes a value to the VI terminal.

Syntax:
VI_RDISP <Address>, <Line>, <Value>, <ErrorLabel>,
<Ftext>

Fields:
<Address> Address of the VI terminal. Number between 1 and 15.
<Line> The line on the VI terminal. Valid values are shown below.
<Value> A number or a register of type RV, RW, AV, AW, LV, LW, KV, KW or
ZW.
<ErrorLabel> Label branched to if there is an error in communication with the
terminal.
<Ftext> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

The <Line> has one of these possible values:


1 First display line. Texts longer than 20 characters are curtailed.
2 Second display line. Texts longer than 20 characters are
truncated.
3 Output on a printer attached to the VI’s printer port. Texts longer
than 50 characters are truncated. Control characters \n, \f
and \\ may be used to print a new line, a new page or a
backslash.
All other line numbers will be trapped as error by the compiler.

The formatting in <Ftext> can be given as:


“[Text] #<Digits>.<DecPoint>.<RightSize># [Text]”<0}
Meanings:
<Digits> Number of places reserved for output on the display. A negative
value allows left-aligned formatting with the number of places
indicated by the value.
<DecPoint> Number of places after the decimal in the value to be output.
<RightSize> Number of places after the decimal to be output.
<Text> Optional: additional unformatted text.

Comments:
The formatting of numbers allows working implicitly with fixed decimal numbers. Note
that overflowing places after the decimal will be truncated and not rounded.
The command is the VI equivalent to REGDISP for the display.

Example:
MOV LV100, 120
VI_RDISP 1, 1, LV100, $VI_ERR, “Value: #4.2.2#”
; Displays “Value: 1.20”

10/26/05 – Ver.: 1.02 English ECCO Manual - 228/282 -


Horsch Elektronik AG VI_RDISP

See also:
224 VI_CLRKEY
225 VI_DATE
227 VI_JMPKEY
230 VI_READ
231 VI_TIME
233 VI_WRITE
[3] Connecting a VI terminal to ECCO, Horsch Elektronik AG, Version 0.02,
2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 229/282 -


Horsch Elektronik AG VI_READ

VI_READ

Reads in the key buffer of a VI terminal.

Syntax:
VI_READ <Address>, <Register>, <ErrorLabel>

Fields:
<Address> Address of the VI terminal. Number between 1 and 15.
<Register> Register that will be read into of type RV, RW, AV, AW, LV, LW or
ZW. In <Register>, bit 0 stands for key 1, bit 1 for key 2, bit 2
for key 3 and bit 3 for key 4.
<ErrorLabel> Label branched to on error.

Comments:
In contrast to VI_JMPKEY this command does not wait for a key to be pressed. It is
thus suitable for cases where, depending on the key pressed, several different
actions must be executed.

Example:
VI_CLRKEY 1, $VI_ERR
DO
VI_READ 1, LV001, $VI_ERR ; Wait on user pressing a key
DO_WHILE LV001=0
SWITCH LV001
CASE 1 ; Key 1 pressed
VI_WRITE 1, 1, $VI_ERR, “Key 1 pressed”
CASE 2 ; Key 2 pressed
VI_WRITE 1, 1, $VI_ERR, “Key 2 pressed”
CASE 4 ; Key 3 pressed
VI_WRITE 1, 1, $VI_ERR, “Key 3 pressed”
CASE 8 ; Key 4 pressed
VI_WRITE 1, 1, $VI_ERR, “Key 4 pressed”
END_SWITCH

See also:
111 DO / DO_WHILE / DO_WHILENOT
216 SWITCH / CASE / DEFAULT /END_SWITCH
224 VI_CLRKEY
225 VI_DATE
227 VI_JMPKEY
228 VI_RDISP
231 VI_TIME
233 VI_WRITE
[3] Connecting a VI terminal to ECCO, Horsch Elektronik AG, Version 0.02,
2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 230/282 -


Horsch Elektronik AG VI_TIME

VI_TIME

Outputs the time that is stored in a register on a VI terminal.

Syntax:
VI_TIME <Address>, <Line>, <Reg>, <ErrorLabel>,
<Ftext>

Fields:
<Address> Address of the VI terminal. Number between 1 and 15.
<Line> The line on the VI terminal. Valid values are shown below.
<Reg> An RW, AW or LW register with the time to be output.
<ErrorLabel> Label branched to, if there is an error in communication with the
terminal.
<Ftext> Formatted text. Either text limited by quotes or an ST or SR
register. The allowed formatting is shown below.

The <Line> can have one of the following values:


1 First display line. Texts longer than 20 characters are curtailed.
2 Second display line. Texts longer than 20 characters are
truncated.
3 Output on a printer attached to the VI’s printer port. Texts longer
than 50 characters are truncated. Control characters \n, \f
and \\ may be used to print a new line, a new page or a
backslash.
All other line numbers will be trapped as error by the compiler.

These format descriptors are allowed in the <Ftext>:


hh Writes the hour in double-digit form, e.g. 08.
mm Writes the minute double-digit.
ss Writes the second double-digit.
pp Writes the hundredth second double-digit.

Comments:
The command is the VI equivalent to TIMEDISP for the display.

Example:
RD_TIME LW001, LW002 ; Read time and date
VI_TIME 1, 1, LW002, $VI_ERROR, “Time: #hh:mm#”

See also:
174 RD_TIME
217 TIMEDISP
224 VI_CLRKEY
225 VI_DATE
227 VI_JMPKEY

10/26/05 – Ver.: 1.02 English ECCO Manual - 231/282 -


Horsch Elektronik AG VI_TIME

228 VI_RDISP
230 VI_READ
233 VI_WRITE
[3] Connecting a VI terminal to ECCO, Horsch Elektronik AG, Version 0.02,
2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 232/282 -


Horsch Elektronik AG VI_WRITE

VI_WRITE

Writes a string on the VI terminal.

Syntax:
VI_WRITE <Address>, <Line>, <ErrorLabel>, <Text>

Fields:
<Address> Address of the VI terminal. Number between 1 and 15.
<Line> The line on the VI terminal. Valid values are shown below.
<ErrorLabel> Label branched to if there is an error in communication with the
terminal.
<Text> Text to be output. Either text limited by quotes or an ST or SR
register.

The <Line> can have these values:


1 First display line. Texts longer than 20 characters are curtailed.
2 Second display line. Texts longer than 20 characters are
truncated.
3 Output on a printer attached to the VI’s printer port. Texts longer
than 50 characters are truncated. Control characters \n, \f
and \\ may be used to print a new line, a new page or a
backslash.
All other line numbers will be trapped as error by the compiler.

Comments:
The command is the VI equivalent to WRITE for the display.

Example:
VI_WRITE 1, 1, $VI_ERROR, “Hi folks!”

See also:
224 VI_CLRKEY
225 VI_DATE
227 VI_JMPKEY
228 VI_RDISP
230 VI_READ
231 VI_TIME
233 VI_WRITE
238 WRITE
[3] Connecting a VI terminal to ECCO, Horsch Elektronik AG, Version 0.02,
2004.

10/26/05 – Ver.: 1.02 English ECCO Manual - 233/282 -


Horsch Elektronik AG WAITIM

WAITIM

Waits until a timer has elapsed.

Syntax:
WAITIM <Timer>

Fields:
<Timer> Timer. T0 is the local timer and timers T001 to T255 are global.

Comments:
Global timers must all be designated with three digits, as in T001.
The instruction waits until the timer has decremented to 0 and then continues.

Example:
SETTIM T0, 100 ; T0 shall wait for 1 second
WAITIM T0 ; Wait for this second

See also:
146 JMPTIM
192 SETTIM

10/26/05 – Ver.: 1.02 English ECCO Manual - 234/282 -


Horsch Elektronik AG WHILE / WHILENOT / END_WHILE

WHILE / WHILENOT / END_WHILE

Repeats a program block as long as the input condition is satisfied.

Syntax:
WHILE <Comp>
<Code>
END_WHILE
or
WHILE <Cond>
<Code>
END_WHILE
or
WHILENOT <Cond>
<Code>
END_WHILE

Fields:
<Comp> A comparison defining whether <Code> should be executed
once again.
<Code> Program block to be executed.
<Cond> A logical condition or a timer that defines whether the <Code>
should be executed once again.

<Comp> is constructed as follows:


<Operand> <Operator> <Operand>
Meanings:
<Operand> A directly input number or a register of the type SW, RV, RW, AV,
AW, LV, LW, KV, KW, C, T or ZW. It is thus possible, but not very
practical to compare two timers.
<Operator> The comparative operators <, >, =, <=, >= or <>.

<Cond> is either a timer or one or more inputs, outputs, flags or error flags with the
desired level, H or L.

Comments:
In contrast to the DO / DO_WHILE the <Code> block here cannot be executed if the
condition has not already been satisfied before starting.
WHILE with inputs, outputs, flags and error flags executes <Code> once again only if
all levels are correct. WHILENOT executes it until all levels are satisfied.
If this command is used to constantly query a value from an external control system,
it must be ensured that the control system and the data bus used are not overloaded.
Typically, this is prevented by waiting for a short time after each query. Only one
external control system may be communicated with in a single command.

Examples:
The first example shows use with comparisons.

10/26/05 – Ver.: 1.02 English ECCO Manual - 235/282 -


Horsch Elektronik AG WHILE / WHILENOT / END_WHILE

MOV LV001, 100


WHILE LV001 > 0
CALC LV001, LV001 – 1 ; Run the loop 100 times
END_WHILE

The second example shows the normal use of a timer.


SETTIM T0, 100 ; Wait 1 second
WHILENOT T0
; Do whatever
END_WHILE

The last example shows the use of inputs, outputs and flags. The loop will only be
executed if all four conditions are satisfied.
WHILE E101 L, E102 H, A200 H, M100 L
; Do whatever
END_WHILENOT

See also:
111 DO / DO_WHILE / DO_WHILENOT

10/26/05 – Ver.: 1.02 English ECCO Manual - 236/282 -


Horsch Elektronik AG WR_TIME

WR_TIME

Send the current system time to a networked control system.

Syntax:
WR_TIME ECCO<FarECCO>

Fields:
<FarECCO> Number of the external ECCO control system. As a rule, a
number between 1 and 15. The external control system must
have been declared under .LIMITS.

Comments:
Writes the machine’s own current system time to the networked control system
whose system time is then updated in the operating system.

Example:
WR_TIME ECCO2 ; Update system time of ECCO2

See also:
56 .LIMITS

10/26/05 – Ver.: 1.02 English ECCO Manual - 237/282 -


Horsch Elektronik AG WRITE

WRITE

Outputs a string.

Syntax:
WRITE <xPos>, <yPos>, <Size>, <Text>

Fields:
<xPos> Column from which <Text> will be written. Valid values are in
the range 0 to 60.
<yPos> Line. Lower edge of <Text>. In the range 0 to 200.
<Size> Size of the font used. Valid values are 1 to 5 and 17 to 21, as
shown in the illustration on page 267.
<Text> Text to be output. Either text limited by quotes or an ST or SR
register.

Example:
WRITE 1, 10, 1, “Hello World”

See also:
133 HP_WRITE

10/26/05 – Ver.: 1.02 English ECCO Manual - 238/282 -


Horsch Elektronik AG XOR

XOR

The destination value is the logical EXCLUSIVE OR operation of the source values.

Syntax :
XOR <Dest>, <Source>, <Source>
or
XOR <DestReg>, <SrcReg>, <SrcReg>

Fields:
<Dest> An output, flag or error flag.
<Source> An output, input, flag or error flag.
<DestReg> A register of type AV, AW, RV, RW, LV, LW or ZW.
<SrcReg> A register (AV, AW, RV, RW, LV, LW, ZW, KV or KW) or a direct
numerical value. Must have the same bit width as <DestReg>.

Comments:
The EXCLUSIVE OR operation is also known as ANTI-EQUIVALENCE or BIT PLUS.
For inputs and outputs and flags the destination is precisely H if only one source is H.
For registers, the result is constructed in bits and the destination bit is precisely 1 if
just one source bit is 1.
A mixture of registers on one side and inputs and outputs and flags on the other is
not allowed.
The destination <Dest> may not be one of the <Source> sources. The instruction
accepts only two sources. Both <Source> and <Dest> must be local elements in
ECCO.

Examples:
Output A024 is only raised when inputs E010 to E011 are unequal.
XOR A024, E010, E011

The second example shows use with registers.


MOV LW001, 42 ; 101010(b)
MOV LW002, 36 ; 100100(b)
XOR LW003, LW001, LW002 ; XOR 001110(b) = 14

See also:
90 AND
161 NOT
165 OR

10/26/05 – Ver.: 1.02 English ECCO Manual - 239/282 -


Horsch Elektronik AG ZPOINT_STATE

ZPOINT_STATE

Reports if the ECCO control system is connected to ZPoint.

Syntax :
ZPOINT_STATE <Dest>

Fields:
<Dest> An LW, RW or AW register in which the state of ZPoint will be
reported.

The result is one of:


0 The ECCO is not connected to ZPoint.
1 The ECCO is connected to ZPoint.

See also:
86 .ZPOINT / ANLAGE / RACK / .END_ZPOINT

10/26/05 – Ver.: 1.02 English ECCO Manual - 240/282 -


Horsch Elektronik AG

4. 4. Labels
Labels are used in ECCO as trigger points in order to trigger pre-programmed
reactions in certain situations. ECCO often allows the name of a label to be changed
using the .SETLABEL command. This is not recommended, as such programs are
difficult to read.
ECCO uses the following labels which are explained in more detail on the pages
shown. It should be noted that not all labels must be used in all cases.

242 BACKPGM
242 ERROR_PROTOTYPE
244 HOT_TASK / HOT_END
246 HPPGM
247 NRMPGM
248 NSPGM
249 NSRESP
250 STPGM
251 STRESP

10/26/05 – Ver.: 1.02 English ECCO Manual - 241/282 -


Horsch Elektronik AG BACKPGM

BACKPGM

Label of the background program.

Syntax:
BACKPGM:
<Code>
CLOSE

Fields:
<Code> Code of the background program.

Comments:
In contrast to normal program tasks, background tasks are always running. The
runtime environment starts the first background task at the BACKPGM label at the
beginning.
Normally in <Code> the actual background task is opened with OPEN. This block thus
serves as the main block, as only background tasks can start background tasks.

See also:
164 OPEN

10/26/05 – Ver.: 1.02 English ECCO Manual - 242/282 -


Horsch Elektronik AG ERROR_PROTOTYPE

ERROR_PROTOTYPE

Defines the general error routine to the TINP command.

Syntax:
ERROR_PROTOTYPE:
<Code>
CLOSE

Fields:
<Code> The code to be executed when the input duration in the TINP
command has been exceeded and no handling error flag is
input in the TINP command.

Comments:
The general error routine will only be started if no other error routine is active and will
be delayed until no other error routine is active.
This routine is best placed as high as possible in the program text as only
subsequent routines, tasks and sub-programs can benefit from its functionality. This
routine may only be found once in a program as global labels must, be unique by the
rule.

Example:
Shows the typical ERROR_PROTOTYPE, which displays the arguments from the
.TINP_TEXT block for 1 second.

.TINP_TEXT
TIMEOUT SR0101 ; TIMEOUT AT LINE
CONDITION SR0102 ; 1st UNMATCHED CONDITION
IO_TEXT SR0103 ; IO_TEXT OF THE UNM. COND
REGISTER RW0069 ; ECCO PROGRAM LINE NUMBER
.END_TINP_TEXT

ERROR_PROTOTYPE:
REGDISP 1, 80, 1, RW069, SR0101
WRITE 1, 90, 1, SR0102
WRITE 1, 100, 1, SR0103
REGDISP 1, 110, 1, RV072, “ERROR NR = #4.0.0#”
SETTIM T0,100 ; RV072 USED BY ALL TINP TO
WAITIM T0 ; TRANSFER THE ERROR NUMBER.
CLOSE

See also:
83 .TINP_TEXT / .END_TINP_TEXT
221 TINP

10/26/05 – Ver.: 1.02 English ECCO Manual - 243/282 -


Horsch Elektronik AG HOT_TASK / HOT_END

HOT_TASK / HOT_END

Defines the high priority task.

Syntax:
HOT_TASK:
<Code>
HOT_END

Fields:
<Code> Hot task program block.

Only the following commands are allowed in the <Code> block of a hot task:
AND CALC CTRDEC CTRINC CTRPRES
CTRRES IF IFNOT MOV NOT
OR OUTP SETBIT SWITCH XOR

Comments:
Normally, ECCO reads the inputs in each step, makes a program step for each open
task and sets the outputs. In a hot task, in contrast, all program steps are executed
fully before the outputs are set. It is suitable for high priority critical tasks such as
security queries, or cycle rating a transport conveyor or round table. There may be
only one hot task in each program.
To prevent the system hanging up, only the commands above are allowed in hot
tasks.
The program block should be kept as short as possible because its execution time
will be added to every program cycle.

Example:
In the example, A213 is the output to switch a round table that may be cycle rated
only under certain circumstances.
HOT_TASK:
AND A123, E133, E134, E135
HOT_END

See also:
90 AND
92 CALC
253 CTRDEC
256 CTRINC
257 CTRPRES
258 CTRRES
140 IF / IFNOT / ELSE / END_IF
156 MOV
161 NOT
165 OR
167 OUTP

10/26/05 – Ver.: 1.02 English ECCO Manual - 244/282 -


Horsch Elektronik AG HOT_TASK / HOT_END

191 SETBIT
216 SWITCH / CASE / DEFAULT / END_SWITCH
239 XOR

10/26/05 – Ver.: 1.02 English ECCO Manual - 245/282 -


Horsch Elektronik AG HPPGM

HPPGM

Denotes the beginning of automatic operation.

Syntax:
HPPGM:
<Code>
CLOSE

Fields:
<Code> Code that will be processed in automatic operation.

Comments:
The runtime environment starts a first program step at the HPPGM label if the user
starts automatic operation. Normally <Code> opens the actual program tasks with
OPEN. This block thus serves as the main block.

See also:
164 OPEN

10/26/05 – Ver.: 1.02 English ECCO Manual - 246/282 -


Horsch Elektronik AG NRMPGM

NRMPGM

Start of the norming procedure.

Syntax:
NRMPGM:
<Code>
CLOSE

Fields:
<Code> Norming code

Comments:
Norming is performed on starting-up the control system to set the machine to a
clearly defined status and to calibrate all external devices and regulators.

10/26/05 – Ver.: 1.02 English ECCO Manual - 247/282 -


Horsch Elektronik AG NSPGM

NSPGM

Start of the emergency stop program.

Syntax:
NSPGM:
<Code>
CLOSE

Fields:
<Code> Program executed on an emergency stop. This lowers all
outputs and axes, external devices and regulators stop. The
relevant legal requirements must be complied with.

Comments:
The emergency stop conditions are communicated to the ECCO runtime environment
in the NSDEF command. If a condition arises, all programs, function, error and display
tasks are interrupted and only background tasks continue. The runtime environment
also starts the emergency stop procedure, starting at the NSPGM label.
As soon as the emergency stop program has ended by arriving at the CLOSE
command, the “EMERGENCY STOP” message appears on the display and the “Fail”
button is lit. The user must then reset the emergency stop by resetting all safety
elements and the emergency stop key and acknowledging this on the terminal.
If the user presses the “C” key instead of acknowledging the emergency stop, the
program becomes invalid and a new program must be loaded.
After acknowledging the emergency stop, the runtime environment starts the
emergency stop restart program starting at the NSRESP label.

See also:
162 NSDEF
249 NSRESP

10/26/05 – Ver.: 1.02 English ECCO Manual - 248/282 -


Horsch Elektronik AG NSRESP

NSRESP

Start of the emergency stop restart program.

Syntax:
NSRESP:
<Code>
CLOSE

Fields:
<Code> Code executed by the emergency stop restart procedure.

Comments:
After the user has acknowledged an emergency stop the emergency stop restart
procedure is called from the NSRESP label on. If no other measures are taken, a
switch will be made to manual mode when it finishes.
The programmer can use this procedure to perform the work necessary after a stop,
such as orderly disposal of scrap, resetting axes and recalibrating them if necessary,
and emptying the machine. After all these steps, the programmer can also restart the
machine by overrunning the setting of M035 in automatic mode.

10/26/05 – Ver.: 1.02 English ECCO Manual - 249/282 -


Horsch Elektronik AG STPGM

STPGM

Start of the program called when a disturbance occurs.

Syntax:
STPGM:
<Code>
CLOSE

Fields:
<Code> Code processed on a disturbance. The relevant requirements
must be complied with.

Comments:
In contrast to an emergency stop, the disturbance defined by STDEF is monitored
only in station and automatic operation, so only arises then. Otherwise a disturbance
is handled in the same way as an emergency stop.
If a condition arises, all programs, function, error and display tasks are interrupted
and only background tasks continue. The runtime environment also starts the
disturbance handling procedure, starting at the STPGM label.
As soon as the procedure has ended, the “SYSTEM FAIL” message appears on the
display and the “Fail” key is lit. The user must then correct the disturbance condition
and acknowledge it at the terminal.
If the user presses the “C” key instead of acknowledge, the program becomes invalid
and a new program must be loaded.
After acknowledging the disturbance, the runtime environment starts the disturbance
restart program starting at the STRESP label.

See also:
248 NSPGM
203 STDEF
251 STRESP

10/26/05 – Ver.: 1.02 English ECCO Manual - 250/282 -


Horsch Elektronik AG STRESP

STRESP

Start of the disturbance restart program.

Syntax :
STRESP:
<Code>
CLOSE

Felder :
<Code> Code executed by the disturbance restart procedure.

Comments:
In contrast to an emergency stop, the malfunction defined by STDEF is monitored
only in station and automatic operation, so only arises then. Otherwise a malfunction
is handled in the same way as an emergency stop.
After the user has acknowledged a malfunction the malfunction restart procedure is
called from the STRESP label on. If no other measures are taken, a switch will be
made to manual mode when it finishes.
The programmer can use this procedure to perform the work necessary after a
malfunction, such as orderly disposal of scrap, resetting axes and recalibrating them
if necessary, and emptying the machine. After all these steps, the programmer can
also restart the machine by overrunning the setting of M035 in automatic mode.

See also:
249 NSRESP
203 STDEF
250 STPGM

10/26/05 – Ver.: 1.02 English ECCO Manual - 251/282 -


Horsch Elektronik AG

4. 5. Obsolete commands
The following commands are still supported but should not be used in new programs
as they will be removed completely in future versions.

253 CTRDEC
254 CTRDISP
255 CTREQ
256 CTRINC
257 CTRPRES
258 CTRRES
259 DISABLE_STOP / ENABLE_STOP
259 STAT_SEND
261 STEND
262 TIMETRAP / END_TIMETRAP
263 TRAP / IF_TRAP / END_TRAP

10/26/05 – Ver.: 1.02 English ECCO Manual - 252/282 -


Horsch Elektronik AG CTRDEC

CTRDEC

Decrements a counter.

Syntax:
CTRDEC <Counter>

Fields:
<Counter> Counter that will be decremented. Counters bear the
identification letter C.

Comments:
If the counter is already 0 a system error is generated because a counter can never
be less than 0.

Example:
CTRDEC C020 ; C020 is now smaller by 1

10/26/05 – Ver.: 1.02 English ECCO Manual - 253/282 -


Horsch Elektronik AG CTRDISP

CTRDISP

Displays the content of a counter on the display.

Syntax:
CTRDISP <Counter>

Fields:
<Counter> Counter that will be displayed. Counters bear the identification
letter C.

Comments:
The content of the counter will be displayed on the first line of the display.

Example:
CTRDEC C020 ; Displays content of C020

10/26/05 – Ver.: 1.02 English ECCO Manual - 254/282 -


Horsch Elektronik AG CTREQ

CTREQ

Compares two counters and branches if they are equal.

Syntax:
CTREQ <Counter 1>, <Counter 2>, <Label>

Fields:
<Counter 1> The first counter to be compared. Counters bear the
identification letter C.
<Counter 2> The second counter.
<Label> Label branched to on equality.

Example:
CTREQ C020, C021, $EQUAL
; The code for inequality comes here
; May be closed with a JUMP
$EQUAL:
; The code for equality comes here

10/26/05 – Ver.: 1.02 English ECCO Manual - 255/282 -


Horsch Elektronik AG CTRINC

CTRINC

Increments a counter.

Syntax:
CTRINC <Counter>

Fields:
<Counter> Counter to be incremented by 1. Counters bear the letter C.

Comments:
If the counter has reached 65535 an error is triggered because a counter can never
be more than 65535.

Example:
CTRINC C020 ; C020 is now 1 larger

10/26/05 – Ver.: 1.02 English ECCO Manual - 256/282 -


Horsch Elektronik AG CTRPRES

CTRPRES

Sets a counter to the input value.

Syntax:
CTRPRES <Counter>, <Value>

Fields:
<Counter> Counter that will be set. Counters bear the identification letter C.
<Value> Value to which the counter will be set. Is either a number
between 0 and 65535, or an RV, LV or KV register.

Comments:
The CTRRES command resets a counter to 0.

Example:
CTRPRES C020, RV002 ; Set C020 to value of RV002

10/26/05 – Ver.: 1.02 English ECCO Manual - 257/282 -


Horsch Elektronik AG CTRRES

CTRRES

Resets a counter to zero.

Syntax:
CTRRES <Counter>

Fields:
<Counter> Counter that will be reset. Counters bear the identification letter
C.

Example:
CTRRES C000 ; Sets the local counter to 0

10/26/05 – Ver.: 1.02 English ECCO Manual - 258/282 -


Horsch Elektronik AG DISABLE_STOP / ENABLE_STOP

DISABLE_STOP / ENABLE_STOP

Prevents a program block being stopped by the user with the “STOP” key.

Syntax:
DISABLE_STOP
<Code>
ENABLE_STOP

Fields:
<Code> Program block in which the “STOP” key is useless.

Comments:
The command is only allowed in a program task.
If the “STOP” key is pressed after the DISABLE_STOP command, the program will
continue to be processed until the ENABLE_STOP command. Then the program stops
immediately.
If the DISABLE_STOP is programmed twice, ENABLE_STOP must also be
programmed twice to neutralize the effect. If an ENABLE_STOP is met before
DISABLE_STOP or if the “STOP” key has not previously been deactivated
ENABLE_STOP has no effect.
This command should no longer be used as inadequate programming such as a
forgotten ENABLE_STOP could lead to extremely serious consequences.

Example:
In the example, the INP command can no longer be stopped.
DISABLE_STOP
INP E010 H, E011 L
ENABLE_STOP

10/26/05 – Ver.: 1.02 English ECCO Manual - 259/282 -


Horsch Elektronik AG STAT_SEND

STAT_SEND

Sends a value direct to the statistical unit.

Syntax:
STAT_SEND <Group>, <Cycles>, <DAdr>, <Value>

Fields:
<Group> Statistics group for the data. An RV, RW, AV, AW, LV, LW, KV or
KW register or a direct number between 1 and 20.
<Cycles> Cycles of STAT_TAKT until <Value> will be transferred and
finally deleted from ECCO.
<DAdr> Data record address. Address in the statistical group <Group>
in which <Value> will be stored. Number between 1 and 255.
<Value> The value that will be stored in <DAdr> in a RV, AW, LW, ZW or
KW register.

Comments:
The command was used before the more powerful <Puffer> command became
available. It allows the sending of the contents of individual registers to a statistical
group.
Inputting the cycle number before final storage is required to assign measurements
to a work piece at various stations which will, however, be stored in a single data
record.
The command can be used with ZPoint but is not of any use.

10/26/05 – Ver.: 1.02 English ECCO Manual - 260/282 -


Horsch Elektronik AG STEND

STEND

Ends a running station.

Syntax:
STEND <Station>

Fields:
<Station> Number of the station to be ended. Must be in the range input
under .LIMITS.

Comments:
If the program meets this command in station operation, the relevant station will end
and the task called with <Station> will be closed. The command has no effect in all
other operational modes.

Example:
STEND 5 ; Close station 5

10/26/05 – Ver.: 1.02 English ECCO Manual - 261/282 -


Horsch Elektronik AG TIMETRAP / END_TIMETRAP

TIMETRAP / END_TIMETRAP

Allows the monitoring of several commands by time.

Syntax :
TIMETRAP <Time>, <Trap_Label>
<Code>
END_TIMETRAP

Fields:
<Time> The time after which <Trap_Label> will be triggered if the
program is still working in <Code>. To be given in 10
millisecond units. A direct number or an RV, LV or KV register.
<Trap_Label> Label branched to when the trap is triggered.
<Code> Program code that will be monitored.

Comments:
The instruction is used for the monitoring of several commands by time. If the
<Time> specified elapses before END_TIMETRAP is reached, the program jumps to
the given <Trap_Label>. If the program reaches END_TIMETRAP before the time
has elapsed, it continues on the next line.
The TRAP block provides a structured alternative. The COND_TRAP block provides a
more powerful and structured alternative.
Caution: if a further task is called, the monitoring is interrupted until the program flow
is restored.

Example:
The example shops the use of the command and its representation in TRAP. It waits
for an input up to a maximum of one second.
TIMETRAP 100, $FAIL ; TRAP 100
INP E100 H ; INP E100 H
END_TIMETRAP
JUMP $CONT
$FAIL: ; IF_TRAP
OUTP D100 H ; OUTP D100 H
$CONT: ; END_TRAP

See also:
105 COND_TRAP / IF_COND / END_COND_TRAP
221 TINP
263 TRAP / IF_TRAP / END_TRAP

10/26/05 – Ver.: 1.02 English ECCO Manual - 262/282 -


Horsch Elektronik AG TRAP / IF_TRAP / END_TRAP

TRAP / IF_TRAP / END_TRAP

Allows the monitoring of several commands by time.

Syntax :
TRAP <Time>
<Code>
IF_TRAP
<Trap_Code>
END_TRAP

Fields:
<Time> The time after which <Trap_Code> is executed if the program
is still working on <Code>. In 10 millisecond units. A direct
number or an RV, LV or KV register.
<Code> Program code to be monitored.
<Trap_Code> Program code that will be executed when a trap is triggered.

Comments:
Execution starts at the <Code> program block. If the period in <Time> has not
elapsed when it finishes, the program line following END_TRAP will be executed next.
If, however, <Time> elapses while the program block is being executed, it is
interrupted and the <Trap_Code> program block executed.
The COND_TRAP block provides a more versatile alternative.
Caution: if a further task is called, the monitoring is interrupted until the program flow
is restored.

Example:
TRAP 100 ; Duration maximum 1 second
INP E100 H ; Wait until E100 is H
IF_TRAP
OUTP A101 L ; Handle the trap
END_TRAP

See also:
105 COND_TRAP / IF_COND / END_COND_TRAP
262 TIMETRAP / END_TIMETRAP
221 TINP

10/26/05 – Ver.: 1.02 English ECCO Manual - 263/282 -


Horsch Elektronik AG

4. 6. Commands no longer supported


The following commands are no longer supported and generate compiler errors:

.BIT_RATE
.CAN_DEVICE / .END_CAN_DEVICE
.EXT_IO
.WATCHDOG_OFF
CAN_CHECK
CAN_COM_BITRATE
CAN_COM_BUS
CAN_MSG
CAN_OFF
CAN_ON
GET_CAN_ARRAY
GET_CAN_DEV
ID_INP
ID_OUTP
STOP_LOCK
VI_COM

10/26/05 – Ver.: 1.02 English ECCO Manual - 264/282 -


Horsch Elektronik AG

5. APPENDICES
5. 1. State diagram

10/26/05 – Ver.: 1.02 English ECCO Manual - 265/282 -


Horsch Elektronik AG

5. 2. Priority diagram

5. 3. Colors and fonts on the display


The ECCO display can display five different fonts and 13 colors. An output can also
be inverted, so that the type is displayed in the background color on a differently
colored bar. The illustration below shows examples of the use of fonts and colors.

10/26/05 – Ver.: 1.02 English ECCO Manual - 266/282 -


Horsch Elektronik AG

10/26/05 – Ver.: 1.02 English ECCO Manual - 267/282 -


Horsch Elektronik AG

5. 4. System registers
System registers are identified by the descriptor SW. Free SW registers have no
significance in the current version of ECCO but may be used in further versions.

SW001 Number of the last system error. The meaning of the numbers is
shown in appendix 5. 6 “System errors”.
SW002 Last p_indx. This is the program pointer to the last error and is
required to allow the error to be located with the debugger.
SW003 MAX_ECCO: maximum number of linked ECCO control
systems, as input by .MAX_ECCO.
SW004 OWN_ECCO: Address of the computer’s own ECCO control
system as given in .OWN_ECCO.
SW005 Project number of the program as defined in .PROJECT.
SW006 Active linked DP-IDEX systems. A bit mask in which a bit is only
1 if a data carrier is present on the antenna and communication
can be made with it.
SW007 Free
SW008 Number of declared inputs (value between 1 and 992).
SW009 Number of declared outputs (value between 1 and 992).
SW010 Number of declared flags (value between 1 and 992).
SW011 Number of declared error flags (value between 1 and 992).
SW012 Number of actual inputs.
SW013 Number of actual outputs.
SW014 Free
SW015 Number of the Profibus Master from which the last Profibus
error was output (value between 1 and 10).
SW016 Number of the slave from which the last Profibus error was
output (value between 1 and 125).
SW017 Number of ZW time values (value between 1 and 49).

10/26/05 – Ver.: 1.02 English ECCO Manual - 268/282 -


Horsch Elektronik AG

SW018 Maximum X value for function as declared by .LIMITS (value


between 0 and 40).
SW019 Maximum Y value for function as declared by .LIMITS (value
between 0 and 40).
SW020 Number of stations as declared by .LIMITS (value between 0
and 9999).
SW021 Number of constant strings (thus ST strings)
SW022 Number of RW registers.
SW023 Number of RV registers.
SW024 Free
SW025 Number of AW arrays (value between 0 and 256).
SW026 Number of AV arrays (value between 0 and 256).
SW027 ECCO compiler version. The upper bits indicate the type (SMC
40 to ECCO) and the lower the compiler version as sequential
number. This number is checked by the runtime environment on
loading so that no incorrectly compiled programs are loaded.
SW028 ECCO runtime version. The coding corresponds to SW027.
SW029 Indicates the status of the TINP command. This command is
extremely complex and is internally handled through various
states. This system register returns that status.
SW030 Index of the first ECCO control system where, when M0031 is
H, a communication error occurred. Because SEND_REG does
not return a system error, in some circumstance, such as when
the other system is switched off, the instruction can simply
hangs up. This can be trapped by supervision. SW030 indicates
the control system and the reason for the error is indicated in
the SW register with the address 30+SW030.
SW031 First error code in communication with ECCO1. –1, if no error
has occurred.
SW032 First error code in communication with ECCO2. –1, if no error
has occurred.
SW033 First error code in communication with ECCO3. –1, if no error
has occurred.
SW034 First error code in communication with ECCO4. –1, if no error
has occurred.
SW035 First error code in communication with ECCO5. –1, if no error
has occurred.
SW036 First error code in communication with ECCO6. –1, if no error
has occurred.
SW037 First error code in communication with ECCO7. –1, if no error
has occurred.
SW038 First error code in communication with ECCO8. –1, if no error
has occurred.
SW039 First error code in communication with ECCO9. –1, if no error
has occurred.
SW040 License code from the USB key.
SW041 Contains the license code from if Profibus Master 1 is active,
otherwise 0.
SW042 Contains the license code from if Profibus Master 2 is active,
otherwise 0.

10/26/05 – Ver.: 1.02 English ECCO Manual - 269/282 -


Horsch Elektronik AG

SW043 Contains the license code from if Profibus Master 3 is active,


otherwise 0.
SW044 Contains the license code from if Profibus Master 4 is active,
otherwise 0.
SW045 Contains the license code from if Profibus Master 5 is active,
otherwise 0.
SW046 Contains the license code from if Profibus Master 6 is active,
otherwise 0.
SW047 Contains the license code from if Profibus Master 7 is active,
otherwise 0.
SW048 Contains the license code from if Profibus Master 8 is active,
otherwise 0.
SW049 Contains the license code from if Profibus Master 9 is active,
otherwise 0.
SW050 Contains the license code from if Profibus Master 10 is active,
otherwise 0.
SW051 – SW055 Free
SW056 Active slaves. Bit mask that indicate which slaves can be
communicated with.
SW057 Active VI’s. Bit mask that indicate which VI terminals can be
communicated with. As in ECCO VI terminals have the same
Addresses as slaves, this bit mask is a sub-mask of SW056.
SW058 Number of errors in the PAC supervision since the last
emergency stop.
SW059 Program index p_indx at the last PAC error. Is used to find the
error in the debugger.
SW060 Last PAC error number.
SW061 Communication errors generated by the PAC system error in
earlier versions of the runtime environment. Because third-party
software packages, namely ZPoint, could not handle this,
system errors are no longer generated. For reasons of
compatibility, error numbers that a system error would have
generated are assigned to this system register.
SW062 PAC number of the PAC with the last PAC error.
SW063 Unique identification number from the USB dongle.
SW064 Number of commands repeated by PAC_STATE.
SW065 – SW074 Input read time for Profibus Masters 1 to 10 if system flag M039
has been set. Serves for IO timing analyses.
SW075 – SW084 Output write time for Profibus Masters 1 to 10 if system flag
M039 has been set. Serves for IO timing analyses.
SW085 Balluff read/write cycle time for all connected IDEX systems if
M039 is raised. Balluff IDEX devices may only be connected to
one Profibus Master card so one system register is adequate
for timing analysis.

System register are often used in the debugger to debug or optimize programs.
System registers SW058–SW062 are usually used together. Especially in automatic
parameterization with operating control programs, it can happen that they transmit
nonsense PAC parameters to the ECCO program which refuses them with an error.

10/26/05 – Ver.: 1.02 English ECCO Manual - 270/282 -


Horsch Elektronik AG

In the debugger, this can easily be determined as SW062 indicates the relevant PAC
and SW059 makes it possible to determine the coupling instruction.

5. 5. System flags
In the way they are written, system flags are normal flags identified with M or F. Some
system flags are write-protected, however, identified in the following table by RO for
“read only”.

M001 RO Position of the virtual key switch on the display.


M002 Memory full. In contrast to SMC control systems, in PC control
systems, this indicates a serious error in the Windows operating
system’s behavior.
M003 Statistic buffer full.
M004 RO New order number ready.
M005 RO Manual operation mode.
M006 RO Station operation mode.
M007 RO Automatic operation mode.
M008 RO Program stopped.
M009 RO Program started.
M010 RO System error occurred.
M011 RO Emergency stop triggered.
M012 Program stop flag blocks function tasks in contrast to M025.
M013 RO Error task active.
M014 RO Display task active.
M015 RO Function mode active.
M016 Warning of full buffer. The flag is raised when more than 80% of
the statistics buffer is occupied.
M017 Start tracer.
M018 Program trace free.
M019 Background trace free.
M020 PSL trace free.
M021 Display task trace free.
M022 Error trace free.
M023 Function task trace free.
M024 RO Tracer active.
M025 Program stop flag allows function tasks in contrast to M012.
M026 Free. Can be used as system flag in later versions and should
remain unused in all ECCO programs.
M027 RO Profibus activated.
M028 RO Profibus communication error.
M029 Object error at ZPoint gateway.
M030 ZPoint gateway timeout.
M031 PAC communication error.
M032 RO ZPoint gateway present.
M033 RO Communication with other ECCO control systems possible.
M034 Flag to set manual operation mode.
M035 Flag to set automatic operation mode.
M036 Flag to set “Start” key and trigger its function.
M037 Flag to set “Stop” key and trigger its function.

10/26/05 – Ver.: 1.02 English ECCO Manual - 271/282 -


Horsch Elektronik AG

M038 Flag to set “Fail” key and trigger its function.


M039 Profibus I/O timing analysis. The results are collected in system
registers SW065–SW085.
M040 – M049 Free. Can be used as system flag in later versions and should
remain unused in ECCO programs.

Other flags, those with numbers over 50, can be used freely by programmers.

5. 6. System errors
If a system error occurs in ECCO, a message with the following structure appears:

p_index = <pp>
SYSTEM FAIL
STOP at system error No.: <errno>
<line1>
<line2>

Meanings:
<pp> The program pointer. Its value indicates the line in the compiled
program. The indication is used by the debugger to find the line
in question.
<errno> The system error. The values are shown below.
<line1>, More detailed description of the error.
<line2>

System errors are either “common” and can be remedied by the user so that the
program can continue, or “fatal” which means that ECCO must declare the program
invalid and a new program must be loaded.
The following table provides information on the different errors, if they are fatal, the
displayed message and their meaning:

1 Fatal compiler type or The program is not recognized as a valid


version program. The ECCO runtime system
assumes that is has been translated with
the wrong compiler version or is for
another system.
2 unknown loop variable System conflict with an unknown loop
variable. Usually means that the program
has been wrongly compiled.
3 invalid function The function cannot be started as its
address start address is unknown. The function
declaration or the call was wrong or the
program has been wrongly compiled.
4 parametric function An attempt was made to start a function
call with arguments from the display.
5 function mode disabled The function mode is disabled if the
program contains errors.
6 function not defined The function has not been declared and
was not started.

10/26/05 – Ver.: 1.02 English ECCO Manual - 272/282 -


Horsch Elektronik AG

7 station not defined The station has not been declared and
was not started.
8 Fatal PROFIBUS hardware Fatal error in communication on Profibus,
error for example, because the Profibus
Master card is defective. Because an
intervention is required, the program is
declared invalid.
9 STRING out of range Incorrect string. Often the closing quotes
are missing.
10 PROFIBUS license The USB key is missing or does not have
invalid the required rights.
11 invalid task address The address at which the task should
start is invalid.
12 type bits err, An invalid instruction was generated by
L_JMPCOND the L_JMPCOND command. The
instructions around this error must be
verified.
13 Fatal function call in error No function may be called from an error
task. No error task can be called when
the program has been interrupted.
14 func.disp.command Display commands are not allowed in a
error function called by an error task. This
error never occurs, however, as error
tasks may not call functions (system
error 13).
15 NUM_INP in bg, psl, NUM_INP may not be used in back-
func ground, PSL or function tasks.
16 Fatal not legal command Occurs when an illegal instruction is met.
Typically a consequence of a first error to
be remedied. If it occurs otherwise, this
indicates malfunctioning hardware.
17 Fatal CALLD while ERROR_TASK Because an error task has a higher
priority than a display task, a display task
may not be called in an error task.
18 string too long A string was transmitted only partially.
Either the string is too long or wrongly
closed off.
19 wrong register Occurs when not allowed registers or
assigned arguments are assigned to a command.
Usually trapped by the compiler.
20 data over(under)flowed An overflow or underflow occurred in a
calculation.
21 wrong task type for The OPEN command can only be used
open in normal tasks and background tasks.
22 Fatal too many nested Only four function procedures can be
CALLF-s nested.
23 Fatal no task free for CALLF No free task is available to open the
function procedure. This means there are
already too many tasks open and the
whole program will be declared invalid.

10/26/05 – Ver.: 1.02 English ECCO Manual - 273/282 -


Horsch Elektronik AG

24 Fatal main does not exist In earlier systems, the main card was
responsible for statistical links and
communications. In modern PC systems
this is integrated into the runtime
environment and indicates a problem in
the subordinate operating system.
25 too many nested calls Only 16 CALLs can be nested.
26 Fatal RETURN without CALL The program met a RET instruction,
although the block was not started with
CALL. This indicates a serious problem.
27 type bits error in An invalid instruction was generated by
L_INP the L_INP command. The lines around
the error must be verified.
28 slave return error The slave responds to a command with
an unexpected number of return
arguments. This usually means an
incorrect slave command was issued.
29 wrong AD number A PAC has only four A/D converters, so
that wrong addressing must be checked.
30 Fatal division by zero A CALC command has tried to divide by
zero.
31 wrong DA number A PAC has only four A/D converters, so
that wrong addressing must be checked.
32 Fatal too many tasks open No free task is available to open a further
>128 task. This means there are already too
many tasks open and the whole program
will be declared invalid.
33 Fatal too many bgnds >85 No free background task is available to
open a further task. This means there
are already too many tasks open and the
whole program will be declared invalid.
34 wrong task type, CLOSE CLOSE has been used wrongly. Error,
function and display tasks may not be
ended with CLOSE, nor any procedures
started with CALL.
35 wrong task type, stend The obsolete STEND command may only
be used in station operation.
36 counter overflow The obsolete CTRINC command triggers
>65535 an overflow.
37 counter underflow <0 The obsolete CTRDEC command triggers
an underflow.
38 vi_term comm_device An attempt was made to access a non-VI
err device with a VI command.
39 idex comm_device err An attempt was made to access a non-
IDEX device with an IDEX command.
40 enable_stop, wrong The ENABLE_STOP command may only
task be used in program tasks.
41 disable_stop, wrong The DISABLE_STOP command may only
type be used in program tasks.
42 wrong task type, CALL CALL may not be used at this location.

10/26/05 – Ver.: 1.02 English ECCO Manual - 274/282 -


Horsch Elektronik AG

43 wrong task type, RET RET may not be used at this location.
44 wrong task type, RETF RETF may not be used at this location.
RETF ends only function procedures.
45 wrong task type, CALLF CALLF may not be used at this location.
46 wrong task type, CALLD CALLD may not be used at this location.
47 wrong task type, RETD RETD may not be used at this location.
RETD ends only display tasks.
48 wrong task type, RETE RETE may not be used at this location.
RETE ends only error tasks.
49 type bits error L_OUTP An invalid instruction was generated by
the L_OUTP command. The instructions
around this error must also be verified.
50 wrong SLAVE number The PAC or slave was wrongly
addressed. An address was input where
no PAC or slave is declared.
51 - 59 Reserved for CAN bus.
60 Fatal DP-RAM checksum error A fatal error in the hardware or
underlying operating system has
occurred.
61 - 62 Reserved for CAN bus.
63 GATEWAY reply error Error in communication with the ZPoint
gateway.
64 wrong data type The data type in the instruction is not
supported.
65 INDEX out of range An element was selected in indirect
addressing or an array that does not
exist.
66 wrong string format The format of the string used is incorrect.
The formatting and declaration of the
dynamic string must be verified.
67 SR variable is empty The input variable string is empty.
68 Reserved.
69 wrong slave nr / The input slave is invalid or the slave
command command is incorrect or not recognized.
70 wrong DPRAM data count Wrong number of data elements in DP-
RAM in communication with a PAC.
Potentially due to a communication error
or an incorrect declaration in .PAC_DEF.
71 wrong slave response The response of the slave was not
understood by the runtime environment
or the slave could not understand the
command sent.
72 Fatal programm invalid by A program has been declared invalid by
D999 the raising of error flag D999, by the
debugger, for example. The user is
forcing the fatal error.
73 Fatal program index invalid The command attempts to branch to an
invalid location, usually due to a compiler
error.

10/26/05 – Ver.: 1.02 English ECCO Manual - 275/282 -


Horsch Elektronik AG

74 TINP allocation failed The runtime environment cannot execute


the TINP command because there is not
enough free memory available.
75 TINP not allowed The command may only be used in
background, function and normal tasks.
76 slv QUITT and COMM Error in communication with slave or
zero PAC. Specifically, the runtime system is
expecting a response, the motion
controller a command.
77 write to slv comm err Error in communication with slave or
PAC. The number of the command is not
understood.
78 wrong slave response Error in communication with slave or
PAC. The runtime environment cannot
use the response.
79 - 86 PAC Profibus Monitoring. Do not trigger
a system error.
87 wrong PAC number The PAC number used is incorrect.
88 PAC Profibus Monitoring. Does not
trigger a system error.

System error numbers 79 – 88 are used by the PAC Profibus Monitoring. With the
exception of number 87, they do not trigger system errors but simply change SW001,
the number of the last system error. In addition, the command is repeated. The
meanings can be seen in the table below:
79 checksum error received in The PAC receives a packet with an
PAC incorrect checksum probably because of
a transmission error.
80 checksum error received in ECCO receives a packet from PAC with
ECCO an incorrect checksum probably because
of a transmission error.
81 wrong parameter received in ECCO sends invalid parameters. This
PAC does not trigger a system error but the
task halts at the faulted instruction.
82 wrong commands received in ECCO sends an invalid command. This
PAC does not trigger a system error but the
task stands at the incorrect instruction.
83 wrong byte counts received The PAC sends an incorrect number of
in ECCO response bytes.
84 timeout Time overflow in communication with the
PAC.
85 unknown PAC answer ECCO cannot interpret the response
from PAC probably because of a
transmission error.
86 wrong values received from Values in the PAC response are invalid.
PAC
88 internal PAC error Internal PAC error.

The number of errors that have occurred can be determined from the relevant system
registers.

10/26/05 – Ver.: 1.02 English ECCO Manual - 276/282 -


Horsch Elektronik AG

5. 7. Commands for servo slaves and PAC


The commands for the configuration and operation of servo slaves or the PAC are
used with a block-specific descriptor. The descriptor is almost a command within a
command and is explained here for each command.
The following commands are affected:
208 SV_COM
212 SV_CONST
214 SV_READ
215 SV_TRJ

Descriptors for SV_COM


SV_COM <Slave>, <Descriptor>

Slave PAC
DFH 9 9 (Define Home). The present position becomes the
home position (value 0).
DYLIM_OFF 9 Dynamic calculation of the integral limit off.
DYLIM_ON 9 Dynamic calculation of the integral limit on.
HALT 9 9 Stop the regulated axis with the programmed
acceleration.
INIT_B 9 9 Look for the reference initiator backwards.
INIT_F 9 9 Look for the reference initiator forwards.
MOFF 9 9 Stop the regulated axis by setting the set value to 0V.
P_MODE 9 9 Motion control in positioning mode. (Default behavior).
R4_OFF 9 Relay 4 (reserve) off.
R4_ON 9 Relay 4 (reserve) on.
RESET 9 9 Initialize servo controller. All values are reset to works
settings.
S 9 S curve.
SIP 9 9 Save position on next index impulse.
ST_OFF 9 Statistics off.
ST_ON 9 Statistics on.
STOP 9 9 Stop the axis with maximum deceleration.
STT 9 9 The current movement parameters set by the SV_TRJ
command are updated and the drive of the regulated
axis started.
SV_OFF 9 9 Servo amplifier off. The relevant relay opens.
SV_ON 9 9 Servo amplifier on. The relevant relay closes.
T 9 Trapezium curve.
UDF 9 9 The new filter parameters, set with the SV_FIL
command, are activated.
VB_MODE 9 9 Controller in speed mode backwards.
VF_MODE 9 9 Controller in speed mode forwards.
Z 9 Set Max and Min values to 0.

Descriptors for SV_CONST


SV_CONST <Slave>, <Descriptor>, <Value>

10/26/05 – Ver.: 1.02 English ECCO Manual - 277/282 -


Horsch Elektronik AG

Slave PAC
PERR 9 9 Maximum allowed control error. If this value is
exceeded, the motor is stopped and the related relay
opened.
PF 9 9 Proportional factor in order to be able to work in the
user-defined units. <Value> should be an FW register.
PF = measurement trigger / user unit.
POS_OFFSET 9 9 Offset correction in measurement system of user unit.
Is reset on zeroing of axes.
POS_TIME 9 9 Allowed time for positioning axes in hundredths of a
second. If the set position is not reached in the time
set, the TIME bit is set in the STATUS register.
POS_TOL 9 9 Position tolerance. The axis must be positioned within
the tolerance in order for the POSOK bit to be set in the
STATUS register.
ZV 9 9 Speed at which the reference initiator is moved
towards.
ZVS 9 9 Speed at which the reference initiator is moved away
from.

Descriptors for SV_READ


SV_READ <Slave>, <Descriptor>, <Register>

Slave PAC
D 9 Differential factor.
D_POS 9 9 Set position.
D_VEL 9 9 Set speed.
I 9 Integral factor.
IL 9 9 Value of integration limit.
IL_IN 9 Limit for integral factor.
IL_MAX 9 Maximum limit for integral factor.
IND_POS 9 9 Value of index position register.
MAX_ISUM 9 Maximum value for integral portion.
MAX_PERR 9 Maximum position error.
MAX_RPOS 9 Maximum position.
MAX_RVEL 9 Maximum speed.
MAX_VERR 9 Maximum speed error.
MIN_ISUM 9 Minimum value for integral portion.
MIN_PERR 9 Minimum position error.
MIN_RPOS 9 Minimum position.
MIN_RVEL 9 Minimum speed.
MIN_VERR 9 Minimum speed error.
NA 9 Negative acceleration when starting-up.
ND 9 Negative deceleration when braking.
NEW_STATUS 9 New status register. The precise meaning can be found
in the PAC manual.
P 9 Proportional factor.
PA 9 Positive acceleration when starting-up.
PD 9 Positive deceleration when braking.
PERR 9 Value of position error.

10/26/05 – Ver.: 1.02 English ECCO Manual - 278/282 -


Horsch Elektronik AG

R_POS 9 9 Actual position.


R_VEL 9 9 Actual speed.
REGISTER 9 9 Bit field that shows the status of the servo regulator.
The meaning of individual bits is shown below.
STATUS 9 9 Bit field that shows the status of the servo regulator
and serves to check communication. The meaning of
individual bits is shown below.
SUM_ABS_ 9 Sum of absolute position errors. Can be used for
PERR optimization of filter parameters.
V_ERR 9 Value of current speed error.
VEL_MAXIN 9 Value of maximum speed input by user.

The bit field that returns REGISTER has the following meaning:
Bit 31 Servo stop. Is reset by STT . Raised when end switch reached.
Bit 30 Time bit. Is reset by STT. Raised when position not reached in the
given time.
Bit 29 Position bit. Is reset by STT. Raised when brake ramp has been
traveled and the axis is within positioning tolerance.
Bit 28 Raised when axis was initialized.
Bit 27 End switch E2 (positive direction) for servo controller 3.
Bit 26 End switch E2 (negative direction) for servo controller 3.
Bit 25 End switch E2 (positive direction) for servo controller 2.
Bit 24 End switch E1 (negative direction) for servo controller 2.
Bit 23 (Reserved)
Bit 22 Release granted for amplifier for servo 3.
Bit 21 Release granted for amplifier for servo 2.
Bit 20 Release granted for amplifier for servo 1.
Bit 19 End switch E2 (positive direction) for servo controller 1.
Bit 18 End switch E1 (negative direction) for servo controller 1.
Bit 17 Reference initiator for servos 2 and 3 initialized.
Bit 16 Reference initiator for servo 1 initialized.
Bit 15 Host interrupt.
Bit 14 Acceleration loaded but not yet updated.
Bit 13 UDF executed but filter not yet updated.
Bit 12 Positive direction. Forward.
Bit 11 Controller in speed mode.
Bit 10 At target.
Bit 9 Off after excessive position error.
Bit 8 8-bit output mode.
Bit 7 Motor off.
Bit 6 Interrupt: breakpoint reached.
Bit 5 Interrupt: excessive position error.
Bit 4 Interrupt: numerical overflow.
Bit 3 Interrupt: index impulse recorded.
Bit 2 Interrupt: trajectory completed.
Bit 1 Interrupt: incorrect or invalid command.
Bit 0 Recording next index impulse (on SIP command).

The bit field that returns STATUS has the following meaning:
Bit 7 Motor off.
Bit 6 Interrupt: breakpoint reached.

10/26/05 – Ver.: 1.02 English ECCO Manual - 279/282 -


Horsch Elektronik AG

Bit 5 Interrupt: excessive position error.


Bit 4 Interrupt: numerical overflow.
Bit 3 Interrupt: index impulse recorded.
Bit 2 Interrupt: trajectory completed.
Bit 1 Interrupt: incorrect or invalid command.
Bit 0 Busy bit. Occupied; working.

Further information can be found in the servo controller data sheet:


[4] LM628 Precision Motion Controller Datasheet, National Semicondctor, to be
obtained from http://www.national.com/ds/LM/LM628.pdf.

Descriptors for SV_TRJ


SV_COM <Slave>, <Descriptor>, <Value>

Slave PAC
A 9 9 Sets the absolute acceleration, is only accepted when
the axis is stopped and must always be larger than
zero.
AR 9 9 Sets the relative acceleration, is only accepted when
the axis is stopped and must always be greater than
zero.
NA 9 Sets the negative acceleration when starting up.
NAR 9 Sets the relative negative acceleration when starting
up.
ND 9 Sets the negative deceleration when braking.
NDR 9 Sets the relative negative deceleration when braking.
PA 9 Sets the positive acceleration when starting up.
PAR 9 Sets the relative positive acceleration when starting up.
PD 9 Sets the positive deceleration when braking.
PDR 9 Sets the relative positive deceleration when braking.
V 9 9 Sets the absolute speed and must always be larger
than zero.
VR 9 9 Sets the relative speed and must always be larger than
zero.
X 9 9 Sets the absolute position, the distance.
XR 9 9 Sets the relative position, the distance.

5. 8. Bibliography
Further literature on specific slaves and their connections:
[1] Connecting a Balluff IDEX BIS S 6002 and BIS C 6002 to ECCO, Horsch
Elektronik AG, Version 0.02, 2004.
[2] Connecting a PAGO printer to ECCO, Horsch Elektronik AG, Version 0.02,
2004.
[3] Connecting a VI terminal to ECCO, Horsch Elektronik AG, Version 0.02,
2004.
[4] LM628 Precision Motion Controller Datasheet, National Semicondctor, to be
obtained from http://www.national.com/ds/LM/LM628.pdf.

Literature on the use of the PAC:

10/26/05 – Ver.: 1.02 English ECCO Manual - 280/282 -


Horsch Elektronik AG

[5] PAC Handbuch, Horsch Elektronik AG, Version 1.01, 2001.

On the use of STATREAD and ZPoint statistical software:


[6] STATREAD – User’s Guide, Horsch Elektronik AG, Version 1.26, 1997.
[7] STATREAD + STATCALC – Configuration and Technical Documentation,
Horsch Elektronik AG, Version 1.26, 1997.

On ECCO auxiliary programs:


[8] ECCO Debugger, Horsch Elektronik AG, Version 1.00, 2004.
[9] PACTest Manual, Horsch Elektronik AG, Version 1.00, 2002.
[10] UltraEdit32, IDM Computer Solutions. http://www.ultraedit.com/index.php.
Shareware program (at date of print).

10/26/05 – Ver.: 1.02 English ECCO Manual - 281/282 -


Horsch Elektronik AG

6. VALID VERSIONS
The version of this manual: 1.02 English
Version Date Author Description
1.02 26.10.05 MC English translation of Manual 1.02.
English

Current software versions:


ECCO environment ecco.exe 09.08.2005 Version 5.01
cif32dll.dll 25.07.2002
dbm32.dll 29.04.2002
eccomonitor.exe 21.06.2005
haspms32.dll 30.08.2002
PacLink.dll 19.04.2005
SMC_API.dll 10.05.2005
SmcLogin.dll 15.06.1999 + user.dat
ECCO compiler eccocomp.exe 11.04.2005 Type 47
ECCO loader eccoload.exe 20.06.2005
SMC_API.dll 10.05.2005
ECCO Debugger eccodbg.exe 06.07.2005
SMC_API.dll 10.05.2005
SmcLogin.dll 15.06.1999 + user.dat
Gateway admin GwyAdmin.exe 07.07.2005
SmcLogin.dll 15.06.1999 + user.dat
PACTest PacTest.exe 01.06.2005
PacLink.dll 19.04.2005
pac.def 29.04.2005
pacNew.def 17.06.2005
PathPicker.dll 13.05.2005
Profiler SMCProfile.exe 18.05.2004
SMC_API.dll 10.05.2005

Please use only the latest versions of the software, available for download from
http://www.horsch.ch

10/26/05 – Ver.: 1.02 English ECCO Manual - 282/282 -

S-ar putea să vă placă și