Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
Hi All Best Friend
I intend create counter in Codesys v2.3 in Visualisation
please help me
tankx
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2017-04-12
Originally created by: AntonZ
Counters are used in code and have no direct relationship with a visualisation (in the sense in which they are usually referred to in a PLC context, that is).
If your counter is called MyCounter and is a standard CTU, CTD or CTUD then the current value of the counter is available through MyCounter.CV. This value can be displayed in a rectangle shape through use of the Text and Textdisplay properties of the rectangle.
E.g. Let us assume your counter is part of the program PLC_PRG. Then you could set your rectangle's Text to be "%d" (without the quotes) and Textdisplay to refer to PLC_PRG.MyCounter.CV.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All Best Friend
I intend create counter in Codesys v2.3 in Visualisation
please help me
tankx
Originally created by: AntonZ
Counters are used in code and have no direct relationship with a visualisation (in the sense in which they are usually referred to in a PLC context, that is).
If your counter is called MyCounter and is a standard CTU, CTD or CTUD then the current value of the counter is available through MyCounter.CV. This value can be displayed in a rectangle shape through use of the Text and Textdisplay properties of the rectangle.
E.g. Let us assume your counter is part of the program PLC_PRG. Then you could set your rectangle's Text to be "%d" (without the quotes) and Textdisplay to refer to PLC_PRG.MyCounter.CV.