easy-forum
English Support - Software => easySoft => Thema gestartet von: darek am März 17, 2024, 21:17:08 Nachmittag
-
Hello.
I use ST language.
In main program when i write code like this:
//MW1 - some counter;
if I1 then
MW1:= MW1 + 1;
end_if;
The value of MW1 can be overwriten from Modbus TCP, or integrated display.
But how to do the same within UF?
If the UF code is:
if I1 then
QA1 := QA1 + 1;
end_if;
and call UF like this:
UF01 (
NAME := "qt",
VERSION := "V1.00",
I1 := I1,
QA1 => MW1
);
I can't overwrite value of MW1 from Modbus, or Display.
Is there any way to make variable input and output at the same time? When I change UF to:
if I1 then
QA1 := IA1 + 1;
end_if;
and call as:
UF01 (
NAME := "qt",
VERSION := "V1.00",
I1 := I1,
IA1 => MW1,
QA1 => MW1
);
I still can't change value of MW1...
BTW. Why there isn't something like symbols definition in ST. For example:
#define I01 as pulse:
IF pulse THEN
...
END_IF;
That would be a huge help.
-
Hi darek,
all variables are predefined at easysoft. You can write comments to any variable.
UF01 (
NAME := "qt",
VERSION := "V1.00",
I1 := I1,
IA1 => MW1,
QA1 => MW1
);
This is not logic!
It should look like this:
UF01 (
NAME := "qt",
VERSION := "V1.00",
I1 := I1,
IA1 := MW1,
QA1 => MW1 );
Change IA1 to an UF-Input
The code into UF can be:
if I1 then
QA1 := IA1 + 1;
end_if;
By the way, you should use MW from the high range in the main program. It's better to use the lower area only for bits.
Thomas
-
all variables are predefined at easysoft. You can write comments to any variable.
It's not enough because you cannot use comments variable in ST (or I don't know how to use it?). When you program is biger you have to think what the marker means. Of course you can comment all the lines of code, but when you change something you heave to change all the comments. That's terreble. Is it really big deal to introduce symbols?
This is not logic!
What is not logic?
you wrote exactly the same code as me. Try in simulation change the MW1 value.
By the way, you should use MW from the high range in the main program. It's better to use the lower area only for bits.
I know, it's only an example.
-
your UF:
I1 := I1,
IA1 => MW1,
QA1 => MW1);
I wrote:
I1 := I1,
IA1 := MW1,
QA1 => MW1 );
Change IA1 to an UF-Input.
Do you see the difference?
-
Hi darek,
It's not enough because you cannot use comments variable in ST (or I don't know how to use it?). When you program is biger you have to think what the marker means. Of course you can comment all the lines of code, but when you change something you heave to change all the comments. That's terreble.
Sorry that I have to say this, but what you want is an PLC at the price of a VW with the comfort and functions of a Mercedes.
If you want to program with symbols, there are also Eaton controllers that can do this, e.g. XC-100, XC-200 or XC-300, with Codesys as programming software.
But you have to pay a little more for this.
By the way, the easyE4 with easySoft is, as far as I know, the only small controller that even offers ST as a programming language.
Neither Siemens LOGO!, Schneider Zelio or Crouzet Millenium offer this.
BR
Ralf
-
Hi darek,
It's not enough because you cannot use comments variable in ST (or I don't know how to use it?). When you program is biger you have to think what the marker means. Of course you can comment all the lines of code, but when you change something you heave to change all the comments. That's terreble.
Sorry that I have to say this, but what you want is an PLC at the price of a VW with the comfort and functions of a Mercedes.
If you want to program with symbols, there are also Eaton controllers that can do this, e.g. XC-100, XC-200 or XC-300, with Codesys as programming software.
But you have to pay a little more for this.
By the way, the easyE4 with easySoft is, as far as I know, the only small controller that even offers ST as a programming language.
Neither Siemens LOGO!, Schneider Zelio or Crouzet Millenium offer this.
BR
Ralf
Thumbs up
-
Sorry that I have to say this, but what you want is an PLC at the price of a VW with the comfort and functions of a Mercedes.
...
You don’t understand. It is now possible to program the EASY-E4 and view symbol comments in the code - but only in FBD or Ladder. However, there is no option to see these comments in the ST editor.
You can hover the mouse cursor over an element to view the comment in a tooltip, so there are no technical obstacles to implementing this feature.
This is not a hardware limitation, it is simply an essential software function that would greatly improve code readability.
-
Now I see that option is available in easySoft V8.30 ;D
What did you say about Deutsche Automobilindustrie ?