ecco manual 1.02 e

Upload: humberto-guerrero-rojo

Post on 08-Apr-2018

250 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Ecco Manual 1.02 e

    1/282

    Horsch Elektronik AG http://www.horsch.ch9473 Gams, Switzerland [email protected].: +41 81 771 61 81; Fax: +41 81 771 17 47

    EECCCCOOMMaannuuaall

    Version: 1.02 EnglishAuthor: M. Chicherio

    Date: 26. October 2005

  • 8/6/2019 Ecco Manual 1.02 e

    2/282

    Horsch Elektronik AG

    ECCO Manual - 2/282 -

    11.

    1.02 EnglishEnglish

    . FFOORREEWWOORRDD

    ECCO Manual - 2/282 -

    11The ECCO programming language by Horsch Elektronik AG was developed as ameans to control and monitor large machines for the automatic assembly of complex

    work pieces and has been continually improved and implemented successfully overmany years. Originally developed by Gabriel Horsch in the 80s, it was improved overthe last ten years by PhD Peter Horn and Marcel Sestak.

    The ECCO programming language by Horsch Elektronik AG was developed as ameans to control and monitor large machines for the automatic assembly of complex

    work pieces and has been continually improved and implemented successfully overmany years. Originally developed by Gabriel Horsch in the 80s, it was improved overthe last ten years by PhD Peter Horn and Marcel Sestak.The ECCO control system is the consistent next step in the development line of SMCcontrollers. What was formerly implemented on its own hardware can now behandled by standard PCs, with the customer benefiting from all the advantages of thePC.

    The ECCO control system is the consistent next step in the development line of SMCcontrollers. What was formerly implemented on its own hardware can now behandled by standard PCs, with the customer benefiting from all the advantages of thePC.The ECCO runtime environment is exceptionally powerful and allows a Pentium 3800 MHz to process 200'000 instructions from 200 tasks in one second with theprocessor using only 5% of its processing power.

    The ECCO runtime environment is exceptionally powerful and allows a Pentium 3800 MHz to process 200'000 instructions from 200 tasks in one second with theprocessor using only 5% of its processing power.This manual has been written with great care but it may still contain errors. Pleasereport any errors found to Horsch Elektronik AG.This manual has been written with great care but it may still contain errors. Pleasereport any errors found to Horsch Elektronik AG.

    .. FFOORREEWWOORRDD

    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 onto third parties is prohibited.Even though this manual has been written with great care, it may still be subject toerrors and omissions. By using this manual, you acknowledge this fact and waiveall claims for compensation against Horsch Elektronik AG, LCA Automation AG orthird parties that could arise from the use of this manual, including but limited to

    claims arising from errors, incompleteness, or other erroneous information. If youdo not agree to this condition, you must immediately return the manual, delete alldigital copies and cease to use the product described.Brand names are used without special reference or marking and the lack ofidentification of a brand name does not represent a declaration that it is freelyavailable for use.

    HORSCH ELEKTRONIK AGHaagerstrasse 42PostfachCH-9473 Gams

    2004, 2005

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    3/282

    Horsch Elektronik AG

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

    22.. TTAABBLLEEOOFFCCOONNTTEENNTTSS

    1. Foreword ......................................................................................................21. Foreword ......................................................................................................22. Table of contents.........................................................................................32. Table of contents.........................................................................................33. Introduction to ECCO..................................................................................83. Introduction to ECCO..................................................................................8

    3. 1. Advantages of ECCO over IEC 61131...........................................................83. 2. Installation of ECCO......................................................................................93. 3. Working with the terminal ..............................................................................93. 4. Operation modes and status........................................................................153. 5. The programming environment....................................................................183. 6. A minimal program.......................................................................................203. 7. Functions, tasks and procedures.................................................................223. 8. Registers and flags......................................................................................243. 9. Working with strings.....................................................................................263. 10. Inputs and outputs .......................................................................................283. 11. Displays and user input ...............................................................................293. 12. Flow control .................................................................................................303. 13. Internationalization ......................................................................................323. 14. ECCO intercommunication ..........................................................................333. 15. Statistic and ZPoint......................................................................................333. 16. The PAC......................................................................................................36

    4. Commands.................................................................................................374. Commands.................................................................................................374. 1. Conventions.................................................................................................37 4. 2. Systematic command reference ..................................................................384. 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

  • 8/6/2019 Ecco Manual 1.02 e

    4/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 ............................................ 86ABS ............................................................................................................ 89AND............................................................................................................ 90BMOV......................................................................................................... 91BUS_OFF................................................................................................... 92BUS_ON..................................................................................................... 93CALC.......................................................................................................... 94CALL........................................................................................................... 95CALLD........................................................................................................ 96CALLF ........................................................................................................ 98CDATEDISP............................................................................................. 100CLOSE ..................................................................................................... 101CLR_PUFFER .......................................................................................... 102CLS........................................................................................................... 103CLS_WIN.................................................................................................. 104COND_TRAP / IF_COND / END_COND_TRAP ...................................... 105CREGDISP............................................................................................... 107CTIMEDISP.............................................................................................. 108CWRITE ................................................................................................... 109DATEDISP................................................................................................ 110DO / DO_WHILE / DO_WHILENOT ......................................................... 111END_NUM_INP........................................................................................ 113EXCL ........................................................................................................ 114GET_PSL ................................................................................................. 115GW_DD.................................................................................................... 116GW_DW ................................................................................................... 117GW_MSG ................................................................................................. 118GW_QUEUE............................................................................................. 119

    GW_RD_DD............................................................................................. 120GW_RD_DW ............................................................................................ 121HP_CDATEDISP ...................................................................................... 122HP_CLS_WIN........................................................................................... 124HP_CREGDISP........................................................................................ 125HP_CTIMEDISP ....................................................................................... 127HP_CWRITE ............................................................................................ 129HP_DATEDISP......................................................................................... 130HP_REGDISP .......................................................................................... 131HP_TIMEDISP.......................................................................................... 132HP_WRITE............................................................................................... 133ID_INIT ..................................................................................................... 134ID_READ .................................................................................................. 135

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

  • 8/6/2019 Ecco Manual 1.02 e

    5/282

    Horsch Elektronik AG

    ID_REG_RD............................................................................................. 136ID_REG_WR ............................................................................................ 137ID_STATUS.............................................................................................. 138ID_WRITE ................................................................................................ 139IF / IFNOT / ELSE / END_IF..................................................................... 140INM........................................................................................................... 142INP............................................................................................................ 143JMPCOND................................................................................................ 145JMPTIM.................................................................................................... 146JPBIT........................................................................................................ 147JPEQ ........................................................................................................ 148JPGT ........................................................................................................ 149JPLT ......................................................................................................... 150JUMP........................................................................................................ 151L_INP........................................................................................................ 152L_JMPCOND............................................................................................ 153L_OUTP.................................................................................................... 154L_SWITCH / CASE / DEFAULT / END_SWITCH..................................... 155LEN_STR ................................................................................................. 156MID_STR.................................................................................................. 157MOV ......................................................................................................... 158MOV_PUFFER ......................................................................................... 159NEW_PUFFER......................................................................................... 160NOT.......................................................................................................... 161NSDEF ..................................................................................................... 162NUM_INP ................................................................................................. 163OPEN ....................................................................................................... 164OR ............................................................................................................ 165OUTA........................................................................................................ 166OUTP........................................................................................................ 167PAC .......................................................................................................... 168POWER_OFF........................................................................................... 169PUFFER ................................................................................................... 170RD_DATE................................................................................................. 171RD_HOUR................................................................................................ 172RD_PUFFER ............................................................................................ 173RD_TIME.................................................................................................. 174RD_WEEK................................................................................................ 175

    REGDISP ................................................................................................. 176RET .......................................................................................................... 177RETD........................................................................................................ 178RETE........................................................................................................ 179RETF ........................................................................................................ 180SAVE_ARRAY.......................................................................................... 181SCALE_AD............................................................................................... 182SCALE_DA............................................................................................... 183SCHICHT.................................................................................................. 184SEARCH................................................................................................... 185SEND_IO.................................................................................................. 186SEND_REG.............................................................................................. 187SEND_SR................................................................................................. 188

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

  • 8/6/2019 Ecco Manual 1.02 e

    6/282

    Horsch Elektronik AG

    SET_LANG............................................................................................... 189SET_PSL.................................................................................................. 190SETBIT ..................................................................................................... 191SETTIM .................................................................................................... 192SLCE........................................................................................................ 193SLCS........................................................................................................ 194SLV_RCV_STR........................................................................................ 195SLV_SND_STR ........................................................................................ 196SMOV....................................................................................................... 197STAT_CLR ............................................................................................... 198STAT_PUFFER ........................................................................................ 199STAT_QUEUE.......................................................................................... 200STAT_TAKT ............................................................................................. 201STCKZAHL............................................................................................... 202STDEF...................................................................................................... 203STR_ADD................................................................................................. 204STR_ADD_ASCII ..................................................................................... 205STR_ADD_NR.......................................................................................... 207STR_TO_ASCII ........................................................................................ 208STR_TREAT............................................................................................. 209STR_VAL.................................................................................................. 210SV_COM .................................................................................................. 211SV_CONST .............................................................................................. 212SV_FIL...................................................................................................... 213SV_READ................................................................................................. 214SV_TRJ .................................................................................................... 215SWITCH / CASE / DEFAULT / END_SWITCH......................................... 216TASK_KILL............................................................................................... 217TASK_OPEN............................................................................................ 218TASK_STEP............................................................................................. 219TIMEDISP................................................................................................. 220TINP ......................................................................................................... 221VI_CLRKEY.............................................................................................. 224VI_DATE................................................................................................... 225VI_JMPKEY.............................................................................................. 227VI_RDISP ................................................................................................. 228VI_READ .................................................................................................. 230VI_TIME.................................................................................................... 231

    VI_WRITE................................................................................................. 233WAITIM..................................................................................................... 234WHILE / WHILENOT / END_WHILE......................................................... 235WR_TIME................................................................................................. 237WRITE...................................................................................................... 238XOR.......................................................................................................... 239ZPOINT_STATE....................................................................................... 240

    4. 4. Labels ........................................................................................................241BACKPGM................................................................................................ 242ERROR_PROTOTYPE............................................................................. 243HOT_TASK / HOT_END........................................................................... 244HPPGM .................................................................................................... 246NRMPGM ................................................................................................. 247

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

  • 8/6/2019 Ecco Manual 1.02 e

    7/282

    Horsch Elektronik AG

    NSPGM .................................................................................................... 248NSRESP................................................................................................... 249STPGM..................................................................................................... 250STRESP ................................................................................................... 251

    4. 5. Obsolete commands..................................................................................252CTRDEC................................................................................................... 253CTRDISP.................................................................................................. 254CTREQ..................................................................................................... 255CTRINC.................................................................................................... 256CTRPRES ................................................................................................ 257CTRRES................................................................................................... 258DISABLE_STOP / ENABLE_STOP.......................................................... 259STAT_SEND ............................................................................................ 260STEND ..................................................................................................... 261TIMETRAP / END_TIMETRAP................................................................. 262TRAP / IF_TRAP / END_TRAP ................................................................ 263

    4. 6. Commands no longer supported ...............................................................2645. Appendices ..............................................................................................2655. Appendices ..............................................................................................265

    5. 1. State diagram ............................................................................................2655. 2. Priority diagram .........................................................................................2665. 3. Colors and fonts on the display .................................................................2665. 4. System registers........................................................................................2685. 5. System flags..............................................................................................2715. 6. System errors ............................................................................................2725. 7. Commands for servo slaves and PAC.......................................................2775. 8. Bibliography...............................................................................................280

    6. Valid versions ..........................................................................................2826. Valid versions ..........................................................................................282

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

  • 8/6/2019 Ecco Manual 1.02 e

    8/282

    Horsch Elektronik AG

    ECCO Manual - 8/282 -1.02 English

    33.. IINNTTRROODDUUCCTTIIOONNTTOOEECCCCOOThis section will explain various aspects of ECCO. It serves primarily as anintroductions to programmers unskilled in ECCO but also provides opportunity to

    experienced ECCO programmers to become more familiar with the principles of thelanguage.

    33.. 11.. AAddvvaannttaaggeessooffEECCCCOOoovveerrIIEECC6611113311The advantages of the ECCO programming language and the new ECCO operatingsystem are difficult to communicate. It stands in contrast to other control systems,which, for historical reasons, have been developed in a different direction throughnorming 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. Theapplication of relay technology had a powerful influence on the traditional training ofcontrol system engineers and operators of industrial machinery.Digital technology has been treated and thought about in the same way. Nowprocessors with programmable digital components have taken over almost all thetasks of relay technology. Each processor processes its program lines in runtime. Tosimulate a status machine, additional operating system tasks must be carried out inthe processor, which reduces its performance. Therefore, status machines workmore slowly.The IEC 61131 state machine is simulated in the cycle of the processor program withinputs 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 toremember the entire set of states of the inputs and outputs and to execute changesto the program without affecting other states.

    ECCO is a real time language, so the program is processed by each processor inreal time. The execution of tasks in a process is also performed in real time. Thiscorresponds to the human way of thinking, in which tasks are performed insequence.In a state machine, a change in a complicated process means that all states must bechecked for potential effects, because all variables affect all other variables. InECCO, however, only a time segment is changed and has no effect on other timesegments which would have to be checked.

    The difference can be seen by the example of a group of ten workers, performing atask in collaboration. In a state machine, each individual step by each individualworker would have to be defined and monitored, because each worker affects themomentary state of the joint task.In a sequenced process, each worker is given a task to perform independently andmutual controls are restricted to the synchronization points between a few workersand 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 realtime. Not at all times however, as is the case in a state machine. This simplifiesthought processes and the simplifies changes to an existing program considerably .

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    9/282

    Horsch Elektronik AG

    Experience has shown that an extension or change to a program in ECCO and thechecking of the effect on other program processes is significantly faster than in astate machine, such as the IEC 61131 programming language.The ECCO operating system works faster and is more adapted to human thoughtpatterns, and hence easier to understand than a state machine. The proof lies in the

    flexibility, faster implementation of changes and thus significantly shorter start-uptimes for challenging, complicated processes.

    Consideration of programming, start-up and modification costs has allowed theECCO programming language to survive for more than 20 years, despite minimumrecognition and spread.

    ECCO Manual - 9/282 -1.02 English

    33.. 22.. IInnssttaallllaattiioonnooffEECCCCOOThe actual installation of ECCO is extremely simple and takes only a few seconds. In

    addition, however, some third-party software packages are required, whoseinstallation may take longer. This section shows all installation steps. It should benoted that some programs are subject to licensing requirements and may only beused in compliance with the license.

    1. Install Windows 2000 or XP ECCO may not run stably on other Windowsversions.

    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 bemade.

    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 fromHilscher.

    4. If a CP-Link card is used, it must be installed and TwinCat CP must also beinstalled. 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 nothappen 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 ofthe .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 isexplained in the next section. For the use of SyCon and other tools, refer to therelevant documentation.

    33.. 33.. WWoorrkkiinnggwwiitthhtthheetteerrmmiinnaall

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

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    10/282

    Horsch Elektronik AG

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

    1. Switch on the machine with the main switch on the switch box2. 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 .TEXTcommand.

    ECCO Manual - 10/282 -1.02 English

    TThheeEECCCCOOccoonnffiigguurraattoorr

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

    The first advanced setting concerns theability to skip the configurator, as isrequired in the production environment,so that the number can start fullyautomatically. ECCO is called by

    ecco -s

    where the -s switch causes the skippingof the configurator and the compiledruntime program is entered in .

    On a call without the -s switch, the mainpage of the configurator appears, asshown to the side. Most elements areinactive, 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 ofthe last ending of ECCO, when and howECCO was ended and the user. ECCOcan show the status of the runtimeenvironment and power supply unit in theEngine Runtime status and UPSStatus fields.

    The main page for a logged in user lookslike the representation to the side. Aswell as the ability to start ECCO with

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    11/282

    Horsch Elektronik AG

    Start ECCO, or to shut down the program with Cancel, the user can select aruntime program, start ECCO without a runtime program by deactivating Loadprogram 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 theauxiliary programs. Because the oldergeneration of control systems operatedexclusively through the serial port, this isstill supported by ECCO.Most users waive this, however, and usethe first option, as selected in thescreenshot, to provide an interface to

    auxiliary programs.The IP address for PC Services selectsthe IP address to be used.

    IDEX, the second tab, serves only forfunction as IDEX units are declared andconfigured through .PRODIBUS_DEF.The number in the Max field shows thenumber of IDEX antenna connected.Then comes the actual table with theIDEX elements, where the fields have thefollowing meanings:

    ID Profibus ID of the unitBd Number of the card in useAnt Antenna on the unitNr The ECCO IDIB The first input byte in the

    reproductionOB The first output byte in the

    reproduction

    The third tab is labeled Engine Tracer.It provides the possibility to initialize theregister on start-up, to define the start-upbehavior of the runtime environment andbehavior on Profibus errors, to activatesupport for and configure the tracer, todefine the time for periodic saving of thebuffered register, to affect eventrecording, which makes offline analysiseasier and to input the number of system

    cycles in a millisecond.

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

  • 8/6/2019 Ecco Manual 1.02 e

    12/282

    Horsch Elektronik AG

    The fourth tab, the first in the upper row,allows configuration of the screen.Typically, ECCO is operated as standalone application, running on its owncomputer with its own screen. It is

    however also possible to display theruntime environments output on aseparate panel through any availableserial port or, through TCP/IP to aseparate computer, e.g. to administerECCO computers centrally.

    The fifth tab is used for ZPoint andStatREAD.The term gateway comes from oldergenerations of control systems in which

    the SMC control system communicatedthrough a special gateway card with theZPoint computer.The Gateway support checkboxactivates the ZPoint connection. TheConfiguration file button selects theappropriate configuration file. TheActivate/Deactivate STATISTIC supportcheckbox must be activated if statisticalsoftware such as ZPoint or StatREAD willbe used.

    The sixth tab is labeled ECCO andserves to connect with external controlsystems in order to create a network ofcontrol systems.The Support ECCO ECCOcommunication checkbox activatessupport for the network. The other fieldsare for the declaration of the IP Addressof the linked control systems.

    The seventh tab, labeled Slave and VIallows deactivation of support for slaves.It also provides information on the slavesthat are connected.

    ECCO Manual - 12/282 -

    PB Profibus ID of the terminalECC The number allocated in ECCOBRD Number of the card in useSlv

    TypThe type of slave connected

    COM Sequential COM numberTyp Parameters of the COM ports

    10/26/05 Ver.: 1.02 English

  • 8/6/2019 Ecco Manual 1.02 e

    13/282

    Horsch Elektronik AG

    The eighth and final tab activate PACsupport and shows the followinginformation:

    ID Profibus ID of the PAC

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

    ECCO Manual - 13/282 -1.02 English

    TThheeeelleemmeennttssoofftthheetteerrmmiinnaall

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

    When active, the alternative function for each number key is selected. Thisis 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 exampleby releasing the emergency stop button. An error is acknowledged bypressing the Fail key which triggers the error reset sequence.

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    14/282

    Horsch Elektronik AG

    Indicates when the current type of operation is Manual operation. Thekey is used to switch to manual operation mode.Indicates when the current type of operation is Station operation. The keyis 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 programsequences 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 keysets 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 raisederror flags.Number 5. If Shift is active, a function is selected. The number keys canbe 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 beeninput.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 freelyprogrammed by the programmer.

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

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

  • 8/6/2019 Ecco Manual 1.02 e

    15/282

    Horsch Elektronik AG

    ECCO Manual - 15/282 -1.02 English

    33.. 44.. OOppeerraattiioonnmmooddeessaannddssttaattuussOne great advantage of ECCO compared to other control systems are its operationmodes. These greatly simplify the set-up, testing, start-up and modification of

    complicated proceduresThe difference between an operational state and an operation mode is simple: thecontroller is in a state that affects its behavior. The user can select certainoperational states which are then known as operation modes.ECCO recognizes eight operational states: norming, manual, station and automaticoperation mode, function mode, fail, emergency stop and system fail. The user canselect four of these states directly. They are the function mode, manual, station andautomatic operation mode.The individual operational states are shown graphically in Appendix 5. 1 Statediagram. The appendix also details the state transitions, or how to switch from one

    state to another.

    MMaannuuaallooppeerraattiioonn

    Individual elements and functions can be selected directly by the user in manualoperation mode. Thus, individual outputs can be switched in order to calibrate themachine mechanically. This simplifies start-up greatly, as it can be done at a timewhen the programming itself has not been completedSetting 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 .

    SSttaattiioonnooppeerraattiioonn

    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 debuggeddirectly at the terminal. For further details, see below.

    AAuuttoommaattiiccooppeerraattiioonn

    Automatic operation mode is the actual production mode. In it, the procedures andprocesses 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 debuggeddirectly 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 possibilityduring production.

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    16/282

    Horsch Elektronik AG

    ECCO Manual - 16/282 -1.02 English

    NNoorrmmiinngg

    The norming sequence is carried out on starting up the machine in order to normalizeand initialize the control system and all elements of the machine The machine isready 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 debuggeddirectly 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 thenno longer in a properly defined state.

    FFaaiill

    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 errorThe error is acknowledged by the user by pressing the key, which starts theerror reset routine. If this fails, ECCO quits the program and switches to manualmode.

    EEmmeerrggeennccyyssttoopp

    In contrast to fail, emergency stop is active in all operation modes. Normally aphysical emergency stop circuit acts as input to the software condition which itselfprotects 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 areinterrupted and the emergency stop sequence started. This can be freely selected bythe programmer but normally sets all outputs low.After completion of the emergency stop sequence, Emergency Stop appears on thedisplay, together with the number of the element that triggered the emergency stopand 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 theemergency stop reset sequence starts. Unless programmed otherwise, ECCO thenswitches to manual mode.

    SSyysstteemmeerrrroorrss

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

    FFuunnccttiioonnmmooddee

    Functions not requiring a parameter can be selected in function mode. With

    , the user can switch to function mode where the required function can beselected either directly with number keys (e.g. for function numbered 1.2 the keys

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    17/282

    Horsch Elektronik AG

    ) or using the arrow keys. The text that describes the function in thecurrent 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 withparameters through encapsulating functions and to provide the user with certainstart-up functionality.The change to function mode can be made in manual, station and automaticoperation modes at any time, although in station and automatic operation, the

    program running must first be interrupted with .

    ECCO Manual - 17/282 -1.02 English

    DDeebbuuggggiinnggwwiitthhtthheetteerrmmiinnaall

    ECCO is exceptionally suitable for rapid prototyping and evolutional programming,This is particularly so because it is easy in ECCO to locate mechanical, electrical orlogical 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 taskscontinue, however so that safety and supervision functions remain operational. ThePROGRAM STOPPED message appears and a switch is made to diagnostic mode.

    The and keys light. The program is scrapped by pressing thekey 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 furtherconditions are displayed.

    The program is continued with .

    SSttaarrttiinngg--uuppaafftteerraaccrraasshh

    In order to restart ECCO successfully after, say, a system crash without running therisk of triggering consequential errors, overwriting registers or endangering theintegrity 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. Themessage can be acknowledged. The ECCO application program will now startnormally.

    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 systemshould always be the latest edition, including service packs and patches and ECCOshould never be crashed deliberately. So always shut down ECCO with the shutdown function. This will not only ensure correct saving of data, but it will also ensurethat machine and field bus hardware is correctly shut down, which, in particular,protects Profibus Master cards against incorrect configurations.

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    18/282

  • 8/6/2019 Ecco Manual 1.02 e

    19/282

  • 8/6/2019 Ecco Manual 1.02 e

    20/282

  • 8/6/2019 Ecco Manual 1.02 e

    21/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

    CLOSESTPGM: ; 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 changedon porting.Then follow details of the customer's project number of the program and the numberof 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.

    ECCO Manual - 21/282 -

    How control systems are linked together, which values are then to be used and whatmust be given attention is described in detail in section 3. 14 "ECCOintercommunication".

    10/26/05 Ver.: 1.02 English

  • 8/6/2019 Ecco Manual 1.02 e

    22/282

    Horsch Elektronik AG

    Various limits are given in the .LIMITS block which allow the compiler to optimizethe translation process and resulting program.Then comes the first of four .ADDRESS declarations. These tell the compiler how theprogram is ordered and must always be used as shown. It should be noted that otheraddress 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 programis started. The text usually includes a version number so that the user can ensurethat 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 theminimal program: first labels are declared and then their functionality programmed.The declarations allow individual labels to be given other names. This is however notrecommended, as such programs are difficult to understand. The eleven .SETLABELinstructions 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.

    ECCO Manual - 22/282 -1.02 English

    33.. 77.. FFuunnccttiioonnss,, ttaasskkssaannddpprroocceedduurreessThis section explains how the task of the ECCO programmer can be broken downinto many smaller parts and what aids ECCO provides. This relates to largeprogramming blocks, and not to the programming of individual devices or commands.

    FFuunnccttiioonnss

    As any modern programming language, ECCO incorporates functions. A function is arelated program block that solves a certain problem.Specifically, functions can be given parameters in ECCO, so that solutions can bemade general and re-usable. Functions are started from program tasks, about whichmore later, with CALLF and ended with the RETF instruction. They can be nested sothat one function can call another.Functions must be defined in the .FUNCTIONS block. The definition consists of theposition (as lines and columns) where it can be called from the terminal, the numberof arguments and a text to describe the function.The arguments are copied, as described below, the function started and the callingtask 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 thetask making the call, and the task making the call is continued after CALLF. The taskmaking 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 benested within each other. Opposite to this, in a running program, an unlimited numberof functions can be nested, but each function needs to have a free task (whichhowever are limited). Thus, the nesting of function is limited only by the number oftasks available.The CALLF command seems at first sight to be somewhat cumbersome, but it doesopen up great opportunities:

    CALLF #, I, O, F,D, [, ]

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    23/282

  • 8/6/2019 Ecco Manual 1.02 e

    24/282

  • 8/6/2019 Ecco Manual 1.02 e

    25/282

    Horsch Elektronik AG

    allowed, the precise number depending on the declaration of the displayroutine or function.

    RV Global 16-bit register. The number depends on .LIMITS but 32767 at themost.

    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.

    ECCO Manual - 25/282 -1.02 English

    IInnddiirreeccttaaddddrreessssiinngg

    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. Othernames are reference or pointer. The purpose, in any case, is to store the address ofa value in its own register. This allows the implementation of extremely highperformance algorithms, although programs tend towards illegibility with indirectaddressing. 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 alteredat 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 canbe 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).

    AArrrraayyss

    Arrays are groups of related numerical elements. For example, the status of astructure could be described in 20 words. Instead of using 20 RW registers, an AWarray with 20 elements could also be used. The advantage of the latter method isthat 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 storedvery easily.A whole array is described like a register, so AV001 is the first array with 16-bitelements and AW001 the first array with 32-bit elements. In order to pick up a singleelement in an array, its position, the index, is given in round brackets. ThusAV001(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.

    DDeeccllaarraattiioonnooffrreeggiisstteerrss

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

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    26/282

    Horsch Elektronik AG

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

    ECCO Manual - 26/282 -1.02 English

    FFllaaggvvaarriiaannttssiinnppuuttss,, oouuttppuuttss,, ffllaaggssaannddeerrrroorrffllaaggss

    There are four variations of flags, E or I for inputs, A or O for outputs, F or M forordinary 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 memorieswith possible states L and H, with an associated handler function. If an error flag isset, the ECCO runtime environment will start the relevant handler. ECCOs prioritymodel guarantees the necessary exclusivity. Specifically, this means:

    1. If an error task is already active, the new task will be delayed until the old onehas 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 normaloperation, lack of interruption is guaranteed.

    3. At the start of an error task, any display task being executed will be interruptedand 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 PLSpage will be frozen, meaning that it is interrupted and restarted from thebeginning 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 onending. A task can thus wait for completion of the error task by checking theerror flag with INP.

    7. If an error task calls another, the second one will be executed when the firstone has been completed.

    8. The error task closes with RETE. The restorations described above are thenundertaken.

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

    33.. 99.. WWoorrkkiinnggwwiitthhssttrriinnggssStrings are just that: objects in which text can be used simply and conveniently.ECCO supports the following string operations:53 .IO_TEXT / .END_IO_TEXT79 .STRING_REG / .END_STRING_REG80 .STRINGS / .END_STRINGS156 LEN_STR157 MID_STR

    188 SEND_SR189 SET_LANG195 SLV_RCV_STR

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    27/282

    Horsch Elektronik AG

    196 SLV_SND_STR197 SMOV204 STR_ADD205 STR_ADD_ASCII207 STR_ADD_NR

    208 STR_TO_ASCII209 STR_TREAT210 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 eithergiven 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 atruntime, for example, to make multi-language displays or complex outputs easier.Constant strings are defined language specific in the .STRINGS block. In thefollowing example, two constant strings are used which are also used in otherexamples 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. Thisallows 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, messagescan be exchanged with slaves or other control systems, on the other, new text can berecorded 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_STRcommands 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 orerror flag can be allocated with the SMOV command. The descriptive texts have beendefined 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_ASCIIand STR_ADD_NR commands. These commands can best be illustrated with anexample: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.

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

  • 8/6/2019 Ecco Manual 1.02 e

    28/282

  • 8/6/2019 Ecco Manual 1.02 e

    29/282

  • 8/6/2019 Ecco Manual 1.02 e

    30/282

    Horsch Elektronik AG

    To understand why high priority output commands must be used, ECCOs prioritymodel 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 ofeach 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 witheach other through synchronization. This is largely handled by the ECCO runtimeenvironment and the programmer must simply use the functions available in a correctway.Because only one task should access the display at a time, there are several specialtasks for display access, of which only one is active at any precise moment and thusmay access the display.Several PSL tasks may be programmed of which only one is active at a time. A PSLtask serves to display process information and the user can select which theinformation displayed in detail. We talk about PSL pages, therefore. The selectedPSL 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 requestvalues and settings from the machine operator. Only one display task can be activeat a time. Normal program tasks can call display tasks and the ECCO runtimeenvironment provides the necessary synchronization. If an error or other display taskis active at the time of the call, its execution will be delayed until they are no longeractive. Otherwise the display task can begin and the currently active PSL page willbe interrupted. At the end of the display task, the PSL task will be processed againfrom 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 errortask interrupts the display and PSL tasks and causes them to restart when finished.These rules ensure a comprehensive and well-defined screen structure which isimplemented by the lower priority display commands. But there are situations wherethe programmer wants to deviate from the rules: in such a case, he may use the highpriority output commands, which will always be displayed.

    PSL pages are entered with . which makes it possible for the userto 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. Moredetails 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 displaytasks, but this is not recommended as the programs will become illegible. Requestingvalues should be reserved for display tasks.

    ECCO Manual - 30/282 -1.02 English

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

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    31/282

  • 8/6/2019 Ecco Manual 1.02 e

    32/282

    Horsch Elektronik AG

    105 COND_TRAP / IF_COND / END_COND_TRAP221 TINP

    In addition, obsolete and lower-performance commands continue to be supported,but these should no longer be used in new programs.

    ECCO Manual - 32/282 -1.02 English

    33.. 1133.. IInntteerrnnaattiioonnaalliizzaattiioonnECCO control systems are delivered all over the world with the possible exceptionof the Antarctic. So the requirement to support different languages is particularlyimportant. This is achieved very simply in ECCO as strings can be programmedlanguage specific and switching between languages can be made anytime duringoperation. This section explains how internationalization is implemented and wherethe programmer must pay attention to.

    To generate an SPS program in several languages, the following declarations mustfirst be internationalized:51 .FUNCTIONS / .FUNC_END53 .IO_TEXT / .END_IO_TEXT55 .LANGUAGES74 .STATIONS / STATION / .END_STATIONS75 .STATISTIC / GROUP / .END_STATISTIC78 .STOP_IO_TEXT80 .STRINGS / .END_STRINS86 .ZPOINT / ANLAGE / RACK / .END_ZPOINT

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

    .STRINGS GER

    ST001 = Dies ist eine Zeichenkette

    ST002 = Mehr Text

    .END_STRINGS

    .STRINGS ENGST001 = 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 directstrings, those limited by quotes, as these cannot be translated, of course. Soconstant or dynamic strings should be used for all display commands.

    The ECCO runtime environment ensures that all user-programmed error and systemmessages are displayed in the current language.

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    33/282

    Horsch Elektronik AG

    ECCO Manual - 33/282 -1.02 English

    33.. 1144.. EECCCCOOiinntteerrccoommmmuunniiccaattiioonnAs already mentioned, ECCO reveals its full power in the controlling of large, highlycomplex installations for automation. Often, such installations are so large that thereis a requirement for several control systems operating more or less independently.ECCO supports such a setup and provides the possibility of communication betweencontrol systems.

    The following declarations and commands facilitate communication:56 .LIMITS59 .MAX_ECCO60 .OWN_ECCO85 .UNLOCK / .END_UNLOCK185 SEND_IO187 SEND_REG188 SEND_SR

    237 WR_TIME

    ECCO demands only a few declarations in order to communicate with networkedcontrol systems. The IP address is selected in the ECCO configurator, so changes ofthe IP address do not require adjustments to the ECCO program.First, the number of linked control systems and the control systems own address inthe network must be entered: .MAX_ECCO for the number of control systems

    interconnected, .OWN_ECCO for the control systems own address.The .LIMITS declaration provides the characteristics of the control systems

    interconnected. Only a reduced block must be entered, as described in the .LIMITSdeclaration.

    Finally, the elements accessible to the interconnected control systems must bedeclared in the .UNLOCK block. All other elements, i.e. not declared in this block, arethus protected from being overwritten.

    One convention must be respected in the actual communication: every controlsystem can have up to 999 inputs and 999 outputs. The control system to which theinput or output refers to, is entered with the thousands digit; this is omitted for theown control system. Hence, A201 is the control systems own output 201 and A2201is 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 besynchronized with WR_TIME.

    33.. 1155.. SSttaattiissttiiccaannddZZPPooiinnttThe term statistic is usually understood by ECCO programmers and users typicallymore broader than the pure recording and analysis of data. The term also includesmachine parameterization and linking to an ERP solution. The term will be used asbroadly in this section, to reflect the language of ECCO customers.ECCO supports two statistics programs. The first is StatREAD, developed by HorschElektronik AG and optimized for ECCO, and ZPoint, developed and marketed byAMS Engineering.

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    34/282

  • 8/6/2019 Ecco Manual 1.02 e

    35/282

  • 8/6/2019 Ecco Manual 1.02 e

    36/282

    Horsch Elektronik AG

    ECCO Manual - 36/282 -1.02 English

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

    In ECCO, the PAC is controlled trough the PAC command. This instruction is easy touse and extremely powerful: The arguments required can be read from an array orwritten 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_DEF168 PAC[9] PACTest Manual, Horsch Elektronik AG, Version 1.00, 2002.

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    37/282

  • 8/6/2019 Ecco Manual 1.02 e

    38/282

  • 8/6/2019 Ecco Manual 1.02 e

    39/282

    Horsch Elektronik AG

    180 RETF261 STEND217 TASK_KILL218 TASK_OPEN219 TASK_STEP

    ECCO Manual - 39/282 -1.02 English

    JJuummppssaannddssttrruuccttuurreeddpprrooggrraammmmiinngg

    111 DO / DO_WHILE / DO_WHILENOT140 IF / IFNOT / ELSE / END_IF145 JMPCOND146 JMPTIM147 JPBIT148 JPEQ149 JPGT150 JPLT

    151 JUMP153 L_JMPCOND155 L_SWITCH / CASE / DEFAULT / END_SWITCH216 SWITCH / CASE / DEFAULT / END_SWITCH235 WHILE / WHILENOT / END_WHILE

    SSuuppeerrvviissiioonnaannddttiimmeerrss

    49 .ERROR_CODE_START50 .ERROR_FLAG_OFFSET83 .TINP_TEXT / .END_TINP_TEXT

    105 COND_TRAP / IF_COND / END_COND_TRAP192 SETTIM262 TIMETRAP / END_TIMETRAP221 TINP263 TRAP / IF_TRAP / END_TRAP234 WAITIM

    FFllaaggvvaarriiaannttss

    90 AND114 EXCL

    143 INP152 L_INP154 L_OUTP158 MOV161 NOT165 OR167 OUTP239 XOR

    RReeggiisstteerrccoommmmaannddss

    89 ABS90 AND91 BMOV

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    40/282

  • 8/6/2019 Ecco Manual 1.02 e

    41/282

    Horsch Elektronik AG

    109 CWRITE110 DATEDISP113 END_NUM_INP115 GET_PSL122 HP_CDATEDISP

    124 HP_CLS_WIN125 HP_CREGDISP127 HP_CTIMEDISP129 HP_CWRITE130 HP_DATEDISP131 HP_REGDISP132 HP_TIMEDISP133 HP_WRITE163 NUM_INP175 REGDISP190 SET_PSL

    217 TIMEDISP238 WRITE

    ECCO Manual - 41/282 -1.02 English

    SSaavviinnggaarrrraayyss

    181 SAVE_ARRAY

    SSeerrvvooccoommmmaannddssffoorrssllaavveeaannddPPAACC

    142 INM166 OUTA

    168 PAC181 SCALE_AD183 SCALE_DA208 SV_COM212 SV_CONST213 SV_FIL214 SV_READ215 SV_TRJ

    SSllaavveeccoommmmaannddss

    193 SLCE194 SLCS195 SLV_RCV_STR196 SLV_SND_STR

    SSppeecciiaallccoommmmaannddssffoorrIIDDEEXXssyysstteemmss

    134 ID_INIT135 ID_READ136 ID_REG_RD137 ID_REG_WR

    138 ID_STATUS139 ID_WRITE

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    42/282

  • 8/6/2019 Ecco Manual 1.02 e

    43/282

  • 8/6/2019 Ecco Manual 1.02 e

    44/282

  • 8/6/2019 Ecco Manual 1.02 e

    45/282

  • 8/6/2019 Ecco Manual 1.02 e

    46/282

  • 8/6/2019 Ecco Manual 1.02 e

    47/282

    Horsch Elektronik AG .DISPLAYS / .DISP_END

    .DISPLAYS / .DISP_END

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

    ECCO Manual - 47/282 -1.02 English

    SSyynnttaaxx::.DISPLAYS

    @,.

    [@,.]

    .DISP_END

    FFiieellddss::

    Label of the display task with up to 15 characters. Number of 32-bit parameters used. Number of 16-bit parameters used.

    CCoommmmeennttss::

    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 taskis called with CALLD and the required parameters are passed on. Display tasksinterrupt PSL tasks and serve primarily for interaction with the user, such as queryingfor values or the selection of menus.If a display task is interrupted by, say, an error task, the display task will be restartedfrom the beginning to ensure a complete, properly defined screen.

    EExxaammppllee::

    The following example defines 3 display tasks, one with no parameters, one with a16-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

    SSeeeeaallssoo::

    56 .LIMITS67 .PSL96 CALLD

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    48/282

  • 8/6/2019 Ecco Manual 1.02 e

    49/282

    Horsch Elektronik AG .ERROR_CODE_START

    .ERROR_CODE_START

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

    ECCO Manual - 49/282 -1.02 English

    SSyynnttaaxx::.ERROR_CODE_BASE

    FFiieellddss::

    Base number for automatic generation of error numbers even ifno error number is given in the TINP command. Numberbetween 5000 and 25000.

    CCoommmmeennttss::

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

    EExxaammppllee::

    .ERROR_CODE_BASE 10000

    SSeeeeaallssoo::

    42 .ADDRESS83 .TINP_TEXT / .END_TINP_TEXT221 TINP

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    50/282

  • 8/6/2019 Ecco Manual 1.02 e

    51/282

  • 8/6/2019 Ecco Manual 1.02 e

    52/282

  • 8/6/2019 Ecco Manual 1.02 e

    53/282

  • 8/6/2019 Ecco Manual 1.02 e

    54/282

  • 8/6/2019 Ecco Manual 1.02 e

    55/282

    Horsch Elektronik AG .LANGUAGES

    .LANGUAGES

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

    ECCO Manual - 55/282 -1.02 English

    SSyynnttaaxx::.LANGUAGES [, [,]]

    FFiieellddss::

    Language descriptor for the first language. Optional:Language descriptor for the second language. Optional:Language descriptor for the third language.Each language descriptor consists of precisely three letters.

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

    EExxaammppllee::

    .LANGUAGES GER, ENG ; German and English

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    56/282

  • 8/6/2019 Ecco Manual 1.02 e

    57/282

  • 8/6/2019 Ecco Manual 1.02 e

    58/282

  • 8/6/2019 Ecco Manual 1.02 e

    59/282

  • 8/6/2019 Ecco Manual 1.02 e

    60/282

  • 8/6/2019 Ecco Manual 1.02 e

    61/282

  • 8/6/2019 Ecco Manual 1.02 e

    62/282

  • 8/6/2019 Ecco Manual 1.02 e

    63/282

  • 8/6/2019 Ecco Manual 1.02 e

    64/282

    Horsch Elektronik AG .PROFIBUS_DEF / .MASTER / .END_PROFIBUS_DEF

    Descriptor of the connected slave. The descriptor should betaken from the slaves documentation.

    The parameters to the serial interface. The string is constructedcanonically and shown below for completeness.

    field has the following format:, , ,

    The fields have the following meanings and possible values: Baud rate. Possible values are 1200, 2400, 4800, 9600 and

    19200 baud. Defines whether a parity check should be performed. Valid

    values are e for even, u for uneven and n for no parity check. Number of data bits per word. Valid values are 7 and 8 data

    bits. 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 takenfrom the slaves documentation.

    The descriptors for currently are VI, PAGO, MARKER, BARCODE, ELV andSTANDARD. The list may be expanded when new slaves are supported.

    ECCO Manual - 64/282 -1.02 English

    CCoommmmeennttss::

    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 thesettings from SyCon match.At least one INPUTS or OUTPUTS block must be entered for each I/O-element. Theymust be in the same sequence as in the SyCon file. Individual elements areexplained in more detail in the relevant documentation.

    EExxaammppllee::

    .PROFIBUS_DEF 1, HILSCHER

    FILE project.pb

    ID_IO 5, Beckhoff Slave 1INPUTS

    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.:

  • 8/6/2019 Ecco Manual 1.02 e

    65/282

  • 8/6/2019 Ecco Manual 1.02 e

    66/282

  • 8/6/2019 Ecco Manual 1.02 e

    67/282

  • 8/6/2019 Ecco Manual 1.02 e

    68/282

  • 8/6/2019 Ecco Manual 1.02 e

    69/282

  • 8/6/2019 Ecco Manual 1.02 e

    70/282

  • 8/6/2019 Ecco Manual 1.02 e

    71/282

  • 8/6/2019 Ecco Manual 1.02 e

    72/282

  • 8/6/2019 Ecco Manual 1.02 e

    73/282

  • 8/6/2019 Ecco Manual 1.02 e

    74/282

  • 8/6/2019 Ecco Manual 1.02 e

    75/282

  • 8/6/2019 Ecco Manual 1.02 e

    76/282

  • 8/6/2019 Ecco Manual 1.02 e

    77/282

  • 8/6/2019 Ecco Manual 1.02 e

    78/282

  • 8/6/2019 Ecco Manual 1.02 e

    79/282

  • 8/6/2019 Ecco Manual 1.02 e

    80/282

  • 8/6/2019 Ecco Manual 1.02 e

    81/282

  • 8/6/2019 Ecco Manual 1.02 e

    82/282

  • 8/6/2019 Ecco Manual 1.02 e

    83/282

    Horsch Elektronik AG .TINP_TEXT / .END_TINP_TEXT

    .TINP_TEXT / .END_TINP_TEXT

    Defines the parameter transfer for the TINP command.

    ECCO Manual - 83/282 -1.02 English

    SSyynnttaaxx::.TINP_TEXT

    TIMEOUT

    CONDITION

    IO_TEXT

    REGISTER

    .END_TINP_TEXT

    FFiieellddss::

    Is initialized by operating system with the text TIMEOUT AT

    LINE: #6.0.0#?. If the TINP command goes into a timeout, the operating system

    writes the first unsatisfied condition into this register. If the TINP command goes into a timeout, the operating system

    writes the .IO_TEXT of the first unsatisfied condition into thisregister in the selected language.

    RW type register in which the operating system writes the line in

    which the TINP command went into a timeout.

    CCoommmmeennttss::

    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, had to be a register of type RV; in ECCO, it must now be an RW register.

    EExxaammppllee::

    The command is used canonically as follows:

    .ADDRESS 0NULL:

    .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.:

  • 8/6/2019 Ecco Manual 1.02 e

    84/282

  • 8/6/2019 Ecco Manual 1.02 e

    85/282

  • 8/6/2019 Ecco Manual 1.02 e

    86/282

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

    .ZPOINT / ANLAGE / RACK / .END_ZPOINT

    Defines various parameters for communication with the ZPoint software.

    SSyynnttaaxx::.ZPOINT []

    ANLAGE ,

    [RACK , ]

    GS , , , ,

    , , ,

    M ., , ,

    , , ,

    PRM .., ,

    EW .., ,

    VAL .., , ,

    .END_ZPOINT

    ECCO Manual - 86/282 -1.02 English

    FFiieellddss::

    Three-letter label for the language. Each language defined in.LANGUAGES must have its own ZPoint block. If only onelanguage is defined, this is optional. If no language is definedand the .LANGUAGES instruction is missing, German is used as

    the default. Name of the machine for the ZPoint software as a string in the

    relevant language, up to 40 characters long. Number of systems in the machine. The limits depend on the

    ZPoint version. Data block number of the gateway coupler. Up to 64 different

    blocks can be used. Identification of the gateway if several gateways are used. Number for the system described. Value between 1 and

    .

    Number up to 56 of the modules in this basic system. Base register number for the user set values register block. Base flag number for the reserved flag block. Statistics group for production data. A number between 0 and

    20 where 0 means no statistics. Name of the basic system in the relevant language up to 40

    characters long. Module number between 0 and of the basic

    system. In PRM, EW and VAL inputs, 0 means the system andthe other numbers indicate an actual module.

    Name of the module in the relevant language of up to 40 chars.

    10/26/05 Ver.:

  • 8/6/2019 Ecco Manual 1.02 e

    87/282

  • 8/6/2019 Ecco Manual 1.02 e

    88/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