Adding INT Tags in WinCC Flex 2007

control_logic

Member
Join Date
Jun 2007
Location
Central Florida
Posts
42
Hello all,

I need to add 2 int tags together and show the result in a field below the other 2 shown individually. For some reason I am having a mental block as to how to accomplish this in WinCC Flexible 2007 Advanced. I am seeing the 2 individual tags update correctly, buthow do you program the addition?
 
Many ways to do it. Simplest in "ON Change"-Event in the properties of the BOTH TAGS! Call a Script. Script Tag3 = Tag1+Tag2


Nick
 
I can't seem to make that work.
In my application I have: Cases_7A, Cases_7B and Total_Cases_7.
Cases_7A and Cases_7B come from 2 different PLC's, and update at 1second intervals. Total_Cases_7 is setup as an internal output tag. I made the script "Total_Cases", and reference the source tags. Where do I do the "on change" event? The other tags right?
 
Where do I do the "on change" event?
When you setup the tag you can setup events for that tag just like a button. Also look at the update. You have it set for 1 second but you may need to change the update from on demand to cylic.

I don't think you need a script. I think you can using the increase function to do what you need.
 
I think increase function will apply value to the tag that initiated it. You don't want the value to be put back into original.


Nick
 
Quite right Nick, the increasevalue adds to the original tag which is definately not what I need. I figured out ho to get the total if I click a "total" button I made that activates the script, but i'd like it to update automagically, in the same fashion as the 2 counter tags update now. Any ideas? Got to be some WinCC gurus on here somewhere.
 
If you script is working then all you need to do is call the script from the on change in one or both of the tags. Then anytime they change it will run the script.

If you don't display the numbers on the screen then they are not updated with the on demand update.
 
I don't have anywhere to pick that property on the 2 fields in question. They are Output fields. I have tinkered with changing the type but have never seen the "on change" property
 
Are you looking at the text box on the screen or the tag information in the connections? You should be able to goto tags and select the tag. Then you should see events for the selected tag just like you see on the push button.

Are these internal tags or are they PLC addresses?


edit

This may help look at page 97
http://www1.siemens.cz/ad/current/content/data_files/automatizacni_systemy/systemy_pro_ovladani_a_vizualizaci/vizualizacni_software/simatic_wincc_flexible/_manualy/manual_wincc_flex_2005_csa_2005_en.pdf
 
Last edited:

Similar Topics

Title says most of it. I have a module mismatch error in a Logix PLC (v30.11). The setup is for a standard I/O module, but the installed card is a...
Replies
2
Views
832
Hello, Fairly new to PLC programming. Have a question in regards to a 1734 Point I/O rack and the built in tag structure in Logix Designer. I...
Replies
2
Views
2,101
Is there a way to add a Point IO card to a project with a control logix processor (version 30 or 31 I believe) while online and in run mode...
Replies
9
Views
4,235
Hi All, In siemens S7 is it possible to add the value of a Bool to an interger ie if I am adding 15 intergers together but have a further...
Replies
3
Views
2,124
I'm currently using a 1734-ADN Point I/O adapter. I would like to know how i add this to an existing Devicenet Network? I understand it is a...
Replies
2
Views
1,687
Back
Top Bottom