I'm implementing a home automation with Codesys on a Wago PLC. To control shutters I always build a visu containing the same buttons for up and down, color switchings for movement visualization and a text output for the current position. Always the same for 29 shutters, only tha variables differ. Is it possible to create a common visu (like a function block) and connect it to a struct or ins/outs of a function block, so that I have to set only one variable instead of 5?
Rather late then never;
For Codesys v2.3 you should look into the "placeholder" ($placeholder$) concept in the manual of Codesys v2.3.
For Codesys v3.5 you should take a look at graphic references in the manuals of v3.5.
At the top of each visualization element there is an interface editor where you can define variables to be passed into each implementation of the visu element.
For example, you can create a "Switch" visu with a VAR_IN_OUT of Switch (an object containing properties and methods of the switch) and then wherever you want the switch visu to be used, place a frame and make the reference the Switch visu.
Log in to post a comment.