Managed to sort this.
Realised it was the byte issue where the array in the S7 processor is Motorola format and the WinCC format is Intel so they are in reverse.
So avoid hastle and swapping things around, I am mapping the signals in byte tags.
So created a External "Byte Tag" DB22,DBB0
Then completed the action script e.g.....
short ALM_00_00;
short ALM_00_01;
ALM_00_00=GetTagByte("AL_DB0") & 0x0001 ;
ALM_00_01=GetTagByte("AL_DB0") & 0x0002 ;
SetTagBit("ALM_00_00",ALM_00_00);
SetTagBit("ALM_00_01",ALM_00_01);
All working now!!
Chris White
Control / Software Engineer - Ovivo Water (UK) Ltd.
* All views are my own and not neccesarily the views of Ovivo Water.