Error code 4024

2014-10-27
2014-10-31
  • garybolton2014 - 2014-10-27

    THis is my first week Programming PLC's and i'm working through the First Steps with CoDeSys.
    It all seems to go fine until i try to Build the Project, which brings me up multiply errors with the same code,
    Error 4024: PLC_PRG (4): Expecting ":" before "2" as an example.
    Now im using the latest software and the instructions are Dated 2004.
    I imagine the software has been updated numerous times since the instrutions where last updated.
    Could this be where its all going wrong?
    Any help would be much appreciated.

    Gary

     
  • Anonymous - 2014-10-28

    Originally created by: scott_cunningham

    I am not quite sure which section you are getting the error on ("First Steps..."), but my first guess is you missed the ":" in an assignment statement ("x := 2;", not "x = 2;"). Also, possibly to missed a ";" at the end of a previous line. Goto the line of the code the compiler is complaining about and look at that line and a few previous to it. If you are using CFC, then maybe a wire is not actually terminating at an input/output on a function block.

     
  • garybolton2014 - 2014-10-29

    Cheers Scott
    This is my first attempt at writing a program, following First Steps.......
    Following this guide, i get to the last step prior to creating a visualization, which is called BUILD PROJECT using the F11 key and that brings me up the 3 errors.

    I have copied & pasted my lines of code.

    PROGRAM PLC_PRG
    VAR
    Trig1: R_TRIG;
    Trig 2: F_TRIG;
    Timer 1: TOF;
    Timer 2: TON;
    END_VAR

    What is CFC?
    As for my timers,
    I Have nothing connected to the ET outputs on both my timers.
    And the 2 PT inputs are addressed as T#5s but have remained PINK. Is that normal?
    Thanks for your help

     
  • singleton - 2014-10-31

    Hi,
    your declaration is not IEC compliant. Whitespaces are not allowed

    Wrong:

    garybolton2014 hat geschrieben:
    PROGRAM PLC_PRG
    VAR
    Trig1: R_TRIG;
    Trig 2: F_TRIG;
    Timer 1: TOF;
    Timer 2: TON;
    END_VAR

    Correct:

    VAR
    Β  Β Trig1: R_TRIG;
    Β  Β Trig_2: F_TRIG;
    Β  Β Timer_1: TOF;
    Β  Β Timer_2: TON;
    END_VAR
    
     
  • garybolton2014 - 2014-10-31

    Thanks Singleton

    I'll re-write and see how it goes

     

Log in to post a comment.