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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.
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
Hi,
your declaration is not IEC compliant. Whitespaces are not allowed
Wrong:
Correct:
Thanks Singleton
I'll re-write and see how it goes