easy-forum

Deutsch - Software => easySoft => Thema gestartet von: srd am Dezember 11, 2020, 07:13:02 Vormittag

Titel: User Function Block
Beitrag von: srd am Dezember 11, 2020, 07:13:02 Vormittag
I have written a program to calculate the aprox capacity of a storage tank. When i add a text display i have done it so you can put the diameter and height onto the front screen and it will them calculate the capacity. Diameter and height are in mm and capacity is m³. When i created the same program (minus the text display) to a user block for some reason it does not work. I am after advice on what the issue's could be. Cheers
Titel: Antw:User Function Block
Beitrag von: weiss_nix am Dezember 12, 2020, 09:11:41 Vormittag
Hi srd,
... please upload your program with the non-functioning user block. I can't understand your problem because I don't see it.

regards
Titel: Antw:User Function Block
Beitrag von: srd am Dezember 15, 2020, 13:08:19 Nachmittag
When i covert the program to a user function block it doesn't work.
Titel: Antw:User Function Block
Beitrag von: weiss_nix am Dezember 15, 2020, 14:36:51 Nachmittag
how do you convert the program into a user function?
Titel: Antw:User Function Block
Beitrag von: srd am Dezember 16, 2020, 15:22:36 Nachmittag
copy and paste
Titel: Antw:User Function Block
Beitrag von: srd am Dezember 16, 2020, 15:29:46 Nachmittag
this is the program and the user function block created
Titel: Antw:User Function Block
Beitrag von: weiss_nix am Dezember 17, 2020, 08:20:42 Vormittag
... I'm really sorry, but I can't find the malfunctioning user function you were talking about. So I can't find the errors for you.

Regards
Titel: Antw:User Function Block
Beitrag von: srd am Dezember 17, 2020, 12:58:50 Nachmittag
Is this any good for you to look at.
Titel: Antw:User Function Block
Beitrag von: weiss_nix am Dezember 17, 2020, 13:24:15 Nachmittag
...
first of all you have to parameterize the user block. I think 2 analog inputs and an analog output should be enough for the first time. Before changing, you have to delete the user function from the main program! If you drag the module back into your main program after the change, it has inputs and outputs. Next you have to assign the inputs and outputs in the user function program. See the pictures in the appendix.
You have to replace
MW10 with IA01
MW11 with IA02
MD15 with QA01
See the pictures in the appendix.
Titel: Antw:User Function Block
Beitrag von: srd am Dezember 17, 2020, 14:51:44 Nachmittag
cheers for your help i will give it a try.
Titel: Antw:User Function Block
Beitrag von: weiss_nix am Dezember 17, 2020, 18:52:31 Nachmittag
... a Version without errors ...
Titel: Antw:User Function Block
Beitrag von: srd am Dezember 18, 2020, 09:25:39 Vormittag
Cheers for doing that much appreciated 
Titel: Antw:User Function Block
Beitrag von: weiss_nix am Dezember 23, 2020, 11:26:32 Vormittag
Hi srd,
... just as an idea, this user function would be a prime example of ST programming language. it would be much easier than a function diagram or a ladder diagram.

regards