Virtual data source, binary tags into word
-
hi,
i needed to manipulate some binary data within the scada that is then encoded into the word...
i.e.
b0-b15 -> w0
so i created a virtual data source, added some binary tags...
then created a meta source word, added the b0-bx as context variables and then did...
value=0;
if (b0.value==1) value=value+1;
if (b1.value==1) value=value+2;
if (b2.value==1) value=value+4;
if (b3.value==1) value=value+8;
return value;
word.value=value;this gave my word value...
then i did a point link between meta source word and real slave device word...
could i have done this in a more economical way?
i did try adding the slave device word with direct binary tags, but it dint like that...
but was quite happy with word to word control
thanks
Nei
-
I can't think of a better way to get it to work. Looks good to me.