452
Руководство пользователя по программированию ПЛК в CoDeSys 2.3

Руководство пользователя по программированию ПЛК в CoDeSys 2.4

Embed Size (px)

Citation preview

  • CoDeSys 2.3

  • CoDeSys V2.3 1-2

    Copyright 1994, 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 3S - Smart Software Solutions GmbH All rights reserved. Copyright 2003, 2004, 2005, 2006, 2007, 2008 ( ) . . - . Trademark Intel is a registered trademark and 80286, 80386, 80486, Pentium are trademarks of Intel Corporation. Microsoft, MS and MS-DOS are registered trademarks, Windows is a trademark of Microsoft Corporation. : 3S - Smart Software Solutions GmbH Memminger Strae 151 D-87439 Kempten .: +49 831 5 40 31 - 0 : +49 831 5 40 31 50 www.3s-software.com : 21400, , . , . , 9 .: +7 4812 38-29-31 ./: +7 4812 65-81-71 www.prolog-plc.ru CoDeSys V2.3 -. . 10.09.2008 RU 2.8, CoDeSys V2.3.9.x

    http://www.3s-software.comhttp://www.prolog-plc.ru

  • CoDeSys V2.3 1-3

    1 CODESYS ...........................................................................................1-1

    1.1 CoDeSys....................................................................................................................................................... 1-1

    1.2 CoDeSys.................................................................................................................... 1-1

    1.3 CoDeSys............................................................. 1-3

    2 CODESYS ..............................................................................................................2-1

    2.1 ................................................................................................................................................... 2-1

    2.2 ....................................................................................................................................... 2-8 (IL)..................................................................................................................................................... 2-9 IL..................................................................................................................................... 2-9 (ST).................................................................................................................................... 2-10 (SFC) ...................................................................................... 2-17 (FBD)............................................................................................... 2-22 (CFC) ....................................................................................................... 2-23 (LD).................................................................................................................................... 2-23

    2.3 .................................................................................................................................... 2-25

    3 ..............................................................................................................3-1

    3.1 ............................................................................................................................... 3-1

    3.2 ............................................................................................................................................ 3-11

    4 CODESYS ..............................................................4-1

    4.1 .................................................................................................................................................................. 4-1

    4.2 ............................................................................................................................................................... 4-3

    4.3 ............................................................................................................................................... 4-19

    4.4 .......................................................................................................................... 4-50

    4.5 ................................................................................................................ 4-57

    4.6 .................................................................................................................................. 4-64

    4.7 .......................................................................................................................................................... 4-80

    4.8 ........................................................................................................................................................................... 4-80

    5 CODESYS .....................................................................................................................5-1

    5.1 ................................................................................................................................. 5-1

    5.2 .............................................................................................................................. 5-3 .................................................................................................................................. 5-3 ............................................................................................... 5-11

  • CoDeSys V2.3 1-4

    ................................................................................................................................................ 5-11

    5.3 .............................................................................................................................................. 5-20 ................................................................................................................................. 5-20 IL............................................................................................................................................................ 5-24 ST.......................................................................................................................................................... 5-24

    5.4 ......................................................................................................................................... 5-25 ............................................................................................................................ 5-25 FBD ................................................................................................................................................................... 5-30 LD ...................................................................................................................................................................... 5-36 SFC ................................................................................................................................................................... 5-43 CFC ................................................................................................................................................................... 5-52

    6 ............................................................................................................................................6-1

    6.1 ............................................................................................................................................................. 6-1

    6.2 , ............................................... 6-2 ................................................................................................................................................ 6-3 ................................................................................................................................ 6-7 ................................................................................................................................ 6-8

    6.3 (Alarm Configuration)..................................................................................................... 6-9 ..................................................................................................................................................................................... 6-9 ....................................................................................................................... 6-10 ................................................................................................................................................................... 6-11 ................................................................................................................................................................... 6-15 .................................................................................................................................................................... 6-16 '' (Extras): '' (Settings)........................................................................................................... 6-18

    6.4 (Library Manager)............................................................................................................ 6-18

    6.5 (Log) ....................................................................................................................................................... 6-20

    6.6 (PLC Configuration)............................................................................................................ 6-23 ................................................................................................................................................................................... 6-23 ................................................................................................................. 6-25 ..................................................................................................................... 6-26 ..................................................................................................... 6-27 /..................................................................................................................... 6-28 .................................................................................................................................................... 6-31 Profibus ....................................................................................................................... 6-32 CANopen- .................................................................................................................... 6-39 CANopen- (CANopen Slave)........................................................... 6-45 DeviceNet.................................................................................................................... 6-49 ...................................................................................................................... 6-54 / / ................................................................................ 6-54

    6.7 (Task Configuration)........................................................................................................ 6-56 ................................................................................................................................................................................... 6-56 ................................................................................................................................... 6-57 ....................................................................................................................................................... 6-59 .................................................................................................................... 6-60

    6.8 (Watch and Recipe Manager) ..................................................................................... 6-62 ................................................................................................................................................................................... 6-62 .............................................................................................................. 6-62 ................................................................................................................. 6-64

    6.9 (Sampling Trace) ........................................................................................................ 6-65

  • CoDeSys V2.3 1-5

    ................................................................................................................................................................................... 6-65 .......................................................................................................................................... 6-66 ........................................................................................................................ 6-67 ..................................................................................................................................................... 6-68 ('Extras' 'Save trace values') ................................................... 6-70 ('Extras' 'External Trace Configurations')................ 6-70

    6.10 (Workspace) ............................................................................................................................ 6-71

    6.11 (Parameter Manager) ................................................................................................ 6-71 .................................................................................................................................................... 6-71 . ............................................................................................................... 6-73 ................................................................................................................ 6-74 ............................................................................................................................ 6-76 ......................................................................................................................... 6-78 ................................................................................................................ 6-79 / ...................................................................................................................... 6-80

    6.12 (Target Settings)..................................................................................... 6-80

    6.13 - (PLC-Browser)................................................................................................................................. 6-82 .............................................................................................................................................................. 6-82 - ...................................................................................................................................... 6-82 -............................................................................................................... 6-84 -............................................................................................................. 6-85

    6.14 (Tools)............................................................................................................................................... 6-86 (Object Properties)....................................................................................... 6-86 ............................................................................................................................... 6-89 ...................................................................................................... 6-90

    7 ENI........................................................................................................................................................7-1

    7.1 ENI?................................................................................................................................................................ 7-1

    7.2 ENI ............................................................................................. 7-1

    7.3 ENI CoDeSys ............................................................................................. 7-2

    7.4 ................................................................................................... 7-2

    8 DDE ...............................................................................................................................8-1

    8.1 DDE CoDeSys.......................................................................................................................................... 8-1

    8.2 DDE GatewayDDE Server ................................................................................................. 8-2

    9 CODESYS....................................................................................9-1

    9.1 ................................................................................................................................................................................. 9-1

    9.2 CoDeSys..................................................................................... 9-1

    10 ...............................................................................................................................10-1

    A: ...............................................................................10-1

    10.1 .............................................................................................................................. 10-1

  • CoDeSys V2.3 1-6

    10.2 ............................................................................................................................................... 10-4

    10.3 ................................................................................................................................................... 10-6

    10.4 ............................................................................................................................................... 10-8

    10.5 .........................................................................................................................................10-10

    10.6 ...........................................................................................................................................10-13

    10.7 ..............................................................................................................................10-14

    10.8 ...................................................................................................................................................10-15

    10.9 ..........................................................................................................................10-15

    10.10 ................................................................................................................................10-22

    : CODESYS .......................................................................................10-27

    ...........................................................................................................................................................................10-27

    .......................................................................................................................................................................10-29

    ..................................................................................................................................................................................10-31

    ........................................................................................................................................10-32

    : CODESYS ....................................................................................10-33

    .....................................................................................................................................10-33

    .............................................................................................................................10-34

    D: CODESYS .......................................................................................10-42

    Standard.lib ....................................................................................................................10-42 ......................................................................................................................................................10-42 ..............................................................................................................................................................10-45 ..................................................................................................................................................10-47 ...........................................................................................................................................................................10-49 ...........................................................................................................................................................................10-51

    UTIL.LIB ......................................................................................................................................................10-53 BCD ...................................................................................................................................................10-53 / ..........................................................................................................................................................10-54 .........................................................................................................10-55 ......................................................................................................................................................................10-57 ...................................................................................................................................................10-60 ..................................................................................................................10-62 ...........................................................................................................................................10-63

    AnalyzationNew.lib .................................................................................................................................10-64

    CoDeSys ............................................................................................................................10-65

    E: 10-66

    CoDeSys:.....................................................................................................................................................10-66

  • CoDeSys V2.3 1-7

    Standard.lib: ............................................................................................................................................10-68

    Util.lib:........................................................................................................................................................10-68

    F: / ......................................................10-70

    ...........................................................................................................................................................10-70

    (cmdfile) ..........................................................................................................................................10-71

    G: . .................................................................................................10-79

    SEQ ....................................................................................................................10-79

    S5 .....................................................................................................................................10-80

    S5 C 61131-3......................................................................................................10-80

    H: ..................................................................................10-84

    (Target Platform)...............................................................................10-84 Intel 386 ..................................................................................................................................................10-84 Motorola 68K ....................................................................................................................................................................10-85 Infineon C16x ...................................................................................................................................................................10-86 ARM Power PC ............................................................................................................................................................10-87 MIPS...................................................................................................................................................................................10-88 'Hitachi SH'........................................................................................................................................................................10-89 8051 ........................................................................................................................................................10-90 Infineon 'TriCore .............................................................................................................................................................10-90

    (Memory Layout)................................................................................................10-91

    (General)............................................................................................................................10-92

    ..................................................................................................10-94

    ...............................................................................................................................10-95

    I: .........................................................................10-98

    J: ............................................................10-101

    ..........................................................................................................................10-101

    ................................................................................................................................10-101

    (DUT) .........................................................................................10-103

    , (POU) ..........................................10-103

    .............................................................................................................................10-104

    K: .............................................10-105

    ............................................................................................................................................................10-106

    ...............................................................................................................................................................................10-112

  • 1 CoDeSys

    1.1 CoDeSys

    CoDeSys - (CoDeSys Controllers Development System).

    CoDeSys - 61131-3. - , - (, Visual C++).

    1.2 CoDeSys

    ?

    , .

    (POU Program Organization Unit) PLC_PRG. ( main ), (, ).

    PLC_PRG, - (Task Configuration). - , .

    POU, , .

    (Object Organizer) .

    ?

    .

    , .

    .

    , , .

    ?

    , .

    (simulation) . .

    (PLC Configuration) . , - . , - . (,

  • CoDeSys

    CoDeSys V2.3 1-2

    Watch and Recipe Manager), , .

    . - , . (single step), .

    , - , , . (Sampling Trace), - .

    , - "". , .

    CoDeSys

    .

    CoDeSys DDE . - , OPC DDE .

    CoDeSys -.

    (Parameter manager) - .

    ENI: - ENI . CoDeSys - , . ENI CoDeSys, .

    CoDeSys . , , .

    CoDeSys , Web. -.

  • CoDeSys

    CoDeSys V2.3 1-3

    1.3 CoDeSys

    - CoDeSys

    CoDeSys ()

    CoDeSys_V23_RU.pdf

    First Steps with CoDeSys RU.pdf

    Gateway Server , , , ( )

    Gateway Manual.pdf

    OPC Server OPC-Server V2.0, OPC_20_How_to_use.pdf

    CoDeSys CoDeSys , CoDeSys HMI, (Target-) Web-

    CoDeSys_Visu_V23_RU.pdf

    SoftMotion SoftMotion SoftMotion_Manual_V23.pdf

    Standard.lib Util.lib - .

    CoDeSys .pdf

    SoftMotion : . SoftMotion-.

    CoDeSys_V23_RU.pdf

    SysLibs_Overview_RU.pdf

    .pdf

    ENI Server ENI , - , .

    ENI CoDeSys: .

    ENI Admin, ENI Control ENI Explorer: . .

    EniServerQuickstart.pdf

    CoDeSys_V23_RU.pdf

  • 2 CoDeSys

    2.1

    : POU, , , , . .

    POU (Program Organization Unit)

    (POU) , . - POU ().

    . POU (IL, ST, FBD, SFC, LD CFC).

    CoDeSys . - standard.lib.

    POU POU, .

    POU, ( , ). - .

    . . . J.

    :

    FUNCTION Fct: INT;

    , -.

    FUNCTION END_FUNCTION. , IL, .

    , IL:

  • , CoDeSys

    CoDeSys V2.3 2-2

    ST .

    SFC .

    : , CoDeSys - . 61131-3, - -. .. - .

    :

    IL: LD 7 Fct 2,4 ST Result

    ST: Result : = Fct (7, 2, 4);

    FBD:

    : RETAIN . !

    : :

    CheckBounds, ( . ).

    : CheckDivByte, CheckDivWord, CheckDivDWord CheckDivReal - 0 (. DIV).

    CheckRangeSigned CheckRangeUnsigned (. ).

    - POU, . .

    FUNCTION_BLOCK - END_FUNCTION_BLOCK. . - J.

    , IL, . MULERG - , VERGL .

    :

  • , CoDeSys

    CoDeSys V2.3 2-3

    . - () . , - ().

    ( -) , , . , - .

    fubinstance FUB:

    fubinstance: FUB;

    . , .

    :

    fb iInl INT:

    PROGRAM prog VAR fbinst1 : fb; END_VAR LD 17 ST fbinst1.iIn1 CAL fbinst1 END_PROGRAM

    . . POU, , .

    .

  • , CoDeSys

    CoDeSys V2.3 2-4

    . -. , , -, .

    RETAIN, - .

    , :

    .

    :

    (IL, ST) - . - ":=", "=>". , - (Input Assistant)() - (With arguments).

    :

    , FBINST - , - xx yy. FBINST ST :

    FBINST1(xx:= , yy=> );

    -:

    , - (VAR_IN_OUT) - . .

    fuboinst iInOut1 VAR_IN_OUT:

    VAR fuboinst: fubo; iVar1: int; END_VAR iVar1 := 2; fuboinst (iInOut1 := iVar1);

    :

    fuboinst (iInOut1:=2); fuboinst .iInOut1:=2;

    FUB:

    ERG, QUAD. FUB INSTANZ.

    IL:

  • , CoDeSys

    CoDeSys V2.3 2-5

    ST ( , ):

    FBD:

    SFC .

    POU, . - . . .

    .

    , , , POU.

    , .

  • , CoDeSys

    CoDeSys V2.3 2-6

    PROGRAM - END_PROGRAM. . J.

    :

    , , (IL, ST) - . ":=", "=>".

    :

    IL:

    CAL PRGexample2 LD PRGexample2.out_var ST erg

    : CAL PRGexample2(in_var:=33, out_var=>erg )

    ST:

    PRGexample2; erg := PRGexample2.out_var;

    : PRGexample2(in_var:=33, out_var=>erg );

    FBD:

    PLC_PRG

    PLC_PRG POU, . - .

    (Project) - - (Object Add), POU - PLC_PRG.

    .

    (Task Configuration), PLC_PRG.

    : POU PLC_PRG ( (Task Configuration) ). PLC_PRG -.

  • , CoDeSys

    CoDeSys V2.3 2-7

    . - POU . , , -.

    , , .

    :

    Counter - "out" "in". Reset 0. "out" .

    :

    :

    . ..

    POU, , - , .

    :

    PROGRAM PLC_PRG VAR Inst : Counter; END_VAR

    IL: CAL Inst.Reset(In : = FALSE) LD Inst.out ST ERG

    ST: Inst.Reset(In := FALSE); Erg := Inst.out;

    FBD:

    SFC ( SFC).

  • , CoDeSys

    CoDeSys V2.3 2-8

    SFC . CoDeSys.

    , :

    , . (Library manager)

    (Log) (Alarm Configuration)

    (PLC Configuration) -

    . (Task Configuration) (Watch and Recipe Manager)

    (Target Settings) (Workspace)

    :

    (Sampling Trace) - - .

    (Parameter Manager) - -

    - (PLC-Browser) - (Tools) , -

    SoftMotion ( ),

    CNC CAM

    , POU, . POU , - .

    "standard.lib" "util.lib" .

    (. (Library manager))

    , . , .

    (. (Data types))

    . .

    , CoDeSys HMI Web ( ) . (. CoDeSys (Visu-alizations))

    2.2 CoDeSys :

  • , CoDeSys

    CoDeSys V2.3 2-9

    Instruction List (IL) - Structured Text (ST)

    :

    Sequential Function Chart (SFC) Function Block Diagram (FBD) Ladder Diagram (LD) -

    , CoDeSys -, Continuous Function Chart (CFC) .

    (IL)

    IL (Instruction list) , - , , .

    , (:). . .

    :

    LD 17 ST lint (* *) GE 5 JMPC next LD idword EQ istruct.sdword STN test next:

    IL

    IL :

    :

    JMP, CAL, RET: , - .

    N JMPC,CALC, RETC: , .

    N : .

    IL :

    -

    LD N

    ST N

    S , -

    R

    AND N, (

    OR N, (

    XOR N, (

    ADD (

    SUB (

    MUL (

  • , CoDeSys

    CoDeSys V2.3 2-10

    DTV (

    GT ( >

    GE ( >=

    QE ( =

    NE ( < >

    LE (

  • , CoDeSys

    CoDeSys V2.3 2-11

    , .

    . , , .

    . , .., .

    .

    ST , .

    () .

    ( )

    EXPT

    -

    NOT

    *

    /

    MOD

    +

    -

    < , > ,=

    < >

    =

    AND

    .

    XOR

    OR

    ST:

    A := B; CV := CV+1; C := SIN (X);

    FB

    A := CMD_TMR.Q

    RETURN RETURN;

  • , CoDeSys

    CoDeSys V2.3 2-12

    IF

    D := B*B; IF D

  • , CoDeSys

    CoDeSys V2.3 2-13

    RETURN

    RETURN POU, , .

    IF

    IF, , - .

    :

    IF THEN

    {ELSIF THEN . . .ELSIF THEN ELSE } END_IF;

    .

    < , .

    , - . , ELSIF ELSE.

    , , ELSE.

    :

    IF temp < 17 THEN heating_on := TRUE; ELSE heating_on := FALSE; END_IF

    (heating) , 17 , .

  • , CoDeSys

    CoDeSys V2.3 2-14

    CASE

    C CASE - .

    :

    CASE OF : : : :

    ... :

    ELSE END_CASE;

    CASE :

    ,

    , .

    , .

    , - , .

    :

    CASE INT1 OF 1, 5: BOOL1 := TRUE;

    BOOL3 := FALSE; 2: OL2 := FALSE;

    BOOL3 := TRUE; 10. 20: BOOL1:= TRUE;

    BOOL3 := TRUE; ELSE

    BOOL1 := NOT BOOL1; BOOL2 := BOOL1 OR BOOL2;

    END_CASE

    FOR

    FOR .

    :

    INT_Var :INT; FOR := TO {BY } DO END_FOR

    , , .

    , . - , , .

  • , CoDeSys

    CoDeSys V2.3 2-15

    , , , .

    . 1.

    :

    FOR Counter: =1 TO 5 BY 1 DO Var1 := Var1*2; END_FOR; Erg:=Var1;

    , Var1 1. 32.

    : : . , SINT 127, .

    WHILE

    WHILE , FOR, , . , , -.

    :

    WHILE END_WHILE

    , TRUE. FALSE , - . FALSE, .

    : , . - . , - .

    :

    WHILE counter0 DO Var1 := Var1*2; ounter := ounter-1;

    END_WHILE

    REPEAT

    REPEAT WHILE , -, 1 . , .

    :

    REPEAT UNTIL END_REPEAT

    , TRUE. TRUE ,

  • , CoDeSys

    CoDeSys V2.3 2-16

    . TRUE, .

    : , . - . , - .

    EXIT

    EXIT FOR, WHILE, REPEAT, - .

  • , CoDeSys

    CoDeSys V2.3 2-17

    (SFC)

    SFC , . (), - .

    SFC :

    SFC POU , . 2 :

    ( SFC) . ( ) , .

    ( SFC) -. .

    IL ST, FBD LD, - SFC.

    . - , . - / (Extras Zoom Action/Transition). , - .

    , POU. . (Project Add Ac-tion). 9 .

  • , CoDeSys

    CoDeSys V2.3 2-18

    .

    , . , , "" , - "" .

    . - , -.

    :

    /

    . , , -. , , ST (.. (i

  • , CoDeSys

    CoDeSys V2.3 2-19

    , ; S (-) ..

    .x, , - (. ).

    , , , . , , , .

    :

    , . - .

    : , . , - (. ).

    , .

    , "Extras" "Use IEC-Steps" Iecsfc.lib.

    SFC POUs, -. ("Project" "Add Action").

    SFC POU :

    :

    N

    R

    S

    L ,

    D -,

    P ,

    SD

    DS ,

  • , CoDeSys

    CoDeSys V2.3 2-20

    ,

    SL -

    .

    L, D, SD, DS, SL ( L T#5s) TIME ( L t_var).

    : . - P!

    SFC

    SFC , , . - . iecsfc.lib ( SFCStepType SFCActionType), . - SFC CoDeSys.

    :

    : .x ._x. .x . ._x . .x=TRUE, . ._x=TRUE .x=FALSE, . ._x .x .

    _. , , , .

    : .x , . ( ._x - ).

    (TIME):

    , . .

    .t (.t ).

    _time. , "_timeStep1: TIME;"

    .

    SFC. , . : boolvar1:=sfc1.step1.x; step1.x - - , step1 POU sfc1.

    SFC

    SFC . POU. .

  • , CoDeSys

    CoDeSys V2.3 2-21

    : SFC POU , , (. ), , "SFCError" (SFCError TRUE ).

    -:

    SFCEnableLimit: BOOL. , SFCError. .

    SFCInit: BOOL. , - Init SFC . Init , -, . SFCInit , - .

    SFCReset: BOOL. SFCInit. - Init. SFCReset Init.

    : 2.3.7.0, SFCReset , - , .

    SFCQuitError: BOOL. SFC , . , SFCError .

    SFCPause: BOOL. SFC , - .

    SFCError: , . , , - SFCError . : SFCErrorStep, SFCErrorPOU, SFCQuitError, SFCErrorAnalyzation.

    SFCTrans: BOOL. , .

    SFCErrorStep: STRING. , - ( ).

    SFCErrorPOU: STRING. , ( ).

    SFCCurrentStep: STRING. . , - SFC .

    SFCErrorAnalyzationTable: ARRAY [0..n] OF ExpressionResult - p . , - FALSE , , , , .

    16 (), 0 15.

    ExpressionResult Ana-lyzationNew.lib. POU, - SFC.

    . . - SFCError (. ).

  • , CoDeSys

    CoDeSys V2.3 2-22

    SFCTip, SFCTipMode: BOOL SFC. SFCTipMode=TRUE, SFCTip, TRUE. SFCTip FALSE, , .

    : (. ).

    SFC . - . . ( ), ( ) (jump). , , -, .

    , , -.

    SFC .

    . . ( ) ( ) (jump).

    , - , . . , , , - .

    (Jump)

    - , jump. , .

    (FBD)

    FBD . , , , .

    FBD CoDeSys:

    FBD 0.

  • , CoDeSys

    CoDeSys V2.3 2-23

    (CFC)

    FBD , - , , .

    CFC:

    CFC 0.

    (LD)

    - () , .

    LD , - FBD. , LD POU.

    LD .

    - . - , , .

    , "ON" "OFF", . . , . ("OFF").

    LD :

    (. " CoDeSys")

    "ON" "OFF". . . , .

  • , CoDeSys

    CoDeSys V2.3 2-24

    , "ON", "ON".

    , , "ON", -, "ON". - .

    . |/| "ON", .

    (), (). . - .

    (ON), (OFF). (/).

    ( - %QX3.0). (- (/)), -.

    LD

    , LD . , .

    SET RESET

    SET RESET. SET - "S" (S). , ( R) .

    RESET R. - , ( S) .

    LD FBD

    , LD POU.

    -, , . , LD.

    POU , , , - , EN. EN , POU -, EN=. POU , EN . POU LD FBD .

    LD EN POU:

  • , CoDeSys

    CoDeSys V2.3 2-25

    2.3

    (Sampling Trace)

    (Sampling Trace) -, , , - . 20 - . 500 .

    CoDeSys , . (Debugging) (Project Options) (Build).

    , , - . - . , FBD LD - SFC - .

    : CoDeSys SP 32 Bit Full -, .

  • , CoDeSys

    CoDeSys V2.3 2-26

    :

    IL: CAL, LD or JMP.

    ST: .

    FBD, LD: .

    SFC: .

    .

    (Single Cycle) - .

    .

    , ( ) (- ).

    . - , , - , (Write Variable).

    CoDeSys . -, (watch and Recipe manager) . .

    , , . - .

    , - :

    anarray[1] = 5 anarray[i] = 1

    , - ( [i + j] [I*2]).

    : , - : " "(Too many monitoring variables).

  • , CoDeSys

    CoDeSys V2.3 2-27

    :

    , , - CoDeSys. , , .

    : .

    (Log)

    (Log) , , . - .

  • 3

    3.1 -. - - , . -, . - , : -. .

    , - 61131-3, CoDeSys CoDeSys.

    POU

    : CoDeSys ("File" "New").

    POU. PLC_PRG. . POU, , - . . POU Continuous Function Chart (CFC).

    . - ("Pro-ject" "Object Add") ( ) . : Sequential Function Chart (SFC) SEQUENCE, Function Block Diagram (FBD) TRAFFICSIGNAL - WAIT, (IL).

    TRAFFICSIGNAL?

    POU TRAFFICSIGNAL . , - , - ..

    WAIT?

    WAIT , .

    SEQUENCE?

    SEQUENCE , .

    PL_PRG?

    PLC_PRG , ' .

    "TRAFFICSIGNAL"

    POU TRAFFICSIGNAL. - ( VAR_INPUT END_VAR) STATUS INT. STATUS , - , -, - .

  • CoDeSys V2.3 3-2

    TRAFFICSIGNAL , RED, YELLOW GREEN. TRAFFICSIGNAL :

    TRAFFICSIGNAL, :

    "TRAFFICSIGNAL"

    , STATUS . POU (body). ( 1). . ("Insert" "Box").

    AND :

    AND EQ.

    STATUS. - 1. - :

    EQ. EQ. - ("Insert" "Assign").

    ??? GREEN. :

    STATUS 1, GREEN. , GREEN -, STATUS 1.

    TRAFFICSIGNAL . () ("Insert" "Network (after)"). POU - :

  • CoDeSys V2.3 3-3

    TRAFFICSIGNAL:

    , , ( ). ("Insert" "Box").

    POU . , TRAFFICSIGNAL - , STATUS.

    standard.lib

    POU WAIT POU . , - ("Window" "Library Man-ager"). ("Insert" "Additional library"). - . standard.lib .

    "WAIT"

    POU WAIT. , POU , - TRAFFICSIGNAL. POU TIME TIME (Boolean) , OK. TRUE, .

  • CoDeSys V2.3 3-4

    FALSE ( ) ":= FALSE ".

    POU TP. (IN, PT) (Q, ET). TP :

    IN FALSE, ET 0 Q FALSE. IN TRUE, ET . ET PT, . Q TRUE, ET PT. ET PT, Q FALSE.

    POU .

    TP POU WAIT, . ZAB ( ) TP ( VAR, END_VAR).

    WAIT :

    "WAIT"

    :

    , Q TRUE (, ), ZAB, ZAB - - , .

    IN ZAB FALSE ET 0 Q FALSE. , . -

  • CoDeSys V2.3 3-5

    TIME PT ZAB IN:=TRUE. ZAB , TIME Q FALSE.

    Q OK WAIT. Q FALSE, OK TRUE.

    . WAIT TRAFFICSIGNAL PLC_PRG.

    "SEQUENCE" 1

    . START BOOL, - TRAFFICSIGNAL1 TRAFFICSIGNAL2 INT WAIT (DELAY , ). SEQUENCE :

    SEQUENCE 1, :

    SFC

    SFC "Init" "Trans0" Init, -, .

    , . TRAFFICSIGNAL. , Trans0 - - ()("Insert" "Step transition (after)"). .

    -. Init "START", "DELAY.OK".

    , START TRUE, - DELAY OK TRUE, .. .

    ( ) Switch1, Green2, Switch2, Green1, Init, , . "Switch" , Green1 TRAFFICSIGNAL1 ,

  • CoDeSys V2.3 3-6

    Green2 TRAFFICSIGNAL2 . , Init Switch1. , :

    SEQUENCE 1, :

    . - , . - IL ( ).

    Init , START . , . , TRAFFICSIGNAL1 TRAFFICSIGNAL2 5.

    Init:

  • CoDeSys V2.3 3-7

    Green1 TRAFFICSIGNAL1 (STATUS:=1), TRAFFICSIGNAL2 (STATUS:=3), 5000 .

    Green1:

    Switch1 TRAFFICSIGNAL1 2 () , , TRAFFICSIGNAL2 4 (-). , 2000 . - :

    Switch1:

    Green2 TRAFFICSIGNAL1 (STATUS:=3) TRAFFICSIGNAL2 (STATUS:=1). 5000 .

    Green2:

    Switch2 STATUS TRAFFICSIGNAL1 4 (-), , TRAFFICSIGNAL2 2 (). 2000 .

  • CoDeSys V2.3 3-8

    Switch2:

    .

    , :

    POU PLC_PRG. PLC_PRG. AND SEQUENCE. .

    ( - 'Project' 'Build') . : "0 Errors, 0 Warnings".

    (Online 'Simulation mode') - '' (Online 'Login'). '' (Online 'Run').

    SEQUENCE. , , START TRUE. PLC_PRG, - . . - TRUE. ('' Online 'Write values'). - . .

    '' - (Online 'Logout').

    "SEQUENCE"

    . . , TRAFFICSIGNAL .

    COUNTER INT. SEQUENCE.

    Switch1 . - . - . (jump) Init.

    : "Count" "Off". ( ) EXIT, TRUE DELAY.OK. , .

  • CoDeSys V2.3 3-9

    "SEQUENCE", :

    .

    Count - COUNTER 1:

    Count:

    EXIT1 , 7:

    EXIT:

    Off 5 ( ), COUNTER 0 10 .

  • CoDeSys V2.3 3-10

    Off:

    TRAFFICSIGNAL. - , . , .

    PLC_PRG

    SEQUENCE. . - PLC_PRG. IN - (2 ) - SEQUENCE. Boolean , - IEC .

    - LIGHT1 LIGHT2 TRAFFICSIGNAL - .

    LIGHT1 LIGHT2:

    6 Boolean. PLC_PRG, - (Global Variables) (Resources). IN, START SEQUENCE TRUE, . (Resources) (Global Variables).

    :

    PLC_PRG. . (CFC), , , -.

  • CoDeSys V2.3 3-11

    (Box). AND SEQUENCE. SEQUENCE .

    TRAFFICSIGNAL. TRAFFICSIGNAL - - , , , , LIGHT1 LIGHT2.

    Input, IN Output, : L1_green, L1_yellow, L1_red, L2_green, L2_yellow, L2_red.

    , . / ( ) -/ .

    , .

    PLC_PRG:

    .

    TRAFFICSIGNAL

    . , CoDeSys.

    3.2 . 8. , .

    , (Visualizations) - . - ('Project' 'Object Add').

    :

  • CoDeSys V2.3 3-12

    , Lights. Ok, , .

    :

    ('Insert' 'Ellipse') 2 . , , .

    . .

    (Variables) . (Change color) .L1_red. (Input As-sistant) ( ). L1_red - .

    (Colors). (Color) (Inside) , , . (Inside) (Alarm Color) .

    , , , - .

    , .

  • CoDeSys V2.3 3-13

    .

    ('Edit' 'Copy') (+) ('Edit' 'Paste') (+). . . , - . - . . (Change Color) (Variables) - :

    : .L1_yellow : .L1_green

    (Colors) (Alarm color) - ( ).

    .

    (Insert Rectangle) - , . - (Extras Send to back), . .

    , Online Simulation mode( , -).

    (Online Login) (Online Run) , .

    .

    . , (Edit Copy) (Edit Paste). , - (, .L1_red .L2_red), .

    ON.

    , , .ON . (Change Color) (Variables). (Content) - (Text) ON.

  • CoDeSys V2.3 3-14

    ON , (Toggle variable) (Input) .ON. / .

    , . - . (Change Color).

    .

    . (Colors) (frame) . - Contents ( - Text) Light1 Light2.

    Traffic Signal:

  • 4 CoDeSys

    4.1

    CoDeSys:

    CoDeSys ( ):

    . . . , POU, (Data types),

    (Visualizations) (Resources). CoDeSys. , . . , .

    , .

    . CoDeSys.

    .

  • CoDeSys

    CoDeSys V2.3 4-2

    - .

    , . , .

    CoDeSys. .

    (. ('Project' 'Options') (Desktop))

    CoDeSys.

    POUs, (Data types),

    (Visualizations) (Resources). . .

    :

    .

    . CoDeSys - : , - POU, . , .

    . - , , .

    .

    CoDeSys. , - . .

    .

    . - , .

  • CoDeSys

    CoDeSys V2.3 4-3

    -, .

    (Edit Next error) - (Edit Previous error) .

    (Win-dow Messages).

    CoDeSys .

    .

    , -. .

    , : SIM , RUN , BP- -, FORCE .

    , - (, Line:5, Col.:11). OV . - .

    X Y, . - - , . - (, ).

    , .

    (. ('Project' 'Options') - - Desktop)

    : +

    , - . , , - .

    4.2 CoDeSys (Project Options) . . , .

    (Workspace) - (Resources).

    CoDeSys.ini CoDeSys.

    : . CoDeSys.ini

    . -

  • CoDeSys

    CoDeSys V2.3 4-4

    CoDeSys.ini

    (Load & Save) X

    (User information) X

    (Editor) X

    (Desktop) X

    (Colors) X

    (Directories) . Common . Project (Log) X

    (Build) X (Passwords) X (Source download) X

    (Symbol configuration) X

    (Database-connection) X (Macros) X

    (Load&Save)

    (Load&Save):

    (Create Backup) CoDeSys - .bak . .asd (. ) . .

    (AutoSave) CoDeSys .asd, . - , (Auto Save Interval). CoDeSys . - (, - ), . - :

  • CoDeSys

    CoDeSys V2.3 4-5

    " " (Open auto save file) - .

    , .asl.

    (Auto save before compile) - .

    (Ask for project info), - - . (Project Project info).

    (Auto Load) CoDeSys. , CoDeSys - , .

    (Remind of boot project on exit): - , , - : " . ?" (No boot project created since last download. Exit anyway?).

    ENI (Save ENI credentials): (Login) ENI .

    (User information)

    (User information):

  • CoDeSys

    CoDeSys V2.3 4-6

    (Name) (Initials), (Company). . , .

    (Editor).

    (Editor):

    (Autodeclaration): .

    (Autoformat): CoDeSys IL . :

    1. . 2. .

    (List components): (Intellisense). : , -. . - , . Intellisense , , .

    (Declarations as tables): . , , - (in_out). : (Name), (Address), (Type), (Initial) (Commment).

    (Tab-Width) . - 4 . .

    (Font) . -, - CoDeSys.

  • CoDeSys

    CoDeSys V2.3 4-7

    :

    (Mark) , . (Dotted line), - , (Line), -, (Filled) .

    (Bitvalues) ( ) - (BYTE, WODR DWORD): (Bi-nary), (Hexadecimal) (Decimal).

    (, , VAR_IN_OUT) - Suppress monitor-ing of complex types (Array, Pointer, VAR_IN_OUT): , -, , VAR_IN_OUT -.

    POU (Show POU symbols): , - . bmp . : TON TON.bmp. :

  • CoDeSys

    CoDeSys V2.3 4-8

    (DeskTop)

    (DeskTop):

    (Tool bar) ( ).

    (Status bar) .

    (Online in Security mode) (Run), (Stop), (Reset), - (Toggle Breakpoint), (Single cycle), (Write values), (Force values). , , .

    (Query communication parameters before login): (Online Login) - . OK.

    (Do not save communication parameters in project): ( Online Communi-cation Parameters) .

    (Show print area margins): , .

    F4 (F4 ignores warnings): F4 - , -.

    MDI (MDI representation): MDI CoDeSys, . SDI .

    (Communications timeout [ms]): - . , , . : 1-10000000 .

  • CoDeSys

    CoDeSys V2.3 4-9

    (Communications timeout for download [ms]): - ( , , - ): , -, (Download Wait Time). : 1-10000000 .

    XML (XML-Encoding): XML . "ISO 8859-1". ENI, Message Interface COM Automation Interface, - CoDeSys XML. Licensing Manager.

    (Language): , .

    : Windows 98!

    (Colors)

    (Colors):

    CoDeSys. - (Line numbers), (Current position), (Breakpoint positions), (Set breakpoint), (Reached Positions), (Monitoring of Bool). - :

    - - - . - - Bool

    .

  • CoDeSys

    CoDeSys V2.3 4-10

    :

    (Directories)

    (Directories):

    , (Libraries), (Configurations files) (Visualisation files). , (Compile files) (, map- list-) , (Upload files).

    , , . , ;.

    : , . . , ".\libs" 'C:\programs\projects\libs', 'C:\programs\projects'.

    : , "_" .

  • CoDeSys

    CoDeSys V2.3 4-11

    , (Project), . , (General), ini CoDeSys .

    (Target) - , ( .TNF). , ( ).

    CoDeSys (Project), (Target) (Common). , , .

    (Log)

    (Log):

    (*.log ), - , CoDeSys .

    (Activate logging) .

    , . , , (Directory for project logs) . - , .

    .log. , , (Oline sessions). . , .

    (Filter) , : - , , . , , (. ).

    (Window Log).

  • CoDeSys

    CoDeSys V2.3 4-12

    (Build)

    (Build):

    (Debugging) -. - (, ). . . .

    (Replace constant) ( -, ) . - . , . , (, , ).

    (Nested comments) -. :

    (* a := inst.out; (* *) b := b+1; *)

    : . , , -, .

    (Create binary file of application): , ( ). .bin.

    (Actions hide programs): . : , , : , , .

    : , , . : , , , .

  • CoDeSys

    CoDeSys V2.3 4-13

    LREAL REAL (Treat LREAL as REAL): REAL LREAL . , - . .

    (Number of Data segments) , - . . (Out of global data memory...), .

    (Exclude objects) (Exclude objects from build). (POU), , Exclude. POU . , (Ex-clude unused). , , - ('Exclude from build') .

    (Compiler Version): . - V2.3.3 (, -, ) CoDeSys, , - . , (Use latest), - . - . , -, . , - (Fix).

    , , -:

    (Macro before compile): (Macro after compile):

    , : - (file new), - (file open), - (file close), (file save as), - (file exit), , (project compile), - (project check), - - (project build).

    (Check automatically) :

    (Unused variables) (Overlapping memory areas) (Concurrent access) (Multiple write access on output)

    . ('Check') ('Project').

    , - .

    , , .

  • CoDeSys

    CoDeSys V2.3 4-14

    (Passwords).

    (Passwords):

    .

    (Password). (Confirm Password). Ok. "The password does not agree with the confirmation"( ), , , . .

    , , - . , . "The password is not correct"( ).

    . (Write Protection Password) .

    , , . , CoDeSys , Cancel. -, , , .

    .

    .

    (. - (File Save as)). , .

  • CoDeSys

    CoDeSys V2.3 4-15

    (Source download)

    (Source Download):

    (Extent) , .

    (Sourcecode only) . (All files), , , -, ..

    (Timing) . - (Inplicit at load) "" "-" ("Online" "Download"). " " (Notice at load) - . " " (Only on demand) , "" " " ("Online" "Sourcecode download").

    , , , "" "" "- " ("File" "Open" "Open project from PLC"). .

    (Symbol Configuration).

    ( *.sym *.sdb). - , OPC DDE .

    " " (Dumb symbol entries), .

    " XML " (Dump XML symbol table), - XML , . - .SYM_XML.

    : (target settings) " INI-" (Symbol config from INI file), CoDeSys.ini , INI

  • CoDeSys

    CoDeSys V2.3 4-16

    CoDeSys.ini , INI ( " " (Configure symbol file) ).

    " INI-" (Symbol config from INI file) -, (Set object attribute), " " (Configure symbol file).

    " " (Set object attributes):

    , . POU ( ) . . - :

    (Export variables of object): POU - . , .

    (Export data entries): .

    (Export structure components): - .

    (Export array entries): - .

    (Write Access): OPC .

    POU, . -, .

  • CoDeSys

    CoDeSys V2.3 4-17

    (Database-connection)

    (Database-connection):

    ENI - .

    (ENI) (Use source control (ENI)): , ENI. ENI - . ENI Server . .

    . 'ENI'.

    ( (Check in), (Get last version) ..) . , -. ('Project' 'Data Base Link') . (Database-connection) - (Properties), - .

    (Automatically place new Ob-jects in the following project data base):

    : ( ('Project' 'Object' 'Add')), -. ('Project' 'Object' 'Properties') .

    :

    (Project): POU , ENI configura-tion/Project

    (Shared Objects): POU , - ENI configuration/Shared

  • CoDeSys

    CoDeSys V2.3 4-18

    (Local): POU ENI.

    (Project) (Shared Objects), - 'Compile files', , . .

    (Ask for type of new objects): '' '' ('Object' 'Properties') . - , .

    ENI (configure ENI) ENI:

    , ENI, c - : (Project), (Shared Objects) 'Compile files'. () .

    ( Next - Wizard). , . , Login .

    (Macros).

    (Macros):

    (), - CoDeSys. (Edit Macros).

    :

    1. (Name). (New) (Macro list). . . (. ) - , .

    2. (Menu) , (Edit Macros). -

  • CoDeSys

    CoDeSys V2.3 4-19

    . &. : Ma&cro 1, Macro 1.

    3. (Commands) , . CoDeSys. - , (Help) . - . ( ) .

    4. 1-3 OK.

    , . , (Rename).

    (Edit Macros) , - . (Edit Macros).

    :

    .

    : (Create). (Merge project) . - OK. - (Save Macro library) - (Save). .mac.

    : (Include). - (Open Macrolibrary), *.mac (Open). .

    : ('' '' - 'Project' 'Export').

    4.3 (File) (Project). .

    (File New)

    Untitled. .

    (File New from template)

    . Untitled.

    (File Open)

    . - , CoDeSys , .

    ( .pro) ( .lib). , (Open) .

  • CoDeSys

    CoDeSys V2.3 4-20

    (PLC), . - , (Communication parameters) . , CoDeSys , , . , (Load project from PLC), , . ( , (Online - Sourcecode download). . -(Create Boot project)!)

    : , , , . Untitled .

    : , '' (Title) (Project info) . , .

    , .

    CoDeSys:

    ENI

    . ENI, - (Project objects) ENI . (TCP/IP-, , , , ) ( - Project name), -. (Next). , , - (Shared Objects). (Finish), - CoDeSys. -, .

    codesys.ini , - ENI (Save ENI credentials).

    (File) - (Exit).

    , CoDeSys .

  • CoDeSys

    CoDeSys V2.3 4-21

    (File Close)

    . -, CoDeSys , .

    Untitled, - (File Save as).

    (File Save)

    : +

    . Untitled, (File Save as).

    (File Save as)

    . -.

    . .

    (Save as):

    1.5 (Project Version 1.5 (*.pro)), 2.0 (Project Version 2.0 (*.pro)), 2.1 (Project Version 2.1 (*.pro)) 2.2 (Project Version 2.2 (*.pro)). , 2.3, . CoDeSys 1.5, 2.0, 2.1 2.2.

    , -. POU CoDeSys, Internal library (*.lib).

    , , - (External library) (*.lib). , -, , .h. - , POU, . POU, CoDeSys. , .

    , CoDeSys (Encrypted CoDeSys Projekt) (*.pro), (Encrypted internal library) (*.lib), - (Encrypted external library) (*.lib).

  • CoDeSys

    CoDeSys V2.3 4-22

    (Encryption), . - .

    :

    . CoDeSys - , .

    , . (Save as).

    - .

    :

    :

    (Edit Licensing Information), - (Edit license info...).

    . ' CoDeSys'.

    OK. , CoDeSys , .

    . , , .

    / (File Save/Mail Archive )

    . , CoDeSys, - zip . . - , -.

  • CoDeSys

    CoDeSys V2.3 4-23

    :

    , . , , , . , , (Details). , :

    (Select All) (Select None) . - .

    (Save).

    " " (Save archive), , .

    , , , :

    (Pro-ject File)

    .pro ( CoDeSys)

  • CoDeSys

    CoDeSys V2.3 4-24

    (Refer-enced Libraries) - (Symbol Files)

    *.lib, *.obj, *.hex ( hex-)

    *.sdb, *.sym (, )

    - (Compile Information)

    *.ci (, )

    *.ri ( )

    .*( )

    (Log File)

    *.log ( )

    INI File CoDeSys.ini

    (Configura-tion files)

    , PLC (

    , , .): *.cfg, *.con, *.eds, *.dib,*.

    (Target Files)

    *.tgr ( )

    *.txt ( )

    (Registry Entries)

    Registry.reg ( , CoDeSys, Gateway PS).

    :

    HKEY_LOCAL_MACHINE\SOFTWARE\3S-Smart Software Solutions

    HKEY_LOCAL_MACHINE\SOFTWARE\AutomationAlliance

    - (Bitmap Files)

    *.bmp ( POU )

    (Local Gateway)

    Gateway.exe, GatewayDDE.exe, GClient.dll,

    GDrvBase.dll, GDrvStd.dll, GHandle.dll, GSymbol.dll,

    GUtil.dll, DLL Gateway.

    (Language Files)

    , (*.vis, *.xml)

    , (Other Files). (Other files), - :

    (Add) , . . , . , (Remove). Ok, .

  • CoDeSys

    CoDeSys V2.3 4-25

    , (Comment). - , . OK, readme.txt. , - CoDeSys.

    , :

    (Save) . , . - .zip. - , .

    (Mail) . , MAPI (Messaging Application Programming Interface). . -, , (Save) , E-mail, , . -, .

    (Cancel) , .

    : zip !

    (File Print)

    :+

    . - . , OK. . .

    :

    . - (Printer Setup), - . , . , .

    (Project Document). , Extras Make docuframe file .

  • CoDeSys

    CoDeSys V2.3 4-26

    (File Printer setup)

    .

    :

    (File) .dfr, - . DEFAULT.DFR. , (Browse).

    , ( (new page for each object)) ( (new page for each subobject)). - (Printer Setup) .

    (Edit), , - . , , POU, - .

    :

    (Insert Placeholder) 5 : (Page), POU (POU name), (File name), (Date) - (Content) . :

    (Page)

    {Page}

    POU (POU name)

    {POU name} POU

  • CoDeSys

    CoDeSys V2.3 4-27

    (File name)

    {File name}

    (Date) {Date}

    (Contents)

    {Contents} POU

    C (Insert Bitmap) -, . , - . . - (. ).

    , CoDeSys , .

    : (Show print area margins) (Desktop) . , .

    (File Exit)

    : +

    CoDeSys. , , ( File Save).

    (Project Build)

    :

    . POU, . *.ci, -. , (Project Clean all).

    , , POU, - , .

    (Project-Build), (Online-Download), (Online-Login) Online-Login.

    , (Online Login) . -, -. . ().

  • CoDeSys

    CoDeSys V2.3 4-28

    :

    (Auto save before compile) - (Load & Save), .

    , (Object Organizer), . (Exclude from build), . ('Exclude objects') (. 4.2 , ).

    : . , (Show Call Tree), (Show Cross Reference), - (Unused Variables), (Overlapping memory areas), (Concurrent Access), - (Multiple Write Access on output) ('Project' 'Check'), .

    (Project Rebuild all)

    (Project Build) , . , , (Clean All).

    . 4.2 ( , (Build)).

    (Project-Build), (Online-Download), (Online-Login) Online-Login.

  • CoDeSys

    CoDeSys V2.3 4-29

    (Project Clean all)

    . - , , . .

    : , *.ri, - . *.ri - (Load Download-Information).

    (Project Load Download-Information)

    , , . - .

    .ri . , , . , , , POU . , , POU.

    (Project Clean all) *.ri . - (Project Load Download-Information), .

    (Project Translate into another language)

    . , CoDeSys .

    :

    (Create translation file) (Translate project) (View translated project) . : ' '

    (Create translation file) :

  • CoDeSys

    CoDeSys V2.3 4-30

    (Translation file) . .tlt. *.txt - EXCEL WORD, .

    , (Search).

    : (Names), , POU, (Identifiers), (Strings), (Comments), (Visualization texts). , (Position information) .

    , - . , , , .

    :

    Text Tooltip-Text. :

    *.tlt *.txt CoDeSys CoDeSys HMI. Target Web- . *.vis .

    (Extras Settings..) . . (Translate into another language) .

    ( Text Tooltip-Text) - , # (, #text#). . (. ).

    (Position information) . , POU , . 3 :

    (None)

    (First)

    (All)

    , , , .

    : (All), 64- .

    (Overwrite existing): - .

    (Target languages) , .

    (Exclude) (Exclude libraries). , , - . , (Included libraries), , (Add). - (Excluded libraries). , (Remove). Ok , .

  • CoDeSys

    CoDeSys V2.3 4-31

    :

    (Add) (Add target Language).

    :

    . - . Ok, . (Remove) .

    OK.

    , . . -? No , - Yes. Backup_of_.xlt.

    :

    ##TODO.

    , , .

    .

    . ##. ##TODO . -, ##NAME_ITEM, ##END_NAME_ITEM ( ##COMMENT_ITEM ..).

    , POU ST_Visualisierung. (English) (French) . - .

    : ##NAME_ITEM [D:\CoDeSys\projects\Bspdt_22.pro::ST_Visualisierung::0] ST_Visualisierung ##English :: ##TODO ##French :: ##TODO ##END_NAME_ITEM

  • CoDeSys

    CoDeSys V2.3 4-32

    :

    ##NAME_ITEM [D:\CoDeSys\projects\Bspdt_22.pro::ST_Visualisierung::0] ST_Visualisierung ##English :: ST_Visualization ##French :: ST_Visu ##END_NAME_ITEM

    ##TODO .

    , - .

    : . - . .

    : Language, Flag, , (, ) .

    (Translate project)

    , (Translation file).

    :

    : , , .. .

    (Target language) , -, .

    , OK. , , . - , , .

    (Cancel) .

    , OK : , , , -. : [C:\Programs\CoDeSys\projects\visu.tlt (78)]; Translation text expected.

    (Show project translated)

    , - , . ( (Translate Project) !)

  • CoDeSys

    CoDeSys V2.3 4-33

    :

    (Translation file). - , (Search).

    (Target language) . "" . OK. ! (Toggle translation).

    (Switch translation)

    (. 'View translated project'), . - (Toggle translation) ('Project' 'Trans-late').

    (Project Document)

    , :

    POU : , , ,

    PLC, , . POU. .

    , .

  • CoDeSys

    CoDeSys V2.3 4-34

    :

    , .

    , . - , . , - , . , , . - . , , - - .

    , OK. . (File Printer setup) - .

    (Project Export)

    CoDeSys . .

    IL, ST SFC (Common Elements format ).

    POU LD FBD CoDeSys , . ASCII .

    POU, , . ( ).

    : POU FBD LD , - (), -.

    , - (Project Document). One file for each object - , . Ok, . , . . .

  • CoDeSys

    CoDeSys V2.3 4-35

    (Project Import)

    .

    . , -, , , : Do you want to replace it?( ?). Yes, , . No, ("_0", "_1", ..). Yes, all No, all - .

    , - . , , . , - , , * (, standart.lib*30.3.99 11:20:14). , : Cannot find library {\} ( - { \ \ \ }).

    (Project Siemens Import)

    POU Siemens-STEP5 STEP7.

    .

    (Project Compare)

    .

    :

    :

    , , Compare.

    COMPARE. . ( -

    ST IL) ( FBD LD) /POU ( CFC SFC).

    , . POU, , . - POU . , , , (, ) . , - , .

    , !

    :

    (Project Compare) (Project Comparison).

  • CoDeSys

    CoDeSys V2.3 4-36

    :

    (Project to be compared).

    , . , -.

    ENI , , . ENI- (Compare with ENI-Project).

    :

    (Ignore whitespaces)

    (Ignore comments)

    (Ignore properties)

    (Compare differences): , POU , ( ). , - , - (/, ). , .

    :

    0005 ( ).

    ( , )

    OK.

  • CoDeSys

    CoDeSys V2.3 4-37

    :

    1. : :

    Project comparison - . , - . - . POU, , , - :

    : ; .

    : ; .

    : ; - .

    : .

    POU (Properties changed), . (Access right changed) , .

    2. POU

    POU, , POU. POU . - ( , ST,IL), (FBD, LD) (CFC, SFC). , .

  • CoDeSys

    CoDeSys V2.3 4-38

    POU :

    .., - , . .

    , POU, Extras :

    (Next differ-ence)

    ,

    (Previous difference)

    ,

    (Accept change)

    (, ), , . - . , .

    (Accept properties)

    .

    (Accept access right)

    ( -): - .

    : , -.

  • CoDeSys

    CoDeSys V2.3 4-39

    (Project Merge)

    . . , . (Project Document).

    , _1 _2 ..

    (Project Project info)

    . , .

    :

    :

    (File name) (Directory) (Change date)

    . :

    (Title) (Author) (Version) (Description)

    .

    (Statistics), . POU, , .

  • CoDeSys

    CoDeSys V2.3 4-40

    :

    (License info) , CoDeSys- , ('File' 'Save as...'). - (. CoDeSys').

    (Ask for project info) (Load & Save) , .

    (Project Global Search)

    POU, . (. Project Document).

    .

    (Global Search) . . , , .

    , . , (Edit Search).

    (Message window), - . , , .

    :

    : (Decl) (Impl). . .

  • CoDeSys

    CoDeSys V2.3 4-41

    :

    , POU , -. +, .

    (Project Global replace)

    POU, . (Project Global Search) (Edit Replace). , , -.

    .

    (Project Check)

    . , . . - .

    :

    (Unused Variables) (Overlapping memory areas) (Concurrent Access) (Multiple writes to output)

    .

    : .

    (Unused Variables)

    , , . - POU , . : PLC_PRG(4) var1. , , -.

    (Overlapping memory areas)

    , , AT. -, var1 AT %QB21: INT var2 AT %QD5: DWORD , 21- .

    :

    %QB21 is referenced by the following variables: PLC_PRG (3): var1 AT %QB21 PLC_PRG (7): var2 AT %QD5

    (Concurrent Access)

    , , . :

    %MB28 is referenced in the following tasks :

  • CoDeSys

    CoDeSys V2.3 4-42

    Task1 PLC_PRG (6): %MB28 [read-only access] Task2 POU1.ACTION (1) %MB28 [write access]

    (Multiple writes to output)

    , . -:

    %QB24 is written to at the following locations: PLC_PRG (3): %QB24 PLC_PRG.POU1 (8): %QB24

    CoDeSys - . . - . .

    0 7. 0 , .. .

    . 0 , - 0- .

    0 , . .

    :

    (User group) , , (Password). , :

    "The password is not correct."( )

    , .

    (Passwords for user group), (Object properties Access rights).

    (Project Passwords for user group)

    . 0.

    :

    (User group) (Password). *.

  • CoDeSys

    CoDeSys V2.3 4-43

    (Confirm password) . - OK "The password does not agree with the confirmation", , . - .

    , .

    : , !

    (Project Database)

    , (ENI) (Use source control (ENI)) (Data base-connection). ENI:

    1. (Login) - ENI

    (Data Base Login) ( , ), :

    2. (Define) 3. (Get Latest Version) 4. (Check Out) 5. (Check In) 6. (Undo Check Out) 7. (Show differences) 8. (Show Version History)

    , (Database Login) .

    (Data Base Login) (Project) , , -:

    9. (Multiple Define) 10. (Get All Latest Versions) 11. (Multiple Check Out) 12. (Multiple Check In) 13. (Undo Multiple Check Out) 14. (Project Version History) 15. (Label Version) 16. (Add Shared Objects) 17. (Refresh Status)

  • CoDeSys

    CoDeSys V2.3 4-44

    :

    : : - . x : . : . : ( - Task configura-tion, - Sam-pling Trace, - PLC Configuration, - Target Settings, - - Watch- and Recipe Manager) , . , - (Check out) -.

    (Login)

    'Login', - ENI . -. ENI (ENI Admin, User Management).

  • CoDeSys

    CoDeSys V2.3 4-45

    (Login):

    (Project objects) :

    (Host): ENI Server ( 'TCP/IP ' - - 'Database connection').

    (Project): ( (Project name) / - 'Database connection' / 'Project Ob-jects').

    (Credentials):

    (User name) (Password). Use as default, .

    OK . (Shared objects). OK. - (Compile files).

    (Login) , .

    : , - ENI (Save ENI credentials) , (Load & Save).

    (Define)

    : ('Project' 'Project Database' 'Define').

    , - . 'Project' ( ) 'Shared objects' ( ) 'Local' ( ).

    ( ) .

    (Get Latest Version)

    : ('Project' 'Project Data-base' 'Get Latest Version')

    , -. (Check Out), - .

  • CoDeSys

    CoDeSys V2.3 4-46

    (Check Out)

    : ('Project' 'Project Database' 'Check Out')

    .

    'Check out object'. -, . - +.

    , , .

    . , .

    (Check In)

    : ('Project' 'Project Database' 'Check In')

    . , .

    'Check in object'. -, . - +.

    .

    (Undo Check Out)

    : ('Project' 'Project Database' 'Undo Check Out ')

    . - . ( ) - .

    (Show Differences)

    : ('Project' 'Project Database' 'Show Differences')

    () , . CoDeSys , , - (. ('Project' 'Compare')).

    (Show Version History)

    : ('Project' 'Project Data-base' 'Show Version History')

    , . - , , :

  • CoDeSys

    CoDeSys V2.3 4-47

    :

    :

    Version: . - . (label) , .

    User: ,

    Date:

    Action: . : 'created' ( ), 'checked in' ( , ) 'labeled with ' ( ).

    :

    Close: .

    Display: CoDeSys. : "ENI: /

    Details: 'Details of Version History':

    File ( ), Version (. ), Date (. ), User (. -), Comment (, -). Next Previous 'Version history of ..'.

    Get latest version: CoDeSys -.

    Show Differences: , () . , . , .

    Reset version: (). , - , ! .

    Labels only: , .

    Selection box 'Labels only': , . - 'All'.

  • CoDeSys

    CoDeSys V2.3 4-48

    (Multiple Define)

    : ('Project' 'Project Database' 'Multiple Define')

    (Define) - (Object Properties) . - ENI (ENI-Selection), - POU. , . POU OK.

    (Get All Latest Versions)

    : ('Project' 'Project Data-base' 'Get All Latest Versions ')

    . :

    , CoDeSys.

    , , .

    (Multiple Check Out)

    : ('Project' 'Project Database' ' Multiple Check Out')

    . ENI (ENI-Selection) OK. . (Check Out).

    (Multiple Check In)

    : ('Project' 'Project Database' 'Multiple Check In')

    . ENI (ENI-Selection) OK. . - (Check In).

    (Undo Multiple Check Out)

    : ('Project' 'Project Database' ' Undo Multiple Check Out')

    . ENI (ENI-Selection) OK. . - (Undo Check Out).

    (Project Version History)

    : ('Project' 'Project Database' ' Project Version History')

    , .

    ' '. (-, , ) . (Version history).

  • CoDeSys

    CoDeSys V2.3 4-49

    (Show Version History). - :

    1) ' ' (Reset Version) . 2) (Get latest version) , -

    ! , CoDeSys . : , , ! , , , -.

    (Label Version)

    : ('Project' 'Project Database' 'Label Version')

    "" (label) , . ' ' (Label) (, "Release Version") , , Comment. OK. . - . (Version). (Labels only) .

    (Label project )

    (Add Shared Objects)

    : ('Project' 'Project Database' 'Add Shared Objects ')

    (Shared Objects) . (Project Objects) , - () ( ) (Get (all) latest version(s)) , . (Shared Objects) , - .

    (Add Shared Objects) ENI (Browse ENI). - OK .

  • CoDeSys

    CoDeSys V2.3 4-50

    ' ENI (Browse ENI)

    (Refresh Status)

    : ('Project' 'Project Database' 'Re-fresh Status')

    , .

    4.4 .

    , (POU), , (visualizations), (global) - (variable configuration), (Sampling trace), (PLC configuration), (Task Configuration) (Watch and Recipe Manager). . .

    POU , (, ). (VAR_GLOBAL VAR_CONFIG).

    (drug&drop). - , (-, Object_1).

    POU, , . .

    , . , "" "" . - (Expand node) (Collapse node). (New Folder).

    : , - .

  • CoDeSys

    CoDeSys V2.3 4-51

    :

    (New Folder)

    . , . -. , , .

    , , , + .

    (New Folder). - :

    . .

    , - .

    (New Folder) , - , 1 (New Folder 1). , .

    (Expand node) (Collapse node)

    (Expand node) . (Collapse node) . .

    , , , + .

    (Project Object Delete)

    :

    -. . - ('Edit' 'Undo').

    , . (Edit Cut) .

    (Project Object Add)

    :

    . . (Global Variables), (Data types), (Function), (Function Block) (Program) , . (Save as template).

  • CoDeSys

    CoDeSys V2.3 4-52

    POU POU (Name of the new POU) -. , .

    :

    POU POU, -

    . POU .

    POU. , POU -

    .

    . , , , - POU, . , POU.

    POU POU (, ) , POU . POU - POU (Type of the POU), (Language of the POU). POU , - (Return Type). (, , ). (Input assistance), .

    POU:

    POU , OK , , . .

    (Edit Insert) - . , (, Righ_1).

    ENI, , ( - (Database-connection)), -, . . (Properties) .

    (Save as template)

    (Global Variables), (Data types), (Function), (Function