I think there must be a way to combine several function blocks in a sort of user defined block. For example, the combination of the attachment to be made on a block with the required number of inputs and outputs to be used repeatedly.
If yes - where in the HELP I can find a description of how this can be done. Even a keyword to search what will be helpful.[attachment=0]CoDeSys01.PNG[/attachment]
Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if you make a new POU you can set it if it is a program a function block (your user block) and as a function.
when you make it and you press F11 you can use your own block wherever you want it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[quote="shooter"]if you make a new POU you can set it if it is a program a function block (your user block) and as a function.
when you make it and you press F11 you can use your own block wherever you want it.[/quote]
10x U.
I tried this option - added a new POU (type "function block"), but when I insert this newly created unit, it appears only as a block without any inputs and outputs. How do I define this block, so that it appears with the necessary inputs and outputs? May be I have to define them on some specific way, but HELP doesn't say nothing about this.... or I can't find it?!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need to define the inputs and outputs for the function block.
VAR_INPUT and VAR_OUTPUT define the inputs and outputs to your user defined function block. See the help information for how to do this. It is in there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[quote="ndzied1"]You need to define the inputs and outputs for the function block.
VAR_INPUT and VAR_OUTPUT define the inputs and outputs to your user defined function block. See the help information for how to do this. It is in there. [attachment=0]VAR.PNG[/attachment][/quote]
Great, that's exactly what I needed. Good job Chicago
10x U very much!!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I think there must be a way to combine several function blocks in a sort of user defined block. For example, the combination of the attachment to be made on a block with the required number of inputs and outputs to be used repeatedly.
If yes - where in the HELP I can find a description of how this can be done. Even a keyword to search what will be helpful.[attachment=0]CoDeSys01.PNG[/attachment]
Thanks in advance
if you make a new POU you can set it if it is a program a function block (your user block) and as a function.
when you make it and you press F11 you can use your own block wherever you want it.
[quote="shooter"]if you make a new POU you can set it if it is a program a function block (your user block) and as a function.
when you make it and you press F11 you can use your own block wherever you want it.[/quote]
10x U.
I tried this option - added a new POU (type "function block"), but when I insert this newly created unit, it appears only as a block without any inputs and outputs. How do I define this block, so that it appears with the necessary inputs and outputs? May be I have to define them on some specific way, but HELP doesn't say nothing about this.... or I can't find it?!
You need to define the inputs and outputs for the function block.
VAR_INPUT and VAR_OUTPUT define the inputs and outputs to your user defined function block. See the help information for how to do this. It is in there.
[quote="ndzied1"]You need to define the inputs and outputs for the function block.
VAR_INPUT and VAR_OUTPUT define the inputs and outputs to your user defined function block. See the help information for how to do this. It is in there.
[attachment=0]VAR.PNG[/attachment][/quote]
Great, that's exactly what I needed. Good job Chicago
10x U very much!!!