advertisement
from the Instrumentation department...
Digital Tags in WinCC
Software, including programming, OS issues, etc. topic
Posted by CJOHN on 13 May, 2002 - 11:40 am
Am Using WinCC 5.0 Version and S7-400 range of PLC , WinCC is for 1024 Tags. Currently am considering a single digital Input or Digital Output as a single WinCC External tag. With this considered for 400 Digital I/O, i am using 400 WinCC External Tags. Is there any efficient method to configure digital i/os' so that i could optimise my WinCC External Tags ie. some method with which i could read about 16 or 32 Digital I/Os' in a single WinCC tag or something on similar lines. With this done i could save my WinCC External tags.

Could some one suggest me something on same lines.


Posted by Jan de Liefde on 17 May, 2002 - 10:32 am
You can use a unsigned 16 bit or a unsigned 32 bit Tag en read it with GetTagWord/SetTagWord or GetTagDWord/SetTagDWord.
Another way to it and read a datablock from the plc is use rawdata tags so you can do it with 1 one tag voor reading and 1 tag for writing.
Both ways are from the point of engineering and maintenance of software a bad way of programming. When you use single tags or structures of tags you can do it without c-scripts and you can replace objects in a easy way. So at the end you've got better software but it use more tags.

greetings,
Jan de Liefde


Posted by CJOHN on 17 May, 2002 - 3:33 pm
First of All i would like to thank you for ur reply.
I can read my digital tags in a unsigned 32 bit tag with GetTagWord/ GetTagDWord, but then how do i decode my each digital inputs for further dispaly in Graphics or for alarms. For this also do i need to use C-Script.
Please throw some light on this.


Posted by Salma on 21 May, 2002 - 9:40 am
Hi

To display the inidividual bits of the tag on a graphic, you can use the Dynamic Dialog wizard against the objects property.

To write to individual bits of a tag you can use the wizard from the Dynamic Wizard toolbar. This will create the C-script for you.

It may be true that you need to script bit-picking in WinCC, but as long as you use the supplied wizards you can usually accomplish the task without having to write a single piece of code :)

Let me know if you need any more clarification on the above

hope this helps
Salma


Posted by ITS SHAHID WAQAS CHAUDHRY on 22 May, 2002 - 2:17 pm
<P>The best way (as far as I have concluded) is to use the 32-bit Tag. With this you can pick up a Double Word (32 bits) values. To decode this at the WinCC end, you will need to the WinCC Dynamic Wizard. With the wizard, you can pick up the required bit without the need for C-Script (The Wizard does it for you).</P>

<P>However, there is a catch: The bits in the PLC and HMI are not mapped 1-to-1 (probably due to the different HW architecture!!!). The mapping is as below:</P>
<PRE>
HMI PLC HMI PLC HMI PLC HMI PLC
0 24 8 16 16 8 24 0
1 25 9 17 17 9 25 1
2 26 10 18 18 10 26 2
3 27 11 19 19 11 27 3
4 28 12 20 20 12 28 4
5 29 13 21 21 13 29 5
6 30 14 22 22 14 30 6
7 31 15 23 23 15 31 7
</PRE>
To overcome come this mapping problem, I usually use a byte tag (8-bit). That way, the mapping is 1-to-1 and I do not have to refer to the above
mapping table all the time :)
</P>
<P>Shahid Chaudhry
<shahid.c@iname.com></P>

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2014 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
Documentation is like sex: when it is good, it is very, very good; and
when it is bad, it is better than nothing.
-- Dick Brandon
Advertise here
Advertisement
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive