Page 1 of 1

Intouch Tags

Posted: Mon Jan 26, 2015 7:03 pm
by Aztech
I have got an issue. Does anybody knows if it is possible with Intouch to read a bit inside a byte tag like in WinCC? Example: I have a tag DB1.DBB2, but I only need to read the status of DB1.DBX2.5. How it is possible to do without creating a discrete tag?

Thanks!

Re: Intouch Tags

Posted: Tue Jan 27, 2015 5:49 pm
by cmos
in expression you can use for example tagname1 AND 2**5

where tagname1 is the tag of DB1.DBB2

read this http://platforma.astor.com.pl/files/getfile/id/3887

Re: Intouch Tags

Posted: Tue Feb 03, 2015 3:02 am
by Aztech
Thanks a lot, Cmos!

I think, you meant tagname1 & 2**5 and it works.

But now I have got opposite question. Is it possible to set/reset bit in byte tag?

Re: Intouch Tags

Posted: Tue Feb 03, 2015 9:05 pm
by apilife
Hi,
You can use bit fields with integer tags.
Thus, with an integer tagname "MyTag", MyTag.00 is the least significant bit and MyTag.31 is the most significant bit.
You can read or write the bit field :

Code: Select all

IF NOT MyTag.05 THEN
    MyTag.05 = 1;
ENDIF;