wincc counter question

akwrc

Member
Join Date
Oct 2007
Location
thessaloniki
Posts
7
hi all
I am new to wincc and to plcs generally...
I have created a counter in my step7 project where it increases its value +1 when an input is 1. I have an object in runtime from wincc library where it shows numbers, but i did not succeeded to make it show the value of my counter. Does anybody has any idea...?
thanks

P.S Jesper i really tried, but there is no time for further search.
 
Could you show us your PLC code and tell us what object you used?

A few possible hints, your timer values should be passed to WinCC tags via a DB block, this is not the only way of doing it but I would reccomend this.
The values you can pass are either the preset counter value, or the actual count value. Both of these are in the form of a 16 bit word. The highest 4 bits are not used and the lowest 12 bits form 3 BCD numbers giving you a range from 0 to 999.
When you set the tags up in WinCC, you should be able to pick a BCD format. I will check this a bit later today when I am at the programming terminal.
Also, start with a simple number display field and check to see if the values are passing. If not, you can go to the tag list while WinCC is running, move the mouse over the correct tag, and see what the current live value is. This will allow you to see if the tag is reading and writing.

Hope this helps,

Doug

Edited because I miss read counter as timer.
 
Last edited:
Doug thank you for your answer

i am beginner to plcs ,i am a university student and what i do is a simple project.
I have inserted a digital output object from wincc library.
i have tested my counter in my step7 project with success.
what i tried to do in wincc is changing the output value from object properties( not from events) Is there any code tha shows my counter value easily??? the tag i created is a text tag 8-bit character.
 
OK, still need more information.

Which counter are you using?
For example, the count up block is termed S_CU in English or Z_VORW in German. This is for the PLC. Also, which input or output are you trying to view? For the S_CU counter, the outputs are Q, CV or CV_BCD.

For WinCC, are you trying to display a binary ON/OFF value? Or is it a number?
Are you using an IO field or some other display type?

What is the address of the Tag you are using in WinCC?
 
How are you addressing your counter?

You should have your actual 'count' going to a markerword or a dataword that you address in the CV output of your counter (CV = Counter Value).

Then you need to address this same markerword or dataword in your WinCC project.

Hope that helps

JT ;-)

PS... *EDIT* Just thought.. make sure whatever address you are using for your counter isn't being used anywhere else in your program (in any way). i.e. if you use MW10 for your counter value then you can't use MW10 or M10.0 thru' M11.7 anywhere else in your program or you'll be getting conflicting results.
 
akwrc said:
the tag i created is a text tag 8-bit character.

I dunno much, but I always thought counters were numerical values.....a text tag would most probably not work....or maybe this just one of those things I don't know....🤾

Anyway, in the PLC I'd just put in the following

A I 0.0 // This is your input
CU C1 // Count up counter 1 on positive edge of RLO (in this case I 0.0)
L C1 // Load the value of C1 into the ACCU
T DB1.DBW0 // Transfer to DBW for usage on HMI



Just small hints....hope I poked you into the correct direction

Jeebs
 
Hi all i am new to wincc and to plc too, My project is using C# application to send the Counter Set to WinCC program and get the current Counter Value from WinCC continuosly, Are there any way to do that ? thanks for help.
 

Similar Topics

Hi, I'm new to WinCC and PLC's, and I want to know how to show on the display the value of a counter. The PLC is an S7 200, CPU 222. Thank you.
Replies
3
Views
2,095
Does anyone happen to know how to install the graphic picture in HMI when I go into blower selection there are no graphics shown not only blower...
Replies
1
Views
61
Hi folks, I'm not as accustom with Siemens & WinCC, however I've been asked to increase the amount of data an existing application is logging...
Replies
2
Views
61
I have created a project in TIA Portal v16 Upd6 with S7-1200 (6ES7214-1AG40-0XB0) and WinCC Unified (PC station). The communication between the...
Replies
4
Views
142
I am creating a project with WinCC Unified v16 Upd6 (PC runtime) with an S7-1200. The communication is good between the PC and the PLC as I can...
Replies
6
Views
189
Back
Top Bottom