sualk2619
Hello,
I try the first steps with OpenPlc-Editor.
I have written some programms during the last years in codesys 2.3. Now I try to paste the most
of code into the Editor. 
How to paste in the global variables? E.g.:

VAR_GLOBAL
taste_1 at %ix0.0 : bool;
led_1 at %qx0.0 : bool;
var_1 : word;
var_3 : real;
fuellstand : ARRAY[1..8] OF WORD;
END_VAR;

When I write them in the head of a POU , it does not work in Openplc-Editor. " ....no variable declared...."
What did I do wrong? Is that not IEC-61131?

Or do I have the only possibility to declare variables in the table-form above the text-editor?
If this ist true, it will be a strong part of work to move with large programms from codesys to
Openplc-Editor.

Many thanks for your help.
Reply 0 0
thiagoralves
Yes, variables must be declared on the variable table at the top, never on the program body. For global variables, they are declared on the Res0 section
Reply 0 0
sualk2619
Thank you very much.

But what is the Res0 section?


Reply 0 0
thiagoralves
Look at the left pane that lists your project tree. Res0 is right there on the list
Reply 0 0
Reply