Controlling bits in InTouch...

metaller

Member
Join Date
May 2004
Location
Bratislava
Posts
86
Hello there, does anyone know if there is some function in InTouch similar to SeTagBit in WinCC???
I need to control bits in integer or real value...

thx for any help
 
you could use a temp array(16 bits), use the a script & in a loop and the words & set the bit if the corresponding bit is on in the integer.
in vb it could look like this
bitarray array[0..15] \his is your bit fields
temp1 \word for comparison
temp2 \loop count (don't need this but for demo & ease of reading)
anyvariable your 16 bit variable

temp1 = 1 \set bit 0 for and comparison
for temp2 = 0 to 15
if (temp1 & anyvariable) <> 0 then bitarray[temp2] = true
temp1 = temp1 *2 \shift the bit left to test for next bit
next
you could convert this into wonderware script quite easily
 
I used this functionality of .XX a lot in InTouch. Does anyone know how to implement this in ArchestrA. Example: I want to have one Custom Property: Test_Tag (integer) and I want to add animations in ArchestrA Graphics using the bits of this integer. For example, the fill style has to change in a boolean way on the 2nd bit of the integer Test_Tag. It doesn't work with .XX as it used to work in InTouch.

Does anyone have an idea how to solve this?


Thanks in advance.

Michiel
 
Firstly i would start a new thread and not piggyback of another one.

You can set UDT variables to equal bits in word using bitstripping in scripts which is similar to intouch.


Script
ON Word Datachange

MyBoolUDT = Word.01


Reference
You can also use the inputsource but it makes the object "Heavy".
MyBoolUDT.inputsource = Word.01
 

Similar Topics

I have a text display "Word Lamp" that I need to change the background color of if any one of 3 (sometimes 4) PLC bits are ON, and on top of all...
Replies
3
Views
4,119
Afternoon all, I'm working on setting up a large excel recipe table for porting updates through the Linx Gateway RTD/DDE function into my recipe...
Replies
2
Views
110
Compactlogix controller, program has 28 conveyors that use TON's to start the conveyors. The TT sounds a warning horn during start and the DN...
Replies
10
Views
485
I'm a Manufacturing Engineer with limited PLC experience and I am doing some research for our Controls Department. Does anyone have experience...
Replies
4
Views
178
Good Evening , I should know more about Solid State Relays . I have a system with 8) 120 vac Vibrators . These Solid State Relays have...
Replies
24
Views
2,051
Back
Top Bottom