in Codesys 2.3 it's possible to use placeholders in visu elements configuration, that is to define a variable like this
Then if we specify that x should be 5 for a specific visu, the above becomes Drive_5.Start
Is it possible to do the same in v.3.5.x ? I can't see it anywhere.
Each visualization page has an interface (like FB) on witch you can define variables.
To do this select the command Visualization ➔ Interface editor
Uses this variables to set your animation on the visualization.
When you place this visualization like a frame, you can acces this variables by reference properties and affect the value or the variables from your application.
You have to read the Help file "CODESYS Visualisation", chapter "Creating a Structured User Interface", su chapter "Calling Visualization with Interface".
Trying to do exactly the same thing as pnn, having 24 identical POU:s which I would like to interface with just one VISU so I don't have to change in 24 places when customer has ideas of look-and-feel.
Using frame I've managed to switch visualization, but that doesn't make this a walk in the park. (Which Codesys 2.3 would have done using the placeholders)
Can anyone point me in the right direction?
Here you go. If you can't seem to find it in the help file just search a visualization element type like 'Rectangle' and look 'Text' for a link to the placeholders.
Dear Morberis, Perhaps I expressed myself a bit unclear. What I would like to achieve is a placeholder for a part of the variable name, just like pnn wrote.
In my case the POU:s are named P_Axis01..P_Axis24. Displaying the same variable from each POU was super easy in CoDeSys 2. Just insert a placeholder within dollar-signs in the element attribute and then choose what the placeholder should be substituted with in that entire visu. E.g. P_Axis$ID$.bVariable could be substituted with 01..24 at runtime.
Being back at this very project the question regarding placeholders still arises. My German ist quite weak , but from what I've managed to read in German-speaking forums the function doesn't exist in V3.xxx. I've played around with various uses of input variables and pragmas of the visu, but can't achieve my goal. Can someone with knowledge please verify that this is the case, so I can break down and carry on with my life?
I don't think so BUT you have the possibility to give in/out variables to a visu..
This could be used for example making valve faceplates then connecting them to the corresponding valve object..
If you have your valves in an array you could have a input variable valve no and have the visu connected to the valve array and get a somewhat equal behaviour as you describe..
I think what you want to do is not possible directly in the view page.
A solution, unfortunately more complicated, could be to define a variable in the interface editor (for example InternalVar), then, by program, to transfer the value of the variable of each program module in this display variable according to the axis you want. visualize
For example :
CASE AxisNum OF
1 : InternalVar:= P_Axis01.. ;
2 : InternalVar:= P_Axis02.. ;
24 : InternalVar:= P_Axis24.. ;
Log in to post a comment.